summaryrefslogtreecommitdiff
path: root/templates/nixos
diff options
context:
space:
mode:
Diffstat (limited to 'templates/nixos')
-rw-r--r--templates/nixos/flake.nix6
-rw-r--r--templates/nixos/justfile7
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)