From ddfdbeae737b8bda7688f1eb878ba413e2793c0a Mon Sep 17 00:00:00 2001 From: seth Date: Fri, 3 Nov 2023 14:35:29 -0400 Subject: templates/nixos: add justfile and dev shell --- templates/nixos/flake.nix | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'templates/nixos/flake.nix') 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); }; } -- cgit v1.2.3