From 2c1e99608adf83e3e4aeaf9252f4c9c53773db7e Mon Sep 17 00:00:00 2001 From: xeovalyte Date: Thu, 20 Jun 2024 12:56:01 +0200 Subject: [PATCH] Modified desktop configuration --- hosts/desktop/default.nix | 41 +++++++++++--------- hosts/desktop/hardware-configuration.nix | 9 ++--- hosts/desktop/home.nix | 48 ++++++++++++------------ modules/system/desktop/nvidia.nix | 6 +-- modules/system/desktop/plasma.nix | 18 +++++++++ modules/system/programs/sunshine.nix | 6 +-- 6 files changed, 75 insertions(+), 53 deletions(-) create mode 100644 modules/system/desktop/plasma.nix diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index dee5f5b..aaf6453 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -3,19 +3,20 @@ { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix - ../../modules/system/desktop/hyprland.nix - ../../modules/system/desktop/noisetorch.nix +# ../../modules/system/desktop/hyprland.nix + ../../modules/system/desktop/plasma.nix +# ../../modules/system/desktop/noisetorch.nix ../../modules/system/desktop/nvidia.nix - ../../modules/system/programs/syncthing.nix - ../../modules/system/programs/thunar.nix - ../../modules/system/programs/steam.nix - ../../modules/system/utils/common.nix - ../../modules/system/utils/docker.nix - ../../modules/system/utils/firewall.nix +# ../../modules/system/programs/syncthing.nix +# ../../modules/system/programs/thunar.nix +# ../../modules/system/programs/steam.nix +# ../../modules/system/utils/common.nix +# ../../modules/system/utils/docker.nix +# ../../modules/system/utils/firewall.nix #../../modules/system/utils/fprint.nix ../../modules/system/utils/garbage-collection.nix ../../modules/system/utils/locale.nix - ../../modules/system/utils/printing.nix +# ../../modules/system/utils/printing.nix ../../modules/system/programs/sunshine.nix ]; @@ -34,11 +35,14 @@ # Bootloader. boot.loader.efi.canTouchEfiVariables = true; - boot.loader.grub = { - enable = true; - efiSupport = true; - device = "nodev"; - }; +# boot.loader.grub = { +# enable = true; +# efiSupport = true; +# device = "nodev"; +# }; + boot.loader.systemd-boot.enable = true; + + networking.networkmanager.enable = true; networking.hostName = "xv-desktop"; # Define your hostname. networking.interfaces.enp7s0.wakeOnLan.enable = true; @@ -49,10 +53,13 @@ extraGroups = [ "networkmanager" "wheel" "dialout" "fuse" ]; }; - services.printing.enable = true; + services.displayManager.autoLogin = { + enable = true; + user = "xeovalyte"; + }; - # Keyboard - hardware.ckb-next.enable = true; + systemd.services."getty@tty1".enable = false; + systemd.services."autovt@tty1".enable = false; system.stateVersion = "24.05"; diff --git a/hosts/desktop/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix index a90cb86..d345c67 100644 --- a/hosts/desktop/hardware-configuration.nix +++ b/hosts/desktop/hardware-configuration.nix @@ -14,18 +14,17 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/60a347a6-cec9-4e0e-a179-f04285d6a649"; + { device = "/dev/disk/by-uuid/b4cefbc5-dd3d-4a4b-84d0-031b2ed7655c"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/154C-D14F"; + { device = "/dev/disk/by-uuid/9A7D-7464"; fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; }; - swapDevices = - [ { device = "/dev/disk/by-uuid/ad0bc462-5a03-4d7a-a14b-d60fa6d85c89"; } - ]; + 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 diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index 305e94c..41f950a 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -2,18 +2,18 @@ { imports = [ - ../../modules/home/desktop/hyprland +# ../../modules/home/desktop/hyprland # ../../modules/home/programs/barrier.nix - ../../modules/home/programs/common.nix - ../../modules/home/programs/develop.nix - ../../modules/home/programs/firefox.nix - ../../modules/home/programs/modrinth.nix - ../../modules/home/programs/neovim - ../../modules/home/programs/git.nix - ../../modules/home/programs/ssh.nix - ../../modules/home/theme - ../../modules/home/theme/blueish.nix - ../../modules/home/utils/fonts.nix +# ../../modules/home/programs/common.nix +# ../../modules/home/programs/develop.nix + ../../modules/home/programs/firefox.nix +# ../../modules/home/programs/modrinth.nix +# ../../modules/home/programs/neovim +# ../../modules/home/programs/git.nix +# ../../modules/home/programs/ssh.nix +# ../../modules/home/theme +# ../../modules/home/theme/blueish.nix +# ../../modules/home/utils/fonts.nix ]; home = { @@ -22,22 +22,22 @@ }; home.packages = with pkgs; [ - # Desktop Applications - kdenlive - gthumb - unstable.arduino-ide - unstable.prismlauncher - blender + # Desktop Applications + # kdenlive + # gthumb + unstable.bitwarden + unstable.prismlauncher + # blender - unstable.surrealist +# unstable.surrealist ]; - home.sessionVariables = { - LIBVA_DRIVER_NAME = "nvidia"; - XDG_SESSION_TYPE = "wayland"; - __GLX_VENDOR_LIBRARY_NAME = "nvidia"; - WLR_NO_HARDWARE_CURSORS = 1; - }; +# home.sessionVariables = { +# LIBVA_DRIVER_NAME = "nvidia"; +# XDG_SESSION_TYPE = "wayland"; +# __GLX_VENDOR_LIBRARY_NAME = "nvidia"; +# WLR_NO_HARDWARE_CURSORS = 1; +# }; home.stateVersion = "24.05"; } diff --git a/modules/system/desktop/nvidia.nix b/modules/system/desktop/nvidia.nix index 98e903e..936c870 100644 --- a/modules/system/desktop/nvidia.nix +++ b/modules/system/desktop/nvidia.nix @@ -31,11 +31,9 @@ # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus # Only available from driver 515.43.04+ # Currently alpha-quality/buggy, so false is currently the recommended setting. - open = true; + open = false; nvidiaSettings = true; - package = pkgs.unstable.linuxKernel.packages.linux_6_6.nvidia_x11_beta; + package = config.boot.kernelPackages.nvidiaPackages.stable; }; - - programs.gamemode.enable = true; } diff --git a/modules/system/desktop/plasma.nix b/modules/system/desktop/plasma.nix new file mode 100644 index 0000000..bc1db29 --- /dev/null +++ b/modules/system/desktop/plasma.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: + +{ + services.xserver.enable = true; + + services.displayManager.sddm.enable = true; + services.desktopManager.plasma6.enable = true; + + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; +} diff --git a/modules/system/programs/sunshine.nix b/modules/system/programs/sunshine.nix index 6e9cc8b..a9ec115 100644 --- a/modules/system/programs/sunshine.nix +++ b/modules/system/programs/sunshine.nix @@ -1,10 +1,10 @@ -{ ..., pkgs }: +{ pkgs, ... }: { services.sunshine = { enable = true; - package = pkgs.unstable.sunshine; - autostart = true; + package = pkgs.unstable.sunshine.override { cudaSupport = true; }; + autoStart = true; capSysAdmin = true; openFirewall = true; };