diff options
Diffstat (limited to 'templates/nixos/flake.nix')
| -rw-r--r-- | templates/nixos/flake.nix | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/templates/nixos/flake.nix b/templates/nixos/flake.nix index 7c3e15d..a8c2e09 100644 --- a/templates/nixos/flake.nix +++ b/templates/nixos/flake.nix @@ -9,11 +9,31 @@ }; }; - outputs = {nixpkgs, ...} @ inputs: { + outputs = {nixpkgs, ...} @ inputs: let + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + + forAllSystems = fn: nixpkgs.lib.genAttrs systems (sys: fn nixpkgs.legacyPackages.${sys}); + in { nixosConfigurations."myHostname" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [./configuration.nix]; specialArgs = {inherit inputs;}; }; + + devShells = forAllSystems (pkgs: { + default = pkgs.mkShell { + packages = with pkgs; [ + just + fzf + ]; + }; + }); + + formatter = forAllSystems (pkgs: pkgs.alejandra); }; } |
