From 83b8a9d7656cadadf138ef13bf376186d9613f85 Mon Sep 17 00:00:00 2001 From: cy Date: Thu, 23 Jan 2025 16:39:20 -0500 Subject: [PATCH 01/14] pancake: init --- .../workflows/build-machines-and-homes.yml | 1 + flake.lock | 16 +++++ flake.nix | 30 +++++--- hosts/pancake/default.nix | 69 +++++++++++++++++++ hosts/pancake/disk-config.nix | 33 +++++++++ 5 files changed, 141 insertions(+), 8 deletions(-) create mode 100644 hosts/pancake/default.nix create mode 100644 hosts/pancake/disk-config.nix diff --git a/.github/workflows/build-machines-and-homes.yml b/.github/workflows/build-machines-and-homes.yml index e276cbf..f34d785 100644 --- a/.github/workflows/build-machines-and-homes.yml +++ b/.github/workflows/build-machines-and-homes.yml @@ -11,6 +11,7 @@ jobs: - chunk - ytnix - titan + - pancake os: - ubuntu-latest runs-on: ${{ matrix.os }} diff --git a/flake.lock b/flake.lock index 0c81455..e71572c 100644 --- a/flake.lock +++ b/flake.lock @@ -899,6 +899,21 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1737590910, + "narHash": "sha256-qM/y6Dtpu9Wmf5HqeZajQdn+cS0aljdYQQQnrvx+LJE=", + "owner": "nixos", + "repo": "nixos-hardware", + "rev": "9368027715d8dde4b84c79c374948b5306fdd2db", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1726042813, @@ -1207,6 +1222,7 @@ "lix": "lix", "lix-module": "lix-module", "niri": "niri", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_5", "nixpkgs-garage": "nixpkgs-garage", "nixvim": "nixvim", diff --git a/flake.nix b/flake.nix index 77099f8..e76442f 100644 --- a/flake.nix +++ b/flake.nix @@ -68,6 +68,7 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-compat.follows = "flake-compat"; }; + nixos-hardware.url = "github:nixos/nixos-hardware"; nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR @@ -145,9 +146,9 @@ flake = let - pkgs = import nixpkgs { + pkgsFor = system: import nixpkgs { config.allowUnfree = true; - system = "x86_64-linux"; + system = system; overlays = [ inputs.niri.overlays.niri inputs.rust-overlay.overlays.default @@ -164,7 +165,7 @@ specialArgs = { inherit inputs; }; modules = [ { - nixpkgs = { inherit pkgs; }; + nixpkgs.pkgs = pkgsFor "x86_64-linux"; } ./hosts/ytnix inputs.sops-nix.nixosModules.sops @@ -178,7 +179,7 @@ specialArgs = { inherit inputs; }; modules = [ { - nixpkgs = { inherit pkgs; }; + nixpkgs.pkgs = pkgsFor "x86_64-linux"; disabledModules = [ "services/web-servers/garage.nix" ]; @@ -194,7 +195,7 @@ specialArgs = { inherit inputs; }; modules = [ { - nixpkgs = { inherit pkgs; }; + nixpkgs.pkgs = pkgsFor "x86_64-linux"; } ./hosts/titan disko.nixosModules.disko @@ -202,6 +203,19 @@ ./modules ]; }; + + pancake = lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + { + nixpkgs.pkgs = pkgsFor "aarch64-linux"; + } + disko.nixosModules.disko + inputs.nixos-hardware.nixosModules.raspberry-pi-3 + ./hosts/pancake + ./modules + ]; + }; }; homeConfigurations = let @@ -209,7 +223,7 @@ in { "yt@ytnix" = lib.homeManagerConfiguration { - inherit pkgs; + pkgs = pkgsFor "x86_64-linux"; extraSpecialArgs = { inherit inputs; }; modules = [ ./home/yt/ytnix.nix @@ -219,7 +233,7 @@ }; "yt@chunk" = lib.homeManagerConfiguration { - inherit pkgs; + pkgs = pkgsFor "x86_64-linux"; extraSpecialArgs = { inherit inputs; }; modules = [ ./home/yt/chunk.nix @@ -228,7 +242,7 @@ }; "codespace@codespace" = lib.homeManagerConfiguration { - inherit pkgs; + pkgs = pkgsFor "x86_64-linux"; extraSpecialArgs = { inherit inputs; }; modules = [ ./home/yt/codespace.nix diff --git a/hosts/pancake/default.nix b/hosts/pancake/default.nix new file mode 100644 index 0000000..9fd7f4f --- /dev/null +++ b/hosts/pancake/default.nix @@ -0,0 +1,69 @@ +{ + modulesPath, + pkgs, + ... +}: +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + (modulesPath + "/profiles/qemu-guest.nix") + ../common.nix + ./disk-config.nix + ./hardware-configuration.nix + ]; + + services.openssh = { + enable = true; + settings.PasswordAuthentication = false; + }; + + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPdhAQYy0+vS+QmyCd0MAbqbgzyMGcsuuFyf6kg2yKge yt@ytlinux" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINyn2+OoRN4nExti+vFQ1NHEZip0slAoCH9C5/FzvgZD yt@ytnix" + ]; + + system.stateVersion = "24.05"; + + environment.systemPackages = with pkgs; [ + curl + git + ]; + + # network stuff + networking.hostName = "pancake"; + networking.networkmanager.enable = true; + networking.firewall = { + enable = true; + allowedTCPPorts = [ + 22 + 80 + 443 + ]; + allowedUDPPorts = [ + 443 + ]; + }; + + networkings.wireless.enable = true; + networkings.wireless.networks = { + "36 Halsey" = { + psk = "Canada2022"; + }; + "cy" = { + psk = "12345678"; + }; + }; + + hardware.enableRedistributableFirmware = true; + + services.desktopManager.plasma6.enable = true; + services.displayManager = { + enable = true; + autoLogin.user = "yt"; + }; + users.users.yt.extraGroups = [ + "wheel" + ]; + security.sudo.enable = true; + security.sudo.wheelNeedsPassword = false; +} diff --git a/hosts/pancake/disk-config.nix b/hosts/pancake/disk-config.nix new file mode 100644 index 0000000..1d3855b --- /dev/null +++ b/hosts/pancake/disk-config.nix @@ -0,0 +1,33 @@ +{ + disko.devices = { + disk = { + main = { + device = "/dev/mmcblk0"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + type = "EF00"; + size = "500M"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +} From d866d9c0e345a147fe55f661bcf72e9c6fd059f5 Mon Sep 17 00:00:00 2001 From: cy Date: Thu, 23 Jan 2025 17:27:12 -0500 Subject: [PATCH 02/14] add hardware-config for pancake --- hosts/pancake/hardware-configuration.nix | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 hosts/pancake/hardware-configuration.nix diff --git a/hosts/pancake/hardware-configuration.nix b/hosts/pancake/hardware-configuration.nix new file mode 100644 index 0000000..e4ee4f4 --- /dev/null +++ b/hosts/pancake/hardware-configuration.nix @@ -0,0 +1,38 @@ +# 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 = [ ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/cb6f0e18-5add-4177-ab98-e9f0235e06b3"; + fsType = "ext4"; + }; + + fileSystems."/boot/firmware" = + { device = "/dev/disk/by-uuid/D3E6-3F09"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eth0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlan0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +} From f3b7da291897e2c8c90beb0d9ab9f40a7aaf6c25 Mon Sep 17 00:00:00 2001 From: cy Date: Thu, 23 Jan 2025 17:50:38 -0500 Subject: [PATCH 03/14] fix typo and bootloader path --- hosts/pancake/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hosts/pancake/default.nix b/hosts/pancake/default.nix index 9fd7f4f..ae3145e 100644 --- a/hosts/pancake/default.nix +++ b/hosts/pancake/default.nix @@ -44,8 +44,8 @@ ]; }; - networkings.wireless.enable = true; - networkings.wireless.networks = { + networking.wireless.enable = true; + networking.wireless.networks = { "36 Halsey" = { psk = "Canada2022"; }; @@ -66,4 +66,10 @@ ]; security.sudo.enable = true; security.sudo.wheelNeedsPassword = false; + users.users.root.initialHashedPassword = ""; + users.users.yt.initialHashedPassword = ""; + + boot.loader.generic-extlinux-compatible.mirroredBoots = [ + { path = "/boot/firmware"; } + ]; } From b5796b3c2383b55dae18786e319b5c53ce5e5e53 Mon Sep 17 00:00:00 2001 From: cy Date: Thu, 23 Jan 2025 18:06:38 -0500 Subject: [PATCH 04/14] try to fix everything --- flake.nix | 1 - hosts/common.nix | 2 -- hosts/pancake/default.nix | 3 +-- hosts/pancake/disk-config.nix | 33 --------------------------------- 4 files changed, 1 insertion(+), 38 deletions(-) delete mode 100644 hosts/pancake/disk-config.nix diff --git a/flake.nix b/flake.nix index e76442f..d36eb5c 100644 --- a/flake.nix +++ b/flake.nix @@ -210,7 +210,6 @@ { nixpkgs.pkgs = pkgsFor "aarch64-linux"; } - disko.nixosModules.disko inputs.nixos-hardware.nixosModules.raspberry-pi-3 ./hosts/pancake ./modules diff --git a/hosts/common.nix b/hosts/common.nix index 2e8b31a..5303739 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -9,8 +9,6 @@ "root" "@wheel" ]; - trusted-public-keys = [ "central:uWhjva6m6dhC2hqNisjn2hXGvdGBs19vPkA1dPEuwFg=" ]; - substituters = [ "https://cache.cything.io/central" ]; }; channel.enable = false; optimise = { diff --git a/hosts/pancake/default.nix b/hosts/pancake/default.nix index ae3145e..628d171 100644 --- a/hosts/pancake/default.nix +++ b/hosts/pancake/default.nix @@ -8,8 +8,8 @@ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/profiles/qemu-guest.nix") ../common.nix - ./disk-config.nix ./hardware-configuration.nix + ../zsh.nix ]; services.openssh = { @@ -31,7 +31,6 @@ # network stuff networking.hostName = "pancake"; - networking.networkmanager.enable = true; networking.firewall = { enable = true; allowedTCPPorts = [ diff --git a/hosts/pancake/disk-config.nix b/hosts/pancake/disk-config.nix deleted file mode 100644 index 1d3855b..0000000 --- a/hosts/pancake/disk-config.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - disko.devices = { - disk = { - main = { - device = "/dev/mmcblk0"; - type = "disk"; - content = { - type = "gpt"; - partitions = { - ESP = { - type = "EF00"; - size = "500M"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; - }; - }; - root = { - size = "100%"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; - }; - }; - }; - }; - }; - }; -} From af950da1f59b227f045c7387064133ae15ca981f Mon Sep 17 00:00:00 2001 From: cy Date: Thu, 23 Jan 2025 18:07:38 -0500 Subject: [PATCH 05/14] also build machines on arm cuz we have pi now --- .github/workflows/build-machines-and-homes.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-machines-and-homes.yml b/.github/workflows/build-machines-and-homes.yml index f34d785..768a3c5 100644 --- a/.github/workflows/build-machines-and-homes.yml +++ b/.github/workflows/build-machines-and-homes.yml @@ -14,6 +14,7 @@ jobs: - pancake os: - ubuntu-latest + - ubuntu-24.04-arm runs-on: ${{ matrix.os }} continue-on-error: true steps: From 00e6f6267b7de4b1051d73e660145ac1db853264 Mon Sep 17 00:00:00 2001 From: cy Date: Thu, 23 Jan 2025 18:30:37 -0500 Subject: [PATCH 06/14] apply rpi config error fix --- flake.lock | 17 +++++++++++++++++ flake.nix | 1 + hosts/pancake/default.nix | 5 +++++ 3 files changed, 23 insertions(+) diff --git a/flake.lock b/flake.lock index e71572c..2acaba0 100644 --- a/flake.lock +++ b/flake.lock @@ -962,6 +962,22 @@ "type": "github" } }, + "nixpkgs-rpi": { + "locked": { + "lastModified": 1737645144, + "narHash": "sha256-QPTPf1ccrGTIgKA+/a3MIqrKiUbxhUSRUCQll86kUl8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d4e529a24b66b0341f2b866c5abe3ad8a96be2d7", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d4e529a24b66b0341f2b866c5abe3ad8a96be2d7", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1724316499, @@ -1225,6 +1241,7 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_5", "nixpkgs-garage": "nixpkgs-garage", + "nixpkgs-rpi": "nixpkgs-rpi", "nixvim": "nixvim", "nvim-github-theme": "nvim-github-theme", "rust-overlay": "rust-overlay", diff --git a/flake.nix b/flake.nix index d36eb5c..920750a 100644 --- a/flake.nix +++ b/flake.nix @@ -69,6 +69,7 @@ inputs.flake-compat.follows = "flake-compat"; }; nixos-hardware.url = "github:nixos/nixos-hardware"; + nixpkgs-rpi.url = "github:nixos/nixpkgs/d4e529a24b66b0341f2b866c5abe3ad8a96be2d7"; nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR diff --git a/hosts/pancake/default.nix b/hosts/pancake/default.nix index 628d171..221b3dc 100644 --- a/hosts/pancake/default.nix +++ b/hosts/pancake/default.nix @@ -1,6 +1,8 @@ { modulesPath, pkgs, + lib, + inputs, ... }: { @@ -71,4 +73,7 @@ boot.loader.generic-extlinux-compatible.mirroredBoots = [ { path = "/boot/firmware"; } ]; + + # remove this after https://github.com/NixOS/nixpkgs/pull/375165 lands on unstable + boot.kernelPackages = lib.mkForce inputs.nixpkgs-rpi.legacyPackages.aarch64-linux.linuxKernel.packages.linux_rpi3; } From 6b0dbd43468aaac527b2bb71472e7012ea67064a Mon Sep 17 00:00:00 2001 From: cy Date: Fri, 24 Jan 2025 04:33:15 -0500 Subject: [PATCH 07/14] new hardware-configuration --- hosts/pancake/hardware-configuration.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hosts/pancake/hardware-configuration.nix b/hosts/pancake/hardware-configuration.nix index e4ee4f4..455ba76 100644 --- a/hosts/pancake/hardware-configuration.nix +++ b/hosts/pancake/hardware-configuration.nix @@ -14,17 +14,19 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/cb6f0e18-5add-4177-ab98-e9f0235e06b3"; + { device = "/dev/disk/by-uuid/b84680de-5010-457a-9be8-8867571119fc"; fsType = "ext4"; }; - fileSystems."/boot/firmware" = - { device = "/dev/disk/by-uuid/D3E6-3F09"; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/CD4A-62EC"; fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; + options = [ "fmask=0077" "dmask=0077" ]; }; - swapDevices = [ ]; + swapDevices = + [ { device = "/dev/disk/by-uuid/8ffcfec9-0e05-41a0-bdb6-b34c8259eca0"; } + ]; # 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 @@ -32,6 +34,7 @@ # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; # networking.interfaces.eth0.useDHCP = lib.mkDefault true; + # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true; # networking.interfaces.wlan0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; From a63edffc05e0c9819f3809361f3958f7d49732b5 Mon Sep 17 00:00:00 2001 From: cy Date: Fri, 24 Jan 2025 04:36:13 -0500 Subject: [PATCH 08/14] fix boot location --- hosts/pancake/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hosts/pancake/default.nix b/hosts/pancake/default.nix index 221b3dc..091c365 100644 --- a/hosts/pancake/default.nix +++ b/hosts/pancake/default.nix @@ -70,10 +70,6 @@ users.users.root.initialHashedPassword = ""; users.users.yt.initialHashedPassword = ""; - boot.loader.generic-extlinux-compatible.mirroredBoots = [ - { path = "/boot/firmware"; } - ]; - # remove this after https://github.com/NixOS/nixpkgs/pull/375165 lands on unstable boot.kernelPackages = lib.mkForce inputs.nixpkgs-rpi.legacyPackages.aarch64-linux.linuxKernel.packages.linux_rpi3; } From 2d0c49f55bbc12434dd626037364a1ba0ef9f2ed Mon Sep 17 00:00:00 2001 From: cy Date: Fri, 24 Jan 2025 04:40:22 -0500 Subject: [PATCH 09/14] rm plasma and up stateversion --- hosts/pancake/default.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hosts/pancake/default.nix b/hosts/pancake/default.nix index 091c365..1b75f5b 100644 --- a/hosts/pancake/default.nix +++ b/hosts/pancake/default.nix @@ -24,7 +24,7 @@ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINyn2+OoRN4nExti+vFQ1NHEZip0slAoCH9C5/FzvgZD yt@ytnix" ]; - system.stateVersion = "24.05"; + system.stateVersion = "24.11"; environment.systemPackages = with pkgs; [ curl @@ -57,11 +57,6 @@ hardware.enableRedistributableFirmware = true; - services.desktopManager.plasma6.enable = true; - services.displayManager = { - enable = true; - autoLogin.user = "yt"; - }; users.users.yt.extraGroups = [ "wheel" ]; From 300a6b2171ff9663e814c1d9eece00a83e93f957 Mon Sep 17 00:00:00 2001 From: cy Date: Fri, 24 Jan 2025 12:23:03 -0500 Subject: [PATCH 10/14] add nixos-generators module Signed-off-by: cy --- .github/workflows/build-packages.yml | 9 +++++-- flake.lock | 37 ++++++++++++++++++++++++++++ flake.nix | 7 +++++- hosts/pancake/default.nix | 2 +- hosts/ytnix/tailscale.nix | 2 +- 5 files changed, 52 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 4408d30..b5defcf 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -23,10 +23,11 @@ jobs: steps: - name: Install Nix uses: cachix/install-nix-action@v30 + with: + install_url: https://releases.nixos.org/nix/nix-2.25.4/install + extra_nix_config: 'accept-flake-config = true' - name: Sync repository uses: actions/checkout@v4 - with: - persist-credentials: false - uses: cachix/cachix-action@v14 with: name: cything @@ -57,3 +58,7 @@ jobs: # always save the cache save-always: true - run: nix build -L ${{ matrix.package }} + - uses: actions/upload-artifact@v4 + with: + name: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', 'flake.lock') }} + path: result/ diff --git a/flake.lock b/flake.lock index 2acaba0..2eb0b8a 100644 --- a/flake.lock +++ b/flake.lock @@ -899,6 +899,42 @@ "type": "github" } }, + "nixlib": { + "locked": { + "lastModified": 1736643958, + "narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixos-generators": { + "inputs": { + "nixlib": "nixlib", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737057290, + "narHash": "sha256-3Pe0yKlCc7EOeq1X/aJVDH0CtNL+tIBm49vpepwL1MQ=", + "owner": "nix-community", + "repo": "nixos-generators", + "rev": "d002ce9b6e7eb467cd1c6bb9aef9c35d191b5453", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixos-generators", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1737590910, @@ -1238,6 +1274,7 @@ "lix": "lix", "lix-module": "lix-module", "niri": "niri", + "nixos-generators": "nixos-generators", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_5", "nixpkgs-garage": "nixpkgs-garage", diff --git a/flake.nix b/flake.nix index 920750a..bb84cdb 100644 --- a/flake.nix +++ b/flake.nix @@ -69,8 +69,12 @@ inputs.flake-compat.follows = "flake-compat"; }; nixos-hardware.url = "github:nixos/nixos-hardware"; - nixpkgs-rpi.url = "github:nixos/nixpkgs/d4e529a24b66b0341f2b866c5abe3ad8a96be2d7"; + nixos-generators = { + url = "github:nix-community/nixos-generators"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixpkgs-rpi.url = "github:nixos/nixpkgs/d4e529a24b66b0341f2b866c5abe3ad8a96be2d7"; nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR nvim-github-theme = { @@ -212,6 +216,7 @@ nixpkgs.pkgs = pkgsFor "aarch64-linux"; } inputs.nixos-hardware.nixosModules.raspberry-pi-3 + inputs.nixos-generators.nixosModules.all-formats ./hosts/pancake ./modules ]; diff --git a/hosts/pancake/default.nix b/hosts/pancake/default.nix index 1b75f5b..e6d4415 100644 --- a/hosts/pancake/default.nix +++ b/hosts/pancake/default.nix @@ -10,7 +10,7 @@ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/profiles/qemu-guest.nix") ../common.nix - ./hardware-configuration.nix + # ./hardware-configuration.nix ../zsh.nix ]; diff --git a/hosts/ytnix/tailscale.nix b/hosts/ytnix/tailscale.nix index 71d47c8..21504e7 100644 --- a/hosts/ytnix/tailscale.nix +++ b/hosts/ytnix/tailscale.nix @@ -1,6 +1,6 @@ { config, ... }: { services.tailscale = { - enable = true; + enable = false; authKeyFile = config.sops.secrets."tailscale/auth".path; openFirewall = true; useRoutingFeatures = "client"; From aa9c18940e5b71c2023a6157f541204805120fb9 Mon Sep 17 00:00:00 2001 From: cy Date: Fri, 24 Jan 2025 12:48:43 -0500 Subject: [PATCH 11/14] just build from master now --- flake.lock | 7 +++---- flake.nix | 2 +- hosts/pancake/default.nix | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 2eb0b8a..7234057 100644 --- a/flake.lock +++ b/flake.lock @@ -1112,16 +1112,15 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1737642748, - "narHash": "sha256-VsCzuoavNERLs46aw38nmORT4F5pLOZDDe2bzFo+jsE=", + "lastModified": 1737740540, + "narHash": "sha256-BMzjwypS9StiHbGV4INlirX3mzF+HvDOKHhb7+3Kqdo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "864f89f98b0b4e1bbcb762b025fd83da8bc1bae0", + "rev": "b376e96f521d932948aa3a62f7878bce3d26ef11", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-unstable-small", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index bb84cdb..742a82b 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "cy's flake"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; + nixpkgs.url = "github:nixos/nixpkgs"; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/pancake/default.nix b/hosts/pancake/default.nix index e6d4415..1871df6 100644 --- a/hosts/pancake/default.nix +++ b/hosts/pancake/default.nix @@ -66,5 +66,5 @@ users.users.yt.initialHashedPassword = ""; # remove this after https://github.com/NixOS/nixpkgs/pull/375165 lands on unstable - boot.kernelPackages = lib.mkForce inputs.nixpkgs-rpi.legacyPackages.aarch64-linux.linuxKernel.packages.linux_rpi3; + # boot.kernelPackages = lib.mkForce inputs.nixpkgs-rpi.legacyPackages.aarch64-linux.linuxKernel.packages.linux_rpi3; } From 2c052c5d0c45554548bdd3960f10d5e02639f2af Mon Sep 17 00:00:00 2001 From: cy Date: Fri, 24 Jan 2025 12:50:40 -0500 Subject: [PATCH 12/14] fix workflow --- .github/workflows/build-packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index b5defcf..8b19434 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -44,7 +44,7 @@ jobs: uses: nix-community/cache-nix-action@v5.1.0 with: # restore and save a cache using this key - primary-key: nix-${{ runner.os }}-${{ matrix.package }}-${{ hashFiles('**/*.nix', 'flake.lock') }} + primary-key: nix-${{ matrix.os }}-${{ matrix.package }}-${{ hashFiles('**/*.nix', 'flake.lock') }} # if there's no cache hit, restore a cache by this prefix restore-prefixes-first-match: nix-${{ runner.os }}-${{ matrix.package }}- # do purge caches @@ -60,5 +60,5 @@ jobs: - run: nix build -L ${{ matrix.package }} - uses: actions/upload-artifact@v4 with: - name: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', 'flake.lock') }} + name: nix-${{ matrix.os }}-${{ hashFiles('**/*.nix', 'flake.lock') }} path: result/ From 50414e5401182429d749af04f864203cc3305283 Mon Sep 17 00:00:00 2001 From: cy Date: Fri, 24 Jan 2025 12:59:15 -0500 Subject: [PATCH 13/14] maybe not --- hosts/pancake/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/pancake/default.nix b/hosts/pancake/default.nix index 1871df6..e6d4415 100644 --- a/hosts/pancake/default.nix +++ b/hosts/pancake/default.nix @@ -66,5 +66,5 @@ users.users.yt.initialHashedPassword = ""; # remove this after https://github.com/NixOS/nixpkgs/pull/375165 lands on unstable - # boot.kernelPackages = lib.mkForce inputs.nixpkgs-rpi.legacyPackages.aarch64-linux.linuxKernel.packages.linux_rpi3; + boot.kernelPackages = lib.mkForce inputs.nixpkgs-rpi.legacyPackages.aarch64-linux.linuxKernel.packages.linux_rpi3; } From 77713b0a943e9a44170d220858845d52b2d94067 Mon Sep 17 00:00:00 2001 From: cy Date: Fri, 24 Jan 2025 13:06:17 -0500 Subject: [PATCH 14/14] downgrade rpi more --- flake.lock | 8 ++++---- flake.nix | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 7234057..57f3f03 100644 --- a/flake.lock +++ b/flake.lock @@ -1000,17 +1000,17 @@ }, "nixpkgs-rpi": { "locked": { - "lastModified": 1737645144, - "narHash": "sha256-QPTPf1ccrGTIgKA+/a3MIqrKiUbxhUSRUCQll86kUl8=", + "lastModified": 1730668999, + "narHash": "sha256-nxJmfy9l20Ow6rsVtdMWZhi+e36AXmC/aZpg+tHjCoY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d4e529a24b66b0341f2b866c5abe3ad8a96be2d7", + "rev": "68f4d47d0c18eac85d7c654d3f12c756cc1a48a2", "type": "github" }, "original": { "owner": "nixos", "repo": "nixpkgs", - "rev": "d4e529a24b66b0341f2b866c5abe3ad8a96be2d7", + "rev": "68f4d47d0c18eac85d7c654d3f12c756cc1a48a2", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 742a82b..d1e6839 100644 --- a/flake.nix +++ b/flake.nix @@ -74,7 +74,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - nixpkgs-rpi.url = "github:nixos/nixpkgs/d4e529a24b66b0341f2b866c5abe3ad8a96be2d7"; + nixpkgs-rpi.url = "github:nixos/nixpkgs/68f4d47d0c18eac85d7c654d3f12c756cc1a48a2"; nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR nvim-github-theme = {