diff --git a/nixos/boxes/homescreen/default.nix b/nixos/boxes/homescreen/default.nix index 21610d97..ba419c5e 100644 --- a/nixos/boxes/homescreen/default.nix +++ b/nixos/boxes/homescreen/default.nix @@ -5,6 +5,7 @@ hostName = "homescreen"; networkmanager = { enable = true; }; }; + hardware.enableRedistributableFirmware = true; environment.systemPackages = with pkgs; [ neovim htop btop atop ]; @@ -18,12 +19,15 @@ hardware.raspberry-pi."4".fkms-3d.enable = true; + hardware.deviceTree.filter = lib.mkForce "*rpi-*.dtb"; + services.xserver = { enable = true; displayManager.lightdm.enable = true; displayManager.autoLogin.enable = true; displayManager.autoLogin.user = "kiosk"; desktopManager.gnome.enable = true; + libinput.enable = true; }; users = { @@ -39,6 +43,11 @@ fsType = "ext4"; options = [ "noatime" ]; }; + "/boot/firmware" = { + device = "/dev/disk/by-label/FIRMWARE"; + fsType = "vfat"; + options = [ "nofail" "noauto" ]; + }; }; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; @@ -47,4 +56,17 @@ time.timeZone = "Europe/London"; system.stateVersion = "22.05"; + nix = { + autoOptimiseStore = true; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + # Free up to 1GiB whenever there is less than 100MiB left. + extraOptions = '' + min-free = ${toString (100 * 1024 * 1024)} + max-free = ${toString (1024 * 1024 * 1024)} + ''; + }; }