diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-09-19 16:09:58 +0200 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-09-19 16:09:58 +0200 |
commit | 68d4021eefd60e01402cd5321f00c99c65001390 (patch) | |
tree | 1294671c543e1907420ebf6479700b76412ff0aa /flake.nix | |
parent | Implement host-hardware separation (diff) | |
download | nixos-config-68d4021eefd60e01402cd5321f00c99c65001390.tar.gz nixos-config-68d4021eefd60e01402cd5321f00c99c65001390.tar.bz2 nixos-config-68d4021eefd60e01402cd5321f00c99c65001390.zip |
Misc: Remove code duplication by merging sets
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/flake.nix b/flake.nix index 2becc78..3d8534a 100644 --- a/flake.nix +++ b/flake.nix @@ -31,45 +31,36 @@ outputs = inputs @ { self, nixpkgs, home-manager, ... }: let user = "baitinq"; + commonInherits = { + inherit (nixpkgs) lib; + inherit inputs user nixpkgs home-manager; + extraModules = [ ]; + }; in { - nixosConfigurations = import ./hosts { - isNixOS = true; - extraModules = [ ]; + nixosConfigurations = import ./hosts (commonInherits // { + isNixOS = true; isIso = false; isHardware = true; - inherit (nixpkgs) lib; - inherit inputs user nixpkgs home-manager; - }; + }); - homeConfigurations = import ./hosts { + homeConfigurations = import ./hosts (commonInherits // { isNixOS = false; - extraModules = [ ]; isIso = false; isHardware = false; - #no COde duplication here: TODO - inherit (nixpkgs) lib; - inherit inputs user nixpkgs home-manager; - }; + }); - isoConfigurations = import ./hosts { + isoConfigurations = import ./hosts (commonInherits // { isNixOS = true; - extraModules = [ ]; isIso = true; isHardware = false; user = "nixos"; - #no COde duplication here: TODO - inherit (nixpkgs) lib; - inherit inputs nixpkgs home-manager; - }; + }); - nixosNoHardwareConfigurations = import ./hosts { + nixosNoHardwareConfigurations = import ./hosts (commonInherits // { isNixOS = true; - extraModules = [ ]; isIso = false; isHardware = false; - inherit (nixpkgs) lib; - inherit inputs user nixpkgs home-manager; - }; + }); }; } |