diff options
Diffstat (limited to 'system-sapphire.nix')
-rw-r--r-- | system-sapphire.nix | 62 |
1 files changed, 44 insertions, 18 deletions
diff --git a/system-sapphire.nix b/system-sapphire.nix index 997be61..63290db 100644 --- a/system-sapphire.nix +++ b/system-sapphire.nix @@ -1,16 +1,26 @@ -{ inputs, modulesPath, config, lib, pkgs, ... }: +{ + inputs, + modulesPath, + config, + lib, + pkgs, + ... +}: { ### ### NixOS and Nixpkgs configuration ### - imports = [(modulesPath + "/installer/scan/not-detected.nix")]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; system.stateVersion = "25.05"; nixpkgs.config.allowUnfree = true; # Use the same nixpkgs for system and for `nix-shell` and `nix shell` nix.registry.nixpkgs.flake = inputs.nixpkgs; - nix.nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" "/nix/var/nix/profiles/per-user/root/channels" ]; + nix.nixPath = [ + "nixpkgs=${inputs.nixpkgs.outPath}" + "/nix/var/nix/profiles/per-user/root/channels" + ]; ### ### Filesystems @@ -25,7 +35,10 @@ "/efi" = { device = "/dev/disk/by-uuid/796C-8DE8"; fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; + options = [ + "fmask=0022" + "dmask=0022" + ]; }; "/data" = { @@ -38,7 +51,6 @@ { device = "/dev/disk/by-uuid/37e818f5-1460-4f22-8207-5ad94b5ec8c4"; } ]; - ### ### Bootloader and Linux kernel ### @@ -58,11 +70,20 @@ boot.kernelParams = [ "amdgpu.ppfeaturemask=0xfffd7fff" ]; boot.kernelModules = [ "kvm-amd" ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + "usbhid" + ]; # NOTE: We need to load `i915` before `amdgpu` due to Chromium bugs # Will be removed when Chromium 131 will be released and Electron will upgrade to it - boot.initrd.kernelModules = [ "i915" "amdgpu" "dm-snapshot" ]; + boot.initrd.kernelModules = [ + "i915" + "amdgpu" + "dm-snapshot" + ]; # boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.postBootCommands = '' @@ -117,7 +138,6 @@ pulse.enable = true; }; - ### ### Timezone and Networking ### @@ -130,9 +150,8 @@ services.openssh.enable = true; services.openssh.settings.PasswordAuthentication = false; - networking.firewall.allowedTCPPorts = []; - networking.firewall.allowedUDPPorts = []; - + networking.firewall.allowedTCPPorts = [ ]; + networking.firewall.allowedUDPPorts = [ ]; ### ### Software configuration @@ -149,19 +168,25 @@ }; programs.dconf.enable = true; - services.dbus.packages = with pkgs; [ dconf gcr ]; - + services.dbus.packages = with pkgs; [ + dconf + gcr + ]; xdg.portal = { enable = true; - config.common.default = [ "gtk" "gnome" ]; - extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-gnome ]; + config.common.default = [ + "gtk" + "gnome" + ]; + extraPortals = with pkgs; [ + xdg-desktop-portal-gtk + xdg-desktop-portal-gnome + ]; }; - services.flatpak.enable = true; - # NOTE: I now use this as alternative to steam-run'ing every precompiled binary # This should be much easier now, than `steam-run <binary>` every time services.envfs.enable = true; @@ -231,7 +256,8 @@ ### Extra Packages ### environment.systemPackages = with pkgs; [ - git git-crypt + git + git-crypt lact ]; |