diff --git a/flake.lock b/flake.lock index df9c9ff..ae58990 100755 --- a/flake.lock +++ b/flake.lock @@ -1614,6 +1614,27 @@ "type": "github" } }, + "pi5-disko": { + "inputs": { + "nixpkgs": [ + "pi5-nixpkgs" + ] + }, + "locked": { + "lastModified": 1742690494, + "narHash": "sha256-SFacEbSRMoTyWG5VXh4ieofJGge+cLq9lH8ifB+zjBg=", + "owner": "nvmd", + "repo": "disko", + "rev": "9dc58d4d49c9f74623a06e2fc20cdfd8bb3cbe8b", + "type": "github" + }, + "original": { + "owner": "nvmd", + "ref": "gpt-attrs", + "repo": "disko", + "type": "github" + } + }, "pi5-home-manager": { "inputs": { "nixpkgs": [ @@ -1621,11 +1642,11 @@ ] }, "locked": { - "lastModified": 1749400020, - "narHash": "sha256-0nTmHO8AYgRYk5v6zw5oZ3x9nh+feb+Isn7WNe318M0=", + "lastModified": 1749499854, + "narHash": "sha256-V1BgwiX8NjbRreU6LC2EzmuqFSQAHhoSeNlYJyZ40NE=", "owner": "nix-community", "repo": "home-manager", - "rev": "2835e8ba0ad99ba86d4a5e497a962ec9fa35e48f", + "rev": "1df816c407d3a5090c8496c9b00170af7891f021", "type": "github" }, "original": { @@ -1868,6 +1889,7 @@ "pi4-nixos-raspberrypi": "pi4-nixos-raspberrypi", "pi4-nixpkgs": "pi4-nixpkgs", "pi4-sops-nix": "pi4-sops-nix", + "pi5-disko": "pi5-disko", "pi5-home-manager": "pi5-home-manager", "pi5-impermanence": "pi5-impermanence", "pi5-nixos-hardware": "pi5-nixos-hardware", diff --git a/flake.nix b/flake.nix index 475a41f..d0688fe 100755 --- a/flake.nix +++ b/flake.nix @@ -156,6 +156,13 @@ nas-nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions"; + pi5-disko = { + # the fork is needed for partition attributes support + url = "github:nvmd/disko/gpt-attrs"; + # url = "github:nix-community/disko"; + inputs.nixpkgs.follows = "pi5-nixpkgs"; + }; + ##################################################### # pi4 # ##################################################### @@ -321,6 +328,7 @@ pi5-nixos-hardware, pi5-sops-nix, nixos-raspberrypi, + pi5-disko, # pi4 pi4-nixpkgs, @@ -510,6 +518,8 @@ modules = [ ./base/base-nogui ./base/base-gui + pi5-disko.nixosModules.disko + ./share/disko/pi-uefi-disko.nix pi5-impermanence.nixosModules.impermanence pi5-sops-nix.nixosModules.sops ./hosts/pi5/configuration.nix diff --git a/hosts/pi4/boot.nix b/hosts/pi4/boot.nix index 4474b8e..2a35ce5 100755 --- a/hosts/pi4/boot.nix +++ b/hosts/pi4/boot.nix @@ -5,19 +5,19 @@ in { boot = { loader = { - systemd-boot.enable = lib.mkForce true; + systemd-boot.enable = lib.mkForce false; efi.canTouchEfiVariables = false; - generic-extlinux-compatible.enable = lib.mkForce false; + generic-extlinux-compatible.enable = lib.mkForce true; }; - plymouth.enable = true; - kernelPackages = pkgs.linuxPackages_latest; + plymouth.enable = false; + kernelPackages = pkgs.linuxPackages_rpi4; kernelModules = [ "i2c-dev" "i2c-bcm2835" ]; initrd.kernelModules = [ "i2c-dev" "i2c-bcm2835" ]; }; - environment.systemPackages = [ uefi_pi4 ]; + # environment.systemPackages = [ uefi_pi4 ]; # Copy UEFI firmware files to the boot partition - system.activationScripts.installUEFIFirmware.text = '' - cp -r ${uefi_pi4}/share/uefi_rpi4/* /boot/firmware/ - ''; + # system.activationScripts.installUEFIFirmware.text = '' + # cp -r ${uefi_pi4}/share/uefi_rpi4/* /boot/firmware/ + # ''; } diff --git a/hosts/pi4/configuration.nix b/hosts/pi4/configuration.nix index 6005fe4..6c33c57 100755 --- a/hosts/pi4/configuration.nix +++ b/hosts/pi4/configuration.nix @@ -57,16 +57,17 @@ in environment = { systemPackages = with pkgs; [ + i2c-tools libraspberrypi raspberrypi-eeprom raspberrypifw raspberrypiWirelessFirmware raspberrypi-armstubs ]; - etc = { - "ssh/ssh_host_ed25519_key".source = config.sops.secrets."pi4/sys-priv-key".path; - "ssh/ssh_host_ed25519_key.pub".source = config.sops.secrets."pi4/sys-public-key".path; - }; + # etc = { + # "ssh/ssh_host_ed25519_key".source = config.sops.secrets."pi4/sys-priv-key".path; + # "ssh/ssh_host_ed25519_key.pub".source = config.sops.secrets."pi4/sys-public-key".path; + # }; }; users = { diff --git a/hosts/pi4/pi4-hw.nix b/hosts/pi4/pi4-hw.nix index ca2370c..9756a9a 100644 --- a/hosts/pi4/pi4-hw.nix +++ b/hosts/pi4/pi4-hw.nix @@ -2,19 +2,19 @@ { hardware = { raspberry-pi."4" = { - apply-overlays-dtmerge.enable = false; + apply-overlays-dtmerge.enable = true; audio.enable = false; backlight.enable = false; - bluetooth.enable = false; + bluetooth.enable = true; dwc2.enable = true; - i2c0.enable = false; - i2c1.enable = false; + i2c0.enable = true; + i2c1.enable = true; leds = { eth.disable = false; act.disable = false; pwr.disable = false; }; - fkms-3d.enable = false; + fkms-3d.enable = true; xhci.enable = true; }; deviceTree.filter = "bcm2711-rpi-4*.dtb"; diff --git a/hosts/pi4/sops.nix b/hosts/pi4/sops.nix index af59e6a..6db9c3f 100755 --- a/hosts/pi4/sops.nix +++ b/hosts/pi4/sops.nix @@ -5,7 +5,6 @@ in { sops = { defaultSopsFile = ../../secrets/pi4-secrets.yaml; - # age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt"; age = { generateKey = true; sshKeyPaths = [ "/etc/ssd/ssh_host_ed25519_key" ]; diff --git a/hosts/pi5/configuration.nix b/hosts/pi5/configuration.nix index 0dfe95c..228ae59 100755 --- a/hosts/pi5/configuration.nix +++ b/hosts/pi5/configuration.nix @@ -11,13 +11,13 @@ in { imports = [ ./boot.nix - ./hardware-configuration.nix + # ./hardware-configuration.nix ./impermanence.nix ./networking.nix ./services.nix ./sops.nix - ./hass.nix +# ./hass.nix ]; # Enable nix flakes and nix-command tools diff --git a/share/disko/pi-uefi-disko.nix b/share/disko/pi-uefi-disko.nix index 3aa901d..cb0276f 100644 --- a/share/disko/pi-uefi-disko.nix +++ b/share/disko/pi-uefi-disko.nix @@ -1,9 +1,9 @@ { ... }: let - rootDisk = "/dev/mmcblk0"; + rootDisk = "/dev/nvme0n1"; in { - disko.devices.disk.main.imageSize = "32G"; + disko.devices.disk.main.imageSize = "15G"; disko.devices = { nodev."/" = { fsType = "tmpfs"; diff --git a/share/home/defaults.nix b/share/home/defaults.nix index 5fe043e..6839bbb 100644 --- a/share/home/defaults.nix +++ b/share/home/defaults.nix @@ -43,6 +43,7 @@ java.enable = lib.mkDefault true; mangohud.enable = lib.mkDefault true; password-store.enable = true; + tmux.enable = true; }; services = {