diff options
Diffstat (limited to 'hosts/desktop')
| -rw-r--r-- | hosts/desktop/configuration.nix | 155 | ||||
| -rw-r--r-- | hosts/desktop/hardware-configuration.nix | 49 |
2 files changed, 204 insertions, 0 deletions
diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix new file mode 100644 index 0000000..ad49e90 --- /dev/null +++ b/hosts/desktop/configuration.nix @@ -0,0 +1,155 @@ +{ inputs, pkgs, ... }: + +{ + nixpkgs.config.allowUnfree = true; + + imports = + [ + ./hardware-configuration.nix + ../../modules/greet.nix + ../../modules/virtualization.nix + ../../modules/boot.nix + ../../modules/audio.nix + ../../modules/networking.nix + ../../modules/scx.nix + ../../modules/firefox.nix + ../../modules/tor.nix + ../../modules/disko.nix + inputs.home-manager.nixosModules.home-manager + inputs.chaotic.nixosModules.default + ]; + + home-manager = { + extraSpecialArgs = { inherit inputs; }; + users = { + "adam" = import ../../home/home.nix; + }; + backupFileExtension = "bak"; + useGlobalPkgs = true; + useUserPackages = true; + }; + + services.spotifyd = { + enable = true; + }; + + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + pinentryPackage = pkgs.pinentry-curses; + }; + +programs.steam = { + enable = true; + localNetworkGameTransfers.openFirewall = true; + dedicatedServer.openFirewall = true; + remotePlay.openFirewall = false; + gamescopeSession.enable = true; + extest.enable = true; + protontricks.enable = true; + + extraCompatPackages = with pkgs; [ + proton-cachyos_x86_64_v4 + proton-ge-custom + ]; +}; + +hardware.cpu.amd.updateMicrocode = true; + +services.xserver.videoDrivers = [ "amdgpu" ]; +hardware.sensor.iio.enable = true; +programs.kdeconnect.enable = true; +services.lact.enable = true; +environment.variables.AMD_VULKAN_ICD = "RADV"; +hardware.amdgpu.initrd.enable = true; + +programs.hyprland.enable = true; +programs.hyprland.package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; + + nix.settings = { + trusted-users = [ "root" "adam" ]; + experimental-features = [ "nix-command" "flakes" ]; + }; + + hardware = { + enableRedistributableFirmware = true; + graphics = { + enable = true; + enable32Bit = true; + }; + }; + +chaotic = { + mesa-git = { + enable = true; + fallbackSpecialisation = false; + }; +}; + +services.dbus.enable = true; + +xdg.portal = { + enable = true; + wlr.enable = true; +}; + +time.timeZone = "Europe/Warsaw"; + + # Select internationalisation properties. + # i18n.defaultLocale = "en_US.UTF-8"; + # console = { + # font = "Lat2-Terminus16"; + # keyMap = "pl"; + # useXkbConfig = true; # use xkb.options in tty. + # }; + +environment.sessionVariables = { + NH_FLAKE = "/etc/nixos"; + NIXOS_OZONE_WL = "1"; + MOZ_ENABLE_WAYLAND = "1"; + GDK_BACKEND = "wayland"; + QT_QPA_PLATFORM = "wayland"; + ELECTRON_ENABLE_WAYLAND = "1"; + }; + +programs.fish.enable = true; + + users.users.adam = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + home = "/home/adam"; + shell = pkgs.fish; + }; + + environment.systemPackages = with pkgs; [ + vim + lan-mouse_git + tuigreet + hyprland + linux-firmware + dbus + nh + gamemode + mangohud + grim + grimblast + slurp + wl-clipboard + swappy + git + nix-output-monitor + nvd + rivalcfg + easyeffects + wineWowPackages.stagingFull + lutris + winetricks + nix-tree + ]; + + fonts.packages = with pkgs; [ + nerd-fonts.jetbrains-mono +]; + +system.stateVersion = "25.05"; +} diff --git a/hosts/desktop/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix new file mode 100644 index 0000000..0db0d28 --- /dev/null +++ b/hosts/desktop/hardware-configuration.nix @@ -0,0 +1,49 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/aa9c6208-2cc3-413c-a52a-5e0fdf93e748"; + fsType = "btrfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/A687-03D4"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/694036da-fc6e-4c7c-8765-7b90fb9a04c8"; + fsType = "btrfs"; + }; + + fileSystems."/media" = + { device = "/dev/disk/by-uuid/c619e4ea-c146-4e36-9535-d0240f1cd637"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp14s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp15s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} |
