From 7524f74f76fcf9d6dacb2e0d849e1138b3bdf5fb Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 13 Sep 2025 12:46:46 +0200 Subject: [PATCH 01/28] show rust and dotnet version in shell --- home/vinzenz/.zsh/p10k.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/home/vinzenz/.zsh/p10k.zsh b/home/vinzenz/.zsh/p10k.zsh index 3b6355d..fc3c2b2 100644 --- a/home/vinzenz/.zsh/p10k.zsh +++ b/home/vinzenz/.zsh/p10k.zsh @@ -60,8 +60,8 @@ nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) # node_version # node.js version # go_version # go version (https://golang.org) - # rust_version # rustc version (https://www.rust-lang.org) - # dotnet_version # .NET version (https://dotnet.microsoft.com) + rust_version # rustc version (https://www.rust-lang.org) + dotnet_version # .NET version (https://dotnet.microsoft.com) # php_version # php version (https://www.php.net/) # laravel_version # laravel php framework version (https://laravel.com/) # java_version # java version (https://www.java.com/) @@ -756,14 +756,14 @@ typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0 # Custom icon. # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' - + ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]##################### # Yazi shell color. typeset -g POWERLEVEL9K_YAZI_FOREGROUND=3 typeset -g POWERLEVEL9K_YAZI_BACKGROUND=0 # Custom icon. # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐' - + ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### # Nnn shell color. typeset -g POWERLEVEL9K_NNN_FOREGROUND=0 -- 2.50.1 From a63f1c69c794bb238296f07dd50a9df1b8c78bfe Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 13 Sep 2025 14:05:04 +0200 Subject: [PATCH 02/28] move stuff into nixosModules --- flake.lock | 16 ++++++------- flake.nix | 53 ++++++++++++++++++++++++++------------------ modules/lix.nix | 12 ---------- nixosModules/lix.nix | 15 +++++++++++++ 4 files changed, 54 insertions(+), 42 deletions(-) delete mode 100644 modules/lix.nix create mode 100644 nixosModules/lix.nix diff --git a/flake.lock b/flake.lock index 44edeab..7d1be42 100644 --- a/flake.lock +++ b/flake.lock @@ -266,11 +266,11 @@ ] }, "locked": { - "lastModified": 1751117291, - "narHash": "sha256-iOeiPypZkl6uPL5mQ4aFG4wYVs9w9BJZ2/5XHlLgyIk=", + "lastModified": 1757763404, + "narHash": "sha256-a1h+58wDOtbQXrHoZwLwB7PhXwFhBXRHhNRhAQGq/oY=", "ref": "refs/heads/main", - "rev": "2a4818dc2158cbdad34a701ab12d0b1cf7f52c46", - "revCount": 45, + "rev": "07a5fbca27ec941c841ad93f2ac65bc529225a51", + "revCount": 46, "type": "git", "url": "https://git.berlin.ccc.de/servicepoint/servicepoint-cli.git" }, @@ -290,11 +290,11 @@ ] }, "locked": { - "lastModified": 1752323001, - "narHash": "sha256-YEcYegmlv12yN9VWrz2qt0nyL+9EeGIlrDvac8Pf7Cw=", + "lastModified": 1757763091, + "narHash": "sha256-V3E6JKGzCrq5u+hp38sAdKv/EoxU+X0qfSoBIPxALi4=", "ref": "refs/heads/main", - "rev": "75a0ae7a59e687bea5f92791a2d64c048f35846d", - "revCount": 119, + "rev": "493b7b0343334019b372176f811a966839ba9aa5", + "revCount": 121, "type": "git", "url": "https://git.berlin.ccc.de/servicepoint/servicepoint-simulator.git" }, diff --git a/flake.nix b/flake.nix index c7e62e0..04e0bcc 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,6 @@ { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; - nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; home-manager = { @@ -104,10 +103,7 @@ modules = [ { networking.hostName = device; } - ./modules/globalinstalls.nix - ./modules/networking.nix - ./modules/nixpkgs.nix - ./modules/lix.nix + self.nixosModules.default ./hosts/${device}/hardware.nix ./hosts/${device}/imports.nix @@ -120,20 +116,8 @@ } ] ++ (nixpkgs.lib.optionals (builtins.elem device homeDevices) [ - home-manager.nixosModules.home-manager + self.nixosModules.desktopDefault { home-manager.extraSpecialArgs = specialArgs; } - ./modules/home-manager.nix - - ./modules/i18n.nix - - niri.nixosModules.niri - { - nixpkgs.overlays = [ - niri.overlays.niri - overlays.servicepoint-packages - nix-vscode-extensions.overlays.default - ]; - } ]); } ); @@ -145,10 +129,35 @@ config = prev.config; }; }; - servicepoint-packages = final: prev: { - servicepoint-cli = servicepoint-cli.legacyPackages."${prev.system}".servicepoint-cli; - servicepoint-simulator = - servicepoint-simulator.legacyPackages."${prev.system}".servicepoint-simulator; + }; + + nixosModules = { + lix = (import ./nixosModules/lix.nix); + niri = { + imports = [ niri.nixosModules.niri ]; + nixpkgs.overlays = [ niri.overlays.niri ]; + }; + pkgs-unstable = { + nixpkgs.overlays = [ nix-vscode-extensions.overlays.default ]; + }; + desktopDefault = { + imports = [ + self.nixosModules.pkgs-unstable + self.nixosModules.niri + home-manager.nixosModules.home-manager + servicepoint-simulator.nixosModules.default + servicepoint-cli.nixosModules.default + ./modules/home-manager.nix + ./modules/i18n.nix + ]; + }; + default = { + imports = [ + self.nixosModules.lix + ./modules/globalinstalls.nix + ./modules/networking.nix + ./modules/nixpkgs.nix + ]; }; }; diff --git a/modules/lix.nix b/modules/lix.nix deleted file mode 100644 index 55a3265..0000000 --- a/modules/lix.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs, ... }: -{ - nixpkgs.overlays = [ (final: prev: { - inherit (prev.lixPackageSets.stable) - nixpkgs-review - nix-eval-jobs - nix-fast-build - colmena; - }) ]; - - nix.package = pkgs.lixPackageSets.stable.lix; -} diff --git a/nixosModules/lix.nix b/nixosModules/lix.nix new file mode 100644 index 0000000..3480d06 --- /dev/null +++ b/nixosModules/lix.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: +{ + nixpkgs.overlays = [ + (final: prev: { + inherit (prev.lixPackageSets.stable) + nixpkgs-review + nix-eval-jobs + nix-fast-build + colmena + ; + }) + ]; + + nix.package = pkgs.lixPackageSets.latest.lix; +} -- 2.50.1 From 16422ccbd7d2377d862d0beb59b8b8356b657a93 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 13 Sep 2025 14:56:45 +0200 Subject: [PATCH 03/28] move kdeconnect settings to nixosModule --- flake.nix | 2 ++ home/vinzenz/gnome.nix | 2 -- home/vinzenz/niri.nix | 11 +------ modules/desktop-environment.nix | 20 ------------- modules/gnome-shared-dconf.nix | 3 -- modules/gnome.nix | 1 - nixosModules/kdeconnect.nix | 53 +++++++++++++++++++++++++++++++++ 7 files changed, 56 insertions(+), 36 deletions(-) create mode 100644 nixosModules/kdeconnect.nix diff --git a/flake.nix b/flake.nix index 04e0bcc..6260502 100644 --- a/flake.nix +++ b/flake.nix @@ -133,6 +133,7 @@ nixosModules = { lix = (import ./nixosModules/lix.nix); + kdeconnect = (import ./nixosModules/kdeconnect.nix); niri = { imports = [ niri.nixosModules.niri ]; nixpkgs.overlays = [ niri.overlays.niri ]; @@ -144,6 +145,7 @@ imports = [ self.nixosModules.pkgs-unstable self.nixosModules.niri + self.nixosModules.kdeconnect home-manager.nixosModules.home-manager servicepoint-simulator.nixosModules.default servicepoint-cli.nixosModules.default diff --git a/home/vinzenz/gnome.nix b/home/vinzenz/gnome.nix index 5648cf6..3a4f479 100644 --- a/home/vinzenz/gnome.nix +++ b/home/vinzenz/gnome.nix @@ -4,7 +4,6 @@ home.packages = with pkgs.gnomeExtensions; [ - gsconnect # battery-health-charging quick-settings-tweaker solaar-extension @@ -16,7 +15,6 @@ "org/gnome/shell" = { enabled-extensions = [ "GPaste@gnome-shell-extensions.gnome.org" - "gsconnect@andyholmes.github.io" "solaar-extension@sidevesh" "AlphabeticalAppGrid@stuarthayhurst" ]; diff --git a/home/vinzenz/niri.nix b/home/vinzenz/niri.nix index 3cb557a..3562ae1 100644 --- a/home/vinzenz/niri.nix +++ b/home/vinzenz/niri.nix @@ -16,16 +16,7 @@ name = "adwaita-dark"; }; - services = { - kdeconnect = { - enable = true; - # this still shows up in gnome session starting with 25.05 - # indicator = true; - }; - mako = { - enable = true; - }; - }; + services.mako.enable = true; programs.niri.settings = { input.keyboard.xkb.layout = "de"; diff --git a/modules/desktop-environment.nix b/modules/desktop-environment.nix index ffb00eb..50d6245 100644 --- a/modules/desktop-environment.nix +++ b/modules/desktop-environment.nix @@ -26,7 +26,6 @@ }; programs = { - kdeconnect.enable = true; firefox = { enable = true; languagePacks = [ @@ -59,25 +58,6 @@ }; }; - networking = { - firewall = { - allowedTCPPortRanges = [ - { - # KDE Connect / gsconnect - from = 1714; - to = 1764; - } - ]; - allowedUDPPortRanges = [ - { - # KDE Connect / gsconnect - from = 1714; - to = 1764; - } - ]; - }; - }; - systemd = { # save some boot time because nothing actually requires network connectivity services.NetworkManager-wait-online.enable = false; diff --git a/modules/gnome-shared-dconf.nix b/modules/gnome-shared-dconf.nix index b9b3716..5d54628 100644 --- a/modules/gnome-shared-dconf.nix +++ b/modules/gnome-shared-dconf.nix @@ -40,7 +40,4 @@ "org/gnome/shell/extensions/alphabetical-app-grid" = { folder-order-position = "start"; }; - "org/gnome/shell/extensions/gsconnect" = { - enabled = true; - }; } diff --git a/modules/gnome.nix b/modules/gnome.nix index f5a5dc0..ddca6b0 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -29,7 +29,6 @@ programs = { dconf.enable = true; gpaste.enable = true; - kdeconnect.package = pkgs.gnomeExtensions.gsconnect; }; # remove some gnome default apps diff --git a/nixosModules/kdeconnect.nix b/nixosModules/kdeconnect.nix new file mode 100644 index 0000000..16b669f --- /dev/null +++ b/nixosModules/kdeconnect.nix @@ -0,0 +1,53 @@ +{ + lib, + config, + pkgs, + ... +}: +{ + config = lib.mkMerge [ + { + networking.firewall = + let + kdeconnect-range = { + from = 1714; + to = 1764; + }; + in + { + allowedTCPPortRanges = [ kdeconnect-range ]; + allowedUDPPortRanges = [ kdeconnect-range ]; + }; + + programs.kdeconnect.enable = true; + home-manager.sharedModules = [ + { + services.kdeconnect = { + enable = true; + # this still shows up in gnome session starting with 25.05 + # indicator = true; + }; + } + ]; + } + + (lib.mkIf config.services.xserver.desktopManager.gnome.enable { + # replace kdeconnect with gsconnect + programs.kdeconnect.package = pkgs.gnomeExtensions.gsconnect; + + home-manager.sharedModules = [ + ( + { pkgs, ... }: + { + home.packages = [ pkgs.gnomeExtensions.gsconnect ]; + # enable gsconnect extension + dconf.settings = { + "org/gnome/shell".enabled-extensions = [ "gsconnect@andyholmes.github.io" ]; + "org/gnome/shell/extensions/gsconnect".enabled = true; + }; + } + ) + ]; + }) + ]; +} -- 2.50.1 From ecc65f071d0869bb70c66688d0b71c1aa38b49b6 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 13 Sep 2025 15:10:42 +0200 Subject: [PATCH 04/28] remove inputs from specialArgs --- flake.nix | 10 +++++++--- hosts/hetzner-vpn2/nginx.nix | 16 +++++++--------- hosts/vinzenz-lpt2/nginx.nix | 4 ++-- hosts/vinzenz-lpt2/zerforschen-plus.nix | 4 +--- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/flake.nix b/flake.nix index 6260502..bc32d3d 100644 --- a/flake.nix +++ b/flake.nix @@ -49,7 +49,7 @@ }; outputs = - inputs@{ + { self, nixpkgs, home-manager, @@ -58,7 +58,6 @@ nixpkgs-unstable, servicepoint-cli, servicepoint-simulator, - naersk, nix-vscode-extensions, ... }: @@ -95,7 +94,7 @@ device: system: let specialArgs = { - inherit inputs device; + inherit device; }; in nixpkgs.lib.nixosSystem { @@ -112,6 +111,7 @@ { nixpkgs.overlays = [ overlays.unstable-packages + overlays.zerforschen ]; } ] @@ -129,6 +129,10 @@ config = prev.config; }; }; + + zerforschen = final: prev: { + zerforschen-plus-content = zerforschen-plus.packages."${prev.system}".zerforschen-plus-content; + }; }; nixosModules = { diff --git a/hosts/hetzner-vpn2/nginx.nix b/hosts/hetzner-vpn2/nginx.nix index 8fa27c6..85207bc 100644 --- a/hosts/hetzner-vpn2/nginx.nix +++ b/hosts/hetzner-vpn2/nginx.nix @@ -1,4 +1,4 @@ -{ inputs, pkgs, ... }: +{ pkgs, ... }: let blog-domain-socket = "/run/nginx/blog.sock"; anubis-domain-socket = "/run/anubis/anubis-blog.sock"; @@ -77,7 +77,7 @@ in }; "blog-in-anubis" = { - root = inputs.zerforschen-plus.packages."${pkgs.system}".zerforschen-plus-content; + root = pkgs.zerforschen-plus-content; listen = [ { addr = ("unix:" + blog-domain-socket); @@ -87,13 +87,11 @@ in }; }; - anubis = { - instances.main = { - enable = true; - settings = { - BIND = anubis-domain-socket; - TARGET = "unix://" + blog-domain-socket; - }; + anubis.instances.main = { + enable = true; + settings = { + BIND = anubis-domain-socket; + TARGET = "unix://" + blog-domain-socket; }; }; }; diff --git a/hosts/vinzenz-lpt2/nginx.nix b/hosts/vinzenz-lpt2/nginx.nix index 302a271..fef3dec 100644 --- a/hosts/vinzenz-lpt2/nginx.nix +++ b/hosts/vinzenz-lpt2/nginx.nix @@ -1,4 +1,4 @@ -{ inputs, pkgs, ... }: +{ pkgs, ... }: let blog-domain-socket = "/run/nginx/blog.sock"; anubis-domain-socket = "/run/anubis/anubis-blog.sock"; @@ -34,7 +34,7 @@ in }; "vinzenz-lpt2-in-anubis" = { - root = inputs.zerforschen-plus.packages."${pkgs.system}".zerforschen-plus-content; + root = pkgs.zerforschen-plus-content; listen = [ { addr = ("unix:" + blog-domain-socket); diff --git a/hosts/vinzenz-lpt2/zerforschen-plus.nix b/hosts/vinzenz-lpt2/zerforschen-plus.nix index af3ea3c..d2b919d 100644 --- a/hosts/vinzenz-lpt2/zerforschen-plus.nix +++ b/hosts/vinzenz-lpt2/zerforschen-plus.nix @@ -1,7 +1,5 @@ { pkgs, - system, - inputs, ... }: { @@ -28,7 +26,7 @@ "zerforschen.plus" = { #addSSL = true; #enableACME = true; - root = inputs.zerforschen-plus.packages."${pkgs.system}".zerforschen-plus-content; + root = pkgs.zerforschen-plus-content; }; }; }; -- 2.50.1 From 26625c69523003242c2a882aaa8f27929cda86e9 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 13 Sep 2025 15:25:54 +0200 Subject: [PATCH 05/28] move stuff into nixosModules --- flake.nix | 28 ++++++++++++++---- modules/globalinstalls.nix | 34 --------------------- modules/i18n.nix | 19 ------------ modules/nixpkgs.nix | 52 +++++++++++---------------------- nixosModules/autoupdate.nix | 15 ++++++++++ nixosModules/en-de.nix | 19 ++++++++++++ nixosModules/globalinstalls.nix | 23 +++++++++++++++ 7 files changed, 96 insertions(+), 94 deletions(-) delete mode 100644 modules/globalinstalls.nix delete mode 100644 modules/i18n.nix create mode 100644 nixosModules/autoupdate.nix create mode 100644 nixosModules/en-de.nix create mode 100644 nixosModules/globalinstalls.nix diff --git a/flake.nix b/flake.nix index bc32d3d..5e30558 100644 --- a/flake.nix +++ b/flake.nix @@ -100,7 +100,13 @@ nixpkgs.lib.nixosSystem { inherit system specialArgs; modules = [ - { networking.hostName = device; } + { + networking.hostName = device; + system = { + stateVersion = "22.11"; + autoUpgrade.flake = "git+https://git.berlin.ccc.de/vinzenz/nixos-configuration.git"; + }; + } self.nixosModules.default @@ -117,7 +123,11 @@ ] ++ (nixpkgs.lib.optionals (builtins.elem device homeDevices) [ self.nixosModules.desktopDefault - { home-manager.extraSpecialArgs = specialArgs; } + { + home-manager.extraSpecialArgs = specialArgs; + + time.timeZone = "Europe/Berlin"; + } ]); } ); @@ -138,6 +148,9 @@ nixosModules = { lix = (import ./nixosModules/lix.nix); kdeconnect = (import ./nixosModules/kdeconnect.nix); + globalinstalls = (import ./nixosModules/globalinstalls.nix); + autoupdate = (import ./nixosModules/autoupdate.nix); + en-de = (import ./nixosModules/en-de.nix); niri = { imports = [ niri.nixosModules.niri ]; nixpkgs.overlays = [ niri.overlays.niri ]; @@ -150,17 +163,20 @@ self.nixosModules.pkgs-unstable self.nixosModules.niri self.nixosModules.kdeconnect + self.nixosModules.en-de + home-manager.nixosModules.home-manager servicepoint-simulator.nixosModules.default servicepoint-cli.nixosModules.default + ./modules/home-manager.nix - ./modules/i18n.nix ]; }; default = { - imports = [ - self.nixosModules.lix - ./modules/globalinstalls.nix + imports = with self.nixosModules; [ + lix + globalinstalls + autoupdate ./modules/networking.nix ./modules/nixpkgs.nix ]; diff --git a/modules/globalinstalls.nix b/modules/globalinstalls.nix deleted file mode 100644 index c4c21d2..0000000 --- a/modules/globalinstalls.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ pkgs, ... }: -{ - config = { - environment = { - systemPackages = with pkgs; [ - ncdu - glances - iotop - - pciutils - lsof - dig - - screen - - tldr - neofetch - - nix-output-monitor - ]; - }; - - programs = { - zsh.enable = true; - htop.enable = true; - iotop.enable = true; - git.enable = true; - nano = { - enable = true; - syntaxHighlight = true; - }; - }; - }; -} diff --git a/modules/i18n.nix b/modules/i18n.nix deleted file mode 100644 index 3d789f0..0000000 --- a/modules/i18n.nix +++ /dev/null @@ -1,19 +0,0 @@ -_: { - config = { - time.timeZone = "Europe/Berlin"; - i18n = { - defaultLocale = "en_US.UTF-8"; - extraLocaleSettings = { - LC_ADDRESS = "de_DE.UTF-8"; - LC_IDENTIFICATION = "de_DE.UTF-8"; - LC_MEASUREMENT = "de_DE.UTF-8"; - LC_MONETARY = "de_DE.UTF-8"; - LC_NAME = "de_DE.UTF-8"; - LC_NUMERIC = "de_DE.UTF-8"; - LC_PAPER = "de_DE.UTF-8"; - LC_TELEPHONE = "de_DE.UTF-8"; - LC_TIME = "de_DE.UTF-8"; - }; - }; - }; -} diff --git a/modules/nixpkgs.nix b/modules/nixpkgs.nix index aba3504..5fdb60d 100644 --- a/modules/nixpkgs.nix +++ b/modules/nixpkgs.nix @@ -11,41 +11,23 @@ allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.allowedUnfreePackages; }; - nix = { - settings = { - substituters = [ - "https://cache.nixos.org/" - "https://nix-community.cachix.org" - "https://cache.lix.systems" - "https://niri.cachix.org" - ]; - trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" - "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" - ]; - experimental-features = [ - "nix-command" - "flakes" - ]; - }; - gc = { - automatic = true; - dates = "daily"; - options = "--delete-older-than 7d"; - }; - optimise.automatic = true; - }; - - system = { - stateVersion = "22.11"; - # enable auto updates - autoUpgrade = { - enable = true; - dates = "daily"; - flake = "git+https://git.berlin.ccc.de/vinzenz/nixos-configuration.git"; - }; + nix.settings = { + substituters = [ + "https://cache.nixos.org/" + "https://nix-community.cachix.org" + "https://cache.lix.systems" + "https://niri.cachix.org" + ]; + trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" + "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" + ]; + experimental-features = [ + "nix-command" + "flakes" + ]; }; documentation = { diff --git a/nixosModules/autoupdate.nix b/nixosModules/autoupdate.nix new file mode 100644 index 0000000..5a45b10 --- /dev/null +++ b/nixosModules/autoupdate.nix @@ -0,0 +1,15 @@ +{ + nix = { + optimise.automatic = true; + gc = { + automatic = true; + dates = "daily"; + options = "--delete-older-than 7d"; + }; + }; + + system.autoUpgrade = { + enable = true; + dates = "daily"; + }; +} diff --git a/nixosModules/en-de.nix b/nixosModules/en-de.nix new file mode 100644 index 0000000..1df6811 --- /dev/null +++ b/nixosModules/en-de.nix @@ -0,0 +1,19 @@ +{ + i18n = { + defaultLocale = "en_US.UTF-8"; + extraLocales = [ + "de_DE.UTF-8/UTF-8" + ]; + extraLocaleSettings = { + LC_ADDRESS = "de_DE.UTF-8"; + LC_IDENTIFICATION = "de_DE.UTF-8"; + LC_MEASUREMENT = "de_DE.UTF-8"; + LC_MONETARY = "de_DE.UTF-8"; + LC_NAME = "de_DE.UTF-8"; + LC_NUMERIC = "de_DE.UTF-8"; + LC_PAPER = "de_DE.UTF-8"; + LC_TELEPHONE = "de_DE.UTF-8"; + LC_TIME = "de_DE.UTF-8"; + }; + }; +} diff --git a/nixosModules/globalinstalls.nix b/nixosModules/globalinstalls.nix new file mode 100644 index 0000000..47fb343 --- /dev/null +++ b/nixosModules/globalinstalls.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + ncdu + glances + lsof + dig + screen + tldr + nix-output-monitor + ]; + + programs = { + zsh.enable = true; + htop.enable = true; + iotop.enable = true; + git.enable = true; + nano = { + enable = true; + syntaxHighlight = true; + }; + }; +} -- 2.50.1 From a377c8e30b2c5fd10d8c6fe8b7fc9ed81c30a75d Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 13 Sep 2025 17:22:20 +0200 Subject: [PATCH 06/28] auto-import nixosModules, openssh mod --- flake.nix | 66 +++++++++++++++++++--------------------- modules/networking.nix | 10 ------ nixosModules/openssh.nix | 11 +++++++ 3 files changed, 43 insertions(+), 44 deletions(-) create mode 100644 nixosModules/openssh.nix diff --git a/flake.nix b/flake.nix index 5e30558..26dc2e7 100644 --- a/flake.nix +++ b/flake.nix @@ -145,43 +145,41 @@ }; }; - nixosModules = { - lix = (import ./nixosModules/lix.nix); - kdeconnect = (import ./nixosModules/kdeconnect.nix); - globalinstalls = (import ./nixosModules/globalinstalls.nix); - autoupdate = (import ./nixosModules/autoupdate.nix); - en-de = (import ./nixosModules/en-de.nix); - niri = { - imports = [ niri.nixosModules.niri ]; - nixpkgs.overlays = [ niri.overlays.niri ]; - }; - pkgs-unstable = { - nixpkgs.overlays = [ nix-vscode-extensions.overlays.default ]; - }; - desktopDefault = { - imports = [ - self.nixosModules.pkgs-unstable - self.nixosModules.niri - self.nixosModules.kdeconnect - self.nixosModules.en-de + nixosModules = + (builtins.mapAttrs (m: _: import ./nixosModules/${m}) (builtins.readDir ./nixosModules)) + // { + niri = { + imports = [ niri.nixosModules.niri ]; + nixpkgs.overlays = [ niri.overlays.niri ]; + }; + pkgs-unstable = { + nixpkgs.overlays = [ nix-vscode-extensions.overlays.default ]; + }; + desktopDefault = { + imports = [ + self.nixosModules.pkgs-unstable + self.nixosModules.niri + self.nixosModules.kdeconnect + self.nixosModules.en-de - home-manager.nixosModules.home-manager - servicepoint-simulator.nixosModules.default - servicepoint-cli.nixosModules.default + home-manager.nixosModules.home-manager + servicepoint-simulator.nixosModules.default + servicepoint-cli.nixosModules.default - ./modules/home-manager.nix - ]; + ./modules/home-manager.nix + ]; + }; + default = { + imports = with self.nixosModules; [ + lix + globalinstalls + autoupdate + openssh + ./modules/networking.nix + ./modules/nixpkgs.nix + ]; + }; }; - default = { - imports = with self.nixosModules; [ - lix - globalinstalls - autoupdate - ./modules/networking.nix - ./modules/nixpkgs.nix - ]; - }; - }; formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-tree); }; diff --git a/modules/networking.nix b/modules/networking.nix index a6a8d03..68ce3ea 100644 --- a/modules/networking.nix +++ b/modules/networking.nix @@ -1,15 +1,5 @@ _: { config = { - services.openssh = { - enable = true; - openFirewall = true; - settings = { - PermitRootLogin = "without-password"; - PasswordAuthentication = false; - KbdInteractiveAuthentication = false; - }; - }; - services.tailscale = { enable = true; openFirewall = true; diff --git a/nixosModules/openssh.nix b/nixosModules/openssh.nix new file mode 100644 index 0000000..ed24fe2 --- /dev/null +++ b/nixosModules/openssh.nix @@ -0,0 +1,11 @@ +{ + services.openssh = { + enable = true; + openFirewall = true; + settings = { + PermitRootLogin = "without-password"; + PasswordAuthentication = false; + KbdInteractiveAuthentication = false; + }; + }; +} -- 2.50.1 From c0d650d54fefd80e6082199854078abf6821ea47 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 13 Sep 2025 17:37:38 +0200 Subject: [PATCH 07/28] move printing to nixosModules --- flake.nix | 8 +++++++- hosts/vinzenz-lpt2/imports.nix | 3 ++- hosts/vinzenz-pc2/imports.nix | 3 ++- modules/printing.nix | 14 -------------- nixosModules/printing.nix | 12 ++++++++++++ 5 files changed, 23 insertions(+), 17 deletions(-) delete mode 100644 modules/printing.nix create mode 100644 nixosModules/printing.nix diff --git a/flake.nix b/flake.nix index 26dc2e7..cbfb655 100644 --- a/flake.nix +++ b/flake.nix @@ -95,6 +95,7 @@ let specialArgs = { inherit device; + inherit (self) nixosModules; }; in nixpkgs.lib.nixosSystem { @@ -146,7 +147,12 @@ }; nixosModules = - (builtins.mapAttrs (m: _: import ./nixosModules/${m}) (builtins.readDir ./nixosModules)) + let + lib = nixpkgs.lib; + in + (lib.attrsets.mapAttrs' ( + m: _: lib.attrsets.nameValuePair (lib.strings.removeSuffix ".nix" m) (import ./nixosModules/${m}) + ) (builtins.readDir ./nixosModules)) // { niri = { imports = [ niri.nixosModules.niri ]; diff --git a/hosts/vinzenz-lpt2/imports.nix b/hosts/vinzenz-lpt2/imports.nix index f9a0ae1..490252a 100644 --- a/hosts/vinzenz-lpt2/imports.nix +++ b/hosts/vinzenz-lpt2/imports.nix @@ -1,8 +1,9 @@ +{ nixosModules, ... }: { imports = [ ../../modules/gnome.nix ../../modules/gaming.nix - ../../modules/printing.nix + nixosModules.printing ../../modules/podman.nix #../../modules/niri.nix ../../modules/desktop-environment.nix diff --git a/hosts/vinzenz-pc2/imports.nix b/hosts/vinzenz-pc2/imports.nix index f9a0ae1..490252a 100644 --- a/hosts/vinzenz-pc2/imports.nix +++ b/hosts/vinzenz-pc2/imports.nix @@ -1,8 +1,9 @@ +{ nixosModules, ... }: { imports = [ ../../modules/gnome.nix ../../modules/gaming.nix - ../../modules/printing.nix + nixosModules.printing ../../modules/podman.nix #../../modules/niri.nix ../../modules/desktop-environment.nix diff --git a/modules/printing.nix b/modules/printing.nix deleted file mode 100644 index 4b74421..0000000 --- a/modules/printing.nix +++ /dev/null @@ -1,14 +0,0 @@ -_: { - config = { - services = { - # Enable CUPS to print documents. - printing.enable = true; - - avahi = { - enable = true; # runs the Avahi daemon - nssmdns4 = true; # enables the mDNS NSS plug-in - openFirewall = true; # opens the firewall for UDP port 5353 - }; - }; - }; -} diff --git a/nixosModules/printing.nix b/nixosModules/printing.nix new file mode 100644 index 0000000..c85edd7 --- /dev/null +++ b/nixosModules/printing.nix @@ -0,0 +1,12 @@ +{ + services = { + # Enable CUPS to print documents. + printing.enable = true; + + avahi = { + enable = true; # runs the Avahi daemon + nssmdns4 = true; # enables the mDNS NSS plug-in + openFirewall = true; # opens the firewall for UDP port 5353 + }; + }; +} -- 2.50.1 From 3ba30b1a6dad3c2fed4cf8595f3539fcd31b2187 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 13 Sep 2025 17:49:17 +0200 Subject: [PATCH 08/28] do not provide default nixosModule --- flake.nix | 78 +++++++++++------------- nixosModules/autoupdate.nix | 1 + nixosModules/{lix.nix => lix-is-nix.nix} | 0 3 files changed, 35 insertions(+), 44 deletions(-) rename nixosModules/{lix.nix => lix-is-nix.nix} (100%) diff --git a/flake.nix b/flake.nix index cbfb655..690dbf8 100644 --- a/flake.nix +++ b/flake.nix @@ -74,20 +74,26 @@ "vinzenz-pc2" "ronja-pc" ]; - forDevice = f: nixpkgs.lib.mapAttrs f devices; + lib = nixpkgs.lib; + forDevice = f: lib.mapAttrs f devices; supported-systems = [ "x86_64-linux" "aarch64-linux" ]; forAllSystems = f: - nixpkgs.lib.genAttrs supported-systems ( + lib.genAttrs supported-systems ( system: f rec { inherit system; pkgs = nixpkgs.legacyPackages.${system}; } ); + importDir = + dir: + (lib.attrsets.mapAttrs' ( + m: _: lib.attrsets.nameValuePair (lib.strings.removeSuffix ".nix" m) (import "${dir}/${m}") + ) (builtins.readDir dir)); in rec { nixosConfigurations = forDevice ( @@ -109,12 +115,17 @@ }; } - self.nixosModules.default - ./hosts/${device}/hardware.nix ./hosts/${device}/imports.nix ./hosts/${device}/configuration.nix + self.nixosModules.lix-is-nix + self.nixosModules.globalinstalls + self.nixosModules.autoupdate + self.nixosModules.openssh + ./modules/networking.nix + ./modules/nixpkgs.nix + { nixpkgs.overlays = [ overlays.unstable-packages @@ -123,12 +134,22 @@ } ] ++ (nixpkgs.lib.optionals (builtins.elem device homeDevices) [ - self.nixosModules.desktopDefault { home-manager.extraSpecialArgs = specialArgs; time.timeZone = "Europe/Berlin"; } + + self.nixosModules.pkgs-unstable + self.nixosModules.niri + self.nixosModules.kdeconnect + self.nixosModules.en-de + ./modules/home-manager.nix + + home-manager.nixosModules.home-manager + servicepoint-simulator.nixosModules.default + servicepoint-cli.nixosModules.default + ]); } ); @@ -146,46 +167,15 @@ }; }; - nixosModules = - let - lib = nixpkgs.lib; - in - (lib.attrsets.mapAttrs' ( - m: _: lib.attrsets.nameValuePair (lib.strings.removeSuffix ".nix" m) (import ./nixosModules/${m}) - ) (builtins.readDir ./nixosModules)) - // { - niri = { - imports = [ niri.nixosModules.niri ]; - nixpkgs.overlays = [ niri.overlays.niri ]; - }; - pkgs-unstable = { - nixpkgs.overlays = [ nix-vscode-extensions.overlays.default ]; - }; - desktopDefault = { - imports = [ - self.nixosModules.pkgs-unstable - self.nixosModules.niri - self.nixosModules.kdeconnect - self.nixosModules.en-de - - home-manager.nixosModules.home-manager - servicepoint-simulator.nixosModules.default - servicepoint-cli.nixosModules.default - - ./modules/home-manager.nix - ]; - }; - default = { - imports = with self.nixosModules; [ - lix - globalinstalls - autoupdate - openssh - ./modules/networking.nix - ./modules/nixpkgs.nix - ]; - }; + nixosModules = (importDir ./nixosModules) // { + niri = { + imports = [ niri.nixosModules.niri ]; + nixpkgs.overlays = [ niri.overlays.niri ]; }; + pkgs-unstable = { + nixpkgs.overlays = [ nix-vscode-extensions.overlays.default ]; + }; + }; formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-tree); }; diff --git a/nixosModules/autoupdate.nix b/nixosModules/autoupdate.nix index 5a45b10..0f26b7e 100644 --- a/nixosModules/autoupdate.nix +++ b/nixosModules/autoupdate.nix @@ -11,5 +11,6 @@ system.autoUpgrade = { enable = true; dates = "daily"; + # do not forget to set `flake` when using this module! }; } diff --git a/nixosModules/lix.nix b/nixosModules/lix-is-nix.nix similarity index 100% rename from nixosModules/lix.nix rename to nixosModules/lix-is-nix.nix -- 2.50.1 From d2b11ad2e2755d94253f6758e62f5dd48e1aa767 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 13 Sep 2025 18:03:16 +0200 Subject: [PATCH 09/28] move podman to nixosModules --- hosts/forgejo-runner-1/imports.nix | 3 ++- hosts/vinzenz-lpt2/imports.nix | 3 +-- hosts/vinzenz-pc2/imports.nix | 2 +- {modules => nixosModules}/podman.nix | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename {modules => nixosModules}/podman.nix (97%) diff --git a/hosts/forgejo-runner-1/imports.nix b/hosts/forgejo-runner-1/imports.nix index 8b867c6..05d6c4d 100644 --- a/hosts/forgejo-runner-1/imports.nix +++ b/hosts/forgejo-runner-1/imports.nix @@ -1,6 +1,7 @@ +{ nixosModules, ... }: { imports = [ - ../../modules/podman.nix + nixosModules.podman ./forgejo-runner.nix ]; } diff --git a/hosts/vinzenz-lpt2/imports.nix b/hosts/vinzenz-lpt2/imports.nix index 490252a..751d35b 100644 --- a/hosts/vinzenz-lpt2/imports.nix +++ b/hosts/vinzenz-lpt2/imports.nix @@ -4,8 +4,7 @@ ../../modules/gnome.nix ../../modules/gaming.nix nixosModules.printing - ../../modules/podman.nix - #../../modules/niri.nix + nixosModules.podman ../../modules/desktop-environment.nix ../../modules/desktop-hardware.nix diff --git a/hosts/vinzenz-pc2/imports.nix b/hosts/vinzenz-pc2/imports.nix index 490252a..73bf957 100644 --- a/hosts/vinzenz-pc2/imports.nix +++ b/hosts/vinzenz-pc2/imports.nix @@ -4,7 +4,7 @@ ../../modules/gnome.nix ../../modules/gaming.nix nixosModules.printing - ../../modules/podman.nix + nixosModules.podman #../../modules/niri.nix ../../modules/desktop-environment.nix ../../modules/desktop-hardware.nix diff --git a/modules/podman.nix b/nixosModules/podman.nix similarity index 97% rename from modules/podman.nix rename to nixosModules/podman.nix index abecea4..93540f8 100644 --- a/modules/podman.nix +++ b/nixosModules/podman.nix @@ -1,4 +1,4 @@ -_: { +{ virtualisation = { containers.enable = true; podman = { -- 2.50.1 From 2059b854de4b7a6660c38ef77c46313fc04c1ed0 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 13 Sep 2025 18:08:41 +0200 Subject: [PATCH 10/28] tailscale mod --- flake.nix | 2 +- modules/networking.nix | 13 ------------- nixosModules/tailscale.nix | 8 ++++++++ 3 files changed, 9 insertions(+), 14 deletions(-) delete mode 100644 modules/networking.nix create mode 100644 nixosModules/tailscale.nix diff --git a/flake.nix b/flake.nix index 690dbf8..267e260 100644 --- a/flake.nix +++ b/flake.nix @@ -123,7 +123,7 @@ self.nixosModules.globalinstalls self.nixosModules.autoupdate self.nixosModules.openssh - ./modules/networking.nix + self.nixosModules.tailscale ./modules/nixpkgs.nix { diff --git a/modules/networking.nix b/modules/networking.nix deleted file mode 100644 index 68ce3ea..0000000 --- a/modules/networking.nix +++ /dev/null @@ -1,13 +0,0 @@ -_: { - config = { - services.tailscale = { - enable = true; - openFirewall = true; - }; - - networking.firewall = { - enable = true; - checkReversePath = "loose"; - }; - }; -} diff --git a/nixosModules/tailscale.nix b/nixosModules/tailscale.nix new file mode 100644 index 0000000..e51ee7f --- /dev/null +++ b/nixosModules/tailscale.nix @@ -0,0 +1,8 @@ +{ + services.tailscale = { + enable = true; + openFirewall = true; + }; + + networking.firewall.checkReversePath = "loose"; +} -- 2.50.1 From 78400473efbadf736a9858d394eee737a7f57d1f Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 13 Sep 2025 18:20:00 +0200 Subject: [PATCH 11/28] wip split gnome mod --- flake.nix | 3 ++- modules/gnome.nix | 41 +--------------------------------------- nixosModules/adwaita.nix | 12 ++++++++++++ nixosModules/gnome.nix | 31 ++++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 41 deletions(-) create mode 100644 nixosModules/adwaita.nix create mode 100644 nixosModules/gnome.nix diff --git a/flake.nix b/flake.nix index 267e260..9566a13 100644 --- a/flake.nix +++ b/flake.nix @@ -144,12 +144,13 @@ self.nixosModules.niri self.nixosModules.kdeconnect self.nixosModules.en-de + self.nixosModules.adwaita + self.nixosModules.gnome ./modules/home-manager.nix home-manager.nixosModules.home-manager servicepoint-simulator.nixosModules.default servicepoint-cli.nixosModules.default - ]); } ); diff --git a/modules/gnome.nix b/modules/gnome.nix index ddca6b0..507247d 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -1,36 +1,6 @@ { pkgs, ... }: { config = { - 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 = with pkgs; [ xterm ]; - }; - - displayManager.defaultSession = "gnome"; - - gnome = { - tinysparql.enable = false; - localsearch.enable = false; - sushi.enable = true; - gnome-remote-desktop.enable = true; - }; - }; - - programs = { - dconf.enable = true; - gpaste.enable = true; - }; - # remove some gnome default apps environment.gnome.excludePackages = with pkgs; [ cheese # photo booth @@ -53,6 +23,7 @@ ]; # RDP connections + services.gnome.gnome-remote-desktop.enable = true; networking.firewall.allowedTCPPorts = [ 3389 ]; home-manager.sharedModules = [ @@ -79,16 +50,6 @@ ]); dconf.settings = import ./gnome-shared-dconf.nix; - - gtk = { - enable = true; - iconTheme.name = "Adwaita"; - cursorTheme.name = "Adwaita"; - theme = { - name = "adw-gtk3-dark"; - package = pkgs.adw-gtk3; - }; - }; } { diff --git a/nixosModules/adwaita.nix b/nixosModules/adwaita.nix new file mode 100644 index 0000000..96d24c7 --- /dev/null +++ b/nixosModules/adwaita.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: +{ + gtk = { + enable = true; + iconTheme.name = "Adwaita"; + cursorTheme.name = "Adwaita"; + theme = { + name = "adw-gtk3-dark"; + package = pkgs.adw-gtk3; + }; + }; +} diff --git a/nixosModules/gnome.nix b/nixosModules/gnome.nix new file mode 100644 index 0000000..3afe9ce --- /dev/null +++ b/nixosModules/gnome.nix @@ -0,0 +1,31 @@ +{ pkgs, ... }: +{ + 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; + }; + }; + + programs = { + dconf.enable = true; + gpaste.enable = true; + }; +} -- 2.50.1 From 084e819232cbf43bdf3fca62d4f385e6fdfdeee6 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 14 Sep 2025 12:22:20 +0200 Subject: [PATCH 12/28] steam mod, move adwaita to homeModules --- flake.nix | 29 ++++++++---- {nixosModules => homeModules}/adwaita.nix | 0 hosts/ronja-pc/imports.nix | 2 + hosts/vinzenz-lpt2/imports.nix | 1 + hosts/vinzenz-pc2/imports.nix | 1 + modules/desktop-environment.nix | 1 + modules/gaming.nix | 57 ++--------------------- modules/nixpkgs.nix | 44 +++-------------- nixosModules/allowed-unfree-list.nix | 15 ++++++ nixosModules/extra-caches.nix | 16 +++++++ nixosModules/steam.nix | 48 +++++++++++++++++++ 11 files changed, 113 insertions(+), 101 deletions(-) rename {nixosModules => homeModules}/adwaita.nix (100%) create mode 100644 nixosModules/allowed-unfree-list.nix create mode 100644 nixosModules/extra-caches.nix create mode 100644 nixosModules/steam.nix diff --git a/flake.nix b/flake.nix index 9566a13..852eae2 100644 --- a/flake.nix +++ b/flake.nix @@ -92,7 +92,8 @@ importDir = dir: (lib.attrsets.mapAttrs' ( - m: _: lib.attrsets.nameValuePair (lib.strings.removeSuffix ".nix" m) (import "${dir}/${m}") + m: _: + lib.attrsets.nameValuePair (lib.strings.removeSuffix ".nix" m) { imports = [ "${dir}/${m}" ]; } ) (builtins.readDir dir)); in rec { @@ -113,6 +114,16 @@ stateVersion = "22.11"; autoUpgrade.flake = "git+https://git.berlin.ccc.de/vinzenz/nixos-configuration.git"; }; + + nixpkgs.overlays = [ + overlays.unstable-packages + overlays.zerforschen + ]; + + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; } ./hosts/${device}/hardware.nix @@ -124,27 +135,25 @@ self.nixosModules.autoupdate self.nixosModules.openssh self.nixosModules.tailscale + self.nixosModules.allowed-unfree-list + self.nixosModules.extra-caches ./modules/nixpkgs.nix - - { - nixpkgs.overlays = [ - overlays.unstable-packages - overlays.zerforschen - ]; - } ] ++ (nixpkgs.lib.optionals (builtins.elem device homeDevices) [ { home-manager.extraSpecialArgs = specialArgs; time.timeZone = "Europe/Berlin"; + + home-manager.sharedModules = [ + self.homeModules.adwaita + ]; } self.nixosModules.pkgs-unstable self.nixosModules.niri self.nixosModules.kdeconnect self.nixosModules.en-de - self.nixosModules.adwaita self.nixosModules.gnome ./modules/home-manager.nix @@ -178,6 +187,8 @@ }; }; + homeModules = importDir ./homeModules; + formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-tree); }; } diff --git a/nixosModules/adwaita.nix b/homeModules/adwaita.nix similarity index 100% rename from nixosModules/adwaita.nix rename to homeModules/adwaita.nix diff --git a/hosts/ronja-pc/imports.nix b/hosts/ronja-pc/imports.nix index 8b9ed4b..ca628cc 100644 --- a/hosts/ronja-pc/imports.nix +++ b/hosts/ronja-pc/imports.nix @@ -1,7 +1,9 @@ +{ nixosModules, ... }: { imports = [ ../../modules/gnome.nix ../../modules/gaming.nix + nixosModules.steam ../../modules/desktop-environment.nix ../../modules/desktop-hardware.nix diff --git a/hosts/vinzenz-lpt2/imports.nix b/hosts/vinzenz-lpt2/imports.nix index 751d35b..9335800 100644 --- a/hosts/vinzenz-lpt2/imports.nix +++ b/hosts/vinzenz-lpt2/imports.nix @@ -3,6 +3,7 @@ imports = [ ../../modules/gnome.nix ../../modules/gaming.nix + nixosModules.steam nixosModules.printing nixosModules.podman ../../modules/desktop-environment.nix diff --git a/hosts/vinzenz-pc2/imports.nix b/hosts/vinzenz-pc2/imports.nix index 73bf957..ca29682 100644 --- a/hosts/vinzenz-pc2/imports.nix +++ b/hosts/vinzenz-pc2/imports.nix @@ -3,6 +3,7 @@ imports = [ ../../modules/gnome.nix ../../modules/gaming.nix + nixosModules.steam nixosModules.printing nixosModules.podman #../../modules/niri.nix diff --git a/modules/desktop-environment.nix b/modules/desktop-environment.nix index 50d6245..1f1efe0 100644 --- a/modules/desktop-environment.nix +++ b/modules/desktop-environment.nix @@ -56,6 +56,7 @@ enable = true; binfmt = true; }; + xwayland.enable = true; }; systemd = { diff --git a/modules/gaming.nix b/modules/gaming.nix index 4214c23..478c200 100644 --- a/modules/gaming.nix +++ b/modules/gaming.nix @@ -8,7 +8,6 @@ extraPackages32 = with pkgs; [ mangohud ]; }; - steam-hardware.enable = true; xpadneo.enable = true; }; @@ -23,59 +22,9 @@ lutris ]; - programs = { - xwayland.enable = true; - steam = { - enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; - localNetworkGameTransfers.openFirewall = true; - gamescopeSession.enable = false; - }; - gamemode.enable = true; - }; - - networking.firewall = { - allowedUDPPorts = [ - # Factorio - 34197 - - # steam network transfer - 3478 - ]; - - allowedTCPPorts = [ - # steam network transfer - 24070 - ]; - - allowedTCPPortRanges = [ - # steam network transfer - { - from = 27015; - to = 27050; - } - ]; - - allowedUDPPortRanges = [ - # steam network transfer - { - from = 4379; - to = 4380; - } - { - from = 27000; - to = 27100; - } - ]; - }; - - allowedUnfreePackages = [ - "steam" - "steam-original" - "steam-run" - "steam-unwrapped" - "ut1999" + networking.firewall.allowedUDPPorts = [ + # Factorio + 34197 ]; }; } diff --git a/modules/nixpkgs.nix b/modules/nixpkgs.nix index 5fdb60d..7fb99a7 100644 --- a/modules/nixpkgs.nix +++ b/modules/nixpkgs.nix @@ -1,41 +1,9 @@ -{ config, lib, ... }: { - options.allowedUnfreePackages = lib.mkOption { - type = lib.types.listOf lib.types.str; - default = [ ]; - example = [ "steam" ]; - }; - config = { - nixpkgs.config = { - # https://github.com/NixOS/nixpkgs/issues/197325#issuecomment-1579420085 - allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.allowedUnfreePackages; - }; - - nix.settings = { - substituters = [ - "https://cache.nixos.org/" - "https://nix-community.cachix.org" - "https://cache.lix.systems" - "https://niri.cachix.org" - ]; - trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" - "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" - ]; - experimental-features = [ - "nix-command" - "flakes" - ]; - }; - - 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 - }; + 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/nixosModules/allowed-unfree-list.nix b/nixosModules/allowed-unfree-list.nix new file mode 100644 index 0000000..a5583cf --- /dev/null +++ b/nixosModules/allowed-unfree-list.nix @@ -0,0 +1,15 @@ +{ lib, config, ... }: +{ + options.allowedUnfreePackages = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ ]; + example = [ "steam" ]; + }; + + config = { + nixpkgs.config = { + # https://github.com/NixOS/nixpkgs/issues/197325#issuecomment-1579420085 + allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.allowedUnfreePackages; + }; + }; +} diff --git a/nixosModules/extra-caches.nix b/nixosModules/extra-caches.nix new file mode 100644 index 0000000..6af372f --- /dev/null +++ b/nixosModules/extra-caches.nix @@ -0,0 +1,16 @@ +{ + nix.settings = { + substituters = [ + "https://cache.nixos.org/" + "https://nix-community.cachix.org" + "https://cache.lix.systems" + "https://niri.cachix.org" + ]; + trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" + "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" + ]; + }; +} diff --git a/nixosModules/steam.nix b/nixosModules/steam.nix new file mode 100644 index 0000000..6e3c997 --- /dev/null +++ b/nixosModules/steam.nix @@ -0,0 +1,48 @@ +{ nixosModules, ... }: +{ + imports = [ nixosModules.allowed-unfree-list ]; + + hardware.steam-hardware.enable = true; + + programs = { + steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + localNetworkGameTransfers.openFirewall = true; + gamescopeSession.enable = false; + }; + gamemode.enable = true; + }; + + # steam network transfer + networking.firewall = { + allowedUDPPorts = [ 3478 ]; + allowedTCPPorts = [ 24070 ]; + + allowedTCPPortRanges = [ + { + from = 27015; + to = 27050; + } + ]; + + allowedUDPPortRanges = [ + { + from = 4379; + to = 4380; + } + { + from = 27000; + to = 27100; + } + ]; + }; + + allowedUnfreePackages = [ + "steam" + "steam-original" + "steam-run" + "steam-unwrapped" + ]; +} -- 2.50.1 From 29d96e90a436fe7d3bacde80cda7b1466832034e Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 14 Sep 2025 12:37:29 +0200 Subject: [PATCH 13/28] lib, fix homeManagerModules name --- flake.nix | 27 ++++++++++--------- .../adwaita.nix | 0 modules/intel-graphics.nix | 4 ++- 3 files changed, 18 insertions(+), 13 deletions(-) rename {homeModules => homeManagerModules}/adwaita.nix (100%) diff --git a/flake.nix b/flake.nix index 852eae2..8a35273 100644 --- a/flake.nix +++ b/flake.nix @@ -89,14 +89,17 @@ pkgs = nixpkgs.legacyPackages.${system}; } ); - importDir = - dir: - (lib.attrsets.mapAttrs' ( - m: _: - lib.attrsets.nameValuePair (lib.strings.removeSuffix ".nix" m) { imports = [ "${dir}/${m}" ]; } - ) (builtins.readDir dir)); in - rec { + { + lib = { + importDir = + dir: + (lib.attrsets.mapAttrs' ( + m: _: + lib.attrsets.nameValuePair (lib.strings.removeSuffix ".nix" m) { imports = [ "${dir}/${m}" ]; } + ) (builtins.readDir dir)); + }; + nixosConfigurations = forDevice ( device: system: let @@ -116,8 +119,8 @@ }; nixpkgs.overlays = [ - overlays.unstable-packages - overlays.zerforschen + self.overlays.unstable-packages + self.overlays.zerforschen ]; nix.settings.experimental-features = [ @@ -146,7 +149,7 @@ time.timeZone = "Europe/Berlin"; home-manager.sharedModules = [ - self.homeModules.adwaita + self.homeManagerModules.adwaita ]; } @@ -177,7 +180,7 @@ }; }; - nixosModules = (importDir ./nixosModules) // { + nixosModules = (self.lib.importDir ./nixosModules) // { niri = { imports = [ niri.nixosModules.niri ]; nixpkgs.overlays = [ niri.overlays.niri ]; @@ -187,7 +190,7 @@ }; }; - homeModules = importDir ./homeModules; + homeManagerModules = self.lib.importDir ./homeManagerModules; formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-tree); }; diff --git a/homeModules/adwaita.nix b/homeManagerModules/adwaita.nix similarity index 100% rename from homeModules/adwaita.nix rename to homeManagerModules/adwaita.nix diff --git a/modules/intel-graphics.nix b/modules/intel-graphics.nix index 74c6e67..d7cae18 100644 --- a/modules/intel-graphics.nix +++ b/modules/intel-graphics.nix @@ -1,5 +1,7 @@ -{ pkgs, ... }: +{ pkgs, nixosModules, ... }: { + imports = [ nixosModules.allowed-unfree-list ]; + config = { hardware.graphics = { extraPackages = with pkgs; [ -- 2.50.1 From 232728a053c02658207912a34e44df35e5b5a91a Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 14 Sep 2025 12:54:58 +0200 Subject: [PATCH 14/28] use overlay from zerforschen, re-rename homeModules --- flake.lock | 8 ++++---- flake.nix | 13 +++++++------ {homeManagerModules => homeModules}/adwaita.nix | 0 3 files changed, 11 insertions(+), 10 deletions(-) rename {homeManagerModules => homeModules}/adwaita.nix (100%) diff --git a/flake.lock b/flake.lock index 7d1be42..f53b1f6 100644 --- a/flake.lock +++ b/flake.lock @@ -358,11 +358,11 @@ ] }, "locked": { - "lastModified": 1755431984, - "narHash": "sha256-iBgSdzkta6zQ2eIRWjmJTLZ3b1e1EZiCyCPcgCdqPGU=", + "lastModified": 1757847061, + "narHash": "sha256-YW8fpD35tD+1zTkxk0WhP7FJSL15JlFfG7tscgkdI+A=", "ref": "refs/heads/main", - "rev": "31abcb7a9583c4ed931f658eca3e3c1970e60814", - "revCount": 28, + "rev": "ddff8c9b206564dd9b9007e4e894afa6f7860fc8", + "revCount": 30, "type": "git", "url": "https://git.berlin.ccc.de/vinzenz/zerforschen.plus" }, diff --git a/flake.nix b/flake.nix index 8a35273..4bcfe36 100644 --- a/flake.nix +++ b/flake.nix @@ -120,7 +120,6 @@ nixpkgs.overlays = [ self.overlays.unstable-packages - self.overlays.zerforschen ]; nix.settings.experimental-features = [ @@ -141,6 +140,8 @@ self.nixosModules.allowed-unfree-list self.nixosModules.extra-caches ./modules/nixpkgs.nix + + zerforschen-plus.nixosModules.default ] ++ (nixpkgs.lib.optionals (builtins.elem device homeDevices) [ { @@ -154,6 +155,7 @@ } self.nixosModules.pkgs-unstable + self.nixosModules.pkgs-vscode-extensions self.nixosModules.niri self.nixosModules.kdeconnect self.nixosModules.en-de @@ -174,10 +176,6 @@ config = prev.config; }; }; - - zerforschen = final: prev: { - zerforschen-plus-content = zerforschen-plus.packages."${prev.system}".zerforschen-plus-content; - }; }; nixosModules = (self.lib.importDir ./nixosModules) // { @@ -186,11 +184,14 @@ nixpkgs.overlays = [ niri.overlays.niri ]; }; pkgs-unstable = { + nixpkgs.overlays = [ self.overlays.unstable-packages ]; + }; + pkgs-vscode-extensions = { nixpkgs.overlays = [ nix-vscode-extensions.overlays.default ]; }; }; - homeManagerModules = self.lib.importDir ./homeManagerModules; + homeModules = self.lib.importDir ./homeModules; formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-tree); }; diff --git a/homeManagerModules/adwaita.nix b/homeModules/adwaita.nix similarity index 100% rename from homeManagerModules/adwaita.nix rename to homeModules/adwaita.nix -- 2.50.1 From 4d28e476dc458c3fb1eba501e33224320d7422f4 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 14 Sep 2025 13:00:03 +0200 Subject: [PATCH 15/28] mv hosts nixosConfigurations --- flake.nix | 8 ++++---- modules/desktop-environment.nix | 8 ++++---- .../forgejo-runner-1/configuration.nix | 0 .../forgejo-runner-1/forgejo-runner.nix | 0 .../forgejo-runner-1/hardware.nix | 0 .../forgejo-runner-1/imports.nix | 0 .../hetzner-vpn2/configuration.nix | 0 {hosts => nixosConfigurations}/hetzner-vpn2/hardware.nix | 0 {hosts => nixosConfigurations}/hetzner-vpn2/imports.nix | 0 {hosts => nixosConfigurations}/hetzner-vpn2/nginx.nix | 0 {hosts => nixosConfigurations}/ronja-pc/configuration.nix | 0 {hosts => nixosConfigurations}/ronja-pc/hardware.nix | 0 {hosts => nixosConfigurations}/ronja-pc/imports.nix | 0 .../vinzenz-lpt2/configuration.nix | 0 {hosts => nixosConfigurations}/vinzenz-lpt2/hardware.nix | 0 {hosts => nixosConfigurations}/vinzenz-lpt2/imports.nix | 0 {hosts => nixosConfigurations}/vinzenz-lpt2/nginx.nix | 0 .../vinzenz-lpt2/zerforschen-plus.nix | 0 .../vinzenz-pc2/configuration.nix | 0 {hosts => nixosConfigurations}/vinzenz-pc2/fstab.nix | 0 {hosts => nixosConfigurations}/vinzenz-pc2/hardware.nix | 0 {hosts => nixosConfigurations}/vinzenz-pc2/hass.nix | 0 {hosts => nixosConfigurations}/vinzenz-pc2/imports.nix | 0 .../vinzenz-pc2/vscode-server.nix | 0 24 files changed, 8 insertions(+), 8 deletions(-) rename {hosts => nixosConfigurations}/forgejo-runner-1/configuration.nix (100%) rename {hosts => nixosConfigurations}/forgejo-runner-1/forgejo-runner.nix (100%) rename {hosts => nixosConfigurations}/forgejo-runner-1/hardware.nix (100%) rename {hosts => nixosConfigurations}/forgejo-runner-1/imports.nix (100%) rename {hosts => nixosConfigurations}/hetzner-vpn2/configuration.nix (100%) rename {hosts => nixosConfigurations}/hetzner-vpn2/hardware.nix (100%) rename {hosts => nixosConfigurations}/hetzner-vpn2/imports.nix (100%) rename {hosts => nixosConfigurations}/hetzner-vpn2/nginx.nix (100%) rename {hosts => nixosConfigurations}/ronja-pc/configuration.nix (100%) rename {hosts => nixosConfigurations}/ronja-pc/hardware.nix (100%) rename {hosts => nixosConfigurations}/ronja-pc/imports.nix (100%) rename {hosts => nixosConfigurations}/vinzenz-lpt2/configuration.nix (100%) rename {hosts => nixosConfigurations}/vinzenz-lpt2/hardware.nix (100%) rename {hosts => nixosConfigurations}/vinzenz-lpt2/imports.nix (100%) rename {hosts => nixosConfigurations}/vinzenz-lpt2/nginx.nix (100%) rename {hosts => nixosConfigurations}/vinzenz-lpt2/zerforschen-plus.nix (100%) rename {hosts => nixosConfigurations}/vinzenz-pc2/configuration.nix (100%) rename {hosts => nixosConfigurations}/vinzenz-pc2/fstab.nix (100%) rename {hosts => nixosConfigurations}/vinzenz-pc2/hardware.nix (100%) rename {hosts => nixosConfigurations}/vinzenz-pc2/hass.nix (100%) rename {hosts => nixosConfigurations}/vinzenz-pc2/imports.nix (100%) rename {hosts => nixosConfigurations}/vinzenz-pc2/vscode-server.nix (100%) diff --git a/flake.nix b/flake.nix index 4bcfe36..089732e 100644 --- a/flake.nix +++ b/flake.nix @@ -128,9 +128,9 @@ ]; } - ./hosts/${device}/hardware.nix - ./hosts/${device}/imports.nix - ./hosts/${device}/configuration.nix + ./nixosConfigurations/${device}/hardware.nix + ./nixosConfigurations/${device}/imports.nix + ./nixosConfigurations/${device}/configuration.nix self.nixosModules.lix-is-nix self.nixosModules.globalinstalls @@ -150,7 +150,7 @@ time.timeZone = "Europe/Berlin"; home-manager.sharedModules = [ - self.homeManagerModules.adwaita + self.homeModules.adwaita ]; } diff --git a/modules/desktop-environment.nix b/modules/desktop-environment.nix index 1f1efe0..e0334cc 100644 --- a/modules/desktop-environment.nix +++ b/modules/desktop-environment.nix @@ -73,10 +73,10 @@ lm_sensors # office - libreoffice-qt - hunspell - hunspellDicts.de-de - hunspellDicts.en-us-large + #libreoffice-qt + #hunspell + #hunspellDicts.de-de + #hunspellDicts.en-us-large ]; fonts = { diff --git a/hosts/forgejo-runner-1/configuration.nix b/nixosConfigurations/forgejo-runner-1/configuration.nix similarity index 100% rename from hosts/forgejo-runner-1/configuration.nix rename to nixosConfigurations/forgejo-runner-1/configuration.nix diff --git a/hosts/forgejo-runner-1/forgejo-runner.nix b/nixosConfigurations/forgejo-runner-1/forgejo-runner.nix similarity index 100% rename from hosts/forgejo-runner-1/forgejo-runner.nix rename to nixosConfigurations/forgejo-runner-1/forgejo-runner.nix diff --git a/hosts/forgejo-runner-1/hardware.nix b/nixosConfigurations/forgejo-runner-1/hardware.nix similarity index 100% rename from hosts/forgejo-runner-1/hardware.nix rename to nixosConfigurations/forgejo-runner-1/hardware.nix diff --git a/hosts/forgejo-runner-1/imports.nix b/nixosConfigurations/forgejo-runner-1/imports.nix similarity index 100% rename from hosts/forgejo-runner-1/imports.nix rename to nixosConfigurations/forgejo-runner-1/imports.nix diff --git a/hosts/hetzner-vpn2/configuration.nix b/nixosConfigurations/hetzner-vpn2/configuration.nix similarity index 100% rename from hosts/hetzner-vpn2/configuration.nix rename to nixosConfigurations/hetzner-vpn2/configuration.nix diff --git a/hosts/hetzner-vpn2/hardware.nix b/nixosConfigurations/hetzner-vpn2/hardware.nix similarity index 100% rename from hosts/hetzner-vpn2/hardware.nix rename to nixosConfigurations/hetzner-vpn2/hardware.nix diff --git a/hosts/hetzner-vpn2/imports.nix b/nixosConfigurations/hetzner-vpn2/imports.nix similarity index 100% rename from hosts/hetzner-vpn2/imports.nix rename to nixosConfigurations/hetzner-vpn2/imports.nix diff --git a/hosts/hetzner-vpn2/nginx.nix b/nixosConfigurations/hetzner-vpn2/nginx.nix similarity index 100% rename from hosts/hetzner-vpn2/nginx.nix rename to nixosConfigurations/hetzner-vpn2/nginx.nix diff --git a/hosts/ronja-pc/configuration.nix b/nixosConfigurations/ronja-pc/configuration.nix similarity index 100% rename from hosts/ronja-pc/configuration.nix rename to nixosConfigurations/ronja-pc/configuration.nix diff --git a/hosts/ronja-pc/hardware.nix b/nixosConfigurations/ronja-pc/hardware.nix similarity index 100% rename from hosts/ronja-pc/hardware.nix rename to nixosConfigurations/ronja-pc/hardware.nix diff --git a/hosts/ronja-pc/imports.nix b/nixosConfigurations/ronja-pc/imports.nix similarity index 100% rename from hosts/ronja-pc/imports.nix rename to nixosConfigurations/ronja-pc/imports.nix diff --git a/hosts/vinzenz-lpt2/configuration.nix b/nixosConfigurations/vinzenz-lpt2/configuration.nix similarity index 100% rename from hosts/vinzenz-lpt2/configuration.nix rename to nixosConfigurations/vinzenz-lpt2/configuration.nix diff --git a/hosts/vinzenz-lpt2/hardware.nix b/nixosConfigurations/vinzenz-lpt2/hardware.nix similarity index 100% rename from hosts/vinzenz-lpt2/hardware.nix rename to nixosConfigurations/vinzenz-lpt2/hardware.nix diff --git a/hosts/vinzenz-lpt2/imports.nix b/nixosConfigurations/vinzenz-lpt2/imports.nix similarity index 100% rename from hosts/vinzenz-lpt2/imports.nix rename to nixosConfigurations/vinzenz-lpt2/imports.nix diff --git a/hosts/vinzenz-lpt2/nginx.nix b/nixosConfigurations/vinzenz-lpt2/nginx.nix similarity index 100% rename from hosts/vinzenz-lpt2/nginx.nix rename to nixosConfigurations/vinzenz-lpt2/nginx.nix diff --git a/hosts/vinzenz-lpt2/zerforschen-plus.nix b/nixosConfigurations/vinzenz-lpt2/zerforschen-plus.nix similarity index 100% rename from hosts/vinzenz-lpt2/zerforschen-plus.nix rename to nixosConfigurations/vinzenz-lpt2/zerforschen-plus.nix diff --git a/hosts/vinzenz-pc2/configuration.nix b/nixosConfigurations/vinzenz-pc2/configuration.nix similarity index 100% rename from hosts/vinzenz-pc2/configuration.nix rename to nixosConfigurations/vinzenz-pc2/configuration.nix diff --git a/hosts/vinzenz-pc2/fstab.nix b/nixosConfigurations/vinzenz-pc2/fstab.nix similarity index 100% rename from hosts/vinzenz-pc2/fstab.nix rename to nixosConfigurations/vinzenz-pc2/fstab.nix diff --git a/hosts/vinzenz-pc2/hardware.nix b/nixosConfigurations/vinzenz-pc2/hardware.nix similarity index 100% rename from hosts/vinzenz-pc2/hardware.nix rename to nixosConfigurations/vinzenz-pc2/hardware.nix diff --git a/hosts/vinzenz-pc2/hass.nix b/nixosConfigurations/vinzenz-pc2/hass.nix similarity index 100% rename from hosts/vinzenz-pc2/hass.nix rename to nixosConfigurations/vinzenz-pc2/hass.nix diff --git a/hosts/vinzenz-pc2/imports.nix b/nixosConfigurations/vinzenz-pc2/imports.nix similarity index 100% rename from hosts/vinzenz-pc2/imports.nix rename to nixosConfigurations/vinzenz-pc2/imports.nix diff --git a/hosts/vinzenz-pc2/vscode-server.nix b/nixosConfigurations/vinzenz-pc2/vscode-server.nix similarity index 100% rename from hosts/vinzenz-pc2/vscode-server.nix rename to nixosConfigurations/vinzenz-pc2/vscode-server.nix -- 2.50.1 From ff0c287624437c9608603bf1ec745070edd96ab1 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 14 Sep 2025 13:09:37 +0200 Subject: [PATCH 16/28] default.nix for hosts --- flake.nix | 4 +--- .../forgejo-runner-1/{imports.nix => default.nix} | 3 +++ nixosConfigurations/hetzner-vpn2/default.nix | 7 +++++++ nixosConfigurations/hetzner-vpn2/imports.nix | 5 ----- nixosConfigurations/ronja-pc/{imports.nix => default.nix} | 3 +++ .../vinzenz-lpt2/{imports.nix => default.nix} | 3 +++ .../vinzenz-pc2/{imports.nix => default.nix} | 3 +++ 7 files changed, 20 insertions(+), 8 deletions(-) rename nixosConfigurations/forgejo-runner-1/{imports.nix => default.nix} (68%) create mode 100644 nixosConfigurations/hetzner-vpn2/default.nix delete mode 100644 nixosConfigurations/hetzner-vpn2/imports.nix rename nixosConfigurations/ronja-pc/{imports.nix => default.nix} (83%) rename nixosConfigurations/vinzenz-lpt2/{imports.nix => default.nix} (87%) rename nixosConfigurations/vinzenz-pc2/{imports.nix => default.nix} (88%) diff --git a/flake.nix b/flake.nix index 089732e..c55fb04 100644 --- a/flake.nix +++ b/flake.nix @@ -128,9 +128,7 @@ ]; } - ./nixosConfigurations/${device}/hardware.nix - ./nixosConfigurations/${device}/imports.nix - ./nixosConfigurations/${device}/configuration.nix + ./nixosConfigurations/${device} self.nixosModules.lix-is-nix self.nixosModules.globalinstalls diff --git a/nixosConfigurations/forgejo-runner-1/imports.nix b/nixosConfigurations/forgejo-runner-1/default.nix similarity index 68% rename from nixosConfigurations/forgejo-runner-1/imports.nix rename to nixosConfigurations/forgejo-runner-1/default.nix index 05d6c4d..93d4950 100644 --- a/nixosConfigurations/forgejo-runner-1/imports.nix +++ b/nixosConfigurations/forgejo-runner-1/default.nix @@ -1,6 +1,9 @@ { nixosModules, ... }: { imports = [ + ./configuration.nix + ./hardware.nix + nixosModules.podman ./forgejo-runner.nix ]; diff --git a/nixosConfigurations/hetzner-vpn2/default.nix b/nixosConfigurations/hetzner-vpn2/default.nix new file mode 100644 index 0000000..46ded48 --- /dev/null +++ b/nixosConfigurations/hetzner-vpn2/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./configuration.nix + ./hardware.nix + ./nginx.nix + ]; +} diff --git a/nixosConfigurations/hetzner-vpn2/imports.nix b/nixosConfigurations/hetzner-vpn2/imports.nix deleted file mode 100644 index 3fadabb..0000000 --- a/nixosConfigurations/hetzner-vpn2/imports.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - imports = [ - ./nginx.nix - ]; -} diff --git a/nixosConfigurations/ronja-pc/imports.nix b/nixosConfigurations/ronja-pc/default.nix similarity index 83% rename from nixosConfigurations/ronja-pc/imports.nix rename to nixosConfigurations/ronja-pc/default.nix index ca628cc..9efb5f1 100644 --- a/nixosConfigurations/ronja-pc/imports.nix +++ b/nixosConfigurations/ronja-pc/default.nix @@ -1,6 +1,9 @@ { nixosModules, ... }: { imports = [ + ./configuration.nix + ./hardware.nix + ../../modules/gnome.nix ../../modules/gaming.nix nixosModules.steam diff --git a/nixosConfigurations/vinzenz-lpt2/imports.nix b/nixosConfigurations/vinzenz-lpt2/default.nix similarity index 87% rename from nixosConfigurations/vinzenz-lpt2/imports.nix rename to nixosConfigurations/vinzenz-lpt2/default.nix index 9335800..6b2603a 100644 --- a/nixosConfigurations/vinzenz-lpt2/imports.nix +++ b/nixosConfigurations/vinzenz-lpt2/default.nix @@ -1,6 +1,9 @@ { nixosModules, ... }: { imports = [ + ./configuration.nix + ./hardware.nix + ../../modules/gnome.nix ../../modules/gaming.nix nixosModules.steam diff --git a/nixosConfigurations/vinzenz-pc2/imports.nix b/nixosConfigurations/vinzenz-pc2/default.nix similarity index 88% rename from nixosConfigurations/vinzenz-pc2/imports.nix rename to nixosConfigurations/vinzenz-pc2/default.nix index ca29682..4d5df4d 100644 --- a/nixosConfigurations/vinzenz-pc2/imports.nix +++ b/nixosConfigurations/vinzenz-pc2/default.nix @@ -1,6 +1,9 @@ { nixosModules, ... }: { imports = [ + ./configuration.nix + ./hardware.nix + ../../modules/gnome.nix ../../modules/gaming.nix nixosModules.steam -- 2.50.1 From 1b3b7cf607b57db75d152829f58f2358f66eabbb Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 14 Sep 2025 13:36:45 +0200 Subject: [PATCH 17/28] more homeModules --- flake.nix | 23 ++++-- homeModules/git.nix | 13 ++++ homeModules/nano.nix | 9 +++ homeModules/templates.nix | 12 +++ homeModules/zsh-basics.nix | 13 ++++ modules/desktop-environment.nix | 73 +------------------ modules/home-manager.nix | 61 ---------------- modules/intel-graphics.nix | 4 +- .../forgejo-runner-1/default.nix | 4 +- nixosConfigurations/ronja-pc/default.nix | 4 +- nixosConfigurations/vinzenz-lpt2/default.nix | 8 +- nixosConfigurations/vinzenz-pc2/default.nix | 8 +- nixosModules/en-de.nix | 5 ++ nixosModules/modern-desktop.nix | 49 +++++++++++++ nixosModules/nix-ld.nix | 22 ++++++ nixosModules/steam.nix | 4 +- 16 files changed, 158 insertions(+), 154 deletions(-) create mode 100644 homeModules/git.nix create mode 100644 homeModules/nano.nix create mode 100644 homeModules/templates.nix create mode 100644 homeModules/zsh-basics.nix delete mode 100644 modules/home-manager.nix create mode 100644 nixosModules/modern-desktop.nix create mode 100644 nixosModules/nix-ld.nix diff --git a/flake.nix b/flake.nix index c55fb04..8b3b690 100644 --- a/flake.nix +++ b/flake.nix @@ -103,13 +103,16 @@ nixosConfigurations = forDevice ( device: system: let - specialArgs = { + commonSpecialArgs = { inherit device; - inherit (self) nixosModules; + vinzenzHomeModules = self.homeModules; }; in nixpkgs.lib.nixosSystem { - inherit system specialArgs; + inherit system; + specialArgs = commonSpecialArgs // { + vinzenzNixosModules = self.nixosModules; + }; modules = [ { networking.hostName = device; @@ -143,12 +146,21 @@ ] ++ (nixpkgs.lib.optionals (builtins.elem device homeDevices) [ { - home-manager.extraSpecialArgs = specialArgs; + home-manager = { + extraSpecialArgs = commonSpecialArgs; + useGlobalPkgs = true; + useUserPackages = true; + }; time.timeZone = "Europe/Berlin"; home-manager.sharedModules = [ + { home.stateVersion = "22.11"; } self.homeModules.adwaita + self.homeModules.git + self.homeModules.templates + self.homeModules.zsh-basics + self.homeModules.nano ]; } @@ -158,7 +170,8 @@ self.nixosModules.kdeconnect self.nixosModules.en-de self.nixosModules.gnome - ./modules/home-manager.nix + self.nixosModules.modern-desktop + self.nixosModules.nix-ld home-manager.nixosModules.home-manager servicepoint-simulator.nixosModules.default diff --git a/homeModules/git.nix b/homeModules/git.nix new file mode 100644 index 0000000..76afceb --- /dev/null +++ b/homeModules/git.nix @@ -0,0 +1,13 @@ +{ + programs = { + git = { + enable = true; + extraConfig.init.defaultBranch = "main"; + }; + + gh = { + enable = true; + gitCredentialHelper.enable = true; + }; + }; +} diff --git a/homeModules/nano.nix b/homeModules/nano.nix new file mode 100644 index 0000000..ab3e7b2 --- /dev/null +++ b/homeModules/nano.nix @@ -0,0 +1,9 @@ +{ + home = { + sessionVariables.EDITOR = "nano"; + file.".nanorc".text = '' + set linenumbers + set mouse + ''; + }; +} diff --git a/homeModules/templates.nix b/homeModules/templates.nix new file mode 100644 index 0000000..71d2e0b --- /dev/null +++ b/homeModules/templates.nix @@ -0,0 +1,12 @@ +{ + home.file = { + "Templates/Empty file".text = ""; + "Templates/Empty bash script".text = '' + #!/usr/bin/env bash + # abort on error, undefined variables + set -eu + # print commands before execution + set -x + ''; + }; +} diff --git a/homeModules/zsh-basics.nix b/homeModules/zsh-basics.nix new file mode 100644 index 0000000..0b0e281 --- /dev/null +++ b/homeModules/zsh-basics.nix @@ -0,0 +1,13 @@ +{ + programs = { + command-not-found.enable = true; + dircolors.enable = true; + + zsh = { + enable = true; + syntaxHighlighting.enable = true; + autosuggestion.enable = true; + enableVteIntegration = true; + }; + }; +} diff --git a/modules/desktop-environment.nix b/modules/desktop-environment.nix index e0334cc..e839353 100644 --- a/modules/desktop-environment.nix +++ b/modules/desktop-environment.nix @@ -1,73 +1,7 @@ { pkgs, ... }: { config = { - services = { - xserver.enable = true; - libinput.enable = true; - flatpak.enable = true; - fstrim.enable = true; - earlyoom = { - enable = true; - freeMemThreshold = 5; - }; - }; - - # Enable sound with pipewire. - security.rtkit.enable = true; - services = { - pulseaudio.enable = false; - pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - #jack.enable = true; - }; - }; - - programs = { - firefox = { - enable = true; - languagePacks = [ - "en-US" - "de" - ]; - }; - nix-ld = { - enable = true; - libraries = with pkgs; [ - stdenv.cc.cc - zlib - zstd - curl - openssl - attr - libssh - bzip2 - libxml2 - acl - libsodium - util-linux - xz - systemd - ]; - }; - appimage = { - enable = true; - binfmt = true; - }; - xwayland.enable = true; - }; - - systemd = { - # save some boot time because nothing actually requires network connectivity - services.NetworkManager-wait-online.enable = false; - - # prevent stuck units from preventing shutdown (default is 120s) - extraConfig = '' - DefaultTimeoutStopSec=10s - ''; - }; + programs.firefox.enable = true; environment.systemPackages = with pkgs; [ lm_sensors @@ -93,10 +27,5 @@ enable = true; enableGraphical = true; }; - - system.autoUpgrade = { - allowReboot = false; - operation = "boot"; - }; }; } diff --git a/modules/home-manager.nix b/modules/home-manager.nix deleted file mode 100644 index 9af6a19..0000000 --- a/modules/home-manager.nix +++ /dev/null @@ -1,61 +0,0 @@ -_: { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - sharedModules = [ - # set stateVersion - { home.stateVersion = "22.11"; } - # make nano the default editor - { - home = { - sessionVariables.EDITOR = "nano"; - file.".nanorc".text = '' - set linenumbers - set mouse - ''; - }; - } - # command line niceness - { - programs = { - command-not-found.enable = true; - dircolors.enable = true; - - zsh = { - enable = true; - syntaxHighlighting.enable = true; - autosuggestion.enable = true; - enableVteIntegration = true; - }; - }; - } - # common git config - { - programs = { - git = { - enable = true; - extraConfig.init.defaultBranch = "main"; - }; - - gh = { - enable = true; - gitCredentialHelper.enable = true; - }; - }; - } - # Templates - { - home.file = { - "Templates/Empty file".text = ""; - "Templates/Empty bash script".text = '' - #!/usr/bin/env bash - # abort on error, undefined variables - set -eu - # print commands before execution - set -x - ''; - }; - } - ]; - }; -} diff --git a/modules/intel-graphics.nix b/modules/intel-graphics.nix index d7cae18..709d720 100644 --- a/modules/intel-graphics.nix +++ b/modules/intel-graphics.nix @@ -1,6 +1,6 @@ -{ pkgs, nixosModules, ... }: +{ pkgs, vinzenzNixosModules, ... }: { - imports = [ nixosModules.allowed-unfree-list ]; + imports = [ vinzenzNixosModules.allowed-unfree-list ]; config = { hardware.graphics = { diff --git a/nixosConfigurations/forgejo-runner-1/default.nix b/nixosConfigurations/forgejo-runner-1/default.nix index 93d4950..79cb613 100644 --- a/nixosConfigurations/forgejo-runner-1/default.nix +++ b/nixosConfigurations/forgejo-runner-1/default.nix @@ -1,10 +1,10 @@ -{ nixosModules, ... }: +{ vinzenzNixosModules, ... }: { imports = [ ./configuration.nix ./hardware.nix - nixosModules.podman + vinzenzNixosModules.podman ./forgejo-runner.nix ]; } diff --git a/nixosConfigurations/ronja-pc/default.nix b/nixosConfigurations/ronja-pc/default.nix index 9efb5f1..e0e9117 100644 --- a/nixosConfigurations/ronja-pc/default.nix +++ b/nixosConfigurations/ronja-pc/default.nix @@ -1,4 +1,4 @@ -{ nixosModules, ... }: +{ vinzenzNixosModules, ... }: { imports = [ ./configuration.nix @@ -6,7 +6,7 @@ ../../modules/gnome.nix ../../modules/gaming.nix - nixosModules.steam + vinzenzNixosModules.steam ../../modules/desktop-environment.nix ../../modules/desktop-hardware.nix diff --git a/nixosConfigurations/vinzenz-lpt2/default.nix b/nixosConfigurations/vinzenz-lpt2/default.nix index 6b2603a..d29ae65 100644 --- a/nixosConfigurations/vinzenz-lpt2/default.nix +++ b/nixosConfigurations/vinzenz-lpt2/default.nix @@ -1,4 +1,4 @@ -{ nixosModules, ... }: +{ vinzenzNixosModules, ... }: { imports = [ ./configuration.nix @@ -6,9 +6,9 @@ ../../modules/gnome.nix ../../modules/gaming.nix - nixosModules.steam - nixosModules.printing - nixosModules.podman + vinzenzNixosModules.steam + vinzenzNixosModules.printing + vinzenzNixosModules.podman ../../modules/desktop-environment.nix ../../modules/desktop-hardware.nix diff --git a/nixosConfigurations/vinzenz-pc2/default.nix b/nixosConfigurations/vinzenz-pc2/default.nix index 4d5df4d..e31bdbc 100644 --- a/nixosConfigurations/vinzenz-pc2/default.nix +++ b/nixosConfigurations/vinzenz-pc2/default.nix @@ -1,4 +1,4 @@ -{ nixosModules, ... }: +{ vinzenzNixosModules, ... }: { imports = [ ./configuration.nix @@ -6,9 +6,9 @@ ../../modules/gnome.nix ../../modules/gaming.nix - nixosModules.steam - nixosModules.printing - nixosModules.podman + vinzenzNixosModules.steam + vinzenzNixosModules.printing + vinzenzNixosModules.podman #../../modules/niri.nix ../../modules/desktop-environment.nix ../../modules/desktop-hardware.nix diff --git a/nixosModules/en-de.nix b/nixosModules/en-de.nix index 1df6811..0ed4faf 100644 --- a/nixosModules/en-de.nix +++ b/nixosModules/en-de.nix @@ -16,4 +16,9 @@ LC_TIME = "de_DE.UTF-8"; }; }; + + programs.firefox.languagePacks = [ + "en-US" + "de" + ]; } diff --git a/nixosModules/modern-desktop.nix b/nixosModules/modern-desktop.nix new file mode 100644 index 0000000..f1879bd --- /dev/null +++ b/nixosModules/modern-desktop.nix @@ -0,0 +1,49 @@ +{ + services = { + xserver.enable = true; + libinput.enable = true; + flatpak.enable = true; + fstrim.enable = true; + earlyoom = { + enable = true; + freeMemThreshold = 5; + }; + }; + + # Enable sound with pipewire. + security.rtkit.enable = true; + services = { + pulseaudio.enable = false; + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + #jack.enable = true; + }; + }; + + systemd = { + # save some boot time because nothing actually requires network connectivity + services.NetworkManager-wait-online.enable = false; + + # prevent stuck units from preventing shutdown (default is 120s) + extraConfig = '' + DefaultTimeoutStopSec=10s + ''; + }; + + programs = { + xwayland.enable = true; + + appimage = { + enable = true; + binfmt = true; + }; + }; + + system.autoUpgrade = { + allowReboot = false; + operation = "boot"; + }; +} diff --git a/nixosModules/nix-ld.nix b/nixosModules/nix-ld.nix new file mode 100644 index 0000000..382aa3d --- /dev/null +++ b/nixosModules/nix-ld.nix @@ -0,0 +1,22 @@ +{ pkgs, ... }: +{ + programs.nix-ld = { + enable = true; + libraries = with pkgs; [ + stdenv.cc.cc + zlib + zstd + curl + openssl + attr + libssh + bzip2 + libxml2 + acl + libsodium + util-linux + xz + systemd + ]; + }; +} diff --git a/nixosModules/steam.nix b/nixosModules/steam.nix index 6e3c997..1c70785 100644 --- a/nixosModules/steam.nix +++ b/nixosModules/steam.nix @@ -1,6 +1,6 @@ -{ nixosModules, ... }: +{ vinzenzNixosModules, ... }: { - imports = [ nixosModules.allowed-unfree-list ]; + imports = [ vinzenzNixosModules.allowed-unfree-list ]; hardware.steam-hardware.enable = true; -- 2.50.1 From 1f1b9013300a1e4ab31c79770ad58204da7f1f66 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 14 Sep 2025 13:45:48 +0200 Subject: [PATCH 18/28] 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 -- 2.50.1 From a208ca4df2f507657403377fd6427226685f2228 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 14 Sep 2025 14:01:42 +0200 Subject: [PATCH 19/28] 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"; + }; + }; +} -- 2.50.1 From f1855c1265a0fd3eb367aa82ef36169ac5c765d3 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 14 Sep 2025 14:12:14 +0200 Subject: [PATCH 20/28] 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; +} -- 2.50.1 From f5e1b9c7eefe2765560b89d2e9a66c13ac2abab3 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 15 Sep 2025 17:18:59 +0200 Subject: [PATCH 21/28] 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 + ]; + } + ]; } -- 2.50.1 From f89c75aad292c637b90289916981675fed7cdcf7 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 15 Sep 2025 17:52:33 +0200 Subject: [PATCH 22/28] 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 -- 2.50.1 From 1bebb5d096d4315756002ed1a67acc324417c617 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 15 Sep 2025 18:07:38 +0200 Subject: [PATCH 23/28] 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 -- 2.50.1 From 87062e05c4b27921cd61ebd58d07d8e90e3a8be0 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 15 Sep 2025 18:11:53 +0200 Subject: [PATCH 24/28] 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 ]; } -- 2.50.1 From 8fc672bfcfcba7f9448c4a024c3d4834929c1bdb Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 15 Sep 2025 19:01:30 +0200 Subject: [PATCH 25/28] 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" + ]; +} -- 2.50.1 From 9cf6333f4b0b470ba61661c714bc7eeb84c02f15 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 15 Sep 2025 19:05:04 +0200 Subject: [PATCH 26/28] 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 + ]; + }; } -- 2.50.1 From 1735ec5594d1c2d1f8650e75d79cc9699d522e15 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 15 Sep 2025 19:14:32 +0200 Subject: [PATCH 27/28] 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 -- 2.50.1 From 6754eed1d88b19216575bdb8c8d8c2d388fd973a Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 15 Sep 2025 19:40:49 +0200 Subject: [PATCH 28/28] lint checks, formatting, update statix url --- flake.nix | 66 ++++++++++----------- homeConfigurations/vinzenz/editorconfig.nix | 1 - homeConfigurations/vinzenz/git.nix | 1 - homeConfigurations/vinzenz/ssh.nix | 1 - homeConfigurations/vinzenz/zsh.nix | 2 +- nixosConfigurations/hetzner-vpn2/nginx.nix | 4 +- nixosConfigurations/vinzenz-lpt2/nginx.nix | 4 +- 7 files changed, 36 insertions(+), 43 deletions(-) diff --git a/flake.nix b/flake.nix index 0096a20..4d7ec50 100644 --- a/flake.nix +++ b/flake.nix @@ -120,7 +120,7 @@ additional-modules = [ self.nixosModules.podman ]; }; }; - lib = nixpkgs.lib; + inherit (nixpkgs) lib; forDevice = f: lib.mapAttrs (device: value: f (value // { inherit device; })) devices; supported-systems = lib.attrsets.mapAttrsToList (k: v: v.system) devices; forAllSystems = @@ -143,6 +143,36 @@ ) (builtins.readDir dir)); }; + overlays = { + unstable-packages = final: prev: { + unstable = import nixpkgs-unstable { + inherit (prev) system config; + }; + }; + }; + + nixosModules = (self.lib.importDir ./nixosModules) // { + niri = { + imports = [ niri.nixosModules.niri ]; + nixpkgs.overlays = [ niri.overlays.niri ]; + }; + pkgs-unstable = { + nixpkgs.overlays = [ self.overlays.unstable-packages ]; + }; + 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; + homeConfigurations = self.lib.importDir ./homeConfigurations; + + formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-tree); + nixosConfigurations = forDevice ( { device, @@ -153,8 +183,6 @@ let specialArgs = { inherit device; - vinzenzHomeModules = self.homeModules; - vinzenzLib = self.lib; }; in nixpkgs.lib.nixosSystem { @@ -178,7 +206,6 @@ nix.settings.experimental-features = [ "nix-command" "flakes" - "repl-flake" ]; documentation = { @@ -242,36 +269,5 @@ ++ additional-modules; } ); - - overlays = { - unstable-packages = final: prev: { - unstable = import nixpkgs-unstable { - system = prev.system; - config = prev.config; - }; - }; - }; - - nixosModules = (self.lib.importDir ./nixosModules) // { - niri = { - imports = [ niri.nixosModules.niri ]; - nixpkgs.overlays = [ niri.overlays.niri ]; - }; - pkgs-unstable = { - nixpkgs.overlays = [ self.overlays.unstable-packages ]; - }; - 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; - homeConfigurations = self.lib.importDir ./homeConfigurations; - - formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-tree); }; } diff --git a/homeConfigurations/vinzenz/editorconfig.nix b/homeConfigurations/vinzenz/editorconfig.nix index 496c714..1ebffa8 100644 --- a/homeConfigurations/vinzenz/editorconfig.nix +++ b/homeConfigurations/vinzenz/editorconfig.nix @@ -1,4 +1,3 @@ -{ ... }: { config.editorconfig = { enable = true; diff --git a/homeConfigurations/vinzenz/git.nix b/homeConfigurations/vinzenz/git.nix index ddaa890..537fe61 100644 --- a/homeConfigurations/vinzenz/git.nix +++ b/homeConfigurations/vinzenz/git.nix @@ -1,4 +1,3 @@ -{ ... }: { config.programs.git = { enable = true; diff --git a/homeConfigurations/vinzenz/ssh.nix b/homeConfigurations/vinzenz/ssh.nix index 98acce9..20b4bae 100644 --- a/homeConfigurations/vinzenz/ssh.nix +++ b/homeConfigurations/vinzenz/ssh.nix @@ -1,4 +1,3 @@ -{ ... }: { config.programs.ssh = { enable = true; diff --git a/homeConfigurations/vinzenz/zsh.nix b/homeConfigurations/vinzenz/zsh.nix index d7cbcfa..1278aca 100644 --- a/homeConfigurations/vinzenz/zsh.nix +++ b/homeConfigurations/vinzenz/zsh.nix @@ -20,7 +20,7 @@ my-direnvallow = "echo \"use nix\" > .envrc && direnv allow"; my-ip4 = "ip addr show | grep 192"; deadnix = "nix run github:astro/deadnix -- "; - statix = "nix run git+https://git.peppe.rs/languages/statix -- "; + statix = "nix run github:oppiliappan/statix -- "; }; history = { diff --git a/nixosConfigurations/hetzner-vpn2/nginx.nix b/nixosConfigurations/hetzner-vpn2/nginx.nix index 85207bc..2520533 100644 --- a/nixosConfigurations/hetzner-vpn2/nginx.nix +++ b/nixosConfigurations/hetzner-vpn2/nginx.nix @@ -72,7 +72,7 @@ in addSSL = true; enableACME = true; locations."/" = { - proxyPass = ("http://unix:" + anubis-domain-socket); + proxyPass = "http://unix:" + anubis-domain-socket; }; }; @@ -80,7 +80,7 @@ in root = pkgs.zerforschen-plus-content; listen = [ { - addr = ("unix:" + blog-domain-socket); + addr = "unix:" + blog-domain-socket; } ]; }; diff --git a/nixosConfigurations/vinzenz-lpt2/nginx.nix b/nixosConfigurations/vinzenz-lpt2/nginx.nix index fef3dec..d5fd6a4 100644 --- a/nixosConfigurations/vinzenz-lpt2/nginx.nix +++ b/nixosConfigurations/vinzenz-lpt2/nginx.nix @@ -29,7 +29,7 @@ in "vinzenz-lpt2" = { locations."/" = { - proxyPass = ("http://unix:" + anubis-domain-socket); + proxyPass = "http://unix:" + anubis-domain-socket; }; }; @@ -37,7 +37,7 @@ in root = pkgs.zerforschen-plus-content; listen = [ { - addr = ("unix:" + blog-domain-socket); + addr = "unix:" + blog-domain-socket; } ]; }; -- 2.50.1