From 1f1b9013300a1e4ab31c79770ad58204da7f1f66 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 14 Sep 2025 13:45:48 +0200 Subject: [PATCH 01/10] 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 From a208ca4df2f507657403377fd6427226685f2228 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 14 Sep 2025 14:01:42 +0200 Subject: [PATCH 02/10] move more modules --- flake.nix | 6 ++ modules/desktop-hardware.nix | 60 +++++-------------- .../forgejo-runner-1/hardware.nix | 5 -- nixosConfigurations/hetzner-vpn2/hardware.nix | 5 -- nixosConfigurations/ronja-pc/hardware.nix | 4 +- nixosConfigurations/vinzenz-lpt2/hardware.nix | 37 ++++++------ nixosConfigurations/vinzenz-pc2/hardware.nix | 5 +- nixosModules/quiet-boot.nix | 11 ++++ nixosModules/systemd-boot.nix | 11 ++++ 9 files changed, 70 insertions(+), 74 deletions(-) create mode 100644 nixosModules/quiet-boot.nix create mode 100644 nixosModules/systemd-boot.nix diff --git a/flake.nix b/flake.nix index 2622042..bb522a6 100644 --- a/flake.nix +++ b/flake.nix @@ -116,6 +116,10 @@ modules = [ { networking.hostName = device; + nixpkgs = { + inherit system; + hostPlatform = lib.mkDefault system; + }; system = { stateVersion = "22.11"; autoUpgrade.flake = "git+https://git.berlin.ccc.de/vinzenz/nixos-configuration.git"; @@ -176,6 +180,8 @@ self.nixosModules.gnome self.nixosModules.modern-desktop self.nixosModules.nix-ld + self.nixosModules.quiet-boot + self.nixosModules.systemd-boot home-manager.nixosModules.home-manager servicepoint-simulator.nixosModules.default diff --git a/modules/desktop-hardware.nix b/modules/desktop-hardware.nix index a8b2f93..97c13fc 100644 --- a/modules/desktop-hardware.nix +++ b/modules/desktop-hardware.nix @@ -1,48 +1,20 @@ +{ lib, ... }: { - lib, - pkgs, - ... -}: -{ - config = { - boot = { - kernelPackages = pkgs.linuxPackages_zen; - kernelParams = [ - "quiet" - "udev.log_level=3" - ]; - supportedFilesystems = [ "btrfs" ]; - initrd.supportedFilesystems = [ "btrfs" ]; - consoleLogLevel = 0; - initrd.verbose = false; - plymouth.enable = true; - loader = { - timeout = 3; - efi.canTouchEfiVariables = true; - systemd-boot = { - enable = true; - editor = false; # do not allow changing kernel parameters - consoleMode = "max"; - }; - }; - }; + networking.networkmanager.enable = true; + # 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.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; - networking.networkmanager.enable = true; - # 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.eno1.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; - - hardware = { - enableRedistributableFirmware = true; - bluetooth.enable = true; - }; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - - services.fwupd.enable = true; + hardware = { + enableRedistributableFirmware = true; + bluetooth.enable = true; }; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + + services.fwupd.enable = true; } diff --git a/nixosConfigurations/forgejo-runner-1/hardware.nix b/nixosConfigurations/forgejo-runner-1/hardware.nix index e3e6880..e8fbc56 100644 --- a/nixosConfigurations/forgejo-runner-1/hardware.nix +++ b/nixosConfigurations/forgejo-runner-1/hardware.nix @@ -3,11 +3,6 @@ imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; config = { - nixpkgs = { - hostPlatform = "aarch64-linux"; - system = "aarch64-linux"; - }; - boot = { tmp.cleanOnBoot = true; kernelParams = [ "console=tty" ]; diff --git a/nixosConfigurations/hetzner-vpn2/hardware.nix b/nixosConfigurations/hetzner-vpn2/hardware.nix index e8fa931..d7c96f0 100644 --- a/nixosConfigurations/hetzner-vpn2/hardware.nix +++ b/nixosConfigurations/hetzner-vpn2/hardware.nix @@ -3,11 +3,6 @@ imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; config = { - nixpkgs = { - hostPlatform = "aarch64-linux"; - system = "aarch64-linux"; - }; - boot = { tmp.cleanOnBoot = true; kernelParams = [ "console=tty" ]; diff --git a/nixosConfigurations/ronja-pc/hardware.nix b/nixosConfigurations/ronja-pc/hardware.nix index f668726..56e653c 100644 --- a/nixosConfigurations/ronja-pc/hardware.nix +++ b/nixosConfigurations/ronja-pc/hardware.nix @@ -1,6 +1,7 @@ -{ lib, ... }: { boot = { + supportedFilesystems = [ "btrfs" ]; + initrd.supportedFilesystems = [ "btrfs" ]; kernelModules = [ "kvm-intel" ]; extraModulePackages = [ ]; initrd = { @@ -37,6 +38,5 @@ { device = "/dev/disk/by-uuid/bf9d19fb-499b-4bfb-b67d-131fa5bf8259"; } ]; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = true; } diff --git a/nixosConfigurations/vinzenz-lpt2/hardware.nix b/nixosConfigurations/vinzenz-lpt2/hardware.nix index 7a0f222..4effcf9 100644 --- a/nixosConfigurations/vinzenz-lpt2/hardware.nix +++ b/nixosConfigurations/vinzenz-lpt2/hardware.nix @@ -1,4 +1,9 @@ -{ lib, vinzenzNixosModules, ... }: +{ + lib, + vinzenzNixosModules, + pkgs, + ... +}: { imports = [ vinzenzNixosModules.intel-graphics ]; config = { @@ -9,11 +14,6 @@ ]; hardware.cpu.intel.updateMicrocode = true; - boot.loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - # 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 @@ -22,17 +22,20 @@ hardware.enableRedistributableFirmware = true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - - boot.initrd = { - availableKernelModules = [ - "xhci_pci" - "thunderbolt" - "nvme" - ]; - luks.devices = { - "luks-2c654ff2-3c42-48d3-a1e3-9545679afaa3" = { - device = "/dev/disk/by-uuid/2c654ff2-3c42-48d3-a1e3-9545679afaa3"; + boot = { + kernelPackages = pkgs.linuxPackages_zen; + supportedFilesystems = [ "btrfs" ]; + initrd = { + supportedFilesystems = [ "btrfs" ]; + availableKernelModules = [ + "xhci_pci" + "thunderbolt" + "nvme" + ]; + luks.devices = { + "luks-2c654ff2-3c42-48d3-a1e3-9545679afaa3" = { + device = "/dev/disk/by-uuid/2c654ff2-3c42-48d3-a1e3-9545679afaa3"; + }; }; }; }; diff --git a/nixosConfigurations/vinzenz-pc2/hardware.nix b/nixosConfigurations/vinzenz-pc2/hardware.nix index 1a72824..5a8751f 100644 --- a/nixosConfigurations/vinzenz-pc2/hardware.nix +++ b/nixosConfigurations/vinzenz-pc2/hardware.nix @@ -1,4 +1,4 @@ -{ vinzenzNixosModules, ... }: +{ vinzenzNixosModules, pkgs, ... }: { imports = [ vinzenzNixosModules.amd-graphics ]; config = { @@ -14,6 +14,9 @@ "usbhid" "sd_mod" ]; # "usb_storage" + kernelPackages = pkgs.linuxPackages_zen; + supportedFilesystems = [ "btrfs" ]; + initrd.supportedFilesystems = [ "btrfs" ]; loader.efi.efiSysMountPoint = "/boot"; }; diff --git a/nixosModules/quiet-boot.nix b/nixosModules/quiet-boot.nix new file mode 100644 index 0000000..8dbcd57 --- /dev/null +++ b/nixosModules/quiet-boot.nix @@ -0,0 +1,11 @@ +{ + boot = { + kernelParams = [ + "quiet" + "udev.log_level=3" + ]; + consoleLogLevel = 0; + initrd.verbose = false; + plymouth.enable = true; + }; +} diff --git a/nixosModules/systemd-boot.nix b/nixosModules/systemd-boot.nix new file mode 100644 index 0000000..321a26c --- /dev/null +++ b/nixosModules/systemd-boot.nix @@ -0,0 +1,11 @@ +{ + boot.loader = { + timeout = 3; + efi.canTouchEfiVariables = true; + systemd-boot = { + enable = true; + editor = false; # do not allow changing kernel parameters + consoleMode = "max"; + }; + }; +} From f1855c1265a0fd3eb367aa82ef36169ac5c765d3 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 14 Sep 2025 14:12:14 +0200 Subject: [PATCH 03/10] remove dektop-hardware module --- flake.nix | 3 ++- modules/desktop-hardware.nix | 20 ------------------- nixosConfigurations/ronja-pc/default.nix | 1 - nixosConfigurations/ronja-pc/hardware.nix | 8 +++++++- nixosConfigurations/vinzenz-lpt2/default.nix | 1 - nixosConfigurations/vinzenz-lpt2/hardware.nix | 16 +++++++-------- nixosConfigurations/vinzenz-pc2/default.nix | 1 - nixosConfigurations/vinzenz-pc2/hardware.nix | 16 ++++++++++++--- nixosModules/firmware-updates.nix | 11 ++++++++++ 9 files changed, 40 insertions(+), 37 deletions(-) delete mode 100644 modules/desktop-hardware.nix create mode 100644 nixosModules/firmware-updates.nix diff --git a/flake.nix b/flake.nix index bb522a6..e526978 100644 --- a/flake.nix +++ b/flake.nix @@ -149,6 +149,7 @@ self.nixosModules.tailscale self.nixosModules.allowed-unfree-list self.nixosModules.extra-caches + self.nixosModules.systemd-boot zerforschen-plus.nixosModules.default ] @@ -181,7 +182,7 @@ self.nixosModules.modern-desktop self.nixosModules.nix-ld self.nixosModules.quiet-boot - self.nixosModules.systemd-boot + self.nixosModules.firmware-updates home-manager.nixosModules.home-manager servicepoint-simulator.nixosModules.default diff --git a/modules/desktop-hardware.nix b/modules/desktop-hardware.nix deleted file mode 100644 index 97c13fc..0000000 --- a/modules/desktop-hardware.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ lib, ... }: -{ - networking.networkmanager.enable = true; - # 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.eno1.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; - - hardware = { - enableRedistributableFirmware = true; - bluetooth.enable = true; - }; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - - services.fwupd.enable = true; -} diff --git a/nixosConfigurations/ronja-pc/default.nix b/nixosConfigurations/ronja-pc/default.nix index e0e9117..6b7fa0b 100644 --- a/nixosConfigurations/ronja-pc/default.nix +++ b/nixosConfigurations/ronja-pc/default.nix @@ -8,7 +8,6 @@ ../../modules/gaming.nix vinzenzNixosModules.steam ../../modules/desktop-environment.nix - ../../modules/desktop-hardware.nix ../../home/ronja ]; diff --git a/nixosConfigurations/ronja-pc/hardware.nix b/nixosConfigurations/ronja-pc/hardware.nix index 56e653c..e6ad854 100644 --- a/nixosConfigurations/ronja-pc/hardware.nix +++ b/nixosConfigurations/ronja-pc/hardware.nix @@ -1,3 +1,4 @@ +{ lib, ... }: { boot = { supportedFilesystems = [ "btrfs" ]; @@ -38,5 +39,10 @@ { device = "/dev/disk/by-uuid/bf9d19fb-499b-4bfb-b67d-131fa5bf8259"; } ]; - hardware.cpu.intel.updateMicrocode = true; + hardware.bluetooth.enable = true; + + networking = { + networkmanager.enable = true; + useDHCP = lib.mkDefault true; + }; } diff --git a/nixosConfigurations/vinzenz-lpt2/default.nix b/nixosConfigurations/vinzenz-lpt2/default.nix index d29ae65..02f6d82 100644 --- a/nixosConfigurations/vinzenz-lpt2/default.nix +++ b/nixosConfigurations/vinzenz-lpt2/default.nix @@ -10,7 +10,6 @@ vinzenzNixosModules.printing vinzenzNixosModules.podman ../../modules/desktop-environment.nix - ../../modules/desktop-hardware.nix ../../home/vinzenz ../../home/ronja diff --git a/nixosConfigurations/vinzenz-lpt2/hardware.nix b/nixosConfigurations/vinzenz-lpt2/hardware.nix index 4effcf9..cf5157c 100644 --- a/nixosConfigurations/vinzenz-lpt2/hardware.nix +++ b/nixosConfigurations/vinzenz-lpt2/hardware.nix @@ -1,7 +1,7 @@ { - lib, vinzenzNixosModules, pkgs, + lib, ... }: { @@ -12,15 +12,11 @@ "kvm-intel" "xe" ]; - hardware.cpu.intel.updateMicrocode = true; - # 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; - - hardware.enableRedistributableFirmware = true; + networking = { + networkmanager.enable = true; + useDHCP = lib.mkDefault true; + }; boot = { kernelPackages = pkgs.linuxPackages_zen; @@ -62,5 +58,7 @@ services.thermald.enable = true; services.hardware.bolt.enable = true; # thunderbolt security + + hardware.bluetooth.enable = true; }; } diff --git a/nixosConfigurations/vinzenz-pc2/default.nix b/nixosConfigurations/vinzenz-pc2/default.nix index 4ba3632..0b5073d 100644 --- a/nixosConfigurations/vinzenz-pc2/default.nix +++ b/nixosConfigurations/vinzenz-pc2/default.nix @@ -13,7 +13,6 @@ vinzenzNixosModules.podman #../../modules/niri.nix ../../modules/desktop-environment.nix - ../../modules/desktop-hardware.nix ../../home/vinzenz ../../home/ronja diff --git a/nixosConfigurations/vinzenz-pc2/hardware.nix b/nixosConfigurations/vinzenz-pc2/hardware.nix index 5a8751f..6a4c71a 100644 --- a/nixosConfigurations/vinzenz-pc2/hardware.nix +++ b/nixosConfigurations/vinzenz-pc2/hardware.nix @@ -1,10 +1,14 @@ -{ vinzenzNixosModules, pkgs, ... }: +{ + vinzenzNixosModules, + pkgs, + lib, + ... +}: { imports = [ vinzenzNixosModules.amd-graphics ]; config = { # amd cpu boot.kernelModules = [ "kvm-amd" ]; - hardware.cpu.amd.updateMicrocode = true; boot = { initrd.availableKernelModules = [ @@ -23,6 +27,12 @@ fileSystems = import ./fstab.nix; swapDevices = [ ]; - networking.interfaces.eno1.wakeOnLan.enable = true; + networking = { + networkmanager.enable = true; + useDHCP = lib.mkDefault true; + interfaces.eno1.wakeOnLan.enable = true; + }; + + hardware.bluetooth.enable = true; }; } diff --git a/nixosModules/firmware-updates.nix b/nixosModules/firmware-updates.nix new file mode 100644 index 0000000..8e81b72 --- /dev/null +++ b/nixosModules/firmware-updates.nix @@ -0,0 +1,11 @@ +{ + hardware = { + enableRedistributableFirmware = true; + cpu = { + amd.updateMicrocode = true; + intel.updateMicrocode = true; + }; + }; + + services.fwupd.enable = true; +} From f5e1b9c7eefe2765560b89d2e9a66c13ac2abab3 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 15 Sep 2025 17:18:59 +0200 Subject: [PATCH 04/10] move shared gnome config to homeModule --- flake.nix | 2 + home/vinzenz/configuration.nix | 2 + home/vinzenz/gnome.nix | 28 ++++----- homeModules/gnome-extensions.nix | 101 +++++++++++++++++++++++++++++++ modules/gaming.nix | 35 +++++------ modules/gnome-shared-dconf.nix | 43 ------------- modules/gnome.nix | 95 ++++++++++++----------------- 7 files changed, 174 insertions(+), 132 deletions(-) create mode 100644 homeModules/gnome-extensions.nix delete mode 100644 modules/gnome-shared-dconf.nix diff --git a/flake.nix b/flake.nix index e526978..e23e1f3 100644 --- a/flake.nix +++ b/flake.nix @@ -106,6 +106,7 @@ commonSpecialArgs = { inherit device; vinzenzHomeModules = self.homeModules; + vinzenzLib = self.lib; }; in nixpkgs.lib.nixosSystem { @@ -170,6 +171,7 @@ self.homeModules.templates self.homeModules.zsh-basics self.homeModules.nano + self.homeModules.gnome-extensions ]; } diff --git a/home/vinzenz/configuration.nix b/home/vinzenz/configuration.nix index ad8f18a..ace8086 100644 --- a/home/vinzenz/configuration.nix +++ b/home/vinzenz/configuration.nix @@ -58,6 +58,8 @@ nextcloud-client lutris + + foliate ]; home.file = { diff --git a/home/vinzenz/gnome.nix b/home/vinzenz/gnome.nix index 3a4f479..ac8875e 100644 --- a/home/vinzenz/gnome.nix +++ b/home/vinzenz/gnome.nix @@ -1,23 +1,21 @@ { pkgs, ... }: { config = { - home.packages = - with pkgs.gnomeExtensions; - [ - # battery-health-charging - quick-settings-tweaker - solaar-extension - alphabetical-app-grid - ] - ++ (with pkgs; [ foliate ]); + home.packages = with pkgs.gnomeExtensions; [ + solaar-extension + ]; dconf.settings = { - "org/gnome/shell" = { - enabled-extensions = [ - "GPaste@gnome-shell-extensions.gnome.org" - "solaar-extension@sidevesh" - "AlphabeticalAppGrid@stuarthayhurst" - ]; + "org/gnome/shell".enabled-extensions = [ + "GPaste@gnome-shell-extensions.gnome.org" + "solaar-extension@sidevesh" + ]; + "org/gnome/desktop/interface".color-scheme = "prefer-dark"; + "org/gnome/desktop/wm/keybindings" = { + switch-windows = [ "Tab" ]; + switch-windows-backward = [ "Tab" ]; + switch-applications = [ "Tab" ]; + switch-applications-backward = [ "Tab" ]; }; }; }; diff --git a/homeModules/gnome-extensions.nix b/homeModules/gnome-extensions.nix new file mode 100644 index 0000000..9c30c40 --- /dev/null +++ b/homeModules/gnome-extensions.nix @@ -0,0 +1,101 @@ +{ + lib, + pkgs, + osConfig, + config, + ... +}: +{ + options.vinzenz.gnome-extensions = + let + mkDefaultEnabledOption = + name: + lib.mkOption { + default = true; + example = false; + description = "Whether to enable ${name}."; + type = lib.types.bool; + }; + in + { + enable = mkDefaultEnabledOption "gnome extended options"; + appindicator.enable = mkDefaultEnabledOption "appindicator"; + caffeine.enable = mkDefaultEnabledOption "caffeine"; + tailscale-qs.enable = lib.mkOption { + default = osConfig.services.tailscale.enable; + example = true; + description = "Whether to enable tailscale quick setting."; + type = lib.types.bool; + }; + alphabetic-apps.enable = mkDefaultEnabledOption "alphabetic app grid"; + clock-show-seconds = mkDefaultEnabledOption "clock seconds"; + show-battery-percentage = mkDefaultEnabledOption "battery percentage"; + enable-numlock = mkDefaultEnabledOption "num lock on login"; + enable-systool-warning = lib.mkEnableOption "system configuration tool warning"; + edge-tiling = mkDefaultEnabledOption "edge tiling"; + dynamic-workspaces = mkDefaultEnabledOption "dynamic workspaces"; + tap-to-click = mkDefaultEnabledOption "tap to click"; + two-finger-scrolling = mkDefaultEnabledOption "two finger scrolling"; + }; + + config = + let + cfg = config.vinzenz.gnome-extensions; + in + lib.mkIf cfg.enable ( + lib.mkMerge [ + { + dconf = { + enable = true; + settings = { + "org/gnome/shell" = { + disable-user-extensions = false; + disabled-extensions = [ ]; + enabled-extensions = [ ]; + }; + + "ca/desrt/dconf-editor".show-warning = cfg.enable-systool-warning; + "org/gnome/tweaks".show-extensions-notice = cfg.enable-systool-warning; + "org/gnome/mutter" = { + inherit (cfg) edge-tiling dynamic-workspaces; + }; + "org/gnome/desktop/peripherals/touchpad" = { + inherit (cfg) tap-to-click; + two-finger-scrolling-enabled = cfg.two-finger-scrolling; + }; + "org/gnome/desktop/interface" = { + inherit (cfg) clock-show-seconds show-battery-percentage; + }; + }; + }; + } + + (lib.mkIf cfg.tailscale-qs.enable { + home.packages = [ pkgs.gnomeExtensions.tailscale-qs ]; + dconf.settings."org/gnome/shell".enabled-extensions = [ "tailscale@joaophi.github.com" ]; + }) + + (lib.mkIf cfg.appindicator.enable { + home.packages = [ pkgs.gnomeExtensions.appindicator ]; + dconf.settings."org/gnome/shell".enabled-extensions = [ "appindicatorsupport@rgcjonas.gmail.com" ]; + }) + + (lib.mkIf cfg.caffeine.enable { + home.packages = [ pkgs.gnomeExtensions.caffeine ]; + dconf.settings."org/gnome/shell".enabled-extensions = [ "caffeine@patapon.info" ]; + }) + + (lib.mkIf cfg.alphabetic-apps.enable { + home.packages = [ pkgs.gnomeExtensions.alphabetical-app-grid ]; + dconf.settings = { + "org/gnome/shell".enabled-extensions = [ "AlphabeticalAppGrid@stuarthayhurst" ]; + "org/gnome/shell/extensions/alphabetical-app-grid".folder-order-position = "start"; + }; + }) + + (lib.mkIf cfg.enable-numlock { + dconf.settings."org/gnome/desktop/peripherals/keyboard".numlock-state = true; + }) + ] + ); +} diff --git a/modules/gaming.nix b/modules/gaming.nix index d93b31d..2b9cb51 100644 --- a/modules/gaming.nix +++ b/modules/gaming.nix @@ -1,25 +1,22 @@ { pkgs, ... }: { - config = { - hardware = { - graphics = { - enable32Bit = true; - extraPackages = with pkgs; [ mangohud ]; - extraPackages32 = with pkgs; [ mangohud ]; - }; - - xpadneo.enable = true; + hardware = { + graphics = { + enable32Bit = true; + extraPackages = with pkgs; [ mangohud ]; + extraPackages32 = with pkgs; [ mangohud ]; }; - environment.systemPackages = with pkgs; [ - wineWowPackages.stagingFull - wineWowPackages.fonts - winetricks - dxvk - mangohud - vulkan-tools - glxinfo - ]; - + xpadneo.enable = true; }; + + environment.systemPackages = with pkgs; [ + wineWowPackages.stagingFull + wineWowPackages.fonts + winetricks + dxvk + mangohud + vulkan-tools + glxinfo + ]; } diff --git a/modules/gnome-shared-dconf.nix b/modules/gnome-shared-dconf.nix deleted file mode 100644 index 5d54628..0000000 --- a/modules/gnome-shared-dconf.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - "org/gnome/desktop/interface" = { - color-scheme = "prefer-dark"; - clock-show-seconds = true; - show-battery-percentage = true; - }; - "org/gnome/mutter" = { - edge-tiling = true; - dynamic-workspaces = true; - }; - "org/gnome/desktop/peripherals/keyboard" = { - numlock-state = true; - }; - "org/gnome/desktop/peripherals/touchpad" = { - tap-to-click = true; - two-finger-scrolling-enabled = true; - }; - "org/gnome/tweaks" = { - show-extensions-notice = false; - }; - "org/gnome/shell" = { - disable-user-extensions = false; - disabled-extensions = [ ]; - enabled-extensions = [ - "tailscale@joaophi.github.com" - "appindicatorsupport@rgcjonas.gmail.com" - "workspace-indicator@gnome-shell-extensions.gcampax.github.com" - "caffeine@patapon.info" - ]; - }; - "ca/desrt/dconf-editor" = { - show-warning = false; - }; - "org/gnome/desktop/wm/keybindings" = { - switch-windows = [ "Tab" ]; - switch-windows-backward = [ "Tab" ]; - switch-applications = [ "Tab" ]; - switch-applications-backward = [ "Tab" ]; - }; - "org/gnome/shell/extensions/alphabetical-app-grid" = { - folder-order-position = "start"; - }; -} diff --git a/modules/gnome.nix b/modules/gnome.nix index 507247d..c347e72 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -1,61 +1,46 @@ { pkgs, ... }: { - config = { - # remove some gnome default apps - environment.gnome.excludePackages = with pkgs; [ - cheese # photo booth - epiphany # web browser - evince # document viewer - geary # email client - gnome-maps - gnome-weather - gnome-tour - sysprof - orca # screen reader - gnome-weather - gnome-backgrounds - gnome-user-docs - yelp # help app - # gnome-music - # totem # video player - # snapshot # camera - # baobab # disk usage - ]; + # remove some gnome default apps + environment.gnome.excludePackages = with pkgs; [ + cheese # photo booth + epiphany # web browser + evince # document viewer + geary # email client + gnome-maps + gnome-weather + gnome-tour + sysprof + orca # screen reader + gnome-weather + gnome-backgrounds + gnome-user-docs + yelp # help app + # gnome-music + # totem # video player + # snapshot # camera + # baobab # disk usage + ]; - # RDP connections - services.gnome.gnome-remote-desktop.enable = true; - networking.firewall.allowedTCPPorts = [ 3389 ]; + # RDP connections + services.gnome.gnome-remote-desktop.enable = true; + networking.firewall.allowedTCPPorts = [ 3389 ]; - home-manager.sharedModules = [ - { - home.packages = - with pkgs; - [ - gitg - meld - simple-scan - pinta - dconf-editor - gpaste - ghex - impression - papers + home-manager.sharedModules = [ + { + home.packages = with pkgs; [ + gitg + meld + simple-scan + pinta + dconf-editor + gpaste + ghex + impression + papers - # graphical installer for flatpak apps - gnome-software - ] - ++ (with gnomeExtensions; [ - caffeine - appindicator - ]); - - dconf.settings = import ./gnome-shared-dconf.nix; - } - - { - home.packages = with pkgs; [ trayscale ] ++ (with gnomeExtensions; [ tailscale-qs ]); - dconf.settings."org/gnome/shell".enabled-extensions = [ "tailscale@joaophi.github.com" ]; - } - ]; - }; + # graphical installer for flatpak apps + gnome-software + ]; + } + ]; } From f89c75aad292c637b90289916981675fed7cdcf7 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 15 Sep 2025 17:52:33 +0200 Subject: [PATCH 05/10] move more stuff into modules --- home/vinzenz/gnome.nix | 13 ++- modules/desktop-environment.nix | 31 ------- modules/gnome.nix | 46 ---------- nixosConfigurations/ronja-pc/default.nix | 6 +- nixosConfigurations/vinzenz-lpt2/default.nix | 6 +- nixosConfigurations/vinzenz-pc2/default.nix | 7 +- nixosModules/en-de.nix | 7 ++ nixosModules/gnome.nix | 88 +++++++++++++------ {modules => nixosModules}/latex.nix | 0 {modules => nixosModules}/niri.nix | 0 nixosModules/vinzenz-desktop-settings.nix | 28 ++++++ .../wine-gaming.nix | 0 12 files changed, 116 insertions(+), 116 deletions(-) delete mode 100644 modules/desktop-environment.nix delete mode 100644 modules/gnome.nix rename {modules => nixosModules}/latex.nix (100%) rename {modules => nixosModules}/niri.nix (100%) create mode 100644 nixosModules/vinzenz-desktop-settings.nix rename modules/gaming.nix => nixosModules/wine-gaming.nix (100%) diff --git a/home/vinzenz/gnome.nix b/home/vinzenz/gnome.nix index ac8875e..7424363 100644 --- a/home/vinzenz/gnome.nix +++ b/home/vinzenz/gnome.nix @@ -1,8 +1,17 @@ { pkgs, ... }: { config = { - home.packages = with pkgs.gnomeExtensions; [ - solaar-extension + home.packages = with pkgs; [ + gitg + meld + simple-scan + pinta + dconf-editor + impression # usb image writer + papers # pdf viewer + gnome-software # for flatpak apps + gnomeExtensions.solaar-extension + snapshot ]; dconf.settings = { diff --git a/modules/desktop-environment.nix b/modules/desktop-environment.nix deleted file mode 100644 index e839353..0000000 --- a/modules/desktop-environment.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ pkgs, ... }: -{ - config = { - programs.firefox.enable = true; - - environment.systemPackages = with pkgs; [ - lm_sensors - - # office - #libreoffice-qt - #hunspell - #hunspellDicts.de-de - #hunspellDicts.en-us-large - ]; - - fonts = { - enableDefaultPackages = true; - fontconfig.defaultFonts.monospace = [ "FiraCode Nerd Font" ]; - packages = with pkgs; [ - nerd-fonts.fira-code - roboto-mono - recursive - ]; - }; - - hardware.logitech.wireless = { - enable = true; - enableGraphical = true; - }; - }; -} diff --git a/modules/gnome.nix b/modules/gnome.nix deleted file mode 100644 index c347e72..0000000 --- a/modules/gnome.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ pkgs, ... }: -{ - # remove some gnome default apps - environment.gnome.excludePackages = with pkgs; [ - cheese # photo booth - epiphany # web browser - evince # document viewer - geary # email client - gnome-maps - gnome-weather - gnome-tour - sysprof - orca # screen reader - gnome-weather - gnome-backgrounds - gnome-user-docs - yelp # help app - # gnome-music - # totem # video player - # snapshot # camera - # baobab # disk usage - ]; - - # RDP connections - services.gnome.gnome-remote-desktop.enable = true; - networking.firewall.allowedTCPPorts = [ 3389 ]; - - home-manager.sharedModules = [ - { - home.packages = with pkgs; [ - gitg - meld - simple-scan - pinta - dconf-editor - gpaste - ghex - impression - papers - - # graphical installer for flatpak apps - gnome-software - ]; - } - ]; -} diff --git a/nixosConfigurations/ronja-pc/default.nix b/nixosConfigurations/ronja-pc/default.nix index 6b7fa0b..225fe6f 100644 --- a/nixosConfigurations/ronja-pc/default.nix +++ b/nixosConfigurations/ronja-pc/default.nix @@ -4,10 +4,10 @@ ./configuration.nix ./hardware.nix - ../../modules/gnome.nix - ../../modules/gaming.nix + vinzenzNixosModules.gnome vinzenzNixosModules.steam - ../../modules/desktop-environment.nix + vinzenzNixosModules.wine-gaming + vinzenzNixosModules.vinzenz-desktop-settings ../../home/ronja ]; diff --git a/nixosConfigurations/vinzenz-lpt2/default.nix b/nixosConfigurations/vinzenz-lpt2/default.nix index 02f6d82..fef8d34 100644 --- a/nixosConfigurations/vinzenz-lpt2/default.nix +++ b/nixosConfigurations/vinzenz-lpt2/default.nix @@ -4,12 +4,12 @@ ./configuration.nix ./hardware.nix - ../../modules/gnome.nix - ../../modules/gaming.nix + vinzenzNixosModules.gnome + vinzenzNixosModules.wine-gaming vinzenzNixosModules.steam vinzenzNixosModules.printing vinzenzNixosModules.podman - ../../modules/desktop-environment.nix + vinzenzNixosModules.vinzenz-desktop-settings ../../home/vinzenz ../../home/ronja diff --git a/nixosConfigurations/vinzenz-pc2/default.nix b/nixosConfigurations/vinzenz-pc2/default.nix index 0b5073d..3400235 100644 --- a/nixosConfigurations/vinzenz-pc2/default.nix +++ b/nixosConfigurations/vinzenz-pc2/default.nix @@ -6,13 +6,12 @@ ./vscode-server.nix ./hass.nix - ../../modules/gnome.nix - ../../modules/gaming.nix + vinzenzNixosModules.gnome + vinzenzNixosModules.wine-gaming vinzenzNixosModules.steam vinzenzNixosModules.printing vinzenzNixosModules.podman - #../../modules/niri.nix - ../../modules/desktop-environment.nix + vinzenzNixosModules.vinzenz-desktop-settings ../../home/vinzenz ../../home/ronja diff --git a/nixosModules/en-de.nix b/nixosModules/en-de.nix index 0ed4faf..a91780e 100644 --- a/nixosModules/en-de.nix +++ b/nixosModules/en-de.nix @@ -1,3 +1,4 @@ +{ pkgs, ... }: { i18n = { defaultLocale = "en_US.UTF-8"; @@ -21,4 +22,10 @@ "en-US" "de" ]; + + environment.systemPackages = [ + pkgs.hunspell + pkgs.hunspellDicts.de-de + pkgs.hunspellDicts.en-us + ]; } diff --git a/nixosModules/gnome.nix b/nixosModules/gnome.nix index 3afe9ce..7a6f920 100644 --- a/nixosModules/gnome.nix +++ b/nixosModules/gnome.nix @@ -1,31 +1,65 @@ -{ pkgs, ... }: { - services = { - xserver = { - # Enable the GNOME Desktop Environment. - desktopManager.gnome = { - enable = true; - extraGSettingsOverridePackages = [ pkgs.mutter ]; - extraGSettingsOverrides = '' - [org.gnome.mutter] - experimental-features=['scale-monitor-framebuffer'] - ''; + pkgs, + lib, + config, + ... +}: +{ + options.vinzenz = { + keep-gnome-default-apps = lib.mkEnableOption "keep gnome default apps"; + }; + + config = lib.mkMerge [ + { + services = { + xserver = { + # Enable the GNOME Desktop Environment. + desktopManager.gnome = { + enable = true; + extraGSettingsOverridePackages = [ pkgs.mutter ]; + extraGSettingsOverrides = '' + [org.gnome.mutter] + experimental-features=['scale-monitor-framebuffer'] + ''; + }; + displayManager.gdm.enable = true; + excludePackages = [ pkgs.xterm ]; + }; + + displayManager.defaultSession = "gnome"; + + gnome = { + tinysparql.enable = false; + localsearch.enable = false; + sushi.enable = true; + }; }; - displayManager.gdm.enable = true; - excludePackages = [ pkgs.xterm ]; - }; - displayManager.defaultSession = "gnome"; - - gnome = { - tinysparql.enable = false; - localsearch.enable = false; - sushi.enable = true; - }; - }; - - programs = { - dconf.enable = true; - gpaste.enable = true; - }; + programs = { + dconf.enable = true; + gpaste.enable = true; + }; + } + (lib.mkIf (!config.vinzenz.keep-gnome-default-apps) { + environment.gnome.excludePackages = with pkgs; [ + cheese # photo booth + epiphany # web browser + evince # document viewer + geary # email client + gnome-maps + gnome-weather + gnome-tour + sysprof + orca # screen reader + gnome-weather + gnome-backgrounds + gnome-user-docs + yelp # help app + gnome-music + totem # video player + snapshot # camera + baobab # disk usage + ]; + }) + ]; } diff --git a/modules/latex.nix b/nixosModules/latex.nix similarity index 100% rename from modules/latex.nix rename to nixosModules/latex.nix diff --git a/modules/niri.nix b/nixosModules/niri.nix similarity index 100% rename from modules/niri.nix rename to nixosModules/niri.nix diff --git a/nixosModules/vinzenz-desktop-settings.nix b/nixosModules/vinzenz-desktop-settings.nix new file mode 100644 index 0000000..24b4b4f --- /dev/null +++ b/nixosModules/vinzenz-desktop-settings.nix @@ -0,0 +1,28 @@ +{ pkgs, ... }: +{ + programs.firefox.enable = true; + + environment.systemPackages = with pkgs; [ + lm_sensors + libreoffice-qt6 + ]; + + fonts = { + enableDefaultPackages = true; + fontconfig.defaultFonts.monospace = [ "FiraCode Nerd Font" ]; + packages = with pkgs; [ + nerd-fonts.fira-code + roboto-mono + recursive + ]; + }; + + hardware.logitech.wireless = { + enable = true; + enableGraphical = true; + }; + + # RDP connections + services.gnome.gnome-remote-desktop.enable = true; + networking.firewall.allowedTCPPorts = [ 3389 ]; +} diff --git a/modules/gaming.nix b/nixosModules/wine-gaming.nix similarity index 100% rename from modules/gaming.nix rename to nixosModules/wine-gaming.nix From 1bebb5d096d4315756002ed1a67acc324417c617 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 15 Sep 2025 18:07:38 +0200 Subject: [PATCH 06/10] mv home homeConfigurations --- {home => homeConfigurations}/ronja/configuration.nix | 0 {home => homeConfigurations}/ronja/default.nix | 0 {home => homeConfigurations}/ronja/vscode.nix | 0 .../vinzenz/.config/containers/policy.json | 0 {home => homeConfigurations}/vinzenz/.zsh/p10k.zsh | 0 {home => homeConfigurations}/vinzenz/configuration.nix | 0 {home => homeConfigurations}/vinzenz/default.nix | 0 {home => homeConfigurations}/vinzenz/editorconfig.nix | 0 {home => homeConfigurations}/vinzenz/fuzzel.nix | 0 {home => homeConfigurations}/vinzenz/git.nix | 0 {home => homeConfigurations}/vinzenz/gnome.nix | 0 {home => homeConfigurations}/vinzenz/niri.nix | 0 {home => homeConfigurations}/vinzenz/ssh.nix | 0 {home => homeConfigurations}/vinzenz/swaylock.nix | 0 {home => homeConfigurations}/vinzenz/vscode.nix | 0 {home => homeConfigurations}/vinzenz/waybar.nix | 0 {home => homeConfigurations}/vinzenz/zsh.nix | 0 17 files changed, 0 insertions(+), 0 deletions(-) rename {home => homeConfigurations}/ronja/configuration.nix (100%) rename {home => homeConfigurations}/ronja/default.nix (100%) rename {home => homeConfigurations}/ronja/vscode.nix (100%) rename {home => homeConfigurations}/vinzenz/.config/containers/policy.json (100%) rename {home => homeConfigurations}/vinzenz/.zsh/p10k.zsh (100%) rename {home => homeConfigurations}/vinzenz/configuration.nix (100%) rename {home => homeConfigurations}/vinzenz/default.nix (100%) rename {home => homeConfigurations}/vinzenz/editorconfig.nix (100%) rename {home => homeConfigurations}/vinzenz/fuzzel.nix (100%) rename {home => homeConfigurations}/vinzenz/git.nix (100%) rename {home => homeConfigurations}/vinzenz/gnome.nix (100%) rename {home => homeConfigurations}/vinzenz/niri.nix (100%) rename {home => homeConfigurations}/vinzenz/ssh.nix (100%) rename {home => homeConfigurations}/vinzenz/swaylock.nix (100%) rename {home => homeConfigurations}/vinzenz/vscode.nix (100%) rename {home => homeConfigurations}/vinzenz/waybar.nix (100%) rename {home => homeConfigurations}/vinzenz/zsh.nix (100%) diff --git a/home/ronja/configuration.nix b/homeConfigurations/ronja/configuration.nix similarity index 100% rename from home/ronja/configuration.nix rename to homeConfigurations/ronja/configuration.nix diff --git a/home/ronja/default.nix b/homeConfigurations/ronja/default.nix similarity index 100% rename from home/ronja/default.nix rename to homeConfigurations/ronja/default.nix diff --git a/home/ronja/vscode.nix b/homeConfigurations/ronja/vscode.nix similarity index 100% rename from home/ronja/vscode.nix rename to homeConfigurations/ronja/vscode.nix diff --git a/home/vinzenz/.config/containers/policy.json b/homeConfigurations/vinzenz/.config/containers/policy.json similarity index 100% rename from home/vinzenz/.config/containers/policy.json rename to homeConfigurations/vinzenz/.config/containers/policy.json diff --git a/home/vinzenz/.zsh/p10k.zsh b/homeConfigurations/vinzenz/.zsh/p10k.zsh similarity index 100% rename from home/vinzenz/.zsh/p10k.zsh rename to homeConfigurations/vinzenz/.zsh/p10k.zsh diff --git a/home/vinzenz/configuration.nix b/homeConfigurations/vinzenz/configuration.nix similarity index 100% rename from home/vinzenz/configuration.nix rename to homeConfigurations/vinzenz/configuration.nix diff --git a/home/vinzenz/default.nix b/homeConfigurations/vinzenz/default.nix similarity index 100% rename from home/vinzenz/default.nix rename to homeConfigurations/vinzenz/default.nix diff --git a/home/vinzenz/editorconfig.nix b/homeConfigurations/vinzenz/editorconfig.nix similarity index 100% rename from home/vinzenz/editorconfig.nix rename to homeConfigurations/vinzenz/editorconfig.nix diff --git a/home/vinzenz/fuzzel.nix b/homeConfigurations/vinzenz/fuzzel.nix similarity index 100% rename from home/vinzenz/fuzzel.nix rename to homeConfigurations/vinzenz/fuzzel.nix diff --git a/home/vinzenz/git.nix b/homeConfigurations/vinzenz/git.nix similarity index 100% rename from home/vinzenz/git.nix rename to homeConfigurations/vinzenz/git.nix diff --git a/home/vinzenz/gnome.nix b/homeConfigurations/vinzenz/gnome.nix similarity index 100% rename from home/vinzenz/gnome.nix rename to homeConfigurations/vinzenz/gnome.nix diff --git a/home/vinzenz/niri.nix b/homeConfigurations/vinzenz/niri.nix similarity index 100% rename from home/vinzenz/niri.nix rename to homeConfigurations/vinzenz/niri.nix diff --git a/home/vinzenz/ssh.nix b/homeConfigurations/vinzenz/ssh.nix similarity index 100% rename from home/vinzenz/ssh.nix rename to homeConfigurations/vinzenz/ssh.nix diff --git a/home/vinzenz/swaylock.nix b/homeConfigurations/vinzenz/swaylock.nix similarity index 100% rename from home/vinzenz/swaylock.nix rename to homeConfigurations/vinzenz/swaylock.nix diff --git a/home/vinzenz/vscode.nix b/homeConfigurations/vinzenz/vscode.nix similarity index 100% rename from home/vinzenz/vscode.nix rename to homeConfigurations/vinzenz/vscode.nix diff --git a/home/vinzenz/waybar.nix b/homeConfigurations/vinzenz/waybar.nix similarity index 100% rename from home/vinzenz/waybar.nix rename to homeConfigurations/vinzenz/waybar.nix diff --git a/home/vinzenz/zsh.nix b/homeConfigurations/vinzenz/zsh.nix similarity index 100% rename from home/vinzenz/zsh.nix rename to homeConfigurations/vinzenz/zsh.nix From 87062e05c4b27921cd61ebd58d07d8e90e3a8be0 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 15 Sep 2025 18:11:53 +0200 Subject: [PATCH 07/10] update imports --- flake.nix | 2 ++ nixosConfigurations/ronja-pc/default.nix | 4 ++-- nixosConfigurations/vinzenz-lpt2/default.nix | 6 +++--- nixosConfigurations/vinzenz-pc2/default.nix | 6 +++--- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index e23e1f3..18a06b9 100644 --- a/flake.nix +++ b/flake.nix @@ -113,6 +113,7 @@ inherit system; specialArgs = commonSpecialArgs // { vinzenzNixosModules = self.nixosModules; + vinzenzHomeConfigurations = self.homeConfigurations; }; modules = [ { @@ -216,6 +217,7 @@ }; homeModules = self.lib.importDir ./homeModules; + homeConfigurations = self.lib.importDir ./homeConfigurations; formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-tree); }; diff --git a/nixosConfigurations/ronja-pc/default.nix b/nixosConfigurations/ronja-pc/default.nix index 225fe6f..d1a97db 100644 --- a/nixosConfigurations/ronja-pc/default.nix +++ b/nixosConfigurations/ronja-pc/default.nix @@ -1,4 +1,4 @@ -{ vinzenzNixosModules, ... }: +{ vinzenzNixosModules, vinzenzHomeConfigurations, ... }: { imports = [ ./configuration.nix @@ -9,6 +9,6 @@ vinzenzNixosModules.wine-gaming vinzenzNixosModules.vinzenz-desktop-settings - ../../home/ronja + vinzenzHomeConfigurations.ronja ]; } diff --git a/nixosConfigurations/vinzenz-lpt2/default.nix b/nixosConfigurations/vinzenz-lpt2/default.nix index fef8d34..df8e26a 100644 --- a/nixosConfigurations/vinzenz-lpt2/default.nix +++ b/nixosConfigurations/vinzenz-lpt2/default.nix @@ -1,4 +1,4 @@ -{ vinzenzNixosModules, ... }: +{ vinzenzNixosModules, vinzenzHomeConfigurations, ... }: { imports = [ ./configuration.nix @@ -11,7 +11,7 @@ vinzenzNixosModules.podman vinzenzNixosModules.vinzenz-desktop-settings - ../../home/vinzenz - ../../home/ronja + vinzenzHomeConfigurations.vinzenz + vinzenzHomeConfigurations.ronja ]; } diff --git a/nixosConfigurations/vinzenz-pc2/default.nix b/nixosConfigurations/vinzenz-pc2/default.nix index 3400235..0b17b3a 100644 --- a/nixosConfigurations/vinzenz-pc2/default.nix +++ b/nixosConfigurations/vinzenz-pc2/default.nix @@ -1,4 +1,4 @@ -{ vinzenzNixosModules, ... }: +{ vinzenzNixosModules, vinzenzHomeConfigurations, ... }: { imports = [ ./configuration.nix @@ -13,7 +13,7 @@ vinzenzNixosModules.podman vinzenzNixosModules.vinzenz-desktop-settings - ../../home/vinzenz - ../../home/ronja + vinzenzHomeConfigurations.vinzenz + vinzenzHomeConfigurations.ronja ]; } From 8fc672bfcfcba7f9448c4a024c3d4834929c1bdb Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 15 Sep 2025 19:01:30 +0200 Subject: [PATCH 08/10] move user and additional module handling into flake.nix --- flake.nix | 103 +++++++++++++----- homeConfigurations/ronja/configuration.nix | 60 ---------- homeConfigurations/ronja/default.nix | 76 +++++++++---- homeConfigurations/vinzenz/default.nix | 62 +++-------- .../forgejo-runner-1/default.nix | 3 - nixosConfigurations/ronja-pc/default.nix | 8 -- nixosConfigurations/vinzenz-lpt2/default.nix | 11 -- nixosConfigurations/vinzenz-lpt2/hardware.nix | 96 ++++++++-------- nixosConfigurations/vinzenz-pc2/default.nix | 11 -- nixosConfigurations/vinzenz-pc2/hardware.nix | 60 +++++----- nixosModules/allowed-unfree-list.nix | 4 +- nixosModules/intel-graphics.nix | 4 +- nixosModules/steam.nix | 3 - nixosModules/user-ronja.nix | 19 ++++ nixosModules/user-vinzenz.nix | 35 ++++++ 15 files changed, 275 insertions(+), 280 deletions(-) delete mode 100644 homeConfigurations/ronja/configuration.nix create mode 100644 nixosModules/user-ronja.nix create mode 100644 nixosModules/user-vinzenz.nix diff --git a/flake.nix b/flake.nix index 18a06b9..0096a20 100644 --- a/flake.nix +++ b/flake.nix @@ -63,23 +63,66 @@ }: let devices = { - vinzenz-lpt2 = "x86_64-linux"; - vinzenz-pc2 = "x86_64-linux"; - ronja-pc = "x86_64-linux"; - hetzner-vpn2 = "aarch64-linux"; - forgejo-runner-1 = "aarch64-linux"; + vinzenz-lpt2 = { + system = "x86_64-linux"; + additional-modules = [ + self.nixosModules.user-vinzenz + + self.nixosModules.gnome + self.nixosModules.wine-gaming + self.nixosModules.steam + self.nixosModules.printing + self.nixosModules.podman + self.nixosModules.vinzenz-desktop-settings + self.nixosModules.intel-graphics + ]; + home-manager-users = { + inherit (self.homeConfigurations) vinzenz; + }; + }; + vinzenz-pc2 = { + system = "x86_64-linux"; + additional-modules = [ + self.nixosModules.user-vinzenz + self.nixosModules.user-ronja + + self.nixosModules.gnome + self.nixosModules.wine-gaming + self.nixosModules.steam + self.nixosModules.printing + self.nixosModules.podman + self.nixosModules.vinzenz-desktop-settings + self.nixosModules.amd-graphics + ]; + home-manager-users = { + inherit (self.homeConfigurations) vinzenz ronja; + }; + }; + ronja-pc = { + system = "x86_64-linux"; + additional-modules = [ + self.nixosModules.user-ronja + + self.nixosModules.gnome + self.nixosModules.steam + self.nixosModules.wine-gaming + self.nixosModules.vinzenz-desktop-settings + ]; + home-manager-users = { + inherit (self.homeConfigurations) ronja; + }; + }; + hetzner-vpn2 = { + system = "aarch64-linux"; + }; + forgejo-runner-1 = { + system = "aarch64-linux"; + additional-modules = [ self.nixosModules.podman ]; + }; }; - homeDevices = [ - "vinzenz-lpt2" - "vinzenz-pc2" - "ronja-pc" - ]; lib = nixpkgs.lib; - forDevice = f: lib.mapAttrs f devices; - supported-systems = [ - "x86_64-linux" - "aarch64-linux" - ]; + forDevice = f: lib.mapAttrs (device: value: f (value // { inherit device; })) devices; + supported-systems = lib.attrsets.mapAttrsToList (k: v: v.system) devices; forAllSystems = f: lib.genAttrs supported-systems ( @@ -101,20 +144,21 @@ }; nixosConfigurations = forDevice ( - device: system: + { + device, + system, + home-manager-users ? { }, + additional-modules ? [ ], + }: let - commonSpecialArgs = { + specialArgs = { inherit device; vinzenzHomeModules = self.homeModules; vinzenzLib = self.lib; }; in nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = commonSpecialArgs // { - vinzenzNixosModules = self.nixosModules; - vinzenzHomeConfigurations = self.homeConfigurations; - }; + inherit system specialArgs; modules = [ { networking.hostName = device; @@ -134,6 +178,7 @@ nix.settings.experimental-features = [ "nix-command" "flakes" + "repl-flake" ]; documentation = { @@ -144,6 +189,7 @@ ./nixosConfigurations/${device} + self.nixosModules.default self.nixosModules.lix-is-nix self.nixosModules.globalinstalls self.nixosModules.autoupdate @@ -155,10 +201,10 @@ zerforschen-plus.nixosModules.default ] - ++ (nixpkgs.lib.optionals (builtins.elem device homeDevices) [ + ++ (nixpkgs.lib.optionals (home-manager-users != { }) [ { home-manager = { - extraSpecialArgs = commonSpecialArgs; + extraSpecialArgs = specialArgs; useGlobalPkgs = true; useUserPackages = true; }; @@ -174,6 +220,8 @@ self.homeModules.nano self.homeModules.gnome-extensions ]; + + home-manager.users = home-manager-users; } self.nixosModules.pkgs-unstable @@ -190,7 +238,8 @@ home-manager.nixosModules.home-manager servicepoint-simulator.nixosModules.default servicepoint-cli.nixosModules.default - ]); + ]) + ++ additional-modules; } ); @@ -214,6 +263,10 @@ pkgs-vscode-extensions = { nixpkgs.overlays = [ nix-vscode-extensions.overlays.default ]; }; + # required modules to use other modules, should not do anything on their own + default = { + imports = [ self.nixosModules.allowed-unfree-list ]; + }; }; homeModules = self.lib.importDir ./homeModules; diff --git a/homeConfigurations/ronja/configuration.nix b/homeConfigurations/ronja/configuration.nix deleted file mode 100644 index 26cceac..0000000 --- a/homeConfigurations/ronja/configuration.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ config, pkgs, ... }: -{ - config = { - home.packages = with pkgs; [ - ## Apps - telegram-desktop - kdiff3 - ]; - - programs = { - home-manager.enable = true; - - zsh = { - history = { - size = 10000; - path = "${config.xdg.dataHome}/zsh/history"; - expireDuplicatesFirst = true; - }; - - oh-my-zsh = { - enable = true; - theme = "agnoster"; - plugins = [ - "git" - "sudo" - "systemadmin" - ]; - }; - shellAliases = { - myos-update = ''echo "Enter sudo password" && sudo nixos-rebuild boot --flake git+https://git.berlin.ccc.de/vinzenz/nixos-configuration.git --show-trace --log-format internal-json -v |& ${pkgs.nix-output-monitor}/bin/nom --json''; - myos-apply = ''echo "Enter sudo password" && sudo nixos-rebuild switch --flake .# --show-trace --log-format internal-json -v |& ${pkgs.nix-output-monitor}/bin/nom --json''; - }; - }; - - git = { - userName = "Ronja Spiegelberg"; - userEmail = "ronja.spiegelberg@gmail.com"; - - extraConfig = { - pull.ff = "only"; - merge.tool = "kdiff3"; - }; - }; - - chromium = { - enable = true; - extensions = [ - { - # ublock origin - id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; - } - { - id = "dcpihecpambacapedldabdbpakmachpb"; - updateUrl = "https://raw.githubusercontent.com/iamadamdev/bypass-paywalls-chrome/master/updates.xml"; - } - ]; - }; - }; - }; -} diff --git a/homeConfigurations/ronja/default.nix b/homeConfigurations/ronja/default.nix index 7c2f96d..0f202cd 100644 --- a/homeConfigurations/ronja/default.nix +++ b/homeConfigurations/ronja/default.nix @@ -1,25 +1,61 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: { + imports = [ ./vscode.nix ]; config = { - # Define user account - users.users.ronja = { - isNormalUser = true; - name = "ronja"; - description = "Ronja"; - home = "/home/ronja"; - extraGroups = [ - "networkmanager" - "wheel" - "games" - "podman" - "openvscode-server" - ]; - shell = pkgs.zsh; - }; - - home-manager.users.ronja.imports = [ - ./configuration.nix - ./vscode.nix + home.packages = with pkgs; [ + ## Apps + telegram-desktop + kdiff3 ]; + + programs = { + home-manager.enable = true; + + zsh = { + history = { + size = 10000; + path = "${config.xdg.dataHome}/zsh/history"; + expireDuplicatesFirst = true; + }; + + oh-my-zsh = { + enable = true; + theme = "agnoster"; + plugins = [ + "git" + "sudo" + "systemadmin" + ]; + }; + shellAliases = { + myos-update = ''echo "Enter sudo password" && sudo nixos-rebuild boot --flake git+https://git.berlin.ccc.de/vinzenz/nixos-configuration.git --show-trace --log-format internal-json -v |& ${pkgs.nix-output-monitor}/bin/nom --json''; + myos-apply = ''echo "Enter sudo password" && sudo nixos-rebuild switch --flake .# --show-trace --log-format internal-json -v |& ${pkgs.nix-output-monitor}/bin/nom --json''; + }; + }; + + git = { + userName = "Ronja Spiegelberg"; + userEmail = "ronja.spiegelberg@gmail.com"; + + extraConfig = { + pull.ff = "only"; + merge.tool = "kdiff3"; + }; + }; + + chromium = { + enable = true; + extensions = [ + { + # ublock origin + id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; + } + { + id = "dcpihecpambacapedldabdbpakmachpb"; + updateUrl = "https://raw.githubusercontent.com/iamadamdev/bypass-paywalls-chrome/master/updates.xml"; + } + ]; + }; + }; }; } diff --git a/homeConfigurations/vinzenz/default.nix b/homeConfigurations/vinzenz/default.nix index e555eba..33cfceb 100644 --- a/homeConfigurations/vinzenz/default.nix +++ b/homeConfigurations/vinzenz/default.nix @@ -1,51 +1,15 @@ -{ pkgs, ... }: { - config = { - users.users.vinzenz = { - isNormalUser = true; - name = "vinzenz"; - description = "Vinzenz"; - home = "/home/vinzenz"; - extraGroups = [ - "networkmanager" - "wheel" - "games" - "dialout" - "podman" - "nginx" - "adbusers" - "kvm" - "input" - "video" - ]; - shell = pkgs.zsh; - autoSubUidGidRange = true; - }; - - nix.settings.trusted-users = [ "vinzenz" ]; - - home-manager.users.vinzenz.imports = [ - ./configuration.nix - ./editorconfig.nix - ./fuzzel.nix - ./git.nix - ./gnome.nix - #./niri.nix - ./ssh.nix - ./swaylock.nix - ./vscode.nix - ./waybar.nix - ./zsh.nix - ]; - - allowedUnfreePackages = [ - "rider" - "pycharm-professional" - "jetbrains-toolbox" - - "anydesk" - - "vscode-extension-ms-dotnettools-csharp" - ]; - }; + imports = [ + ./configuration.nix + ./editorconfig.nix + ./fuzzel.nix + ./git.nix + ./gnome.nix + #./niri.nix + ./ssh.nix + ./swaylock.nix + ./vscode.nix + ./waybar.nix + ./zsh.nix + ]; } diff --git a/nixosConfigurations/forgejo-runner-1/default.nix b/nixosConfigurations/forgejo-runner-1/default.nix index 79cb613..995d3d5 100644 --- a/nixosConfigurations/forgejo-runner-1/default.nix +++ b/nixosConfigurations/forgejo-runner-1/default.nix @@ -1,10 +1,7 @@ -{ vinzenzNixosModules, ... }: { imports = [ ./configuration.nix ./hardware.nix - - vinzenzNixosModules.podman ./forgejo-runner.nix ]; } diff --git a/nixosConfigurations/ronja-pc/default.nix b/nixosConfigurations/ronja-pc/default.nix index d1a97db..66ff518 100644 --- a/nixosConfigurations/ronja-pc/default.nix +++ b/nixosConfigurations/ronja-pc/default.nix @@ -1,14 +1,6 @@ -{ vinzenzNixosModules, vinzenzHomeConfigurations, ... }: { imports = [ ./configuration.nix ./hardware.nix - - vinzenzNixosModules.gnome - vinzenzNixosModules.steam - vinzenzNixosModules.wine-gaming - vinzenzNixosModules.vinzenz-desktop-settings - - vinzenzHomeConfigurations.ronja ]; } diff --git a/nixosConfigurations/vinzenz-lpt2/default.nix b/nixosConfigurations/vinzenz-lpt2/default.nix index df8e26a..66ff518 100644 --- a/nixosConfigurations/vinzenz-lpt2/default.nix +++ b/nixosConfigurations/vinzenz-lpt2/default.nix @@ -1,17 +1,6 @@ -{ vinzenzNixosModules, vinzenzHomeConfigurations, ... }: { imports = [ ./configuration.nix ./hardware.nix - - vinzenzNixosModules.gnome - vinzenzNixosModules.wine-gaming - vinzenzNixosModules.steam - vinzenzNixosModules.printing - vinzenzNixosModules.podman - vinzenzNixosModules.vinzenz-desktop-settings - - vinzenzHomeConfigurations.vinzenz - vinzenzHomeConfigurations.ronja ]; } diff --git a/nixosConfigurations/vinzenz-lpt2/hardware.nix b/nixosConfigurations/vinzenz-lpt2/hardware.nix index cf5157c..175a168 100644 --- a/nixosConfigurations/vinzenz-lpt2/hardware.nix +++ b/nixosConfigurations/vinzenz-lpt2/hardware.nix @@ -1,64 +1,56 @@ +{ pkgs, lib, ... }: { - vinzenzNixosModules, - pkgs, - lib, - ... -}: -{ - imports = [ vinzenzNixosModules.intel-graphics ]; - config = { - # intel cpu - boot.kernelModules = [ - "kvm-intel" - "xe" - ]; + # intel cpu + boot.kernelModules = [ + "kvm-intel" + "xe" + ]; - networking = { - networkmanager.enable = true; - useDHCP = lib.mkDefault true; - }; + networking = { + networkmanager.enable = true; + useDHCP = lib.mkDefault true; + }; - boot = { - kernelPackages = pkgs.linuxPackages_zen; + boot = { + kernelPackages = pkgs.linuxPackages_zen; + supportedFilesystems = [ "btrfs" ]; + initrd = { supportedFilesystems = [ "btrfs" ]; - initrd = { - supportedFilesystems = [ "btrfs" ]; - availableKernelModules = [ - "xhci_pci" - "thunderbolt" - "nvme" - ]; - luks.devices = { - "luks-2c654ff2-3c42-48d3-a1e3-9545679afaa3" = { - device = "/dev/disk/by-uuid/2c654ff2-3c42-48d3-a1e3-9545679afaa3"; - }; + availableKernelModules = [ + "xhci_pci" + "thunderbolt" + "nvme" + ]; + luks.devices = { + "luks-2c654ff2-3c42-48d3-a1e3-9545679afaa3" = { + device = "/dev/disk/by-uuid/2c654ff2-3c42-48d3-a1e3-9545679afaa3"; }; }; }; + }; - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/e4dad0c8-26a1-45e9-bbd9-48565eb6574e"; - fsType = "btrfs"; - options = [ "subvol=@" ]; - }; - - "/boot" = { - device = "/dev/disk/by-uuid/E2B7-2BC1"; - fsType = "vfat"; - }; + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/e4dad0c8-26a1-45e9-bbd9-48565eb6574e"; + fsType = "btrfs"; + options = [ "subvol=@" ]; }; - swapDevices = [ - { - device = "/var/lib/swapfile"; - size = 32 * 1024; - } - ]; - - services.thermald.enable = true; - services.hardware.bolt.enable = true; # thunderbolt security - - hardware.bluetooth.enable = true; + "/boot" = { + device = "/dev/disk/by-uuid/E2B7-2BC1"; + fsType = "vfat"; + }; }; + + swapDevices = [ + { + device = "/var/lib/swapfile"; + size = 32 * 1024; + } + ]; + + services.thermald.enable = true; + services.hardware.bolt.enable = true; # thunderbolt security + + hardware.bluetooth.enable = true; } diff --git a/nixosConfigurations/vinzenz-pc2/default.nix b/nixosConfigurations/vinzenz-pc2/default.nix index 0b17b3a..6a54768 100644 --- a/nixosConfigurations/vinzenz-pc2/default.nix +++ b/nixosConfigurations/vinzenz-pc2/default.nix @@ -1,19 +1,8 @@ -{ vinzenzNixosModules, vinzenzHomeConfigurations, ... }: { imports = [ ./configuration.nix ./hardware.nix ./vscode-server.nix ./hass.nix - - vinzenzNixosModules.gnome - vinzenzNixosModules.wine-gaming - vinzenzNixosModules.steam - vinzenzNixosModules.printing - vinzenzNixosModules.podman - vinzenzNixosModules.vinzenz-desktop-settings - - vinzenzHomeConfigurations.vinzenz - vinzenzHomeConfigurations.ronja ]; } diff --git a/nixosConfigurations/vinzenz-pc2/hardware.nix b/nixosConfigurations/vinzenz-pc2/hardware.nix index 6a4c71a..9e875c3 100644 --- a/nixosConfigurations/vinzenz-pc2/hardware.nix +++ b/nixosConfigurations/vinzenz-pc2/hardware.nix @@ -1,38 +1,30 @@ +{ pkgs, lib, ... }: { - vinzenzNixosModules, - pkgs, - lib, - ... -}: -{ - imports = [ vinzenzNixosModules.amd-graphics ]; - config = { - # amd cpu - boot.kernelModules = [ "kvm-amd" ]; + # amd cpu + boot.kernelModules = [ "kvm-amd" ]; - boot = { - initrd.availableKernelModules = [ - "nvme" - "xhci_pci" - "ahci" - "usbhid" - "sd_mod" - ]; # "usb_storage" - kernelPackages = pkgs.linuxPackages_zen; - supportedFilesystems = [ "btrfs" ]; - initrd.supportedFilesystems = [ "btrfs" ]; - loader.efi.efiSysMountPoint = "/boot"; - }; - - fileSystems = import ./fstab.nix; - swapDevices = [ ]; - - networking = { - networkmanager.enable = true; - useDHCP = lib.mkDefault true; - interfaces.eno1.wakeOnLan.enable = true; - }; - - hardware.bluetooth.enable = true; + boot = { + initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "sd_mod" + ]; # "usb_storage" + kernelPackages = pkgs.linuxPackages_zen; + supportedFilesystems = [ "btrfs" ]; + initrd.supportedFilesystems = [ "btrfs" ]; + loader.efi.efiSysMountPoint = "/boot"; }; + + fileSystems = import ./fstab.nix; + swapDevices = [ ]; + + networking = { + networkmanager.enable = true; + useDHCP = lib.mkDefault true; + interfaces.eno1.wakeOnLan.enable = true; + }; + + hardware.bluetooth.enable = true; } diff --git a/nixosModules/allowed-unfree-list.nix b/nixosModules/allowed-unfree-list.nix index a5583cf..7bfa758 100644 --- a/nixosModules/allowed-unfree-list.nix +++ b/nixosModules/allowed-unfree-list.nix @@ -9,7 +9,9 @@ config = { nixpkgs.config = { # https://github.com/NixOS/nixpkgs/issues/197325#issuecomment-1579420085 - allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.allowedUnfreePackages; + allowUnfreePredicate = lib.mkDefault ( + pkg: builtins.elem (lib.getName pkg) config.allowedUnfreePackages + ); }; }; } diff --git a/nixosModules/intel-graphics.nix b/nixosModules/intel-graphics.nix index 709d720..74c6e67 100644 --- a/nixosModules/intel-graphics.nix +++ b/nixosModules/intel-graphics.nix @@ -1,7 +1,5 @@ -{ pkgs, vinzenzNixosModules, ... }: +{ pkgs, ... }: { - imports = [ vinzenzNixosModules.allowed-unfree-list ]; - config = { hardware.graphics = { extraPackages = with pkgs; [ diff --git a/nixosModules/steam.nix b/nixosModules/steam.nix index 1c70785..b0991e6 100644 --- a/nixosModules/steam.nix +++ b/nixosModules/steam.nix @@ -1,7 +1,4 @@ -{ vinzenzNixosModules, ... }: { - imports = [ vinzenzNixosModules.allowed-unfree-list ]; - hardware.steam-hardware.enable = true; programs = { diff --git a/nixosModules/user-ronja.nix b/nixosModules/user-ronja.nix new file mode 100644 index 0000000..b374ab9 --- /dev/null +++ b/nixosModules/user-ronja.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: +{ + users.users.ronja = { + isNormalUser = true; + name = "ronja"; + description = "Ronja"; + home = "/home/ronja"; + extraGroups = [ + "networkmanager" + "wheel" + "games" + "podman" + "openvscode-server" + ]; + shell = pkgs.zsh; + }; + + nix.settings.trusted-users = [ "ronja" ]; +} diff --git a/nixosModules/user-vinzenz.nix b/nixosModules/user-vinzenz.nix new file mode 100644 index 0000000..b48e750 --- /dev/null +++ b/nixosModules/user-vinzenz.nix @@ -0,0 +1,35 @@ +{ pkgs, ... }: +{ + users.users.vinzenz = { + isNormalUser = true; + name = "vinzenz"; + description = "Vinzenz"; + home = "/home/vinzenz"; + extraGroups = [ + "networkmanager" + "wheel" + "games" + "dialout" + "podman" + "nginx" + "adbusers" + "kvm" + "input" + "video" + ]; + shell = pkgs.zsh; + autoSubUidGidRange = true; + }; + + nix.settings.trusted-users = [ "vinzenz" ]; + + allowedUnfreePackages = [ + "rider" + "pycharm-professional" + "jetbrains-toolbox" + + "anydesk" + + "vscode-extension-ms-dotnettools-csharp" + ]; +} From 9cf6333f4b0b470ba61661c714bc7eeb84c02f15 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 15 Sep 2025 19:05:04 +0200 Subject: [PATCH 09/10] merge default.nix and configuration.nix --- .../forgejo-runner-1/configuration.nix | 15 ------- .../forgejo-runner-1/default.nix | 16 ++++++- .../hetzner-vpn2/configuration.nix | 21 --------- nixosConfigurations/hetzner-vpn2/default.nix | 22 ++++++++- .../ronja-pc/configuration.nix | 26 ----------- nixosConfigurations/ronja-pc/default.nix | 28 +++++++++++- .../vinzenz-lpt2/configuration.nix | 45 ------------------- nixosConfigurations/vinzenz-lpt2/default.nix | 43 +++++++++++++++++- .../vinzenz-pc2/configuration.nix | 34 -------------- nixosConfigurations/vinzenz-pc2/default.nix | 36 ++++++++++++++- 10 files changed, 140 insertions(+), 146 deletions(-) delete mode 100644 nixosConfigurations/forgejo-runner-1/configuration.nix delete mode 100644 nixosConfigurations/hetzner-vpn2/configuration.nix delete mode 100644 nixosConfigurations/ronja-pc/configuration.nix delete mode 100644 nixosConfigurations/vinzenz-lpt2/configuration.nix delete mode 100644 nixosConfigurations/vinzenz-pc2/configuration.nix diff --git a/nixosConfigurations/forgejo-runner-1/configuration.nix b/nixosConfigurations/forgejo-runner-1/configuration.nix deleted file mode 100644 index 345e622..0000000 --- a/nixosConfigurations/forgejo-runner-1/configuration.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ ... }: -{ - # uncomment for build check on non arm system (requires --impure) - # nixpkgs.buildPlatform = builtins.currentSystem; - services.tailscale.useRoutingFeatures = "both"; - system.autoUpgrade.allowReboot = true; - - users.users = { - root.openssh.authorizedKeys.keys = [ - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC vinzenz-lpt2-roaming'' - ]; - }; -} diff --git a/nixosConfigurations/forgejo-runner-1/default.nix b/nixosConfigurations/forgejo-runner-1/default.nix index 995d3d5..f9d3c3f 100644 --- a/nixosConfigurations/forgejo-runner-1/default.nix +++ b/nixosConfigurations/forgejo-runner-1/default.nix @@ -1,7 +1,21 @@ { imports = [ - ./configuration.nix ./hardware.nix ./forgejo-runner.nix ]; + + config = { + # uncomment for build check on non arm system (requires --impure) + # nixpkgs.buildPlatform = builtins.currentSystem; + services.tailscale.useRoutingFeatures = "both"; + system.autoUpgrade.allowReboot = true; + + users.users = { + root.openssh.authorizedKeys.keys = [ + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC vinzenz-lpt2-roaming'' + ]; + }; + }; } diff --git a/nixosConfigurations/hetzner-vpn2/configuration.nix b/nixosConfigurations/hetzner-vpn2/configuration.nix deleted file mode 100644 index 8e16ff7..0000000 --- a/nixosConfigurations/hetzner-vpn2/configuration.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ ... }: -{ - # uncomment for build check on non arm system (requires --impure) - # nixpkgs.buildPlatform = builtins.currentSystem; - - services.tailscale.useRoutingFeatures = "both"; - - users.users = { - root.openssh.authorizedKeys.keys = [ - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICdYqY3Y1/f1bsAi5Qfyr/UWuX9ixu96IeAlhoQaJkbf'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC vinzenz-lpt2-roaming'' - ]; - #ronja.openssh.authorizedKeys.keys = [ - # ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ronja-ssh-host-key'' - #]; - }; - - system.autoUpgrade.allowReboot = true; -} diff --git a/nixosConfigurations/hetzner-vpn2/default.nix b/nixosConfigurations/hetzner-vpn2/default.nix index 46ded48..591dc20 100644 --- a/nixosConfigurations/hetzner-vpn2/default.nix +++ b/nixosConfigurations/hetzner-vpn2/default.nix @@ -1,7 +1,27 @@ { imports = [ - ./configuration.nix ./hardware.nix ./nginx.nix ]; + + config = { + # uncomment for build check on non arm system (requires --impure) + # nixpkgs.buildPlatform = builtins.currentSystem; + + services.tailscale.useRoutingFeatures = "both"; + + users.users = { + root.openssh.authorizedKeys.keys = [ + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICdYqY3Y1/f1bsAi5Qfyr/UWuX9ixu96IeAlhoQaJkbf'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC vinzenz-lpt2-roaming'' + ]; + #ronja.openssh.authorizedKeys.keys = [ + # ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ronja-ssh-host-key'' + #]; + }; + + system.autoUpgrade.allowReboot = true; + }; } diff --git a/nixosConfigurations/ronja-pc/configuration.nix b/nixosConfigurations/ronja-pc/configuration.nix deleted file mode 100644 index 0e9124d..0000000 --- a/nixosConfigurations/ronja-pc/configuration.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - config, - pkgs, - ... -}: -{ - # Configure keymap in X11 - services.xserver.xkb = { - layout = "de"; - variant = ""; - }; - - # Configure console keymap - console.keyMap = "de"; - - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget - ]; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; -} diff --git a/nixosConfigurations/ronja-pc/default.nix b/nixosConfigurations/ronja-pc/default.nix index 66ff518..dd22382 100644 --- a/nixosConfigurations/ronja-pc/default.nix +++ b/nixosConfigurations/ronja-pc/default.nix @@ -1,6 +1,32 @@ +{ + config, + pkgs, + ... +}: { imports = [ - ./configuration.nix ./hardware.nix ]; + + config = { + # Configure keymap in X11 + services.xserver.xkb = { + layout = "de"; + variant = ""; + }; + + # Configure console keymap + console.keyMap = "de"; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget + ]; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ];}; + }; } diff --git a/nixosConfigurations/vinzenz-lpt2/configuration.nix b/nixosConfigurations/vinzenz-lpt2/configuration.nix deleted file mode 100644 index b38f25a..0000000 --- a/nixosConfigurations/vinzenz-lpt2/configuration.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ ... }: -{ - imports = [ ./nginx.nix ]; - - 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 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming'' - ]; - - #users.users.ronja.openssh.authorizedKeys.keys = [ - # ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ronja-ssh-host-key'' - #]; - - programs = { - adb.enable = true; - light = { - enable = true; - brightnessKeys = { - enable = true; - step = 5; - }; - }; - }; - - networking.firewall.allowedTCPPorts = [ - 8776 - 1337 - ]; - }; -} diff --git a/nixosConfigurations/vinzenz-lpt2/default.nix b/nixosConfigurations/vinzenz-lpt2/default.nix index 66ff518..58eac82 100644 --- a/nixosConfigurations/vinzenz-lpt2/default.nix +++ b/nixosConfigurations/vinzenz-lpt2/default.nix @@ -1,6 +1,47 @@ { imports = [ - ./configuration.nix ./hardware.nix + ./nginx.nix ]; + + 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 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming'' + ]; + + #users.users.ronja.openssh.authorizedKeys.keys = [ + # ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ronja-ssh-host-key'' + #]; + + programs = { + adb.enable = true; + light = { + enable = true; + brightnessKeys = { + enable = true; + step = 5; + }; + }; + }; + + networking.firewall.allowedTCPPorts = [ + 8776 + 1337 + ]; + }; } diff --git a/nixosConfigurations/vinzenz-pc2/configuration.nix b/nixosConfigurations/vinzenz-pc2/configuration.nix deleted file mode 100644 index d53ad71..0000000 --- a/nixosConfigurations/vinzenz-pc2/configuration.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ pkgs, ... }: -{ - 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 ]; - - networking.firewall.allowedUDPPorts = [ - # Factorio - 34197 - ]; -} diff --git a/nixosConfigurations/vinzenz-pc2/default.nix b/nixosConfigurations/vinzenz-pc2/default.nix index 6a54768..23505b1 100644 --- a/nixosConfigurations/vinzenz-pc2/default.nix +++ b/nixosConfigurations/vinzenz-pc2/default.nix @@ -1,8 +1,42 @@ +{ pkgs, ... }: { imports = [ - ./configuration.nix ./hardware.nix ./vscode-server.nix ./hass.nix ]; + + 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 ]; + + networking.firewall.allowedUDPPorts = [ + # Factorio + 34197 + ]; + }; } From 1735ec5594d1c2d1f8650e75d79cc9699d522e15 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 15 Sep 2025 19:14:32 +0200 Subject: [PATCH 10/10] add pre-commit check script --- hooks/pre-commit | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 hooks/pre-commit diff --git a/hooks/pre-commit b/hooks/pre-commit new file mode 100755 index 0000000..6b6b870 --- /dev/null +++ b/hooks/pre-commit @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -euxo pipefail + +nix fmt + +nix flake check --all-systems --show-trace