diff --git a/flake.lock b/flake.lock index 7242ccc..58a0108 100644 --- a/flake.lock +++ b/flake.lock @@ -58,11 +58,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1720954236, - "narHash": "sha256-1mEKHp4m9brvfQ0rjCca8P1WHpymK3TOr3v34ydv9bs=", + "lastModified": 1725001927, + "narHash": "sha256-eV+63gK0Mp7ygCR0Oy4yIYSNcum2VQwnZamHxYTNi+M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "53e81e790209e41f0c1efa9ff26ff2fd7ab35e27", + "rev": "6e99f2a27d600612004fbd2c3282d614bfee6421", "type": "github" }, "original": { @@ -88,11 +88,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1720957393, - "narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=", + "lastModified": 1724819573, + "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "693bc46d169f5af9c992095736e82c3488bf7dbb", + "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2", "type": "github" }, "original": { diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index 821227b..44b231f 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -11,12 +11,17 @@ # CLI ../../modules/system/cli/common.nix + ../../modules/system/cli/podman.nix # Hardware ../../modules/system/hardware/firewall.nix ../../modules/system/hardware/garbage-collection.nix ../../modules/system/hardware/locale.nix ../../modules/system/hardware/nvidia.nix + + # Containers + # ../../modules/containers/adguard.nix + # ../../modules/containers/caddy.nix ]; nix.settings = { @@ -45,7 +50,17 @@ extraGroups = [ "networkmanager" "wheel" "dialout" "fuse" ]; }; - boot.kernelPackages = pkgs.linuxPackages_latest; + services.openssh.enable = true; + + # boot.kernelPackages = pkgs.linuxPackages_latest; + + # sunshine + services.sunshine = { + enable = true; + autoStart = true; + capSysAdmin = true; + openFirewall = true; + }; system.stateVersion = "24.05"; diff --git a/hosts/desktop/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix index d345c67..e509594 100644 --- a/hosts/desktop/hardware-configuration.nix +++ b/hosts/desktop/hardware-configuration.nix @@ -8,18 +8,18 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/b4cefbc5-dd3d-4a4b-84d0-031b2ed7655c"; + { device = "/dev/disk/by-uuid/f8dc500b-2b36-4ca8-940b-1716742d6cf3"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/9A7D-7464"; + { device = "/dev/disk/by-uuid/029A-9287"; fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; }; diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index 0136b2a..fb253e5 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -30,7 +30,10 @@ host = "xv-desktop"; home.packages = with pkgs; [ - unstable.prismlauncher + unstable.prismlauncher + unstable.modrinth-app + unstable.vesktop + unstable.blender ]; home.stateVersion = "24.05"; diff --git a/modules/containers/adguard.nix b/modules/containers/adguard.nix new file mode 100644 index 0000000..de96cb9 --- /dev/null +++ b/modules/containers/adguard.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: + +{ + virtualisation.oci-containers.containers = { + adguardhome = { + image = "docker.io/adguard/adguardhome"; + autoStart = true; + ports = [ + "192.168.100.107:53:53/udp" + "81:3000/tcp" + ]; + volumes = [ + "workdir:/opt/adguardhome/work" + "confdir:/opt/adguardhome/conf" + ]; + }; + }; + + networking.firewall = { + allowedTCPPorts = [ 81 53 ]; + allowedUDPPorts = [ 53 ]; + }; +} diff --git a/modules/containers/caddy.nix b/modules/containers/caddy.nix new file mode 100644 index 0000000..9a76103 --- /dev/null +++ b/modules/containers/caddy.nix @@ -0,0 +1,16 @@ +{ pkgs, ... }: + +pkgs.dockerTools.buildImage { + name = "caddy-custom"; + tag = "latest"; + + fromImage = "docker.io/caddy"; + fromImageName = null; + fromImageTag = "2.8.4-builder"; + + runAsRoot = '' + #!${pkgs.runtimeShell} + + xcaddy build --with github.com/caddy-dns/cloudflare + ''; +} diff --git a/modules/home/gui/hyprland/default.nix b/modules/home/gui/hyprland/default.nix index bf7f71f..4ffb142 100644 --- a/modules/home/gui/hyprland/default.nix +++ b/modules/home/gui/hyprland/default.nix @@ -35,6 +35,13 @@ "lxqt-policykit-agent" ]; + env = lib.mkIf (config.host == "xv-desktop") [ + "LIBVA_DRIVER_NAME,nvidia" + "XDG_SESSION_TYPE,wayland" + "GBM_BACKEND,nvidia-drm" + "__GLX_VENDOR_LIBRARY_NAME,nvidia" + ]; + "$mod" = "SUPER"; input = { @@ -83,11 +90,11 @@ ] (lib.mkIf (config.host == "xv-desktop") [ - "1, monitor:DP-2" - "2, monitor:DP-2" - "3, monitor:DP-2" - "4, monitor:DP-2" - "5, monitor:DP-2" + "1, monitor:DP-1" + "2, monitor:DP-1" + "3, monitor:DP-1" + "4, monitor:DP-1" + "5, monitor:DP-1" "6, monitor:HDMI-A-1" "7, monitor:HDMI-A-1" "8, monitor:HDMI-A-1" diff --git a/modules/home/gui/hyprland/waybar.nix b/modules/home/gui/hyprland/waybar.nix index 9d0a6e4..ee139c1 100644 --- a/modules/home/gui/hyprland/waybar.nix +++ b/modules/home/gui/hyprland/waybar.nix @@ -35,6 +35,10 @@ "DP-10" = [ 1 2 3 4 ]; "DP-9" = [ 5 6 7 ]; "eDP-1" = [ 8 9 10 ]; + }) + (lib.mkIf (config.host == "xv-desktop") { + "DP-1" = [ 1 2 3 4 5 ]; + "HDMI-A-1" = [ 6 7 8 9 10 ]; })]; "format-icons" = { "default" = ""; diff --git a/modules/system/cli/podman.nix b/modules/system/cli/podman.nix index ca51568..3d1718c 100644 --- a/modules/system/cli/podman.nix +++ b/modules/system/cli/podman.nix @@ -9,6 +9,8 @@ defaultNetwork.settings.dns_enabled = true; }; + virtualisation.oci-containers.backend = "podman"; + environment.systemPackages = with pkgs; [ dive podman-tui diff --git a/modules/system/hardware/nvidia.nix b/modules/system/hardware/nvidia.nix index 31ac135..9956bb6 100644 --- a/modules/system/hardware/nvidia.nix +++ b/modules/system/hardware/nvidia.nix @@ -34,6 +34,13 @@ open = false; nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.beta; + package = config.boot.kernelPackages.nvidiaPackages.mkDriver { + version = "555.58.02"; + sha256_64bit = "sha256-xctt4TPRlOJ6r5S54h5W6PT6/3Zy2R4ASNFPu8TSHKM="; + sha256_aarch64 = "sha256-xctt4TPRlOJ6r5S54h5W6PT6/3Zy2R4ASNFPu8TSHKM="; + openSha256 = "sha256-ZpuVZybW6CFN/gz9rx+UJvQ715FZnAOYfHn5jt5Z2C8="; + settingsSha256 = "sha256-ZpuVZybW6CFN/gz9rx+UJvQ715FZnAOYfHn5jt5Z2C8="; + persistencedSha256 = lib.fakeSha256; + }; }; }