From 53dd78561e26774fec93ce077bd1b415d7ba2709 Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 14 Jan 2025 22:30:29 +0100 Subject: Format flake Signed-off-by: Mel --- flake.nix | 116 ++++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 68 insertions(+), 48 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 0e2c00d..b8e1a8f 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; - - machines = [ - "graphite" - "bismuth" - ]; - - 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; }); - - unstablePkgs = import nixpkgs-unstable commonPkgsInputs; - - auxiliaryPkgs = import ./pkgs { inherit pkgs unstablePkgs; }; - }; - - in { - nixosConfigurations = nixpkgs.lib.genAttrs machines - (machine: nixpkgs.lib.nixosSystem { - inherit system; - - specialArgs = inputs // packageSets // { - me = machine; + outputs = + inputs@{ + self, + nixpkgs, + nixpkgs-unstable, + agenix, + home-manager, + nix-vscode-extensions, + ... + }: + let + system = "x86_64-linux"; + + machines = [ + "graphite" + "bismuth" + ]; + + 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; }); + + unstablePkgs = import nixpkgs-unstable commonPkgsInputs; + + auxiliaryPkgs = import ./pkgs { inherit pkgs unstablePkgs; }; }; - 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; - } - - agenix.nixosModules.default - ]; - } - ); - - # compatibility wrapper for nixos-option - legacyPackages.${system} = with packageSets; pkgs.recurseIntoAttrs pkgs; - }; + in + { + nixosConfigurations = nixpkgs.lib.genAttrs machines ( + machine: + nixpkgs.lib.nixosSystem { + inherit system; + + specialArgs = + inputs + // packageSets + // { + me = 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; + } + + agenix.nixosModules.default + ]; + } + ); + + # compatibility wrapper for nixos-option + legacyPackages.${system} = with packageSets; pkgs.recurseIntoAttrs pkgs; + }; } -- cgit 1.4.1