about summary refs log tree commit diff
path: root/nix/hosts
diff options
context:
space:
mode:
authorEmile <git@emile.space>2024-06-09 13:53:47 +0200
committerEmile <git@emile.space>2024-06-09 13:55:50 +0200
commitd182f2bea05f7b54c2d4cd24630df51b56af560d (patch)
tree36b31f2881d92a8f1cdb9dfa2503779baa725f3e /nix/hosts
parent632f530737f29bc65e96208c73d60af8aba7f264 (diff)
minimal config for building a pi1 armv6 image
Diffstat (limited to 'nix/hosts')
-rw-r--r--nix/hosts/pi1/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/nix/hosts/pi1/default.nix b/nix/hosts/pi1/default.nix
new file mode 100644
index 0000000..248b0b8
--- /dev/null
+++ b/nix/hosts/pi1/default.nix
@@ -0,0 +1,32 @@
+# build the sd image for the pi using
+# ; nix-build '<nixpkgs/nixos>' -A config.system.build.sdImage -I nixos-config='./default.nix'
+
+{ lib, ... }:
+
+{
+  imports = [
+    <nixpkgs/nixos/modules/installer/sd-card/sd-image-raspberrypi.nix>
+  ];
+
+  users.users = {
+    root = {
+      isNormalUser = true;
+      home = "/root";
+      hashedPassword = "$y$j9T$gs6PF0Ts247/grRimfCP3.$eKq2l72lLeOrVkCSn.jf1niItuBowtf.QYaLbIHX/C0";
+    };
+  };
+
+  nixpkgs = {
+    crossSystem = lib.systems.examples.raspberryPi;
+    localSystem = { system = "x86_64-linux"; };
+    overlays = [
+      (final: super: {
+        # Due to https://github.com/NixOS/nixpkgs/issues/154163#issuecomment-1350599022
+        makeModulesClosure = x:
+          super.makeModulesClosure (x // { allowMissing = true; });
+      })
+    ];
+  };
+  system.stateVersion = "24.05";
+}
+