···11name: Validate PR Title
22-32on:
43 pull_request_target:
54 types:
65 - opened
76 - edited
87 - synchronize
99-108jobs:
119 main:
1210 name: 🔦 Validate PR title
+5-7
.gitignore
···11+# Ignore build outputs from performing a nix-build or `nix build` command
12result
22-result/
33-.direnv/
44-.DS_Store
55-.pre-commit-config.yaml
66-logs/
77-.aider*
88-.env
33+result-*
44+55+# Ignore automatically generated direnv output
66+.direnv
+11-1
README.md
···11# nixos-config
22-NixOS configuration for home devices
22+33+## Getting Started (Wireless Local Computer)
44+- Build all packages: `nix-fast-build`
55+- Burn iso to a usb drive: `sudo dd bs=4M conv=fsync oflag=direct status=progress if=result-x86_64-linux.pkgs-node-bootstrap-iso/iso/nixos-25.11.20251204.c97c47f-x86_64-linux.iso of=/dev/sdX`
66+- Plug iso usb drive into computer and boot
77+- Login with user added to bootstrap iso
88+- Run `iwctl` to start wireless connection process
99+ - Run `station list` to get wireless interfaces
1010+ - Run `station <interface> connect <SSID>` to connect to your wireless network
1111+- From another computer, run `nixos-anywhere -f .#<HOST> root@<IP> --phases disko,install,reboot`
1212+ - If necessary generate a facter.json as part of this command by adding `--generate-hardware-config nixos-facter ./hosts/<HOST>/facter.json`
-7
clusters/clusters.nix
···11-# The importApply argument. Use this to reference things defined locally,
22-# as opposed to the flake where this is imported.
33-localFlake:
44-# Regular module arguments; self, inputs, etc all reference the final user flake,
55-# where this module was imported.
66-{inputs, ...}: {
77-}
···11-# Creating a new host
22-33-1. Generate bootable bootstrap image for the new machine:
44-- Ex. x86 VM `nixos-generate -f iso --flake .#nixos-bootstrap --system x84_64-linux -o ./result |& nom`
55-- Ex. Rasperry Pi 4 `nixos-generate -f sd-aarch64 --flake .#nixos-bootstrap --system aarch64-linux -o ./result |& nom`
66-2. Boot the new machine from the generated image.
77-3. Make a new host configuration in the hosts directory, using one of the existing hosts as a template.
88-4. Connect to the new machine via ssh over tailscale: `ssh root@nixos-bootstrap`. If you can't connect, you may need to refresh the tailscale key and rebuild the image.
99-6. Get the ssh keys on the host and add them to [secrets.nix](../secrets/secrets.nix)
1010-7. Re-key the secrets using `agenix -r`
1111-8. Run `lsblk` to identify the disks on the remote machine
1212-9. Configure `devices.nix` in the new host directory to partition the disks as desired
1313-10. Install the configuration on the host using: `nixos-anywhere --flake .#{your-new-hostname} --generate-hardware-config nixos-generate-config ./machines/hosts/{path/to}/hardware-configuration.nix root@nixos-bootstrap`
···11-# Edit this configuration file to define what should be installed on
22-# your system. Help is available in the configuration.nix(5) man page
33-# and in the NixOS manual (accessible by running ‘nixos-help’).
44-{
55- config,
66- pkgs,
77- ...
88-}:
99-with config; {
1010- imports = [
1111- # Include the results of the hardware scan.
1212- ./hardware-configuration.nix
1313- ../../../modules/hardware/raspberry-pi/pi3.nix
1414- ];
1515-1616- networking.hostName = "nixos-rpi3"; # Define your hostname.
1717- networking.hostId = "f06fe3da"; # Generate using `head -c 8 /etc/machine-id`
1818-1919- boot.binfmt.emulatedSystems = ["x86_64-linux"];
2020-2121- # This value determines the NixOS release from which the default
2222- # settings for stateful data, like file locations and database versions
2323- # on your system were taken. It‘s perfectly fine and recommended to leave
2424- # this value at the release version of the first install of this system.
2525- # Before changing this value read the documentation for this option
2626- # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
2727- system.stateVersion = "24.05"; # Did you read the comment?
2828-}
···11-# Do not modify this file! It was generated by ‘nixos-generate-config’
22-# and may be overwritten by future invocations. Please make changes
33-# to /etc/nixos/configuration.nix instead.
44-{
55- config,
66- lib,
77- pkgs,
88- modulesPath,
99- ...
1010-}: {
1111- imports = [
1212- (modulesPath + "/installer/scan/not-detected.nix")
1313- ];
1414-1515- boot.initrd.availableKernelModules = [];
1616- boot.initrd.kernelModules = [];
1717- boot.kernelModules = [];
1818- boot.extraModulePackages = [];
1919-2020- fileSystems."/" = {
2121- device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
2222- fsType = "ext4";
2323- };
2424-2525- swapDevices = [];
2626-2727- # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
2828- # (the default) this is the recommended approach. When using systemd-networkd it's
2929- # still possible to use this option, but it's recommended to use it in conjunction
3030- # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
3131- networking.useDHCP = lib.mkDefault true;
3232- # networking.interfaces.enu1u1.useDHCP = lib.mkDefault true;
3333- # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
3434- # networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
3535-3636- nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
3737-}
···11-# Edit this configuration file to define what should be installed on
22-# your system. Help is available in the configuration.nix(5) man page
33-# and in the NixOS manual (accessible by running ‘nixos-help’).
44-{
55- config,
66- pkgs,
77- ...
88-}:
99-with config; {
1010- imports = [
1111- # Include the results of the hardware scan.
1212- ./hardware-configuration.nix
1313- ../../../modules/hardware/raspberry-pi/pi4.nix
1414- ];
1515-1616- networking.hostName = "nixos-rpi4-1"; # Define your hostname.
1717- networking.hostId = "7fa9d1f9"; # Generate using `head -c 8 /etc/machine-id`
1818-1919- boot.binfmt.emulatedSystems = ["x86_64-linux"];
2020-2121- # This value determines the NixOS release from which the default
2222- # settings for stateful data, like file locations and database versions
2323- # on your system were taken. It‘s perfectly fine and recommended to leave
2424- # this value at the release version of the first install of this system.
2525- # Before changing this value read the documentation for this option
2626- # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
2727- system.stateVersion = "24.05"; # Did you read the comment?
2828-}
···11-# Do not modify this file! It was generated by ‘nixos-generate-config’
22-# and may be overwritten by future invocations. Please make changes
33-# to /etc/nixos/configuration.nix instead.
44-{
55- config,
66- lib,
77- pkgs,
88- modulesPath,
99- ...
1010-}: {
1111- imports = [
1212- (modulesPath + "/installer/scan/not-detected.nix")
1313- ];
1414-1515- boot.initrd.availableKernelModules = ["xhci_pci"];
1616- boot.initrd.kernelModules = [];
1717- boot.kernelModules = [];
1818- boot.extraModulePackages = [];
1919-2020- fileSystems."/" = {
2121- device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
2222- fsType = "ext4";
2323- };
2424-2525- swapDevices = [];
2626-2727- # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
2828- # (the default) this is the recommended approach. When using systemd-networkd it's
2929- # still possible to use this option, but it's recommended to use it in conjunction
3030- # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
3131- networking.useDHCP = lib.mkDefault true;
3232- # networking.interfaces.end0.useDHCP = lib.mkDefault true;
3333- # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
3434- # networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
3535-3636- nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
3737-}
···11-# Edit this configuration file to define what should be installed on
22-# your system. Help is available in the configuration.nix(5) man page
33-# and in the NixOS manual (accessible by running ‘nixos-help’).
44-{
55- config,
66- pkgs,
77- ...
88-}:
99-with config; {
1010- imports = [
1111- # Include the results of the hardware scan.
1212- ./hardware-configuration.nix
1313- ../../../modules/hardware/raspberry-pi/pi4.nix
1414- ];
1515-1616- networking.hostName = "nixos-rpi4-2"; # Define your hostname.
1717- networking.hostId = "b8c9164e"; # Generate using `head -c 8 /etc/machine-id`
1818-1919- boot.binfmt.emulatedSystems = ["x86_64-linux"];
2020-2121- # This value determines the NixOS release from which the default
2222- # settings for stateful data, like file locations and database versions
2323- # on your system were taken. It‘s perfectly fine and recommended to leave
2424- # this value at the release version of the first install of this system.
2525- # Before changing this value read the documentation for this option
2626- # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
2727- system.stateVersion = "24.05"; # Did you read the comment?
2828-}
···11-# Do not modify this file! It was generated by ‘nixos-generate-config’
22-# and may be overwritten by future invocations. Please make changes
33-# to /etc/nixos/configuration.nix instead.
44-{
55- config,
66- lib,
77- pkgs,
88- modulesPath,
99- ...
1010-}: {
1111- imports = [
1212- (modulesPath + "/installer/scan/not-detected.nix")
1313- ];
1414-1515- boot.initrd.availableKernelModules = ["xhci_pci"];
1616- boot.initrd.kernelModules = [];
1717- boot.kernelModules = [];
1818- boot.extraModulePackages = [];
1919-2020- fileSystems."/" = {
2121- device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
2222- fsType = "ext4";
2323- };
2424-2525- swapDevices = [];
2626-2727- # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
2828- # (the default) this is the recommended approach. When using systemd-networkd it's
2929- # still possible to use this option, but it's recommended to use it in conjunction
3030- # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
3131- networking.useDHCP = lib.mkDefault true;
3232- # networking.interfaces.end0.useDHCP = lib.mkDefault true;
3333- # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
3434- # networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
3535-3636- nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
3737-}
···11-# Edit this configuration file to define what should be installed on
22-# your system. Help is available in the configuration.nix(5) man page
33-# and in the NixOS manual (accessible by running ‘nixos-help’).
44-{
55- config,
66- pkgs,
77- ...
88-}:
99-with config; {
1010- imports = [
1111- # Include the results of the hardware scan.
1212- ./hardware-configuration.nix
1313- ../../../modules/hardware/raspberry-pi/pi4.nix
1414- ];
1515-1616- networking.hostName = "nixos-rpi4-3"; # Define your hostname.
1717- networking.hostId = "cb41623f"; # Generate using `head -c 8 /etc/machine-id`
1818-1919- boot.binfmt.emulatedSystems = ["x86_64-linux"];
2020-2121- # This value determines the NixOS release from which the default
2222- # settings for stateful data, like file locations and database versions
2323- # on your system were taken. It‘s perfectly fine and recommended to leave
2424- # this value at the release version of the first install of this system.
2525- # Before changing this value read the documentation for this option
2626- # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
2727- system.stateVersion = "24.05"; # Did you read the comment?
2828-}
···11-# Do not modify this file! It was generated by ‘nixos-generate-config’
22-# and may be overwritten by future invocations. Please make changes
33-# to /etc/nixos/configuration.nix instead.
44-{
55- config,
66- lib,
77- pkgs,
88- modulesPath,
99- ...
1010-}: {
1111- imports = [
1212- (modulesPath + "/installer/scan/not-detected.nix")
1313- ];
1414-1515- boot.initrd.availableKernelModules = ["xhci_pci"];
1616- boot.initrd.kernelModules = [];
1717- boot.kernelModules = [];
1818- boot.extraModulePackages = [];
1919-2020- fileSystems."/" = {
2121- device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
2222- fsType = "ext4";
2323- };
2424-2525- swapDevices = [];
2626-2727- # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
2828- # (the default) this is the recommended approach. When using systemd-networkd it's
2929- # still possible to use this option, but it's recommended to use it in conjunction
3030- # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
3131- networking.useDHCP = lib.mkDefault true;
3232- # networking.interfaces.end0.useDHCP = lib.mkDefault true;
3333- # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
3434- # networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
3535-3636- nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
3737-}
-30
machines/hosts/servers/syno-vm/configuration.nix
···11-# Edit this configuration file to define what should be installed on
22-# your system. Help is available in the configuration.nix(5) man page
33-# and in the NixOS manual (accessible by running ‘nixos-help’).
44-{
55- config,
66- pkgs,
77- ...
88-}:
99-with config; {
1010- imports = [
1111- # Include the results of the hardware scan.
1212- ./hardware-configuration.nix
1313- ];
1414-1515- networking.hostName = "syno-vm"; # Define your hostname.
1616- networking.hostId = "5433dcd9"; # Generate using `head -c 8 /etc/machine-id`
1717-1818- disko.devices = import ./devices.nix;
1919- customBoot.enable = true;
2020-2121- boot.binfmt.emulatedSystems = ["aarch64-linux"];
2222-2323- # This value determines the NixOS release from which the default
2424- # settings for stateful data, like file locations and database versions
2525- # on your system were taken. It‘s perfectly fine and recommended to leave
2626- # this value at the release version of the first install of this system.
2727- # Before changing this value read the documentation for this option
2828- # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
2929- system.stateVersion = "24.05"; # Did you read the comment?
3030-}
···11-# Do not modify this file! It was generated by ‘nixos-generate-config’
22-# and may be overwritten by future invocations. Please make changes
33-# to /etc/nixos/configuration.nix instead.
44-{
55- config,
66- lib,
77- pkgs,
88- modulesPath,
99- ...
1010-}: {
1111- imports = [];
1212-1313- boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
1414- boot.initrd.kernelModules = [];
1515- boot.kernelModules = [];
1616- boot.extraModulePackages = [];
1717-1818- # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
1919- # (the default) this is the recommended approach. When using systemd-networkd it's
2020- # still possible to use this option, but it's recommended to use it in conjunction
2121- # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
2222- networking.useDHCP = lib.mkDefault true;
2323- # networking.interfaces.ens3.useDHCP = lib.mkDefault true;
2424- # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
2525-2626- nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
2727- virtualisation.hypervGuest.enable = true;
2828-}
···11-# Edit this configuration file to define what should be installed on
22-# your system. Help is available in the configuration.nix(5) man page
33-# and in the NixOS manual (accessible by running ‘nixos-help’).
44-{
55- config,
66- pkgs,
77- lib,
88- modulesPath,
99- ...
1010-}:
1111-with config; let
1212- authorizedKeys = [
1313- # user keys from secrets.nix
1414- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICh921bOnrGEySjw/eRrUAj1UbV2sf1YIcm5X74r6gTh"
1515- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOHrxGPx3dgap4sUwWyHbQsMJiv9tSNG05BEMNkNLDZF"
1616- ];
1717-in {
1818- networking.hostName = "nixos-bootstrap"; # Define your hostname.
1919- networking.hostId = "00000000"; # Set placeholder hostid to support zfs
2020-2121- # Authorize with tailscale as a bootstrap node
2222- services.tailscale_user.auth_key = "TODO: tskey-auth-placeholder";
2323-2424- # Enable sshd to generate root keys
2525- services.openssh = {
2626- enable = true;
2727- openFirewall = true;
2828- };
2929- users.users.root.openssh.authorizedKeys.keys = authorizedKeys;
3030-3131- # Enable zfs so disko install works
3232- boot.supportedFilesystems = ["zfs"];
3333-3434- # Prebuild install packages
3535- environment.systemPackages = with pkgs; [
3636- disko
3737- zfs
3838- nix-output-monitor
3939- ];
4040-4141- # This value determines the NixOS release from which the default
4242- # settings for stateful data, like file locations and database versions
4343- # on your system were taken. It‘s perfectly fine and recommended to leave
4444- # this value at the release version of the first install of this system.
4545- # Before changing this value read the documentation for this option
4646- # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
4747- system.stateVersion = "24.05"; # Did you read the comment?
4848-}