summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Finlinson <devin.finlinson@pm.me>2025-05-18 05:54:58 -0600
committerDevin Finlinson <devin.finlinson@pm.me>2025-05-18 05:54:58 -0600
commit7d7f5905769c488d2129b2ec0ade6451f0765d84 (patch)
tree6fada6c454007e1d2072c452391fbbdc23e36a5f
parentbdab6795e4d3d881aef2b0ead2e2cdf323b76ef9 (diff)
finally got nixos-generators to work
-rw-r--r--flake.nix2
-rw-r--r--machines/iso/configuration.nix3
-rw-r--r--machines/iso/hardware-configuration.nix35
-rw-r--r--machines/khad/default.nix1
-rw-r--r--machines/picast/default.nix10
-rw-r--r--machines/picast/hardware-configuration.nix9
6 files changed, 51 insertions, 9 deletions
diff --git a/flake.nix b/flake.nix
index 4571a0f..37c8b79 100644
--- a/flake.nix
+++ b/flake.nix
@@ -289,7 +289,7 @@
};
live = lib.nixosSystem {
modules = minimalHomeManagerSettings ++ [
- (nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix")
+ # (nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix")
./machines/iso/configuration.nix
./modules/users/defin.nix
./modules/nixos/system-packages.nix
diff --git a/machines/iso/configuration.nix b/machines/iso/configuration.nix
index ee400d3..29b429a 100644
--- a/machines/iso/configuration.nix
+++ b/machines/iso/configuration.nix
@@ -1,4 +1,7 @@
{ ... }: {
+ imports = [
+ ./hardware-configuration.nix
+ ];
nixpkgs = {
config.allowUnfree = true;
};
diff --git a/machines/iso/hardware-configuration.nix b/machines/iso/hardware-configuration.nix
new file mode 100644
index 0000000..78601ad
--- /dev/null
+++ b/machines/iso/hardware-configuration.nix
@@ -0,0 +1,35 @@
+# hardware-configuration.nix
+
+# Do not modify this file! It was generated by ‘nixos-generate-config’
+# and may be overwritten by future invocations. Please make changes
+# to /etc/nixos/configuration.nix instead.
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+ imports =
+ [ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
+
+ boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-label/NIXOS_SD"; # this is important!
+ fsType = "ext4";
+ options = [ "noatime" ];
+ };
+
+ swapDevices = [ ];
+
+ # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+ # (the default) this is the recommended approach. When using systemd-networkd it's
+ # still possible to use this option, but it's recommended to use it in conjunction
+ # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+ networking.useDHCP = lib.mkDefault true;
+ # networking.interfaces.end0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
+}
diff --git a/machines/khad/default.nix b/machines/khad/default.nix
index f28fdbe..cd6f22f 100644
--- a/machines/khad/default.nix
+++ b/machines/khad/default.nix
@@ -33,6 +33,7 @@
};
kernelPackages = pkgs.linuxPackages_latest; # use latest kernel
};
+ boot.binfmt.emulatedSystems = ["aarch64-linux"];
hardware.onlykey.enable = true;
networking.hostName = "khad"; # Define your hostname.
diff --git a/machines/picast/default.nix b/machines/picast/default.nix
index e99a15b..bf0beac 100644
--- a/machines/picast/default.nix
+++ b/machines/picast/default.nix
@@ -12,7 +12,7 @@
../../modules/nixos/nix-common.nix
../../modules/nixos/environment.nix
../../modules/nixos/tailscale.nix
- ../../modules/nixos/cgit.nix
+ # ../../modules/nixos/cgit.nix
../../modules/nixos/system-packages.nix
../../modules/users/defin.nix
../../modules/users/root.nix
@@ -23,13 +23,13 @@
# Enables the generation of /boot/extlinux/extlinux.conf
boot.loader.generic-extlinux-compatible.enable = true;
- # networking.hostName = "nixos"; # Define your hostname.
+ networking.hostName = "picast"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Set your time zone.
- # time.timeZone = "Europe/Amsterdam";
+ time.timeZone = "America/Denver";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
@@ -70,7 +70,7 @@
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
- # programs.mtr.enable = true;
+ programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
@@ -106,7 +106,7 @@
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
- system.stateVersion = "24.05"; # Did you read the comment?
+ system.stateVersion = "24.11"; # Did you read the comment?
}
diff --git a/machines/picast/hardware-configuration.nix b/machines/picast/hardware-configuration.nix
index 3f13493..78601ad 100644
--- a/machines/picast/hardware-configuration.nix
+++ b/machines/picast/hardware-configuration.nix
@@ -1,3 +1,5 @@
+# hardware-configuration.nix
+
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
@@ -8,14 +10,15 @@
[ (modulesPath + "/installer/scan/not-detected.nix")
];
- boot.initrd.availableKernelModules = [ ];
+ boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
- { device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
+ { device = "/dev/disk/by-label/NIXOS_SD"; # this is important!
fsType = "ext4";
+ options = [ "noatime" ];
};
swapDevices = [ ];
@@ -25,7 +28,7 @@
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
- # networking.interfaces.enu1u1.useDHCP = lib.mkDefault true;
+ # networking.interfaces.end0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";