diff --git a/flake.nix b/flake.nix index 32a274f..63069cd 100644 --- a/flake.nix +++ b/flake.nix @@ -68,7 +68,11 @@ ]; }; - nixosConfigurations."dregil" = import ./hosts/dregil { inherit inputs; }; + nixosConfigurations."dregil" = nixpkgs-unstable.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ ./hosts/dregil ]; + }; homeConfigurations = import ./outputs/homeConfigurations inputs; nixOnDroidConfigurations.default = with inputs; diff --git a/hosts/dregil/default.nix b/hosts/dregil/default.nix index f76b4f6..2f65274 100644 --- a/hosts/dregil/default.nix +++ b/hosts/dregil/default.nix @@ -1,17 +1,12 @@ -{ inputs, ... }: -let - inherit (inputs.nixpkgs-unstable.lib) nixosSystem; - - system = "x86_64-linux"; - - pkgs = import inputs.nixpkgs-unstable { - inherit system; - config = { allowUnfree = true; }; - }; -in nixosSystem { - inherit system pkgs; - specialArgs = { inherit inputs; }; - modules = [ +{ lib, config, pkgs, inputs, ... }: { + imports = [ + ({ inputs, lib, ... }: { + nixpkgs = { + config.allowUnfree = true; + overlays = with inputs; [ emacs.overlay ]; + }; + nix.registry = lib.mapAttrs (_: value: { flake = value; }) inputs; + }) ../../modules/security.nix ../../modules/common-system.nix ./configuration.nix