diff options
| -rw-r--r-- | flake.nix | 98 |
1 files changed, 59 insertions, 39 deletions
@@ -23,54 +23,74 @@ flake-compat.url = "github:edolstra/flake-compat"; }; - outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, agenix, home-manager, nix-vscode-extensions, ... }: - let - system = "x86_64-linux"; + outputs = + inputs@{ + self, + nixpkgs, + nixpkgs-unstable, + agenix, + home-manager, + nix-vscode-extensions, + ... + }: + let + system = "x86_64-linux"; - machines = [ - "graphite" - "bismuth" - ]; + machines = [ + "graphite" + "bismuth" + ]; - overlays = [ - agenix.overlays.default - nix-vscode-extensions.overlays.default - ]; + overlays = [ + agenix.overlays.default + nix-vscode-extensions.overlays.default + ]; - packageSets = let - commonPkgsInputs = { inherit system; config = import ./config.nix; }; - in rec { - pkgs = import nixpkgs (commonPkgsInputs // { inherit overlays; }); + packageSets = + let + commonPkgsInputs = { + inherit system; + config = import ./config.nix; + }; + in + rec { + pkgs = import nixpkgs (commonPkgsInputs // { inherit overlays; }); - unstablePkgs = import nixpkgs-unstable commonPkgsInputs; + unstablePkgs = import nixpkgs-unstable commonPkgsInputs; - auxiliaryPkgs = import ./pkgs { inherit pkgs unstablePkgs; }; - }; + auxiliaryPkgs = import ./pkgs { inherit pkgs unstablePkgs; }; + }; - in { - nixosConfigurations = nixpkgs.lib.genAttrs machines - (machine: nixpkgs.lib.nixosSystem { - inherit system; + in + { + nixosConfigurations = nixpkgs.lib.genAttrs machines ( + machine: + nixpkgs.lib.nixosSystem { + inherit system; - specialArgs = inputs // packageSets // { - me = machine; - }; + specialArgs = + inputs + // packageSets + // { + me = machine; + }; - modules = [ - ./machines/${machine} + modules = [ + ./machines/${machine} - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.mel = import ./machines/${machine}/home.nix; - } + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.mel = import ./machines/${machine}/home.nix; + } - agenix.nixosModules.default - ]; - } - ); + agenix.nixosModules.default + ]; + } + ); - # compatibility wrapper for nixos-option - legacyPackages.${system} = with packageSets; pkgs.recurseIntoAttrs pkgs; - }; + # compatibility wrapper for nixos-option + legacyPackages.${system} = with packageSets; pkgs.recurseIntoAttrs pkgs; + }; } |
