diff options
| author | seth <[email protected]> | 2024-10-16 21:18:46 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-10-16 23:23:33 -0400 |
| commit | 19b64bed1e31489de83f0c7d1b0ec1e77e3f7c49 (patch) | |
| tree | ab2d101836db1d44f09996a9bea7469dfe2ec80d /templates/nixos | |
| parent | 43d30b3ea28ab03a2e6da5101dc2b84918f18c51 (diff) | |
templates: cleanup
Diffstat (limited to 'templates/nixos')
| -rw-r--r-- | templates/nixos/flake.nix | 6 | ||||
| -rw-r--r-- | templates/nixos/justfile | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/templates/nixos/flake.nix b/templates/nixos/flake.nix index 2f4f57f..f78331c 100644 --- a/templates/nixos/flake.nix +++ b/templates/nixos/flake.nix @@ -1,5 +1,5 @@ { - description = "my cool flake"; + description = "My cool Nix Flake"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; @@ -14,6 +14,7 @@ { self, nixpkgs, ... }@inputs: let inherit (nixpkgs) lib; + systems = [ "x86_64-linux" "aarch64-linux" @@ -22,7 +23,7 @@ ]; forAllSystems = lib.genAttrs systems; - nixpkgsFor = forAllSystems (system: nixpkgs.legacyPackages.${system}); + nixpkgsFor = nixpkgs.legacyPackages; in { nixosConfigurations.myComputer = nixpkgs.lib.nixosSystem { @@ -43,6 +44,7 @@ packages = [ pkgs.fzf pkgs.just + # Lets you run `nixfmt` to format all of your files self.formatter.${system} ]; diff --git a/templates/nixos/justfile b/templates/nixos/justfile index a6f8655..5b524fb 100644 --- a/templates/nixos/justfile +++ b/templates/nixos/justfile @@ -1,5 +1,5 @@ -alias b := boot -alias s := switch +alias bo := boot +alias bu := build alias sw := switch alias t := test @@ -15,6 +15,9 @@ rebuild subcmd *args="": # Switch to your new configuration when you reboot boot *args="": (rebuild "boot" args) +# Build your new configuration +build *args="": (rebuild "build" args) + # Immediately switch to your new configuration switch *args="": (rebuild "switch" args) |
