diff --git a/flake.nix b/flake.nix index d5bd287..c59873e 100644 --- a/flake.nix +++ b/flake.nix @@ -25,10 +25,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - nixos-hardware = { - url = "github:NixOS/nixos-hardware"; - }; - nixvim = { url = "github:pta2002/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; @@ -71,8 +67,6 @@ system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; } - nixos-hardware.nixosModules.raspberry-pi-4 - ./users ./system.rico ]; diff --git a/system.rico/default.nix b/system.rico/default.nix index 187f975..5a30ce0 100644 --- a/system.rico/default.nix +++ b/system.rico/default.nix @@ -7,6 +7,8 @@ ./security.nix ]; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; networking.hostName = "Rico2"; i18n = { diff --git a/system.rico/hardware/default.nix b/system.rico/hardware/default.nix index f768ed0..bb25f2f 100644 --- a/system.rico/hardware/default.nix +++ b/system.rico/hardware/default.nix @@ -1,3 +1,3 @@ { ... }: { - imports = [ ./filesystem.nix ]; + imports = [ ./filesystem.nix ./kernel.nix ]; } diff --git a/system.rico/hardware/filesystem.nix b/system.rico/hardware/filesystem.nix index 49137e7..1fe7a18 100644 --- a/system.rico/hardware/filesystem.nix +++ b/system.rico/hardware/filesystem.nix @@ -1,8 +1,12 @@ { ... }: { fileSystems."/" = { - device = "/dev/disk/by-label/NIXOS_SD"; - fsType = "ext4"; - options = [ "noatime" ]; + device = "/dev/disk/by-partlabel/NIXOS_ROOT"; + fsType = "btrfs"; + options = [ "noatime" "compress=zstd" ]; + }; + fileSystems."/boot" = { + device = "/dev/disk/by-partlabel/ESP"; + fsType = "vfat"; }; } diff --git a/system.rico/hardware/kernel.nix b/system.rico/hardware/kernel.nix new file mode 100644 index 0000000..1ccec4a --- /dev/null +++ b/system.rico/hardware/kernel.nix @@ -0,0 +1,15 @@ +{ lib, pkgs, ... }: { + boot = { + consoleLogLevel = 3; + initrd = { + availableKernelModules = [ + "usbhid" + "usb_storage" + ]; + systemd.enable = true; + }; + kernelPackages = pkgs.linuxPackages_latest; + kernelParams = [ "quiet" ]; + }; + powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; +}