convert rico1 to generic efi boot

This commit is contained in:
Adithya 2024-06-29 01:08:28 +05:30
parent 8e5121584d
commit ced6f23a46
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
6 changed files with 26 additions and 35 deletions

View file

@ -434,22 +434,6 @@
"type": "github" "type": "github"
} }
}, },
"nixos-hardware": {
"locked": {
"lastModified": 1719487696,
"narHash": "sha256-pCsl9qFCuIuhIfGH03CiBOsy1LNwITC6VMb6/5tz+Qc=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "14aadcba1a26c8c142453839f888afd0db8b2041",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1718541509, "lastModified": 1718541509,
@ -597,7 +581,6 @@
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"lix-module": "lix-module", "lix-module": "lix-module",
"neovim-nightly": "neovim-nightly", "neovim-nightly": "neovim-nightly",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"varnam-nix": "varnam-nix" "varnam-nix": "varnam-nix"

View file

@ -24,7 +24,6 @@
}; };
impermanence.url = "github:nix-community/impermanence?ref=master"; impermanence.url = "github:nix-community/impermanence?ref=master";
lanzaboote.url = "github:nix-community/lanzaboote?ref=master"; lanzaboote.url = "github:nix-community/lanzaboote?ref=master";
nixos-hardware.url = "github:NixOS/nixos-hardware?ref=master";
sops-nix.url = "github:Mic92/sops-nix?ref=master"; sops-nix.url = "github:Mic92/sops-nix?ref=master";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
neovim-nightly.url = "github:nix-community/neovim-nightly-overlay?ref=master"; neovim-nightly.url = "github:nix-community/neovim-nightly-overlay?ref=master";
@ -38,7 +37,6 @@
, home-manager , home-manager
, impermanence , impermanence
, lanzaboote , lanzaboote
, nixos-hardware
, sops-nix , sops-nix
, flake-utils , flake-utils
, neovim-nightly , neovim-nightly
@ -105,7 +103,6 @@
} }
lix-module.nixosModules.default lix-module.nixosModules.default
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
nixos-hardware.nixosModules.raspberry-pi-4
./common ./common
./hosts/rico1 ./hosts/rico1
]; ];

View file

@ -1,14 +1,13 @@
_: { _: {
imports = [ ./filesystem.nix ./kernel.nix ]; imports = [ ./filesystem.nix ./kernel.nix ];
hardware = { hardware.enableRedistributableFirmware = true;
deviceTree = {
enable = true; boot = {
}; loader = {
raspberry-pi."4" = { efi.canTouchEfiVariables = true;
apply-overlays-dtmerge.enable = true; systemd-boot.enable = true;
poe-plus-hat.enable = true;
xhci.enable = true;
}; };
supportedFilesystems = [ "vfat" "btrfs" "ext4" ];
}; };
} }

View file

@ -1,34 +1,34 @@
_: { _: {
fileSystems = { fileSystems = {
"/" = { "/" = {
device = "/dev/disk/by-label/RICO1_ROOT"; device = "/dev/disk/by-partlabel/RICO1_ROOT";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@root" "compress-force=zstd" "noatime" ]; options = [ "subvol=@root" "compress-force=zstd" "noatime" ];
neededForBoot = true; neededForBoot = true;
}; };
"/nix" = { "/nix" = {
device = "/dev/disk/by-label/RICO1_ROOT"; device = "/dev/disk/by-partlabel/RICO1_ROOT";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@nix" "compress-force=zstd" "noatime" ]; options = [ "subvol=@nix" "compress-force=zstd" "noatime" ];
neededForBoot = true; neededForBoot = true;
}; };
"/persist" = { "/persist" = {
device = "/dev/disk/by-label/RICO1_ROOT"; device = "/dev/disk/by-partlabel/RICO1_ROOT";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@persist" "compress-force=zstd" "noatime" ]; options = [ "subvol=@persist" "compress-force=zstd" "noatime" ];
neededForBoot = true; neededForBoot = true;
}; };
"/mnt/system" = { "/mnt/system" = {
device = "/dev/disk/by-label/RICO1_ROOT"; device = "/dev/disk/by-partlabel/RICO1_ROOT";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=/" "compress-force=zstd" "noatime" ]; options = [ "subvol=/" "compress-force=zstd" "noatime" ];
}; };
"/boot" = { "/boot" = {
device = "/dev/disk/by-label/RICO1_BOOT"; device = "/dev/disk/by-partlabel/RICO1_BOOT";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [ "fmask=0022" "dmask=0022" ];
}; };

View file

@ -1,6 +1,18 @@
{ lib { lib
, pkgs
, ... , ...
}: { }: {
boot.supportedFilesystems = lib.mkForce [ "vfat" "btrfs" "ext4" ]; boot = {
consoleLogLevel = 3;
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
kernel.sysctl = {
"vm.swappiness" = 10;
"vm.dirty_ratio" = 3;
};
initrd = {
availableKernelModules = ["xhci_pci"];
systemd.enable = true;
};
};
powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
} }

View file

@ -15,7 +15,7 @@
systemd.enable = true; systemd.enable = true;
}; };
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_zen; kernelPackages = lib.mkDefault pkgs.linuxPackages_zen;
kernelParams = [ "quiet" ]; kernelParams = [ "quiet" ];
kernel.sysctl = { kernel.sysctl = {
"vm.swappiness" = 10; "vm.swappiness" = 10;