From 1f1b9013300a1e4ab31c79770ad58204da7f1f66 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 14 Sep 2025 13:45:48 +0200 Subject: [PATCH] move more modules --- flake.nix | 6 +- home/vinzenz/configuration.nix | 2 + modules/amd-graphics.nix | 22 ------- modules/gaming.nix | 5 -- modules/nixpkgs.nix | 9 --- nixosConfigurations/vinzenz-lpt2/hardware.nix | 4 +- .../vinzenz-pc2/configuration.nix | 58 +++++++++---------- nixosConfigurations/vinzenz-pc2/default.nix | 2 + nixosConfigurations/vinzenz-pc2/hardware.nix | 4 +- .../vinzenz-pc2/vscode-server.nix | 20 +++---- nixosModules/amd-graphics.nix | 20 +++++++ {modules => nixosModules}/intel-graphics.nix | 0 12 files changed, 69 insertions(+), 83 deletions(-) delete mode 100644 modules/amd-graphics.nix delete mode 100644 modules/nixpkgs.nix create mode 100644 nixosModules/amd-graphics.nix rename {modules => nixosModules}/intel-graphics.nix (100%) diff --git a/flake.nix b/flake.nix index 8b3b690..2622042 100644 --- a/flake.nix +++ b/flake.nix @@ -129,6 +129,11 @@ "nix-command" "flakes" ]; + + documentation = { + info.enable = false; # info pages and the info command + doc.enable = false; # documentation distributed in packages' /share/doc + }; } ./nixosConfigurations/${device} @@ -140,7 +145,6 @@ self.nixosModules.tailscale self.nixosModules.allowed-unfree-list self.nixosModules.extra-caches - ./modules/nixpkgs.nix zerforschen-plus.nixosModules.default ] diff --git a/home/vinzenz/configuration.nix b/home/vinzenz/configuration.nix index 74be21f..ad8f18a 100644 --- a/home/vinzenz/configuration.nix +++ b/home/vinzenz/configuration.nix @@ -56,6 +56,8 @@ icu nextcloud-client + + lutris ]; home.file = { diff --git a/modules/amd-graphics.nix b/modules/amd-graphics.nix deleted file mode 100644 index 041d700..0000000 --- a/modules/amd-graphics.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ pkgs, config, ... }: -{ - config = { - boot.kernelModules = [ "amdgpu" ]; - services.xserver.videoDrivers = [ "amdgpu" ]; - - hardware = { - graphics.enable = true; - amdgpu = { - opencl.enable = true; - amdvlk = { - # TODO: this creates black borders around GNOME apps - # enable = true; - # support32Bit.enable = config.hardware.graphics.enable32Bit; - }; - overdrive.enable = true; - }; - }; - - environment.systemPackages = with pkgs; [ nvtopPackages.amd ]; - }; -} diff --git a/modules/gaming.nix b/modules/gaming.nix index 478c200..d93b31d 100644 --- a/modules/gaming.nix +++ b/modules/gaming.nix @@ -19,12 +19,7 @@ mangohud vulkan-tools glxinfo - lutris ]; - networking.firewall.allowedUDPPorts = [ - # Factorio - 34197 - ]; }; } diff --git a/modules/nixpkgs.nix b/modules/nixpkgs.nix deleted file mode 100644 index 7fb99a7..0000000 --- a/modules/nixpkgs.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - documentation = { - enable = true; # documentation of packages - nixos.enable = false; # nixos documentation - man.enable = true; # manual pages and the man command - info.enable = false; # info pages and the info command - doc.enable = false; # documentation distributed in packages' /share/doc - }; -} diff --git a/nixosConfigurations/vinzenz-lpt2/hardware.nix b/nixosConfigurations/vinzenz-lpt2/hardware.nix index f51ccd1..7a0f222 100644 --- a/nixosConfigurations/vinzenz-lpt2/hardware.nix +++ b/nixosConfigurations/vinzenz-lpt2/hardware.nix @@ -1,6 +1,6 @@ -{ lib, ... }: +{ lib, vinzenzNixosModules, ... }: { - imports = [ ../../modules/intel-graphics.nix ]; + imports = [ vinzenzNixosModules.intel-graphics ]; config = { # intel cpu boot.kernelModules = [ diff --git a/nixosConfigurations/vinzenz-pc2/configuration.nix b/nixosConfigurations/vinzenz-pc2/configuration.nix index 4f6b859..d53ad71 100644 --- a/nixosConfigurations/vinzenz-pc2/configuration.nix +++ b/nixosConfigurations/vinzenz-pc2/configuration.nix @@ -1,36 +1,34 @@ { pkgs, ... }: { - imports = [ - ./hardware.nix - ./vscode-server.nix - ./hass.nix + nix.settings.extra-platforms = [ + "aarch64-linux" + "i686-linux" ]; - config = { - nix.settings.extra-platforms = [ - "aarch64-linux" - "i686-linux" - ]; - services.xserver.xkb = { - # Configure keymap in X11 - layout = "de"; - variant = ""; - }; - - # Configure console keymap - console.keyMap = "de"; - - users.users.vinzenz.openssh.authorizedKeys.keys = [ - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINrY6tcgnoC/xbgL7vxSjddEY9MBxRXe9n2cAHt88/TT home roaming'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC vinzenz-lpt2-roaming'' - ]; - - users.users.ronja.openssh.authorizedKeys.keys = [ - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ssh-host-key'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEgN6J8KyVyQqBAz+y3drXDmIsxOPkdPB+ISgpIP9Eld Generated By Termius'' - ]; - - environment.systemPackages = with pkgs; [ lact ]; + services.xserver.xkb = { + # Configure keymap in X11 + layout = "de"; + variant = ""; }; + + # Configure console keymap + console.keyMap = "de"; + + users.users.vinzenz.openssh.authorizedKeys.keys = [ + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINrY6tcgnoC/xbgL7vxSjddEY9MBxRXe9n2cAHt88/TT home roaming'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC vinzenz-lpt2-roaming'' + ]; + + users.users.ronja.openssh.authorizedKeys.keys = [ + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ssh-host-key'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEgN6J8KyVyQqBAz+y3drXDmIsxOPkdPB+ISgpIP9Eld Generated By Termius'' + ]; + + environment.systemPackages = with pkgs; [ lact ]; + + networking.firewall.allowedUDPPorts = [ + # Factorio + 34197 + ]; } diff --git a/nixosConfigurations/vinzenz-pc2/default.nix b/nixosConfigurations/vinzenz-pc2/default.nix index e31bdbc..4ba3632 100644 --- a/nixosConfigurations/vinzenz-pc2/default.nix +++ b/nixosConfigurations/vinzenz-pc2/default.nix @@ -3,6 +3,8 @@ imports = [ ./configuration.nix ./hardware.nix + ./vscode-server.nix + ./hass.nix ../../modules/gnome.nix ../../modules/gaming.nix diff --git a/nixosConfigurations/vinzenz-pc2/hardware.nix b/nixosConfigurations/vinzenz-pc2/hardware.nix index 316d9a2..1a72824 100644 --- a/nixosConfigurations/vinzenz-pc2/hardware.nix +++ b/nixosConfigurations/vinzenz-pc2/hardware.nix @@ -1,6 +1,6 @@ -{ ... }: +{ vinzenzNixosModules, ... }: { - imports = [ ../../modules/amd-graphics.nix ]; + imports = [ vinzenzNixosModules.amd-graphics ]; config = { # amd cpu boot.kernelModules = [ "kvm-amd" ]; diff --git a/nixosConfigurations/vinzenz-pc2/vscode-server.nix b/nixosConfigurations/vinzenz-pc2/vscode-server.nix index 199c015..6632b1f 100644 --- a/nixosConfigurations/vinzenz-pc2/vscode-server.nix +++ b/nixosConfigurations/vinzenz-pc2/vscode-server.nix @@ -15,16 +15,12 @@ ]; }; - networking = { - firewall = { - allowedTCPPorts = [ - 8542 - 8543 - 8544 - 80 - 1313 - 5201 - ]; - }; - }; + networking.firewall.allowedTCPPorts = [ + 8542 + 8543 + 8544 + 80 + 1313 + 5201 + ]; } diff --git a/nixosModules/amd-graphics.nix b/nixosModules/amd-graphics.nix new file mode 100644 index 0000000..cca6393 --- /dev/null +++ b/nixosModules/amd-graphics.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: +{ + boot.kernelModules = [ "amdgpu" ]; + services.xserver.videoDrivers = [ "amdgpu" ]; + + hardware = { + graphics.enable = true; + amdgpu = { + opencl.enable = true; + amdvlk = { + # TODO: this creates black borders around GNOME apps + # enable = true; + # support32Bit.enable = config.hardware.graphics.enable32Bit; + }; + overdrive.enable = true; + }; + }; + + environment.systemPackages = with pkgs; [ nvtopPackages.amd ]; +} diff --git a/modules/intel-graphics.nix b/nixosModules/intel-graphics.nix similarity index 100% rename from modules/intel-graphics.nix rename to nixosModules/intel-graphics.nix