aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix41
1 files changed, 26 insertions, 15 deletions
diff --git a/flake.nix b/flake.nix
index 72f753e..8c46e88 100644
--- a/flake.nix
+++ b/flake.nix
@@ -26,18 +26,29 @@
};
};
- outputs = { flake-utils, ... }@inputs:
- flake-utils.lib.eachDefaultSystem (system:
- let pkgs = inputs.nixpkgs.legacyPackages.${system};
- in {
- formatter = pkgs.nixfmt;
- devShells.default =
- pkgs.mkShell { buildInputs = with pkgs; [ git gitui sops ]; };
- }) // {
- nixosConfigurations = let
+ outputs =
+ { flake-utils, ... }@inputs:
+ flake-utils.lib.eachDefaultSystem (
+ system:
+ let
+ pkgs = inputs.nixpkgs.legacyPackages.${system};
+ in
+ {
+ devShells.default = pkgs.mkShell {
+ buildInputs = with pkgs; [
+ git
+ gitui
+ sops
+ nixfmt-rfc-style
+ ];
+ };
+ }
+ )
+ // {
+ nixosConfigurations =
+ let
generateNixosConfig = name: _value: {
- system =
- "x86_64-linux"; # I don't have any other type of machine yet
+ system = "x86_64-linux"; # I don't have any other type of machine yet
modules = with inputs; [
home-manager.nixosModules.home-manager
sops-nix.nixosModules.sops
@@ -54,14 +65,14 @@
};
};
# wrapper around nixpkgs.lib.nixosSystem to enable using it on attrsets
- generateNixosSystem = _name: value:
- inputs.nixpkgs.lib.nixosSystem value;
+ generateNixosSystem = _name: value: inputs.nixpkgs.lib.nixosSystem value;
hosts = builtins.readDir ./hosts;
nixosConfigs = builtins.mapAttrs generateNixosConfig hosts;
# If you want to add something to a particular system, do it here before
# the `in ...` line
- in builtins.mapAttrs generateNixosSystem nixosConfigs;
- };
+ in
+ builtins.mapAttrs generateNixosSystem nixosConfigs;
+ };
}