From 3bfd1450fce35aaf1b601ca9000515261521ae6e Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Mon, 18 Aug 2025 20:59:02 +0200 Subject: [PATCH] yggdrasil: move over tmp config --- systems/x86_64-linux/tmp/default.nix | 97 ------------------- systems/x86_64-linux/tmp/hardware.nix | 68 ------------- systems/x86_64-linux/tmp/hardware_.nix | 69 ------------- systems/x86_64-linux/tmp/hyprland_config.nix | 48 --------- systems/x86_64-linux/yggdrasil/default.nix | 4 +- systems/x86_64-linux/yggdrasil/hardware.nix | 31 +++--- .../yggdrasil/hyprland_config.nix | 16 +-- 7 files changed, 26 insertions(+), 307 deletions(-) delete mode 100644 systems/x86_64-linux/tmp/default.nix delete mode 100644 systems/x86_64-linux/tmp/hardware.nix delete mode 100644 systems/x86_64-linux/tmp/hardware_.nix delete mode 100644 systems/x86_64-linux/tmp/hyprland_config.nix diff --git a/systems/x86_64-linux/tmp/default.nix b/systems/x86_64-linux/tmp/default.nix deleted file mode 100644 index 8e4ffdb..0000000 --- a/systems/x86_64-linux/tmp/default.nix +++ /dev/null @@ -1,97 +0,0 @@ -{ - inputs, - lib, - namespace, - pkgs, - ... -}: -let - inherit (lib.${namespace}) enabled disabled; -in -{ - imports = [ - ./hardware.nix - ./hyprland_config.nix - ]; - - environment.systemPackages = with pkgs; [ - path-of-building - teams-for-linux - obsidian - zed-editor - - # eve - bottles - pyfa - - # misc - diebahn - - nixpkgs-review - ]; - - environment.pathsToLink = [ "/libexec" ]; - - virtualisation.waydroid = enabled; - - programs.ssh.extraConfig = '' - AddressFamily inet - ''; - home-manager = { - backupFileExtension = "bak"; - }; - - nix = { - distributedBuilds = true; - settings.builders-use-substitutes = true; - buildMachines = [ - { - hostName = "nixberry"; - sshUser = "remotebuild"; - sshKey = "/root/.ssh/remotebuild"; - systems = [ "aarch64-linux" ]; - protocol = "ssh-ng"; - - supportedFeatures = [ - "nixos-test" - "big-parallel" - "kvm" - ]; - } - ]; - }; - - ${namespace} = { - archetypes = { - gaming.enable = true; - }; - - apps = { - _1password = enabled; - obs-studio = enabled; - cli-apps.helix = enabled; - starsector = enabled; - }; - - desktop.hyprland = { - enable = true; - }; - - services = { - factorio-server = disabled; - }; - - tools.devenv = enabled; - - system = { - hardware = { - bluetooth = enabled; - gpu.amd = enabled; - }; - }; - - security.gpg = enabled; - }; - - system.stateVersion = "23.11"; -} diff --git a/systems/x86_64-linux/tmp/hardware.nix b/systems/x86_64-linux/tmp/hardware.nix deleted file mode 100644 index f5a7c2b..0000000 --- a/systems/x86_64-linux/tmp/hardware.nix +++ /dev/null @@ -1,68 +0,0 @@ -# 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, - inputs, - pkgs, - modulesPath, - ... -}: -let - inherit (inputs) nixos-hardware; -in -{ - imports = with nixos-hardware.nixosModules; [ - (modulesPath + "/installer/scan/not-detected.nix") - common-cpu-amd - common-pc - common-pc-ssd - ]; - - boot.initrd.availableKernelModules = [ - "nvme" - "ahci" - "xhci_pci" - "usbhid" - "usb_storage" - "sd_mod" - ]; - boot.kernelModules = [ "kvm-amd" ]; - - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/b1a956f4-91d5-456e-a92b-be505bb719bd"; - fsType = "ext4"; - }; - - "/boot" = { - device = "/dev/disk/by-uuid/B4D4-8BA0"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - - "/storage" = { - device = "/dev/disk/by-uuid/c3c1dec1-7716-4c37-a3f2-bb60f9af84fd"; - fsType = "ext4"; - }; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/4bec00ec-e9eb-4034-836a-ecf15e0bb40e"; } - ]; - - # 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..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; -} diff --git a/systems/x86_64-linux/tmp/hardware_.nix b/systems/x86_64-linux/tmp/hardware_.nix deleted file mode 100644 index e00556a..0000000 --- a/systems/x86_64-linux/tmp/hardware_.nix +++ /dev/null @@ -1,69 +0,0 @@ -# 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, - modulesPath, - inputs, - ... -}: -let - inherit (inputs) nixos-hardware; -in -{ - imports = with nixos-hardware.nixosModules; [ - (modulesPath + "/installer/scan/not-detected.nix") - common-cpu-amd - common-gpu-nvidia-nonprime - common-pc - common-pc-ssd - ]; - - boot = { - initrd.availableKernelModules = [ - "nvme" - "xhci_pci" - "ahci" - "usb_storage" - "usbhid" - "sd_mod" - ]; - initrd.kernelModules = [ ]; - kernelModules = [ - "kvm-amd" - "btusb" - ]; - extraModulePackages = [ ]; - }; - - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/444a9216-59d1-46e0-9643-0b716a42ba0b"; - fsType = "ext4"; - }; - - "/boot" = { - device = "/dev/disk/by-uuid/8310-585A"; - fsType = "vfat"; - }; - - "/storage" = { - device = "/dev/disk/by-uuid/c3c1dec1-7716-4c37-a3f2-bb60f9af84fd"; - 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp40s0.useDHCP = lib.mkDefault true; - # networking.interfaces.enp42s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/systems/x86_64-linux/tmp/hyprland_config.nix b/systems/x86_64-linux/tmp/hyprland_config.nix deleted file mode 100644 index fdeb16e..0000000 --- a/systems/x86_64-linux/tmp/hyprland_config.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ - lib, - namespace, - pkgs, - ... -}: -let -in -{ - ${namespace}.desktop.hyprland.settings = { - monitor = [ - #Ultrawide - "DP-1,3440x1440@144, 0x0, 1" - #Vertical - "HDMI-A-1, 1920x1080@144, auto-right, 1, transform, 1" - # nividia kernel issues - "Unknown-1, disable" - ]; - - cursor = { - no_hardware_cursors = true; - }; - - exec-once = [ - "[workspace 7 silent] obsidian" - - "${lib.getExe pkgs.xorg.xrandr} --output DP-1 --primary" - ]; - - workspace = [ - "1, monitor:DP-1" - "2, monitor:DP-1" - "3, monitor:DP-1" - "4, monitor:DP-1" - "5, monitor:DP-1" - "6, monitor:DP-1" - "7, monitor:HDMI-A-1" - "8, monitor:HDMI-A-1" - "9, monitor:HDMI-A-1" - ]; - - windowrulev2 = [ - "workspace 8 silent, class:^(steam)$, title:^(Friends List)" - "workspace 8 silent, class:^(discord)$, title:^(Discord)" - "workspace 7 silent, class:^(com.obsproject.Studio)$" - ]; - }; -} diff --git a/systems/x86_64-linux/yggdrasil/default.nix b/systems/x86_64-linux/yggdrasil/default.nix index 803d0b5..8e4ffdb 100644 --- a/systems/x86_64-linux/yggdrasil/default.nix +++ b/systems/x86_64-linux/yggdrasil/default.nix @@ -38,7 +38,7 @@ in AddressFamily inet ''; home-manager = { - backupFileExtension = ".bak"; + backupFileExtension = "bak"; }; nix = { @@ -86,7 +86,7 @@ in system = { hardware = { bluetooth = enabled; - gpu.nvidia = enabled; + gpu.amd = enabled; }; }; diff --git a/systems/x86_64-linux/yggdrasil/hardware.nix b/systems/x86_64-linux/yggdrasil/hardware.nix index e00556a..7133352 100644 --- a/systems/x86_64-linux/yggdrasil/hardware.nix +++ b/systems/x86_64-linux/yggdrasil/hardware.nix @@ -4,8 +4,9 @@ { config, lib, - modulesPath, inputs, + pkgs, + modulesPath, ... }: let @@ -15,7 +16,6 @@ in imports = with nixos-hardware.nixosModules; [ (modulesPath + "/installer/scan/not-detected.nix") common-cpu-amd - common-gpu-nvidia-nonprime common-pc common-pc-ssd ]; @@ -23,29 +23,28 @@ in boot = { initrd.availableKernelModules = [ "nvme" - "xhci_pci" "ahci" - "usb_storage" + "xhci_pci" "usbhid" + "usb_storage" "sd_mod" ]; - initrd.kernelModules = [ ]; - kernelModules = [ - "kvm-amd" - "btusb" - ]; - extraModulePackages = [ ]; + kernelModules = [ "kvm-amd" ]; }; fileSystems = { "/" = { - device = "/dev/disk/by-uuid/444a9216-59d1-46e0-9643-0b716a42ba0b"; + device = "/dev/disk/by-uuid/b1a956f4-91d5-456e-a92b-be505bb719bd"; fsType = "ext4"; }; "/boot" = { - device = "/dev/disk/by-uuid/8310-585A"; + device = "/dev/disk/by-uuid/B4D4-8BA0"; fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; }; "/storage" = { @@ -54,15 +53,17 @@ in }; }; - swapDevices = [ ]; + swapDevices = [ + { device = "/dev/disk/by-uuid/4bec00ec-e9eb-4034-836a-ecf15e0bb40e"; } + ]; # 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..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp40s0.useDHCP = lib.mkDefault true; - # networking.interfaces.enp42s0.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; diff --git a/systems/x86_64-linux/yggdrasil/hyprland_config.nix b/systems/x86_64-linux/yggdrasil/hyprland_config.nix index 1927ec1..fdeb16e 100644 --- a/systems/x86_64-linux/yggdrasil/hyprland_config.nix +++ b/systems/x86_64-linux/yggdrasil/hyprland_config.nix @@ -10,7 +10,7 @@ in ${namespace}.desktop.hyprland.settings = { monitor = [ #Ultrawide - "DP-2,3440x1440@144, 0x0, 1" + "DP-1,3440x1440@144, 0x0, 1" #Vertical "HDMI-A-1, 1920x1080@144, auto-right, 1, transform, 1" # nividia kernel issues @@ -24,16 +24,16 @@ in exec-once = [ "[workspace 7 silent] obsidian" - "${lib.getExe pkgs.xorg.xrandr} --output DP-2 --primary" + "${lib.getExe pkgs.xorg.xrandr} --output DP-1 --primary" ]; workspace = [ - "1, monitor:DP-2" - "2, monitor:DP-2" - "3, monitor:DP-2" - "4, monitor:DP-2" - "5, monitor:DP-2" - "6, 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:DP-1" "7, monitor:HDMI-A-1" "8, monitor:HDMI-A-1" "9, monitor:HDMI-A-1"