From c794381bac47fd8ee70f9e63eba52e4e1e638640 Mon Sep 17 00:00:00 2001 From: Bloxx12 Date: Wed, 9 Apr 2025 15:31:18 +0200 Subject: [PATCH 1/5] greetd/module.nix: Hyprland autologin --- modules/services/greetd/module.nix | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/modules/services/greetd/module.nix b/modules/services/greetd/module.nix index ffec7f4..633e644 100644 --- a/modules/services/greetd/module.nix +++ b/modules/services/greetd/module.nix @@ -4,11 +4,14 @@ pkgs, ... }: let - cfg = config.modules.services.greetd; - uwsmEnabled = config.modules.services.uwsm.enable; + inherit (lib.meta) getExe; + inherit (lib.modules) mkIf; inherit (lib.options) mkOption mkEnableOption; inherit (lib.types) str listOf; - inherit (lib.modules) mkIf; + + inherit (config.meta.mainUser) username; + cfg = config.modules.services.greetd; + uwsmEnabled = config.modules.services.uwsm.enable; in { options.modules.services.greetd = { enable = mkEnableOption "greetd"; @@ -25,24 +28,31 @@ in { type = str; default = if uwsmEnabled - then "uwsm start Hyprland" + then "${getExe config.programs.uwsm.package} start Hyprland" else "Hyprland"; }; }; config = mkIf cfg.enable { - services.greetd = { - enable = true; - package = pkgs.greetd; - settings.default_session = { + services.greetd = let + session = { command = '' ${pkgs.greetd.tuigreet}/bin/tuigreet \ -c \"${cfg.session}\" \ - -r + -r -t --time-format "DD.MM.YYYY" --asteriks''; + # command = "${getExe config.programs.uwsm.package} start hyprland-uwsm.desktop"; + # user = username; }; + in { + enable = true; + package = pkgs.greetd; vt = 7; + settings = { + default_session = session; + initial_session = session; + }; }; }; } From e810a8923290c15a4ae5a61d937589b0317c5f60 Mon Sep 17 00:00:00 2001 From: Bloxx12 Date: Wed, 9 Apr 2025 15:31:18 +0200 Subject: [PATCH 2/5] hyprland/exec.nix: add uwsm finalize --- modules/wms/wayland/hyprland/exec.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/wms/wayland/hyprland/exec.nix b/modules/wms/wayland/hyprland/exec.nix index 6a2c5f5..66d206c 100644 --- a/modules/wms/wayland/hyprland/exec.nix +++ b/modules/wms/wayland/hyprland/exec.nix @@ -1,15 +1,17 @@ { config, + lib, pkgs, ... }: let # inherit (config.modules.style) cursor; - inherit (builtins) toString; in { programs.hyprland.settings = { # Hyprland settings # Programs which get executed at Hyprland start. exec-once = [ + "uwsm finalize" + "hyprctl setcursor BreezeX-RosePine-Linux 32" "[workspace special:keepassxc; silent;tile] ${pkgs.keepassxc}/bin/keepassxc" @@ -22,6 +24,7 @@ in { "${pkgs.wlsunset}/bin/wlsunset -S 06:00 -s 20:00" "${pkgs.lxqt.lxqt-policykit}/bin/lxqt-policykit-agent" "hyprctl dispatch split-workspace 1" + ]; }; } From 11cfbf696f604e1d548a5447143117c0d9fe3f23 Mon Sep 17 00:00:00 2001 From: Bloxx12 Date: Wed, 9 Apr 2025 15:31:18 +0200 Subject: [PATCH 3/5] networking/module.nix: networking improvements --- modules/system/os/networking/module.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/system/os/networking/module.nix b/modules/system/os/networking/module.nix index fd4ca78..dd7b01c 100644 --- a/modules/system/os/networking/module.nix +++ b/modules/system/os/networking/module.nix @@ -6,6 +6,17 @@ in { ]; networking = { enableIPv6 = true; + + # INFO: This disables wpa_supplicant, + # I use nenetworkmanager instead. + wireless.enable = false; + + dhcpcd = { + # faster boot times + wait = "background"; + extraConfig = "noarp"; + }; + nameservers = [ # quad9 DNS "9.9.9.9" @@ -14,8 +25,16 @@ in { }; services.resolved = { enable = true; + dnssec = "false"; # quad9 dns fallbackDns = ["9.9.9.9" "2620::fe::fe"]; }; users.users.${username}.extraGroups = ["networkmanager"]; + + systemd = { + network = { + enable = true; + wait-online.anyInterface = true; + }; + }; } From 2f33765b57af7167fbbc9941fe35964f6611f208 Mon Sep 17 00:00:00 2001 From: Bloxx12 Date: Wed, 9 Apr 2025 15:31:18 +0200 Subject: [PATCH 4/5] flake.lock: bump inputs --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index ed91b3c..040c2a6 100644 --- a/flake.lock +++ b/flake.lock @@ -594,11 +594,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1744098102, - "narHash": "sha256-tzCdyIJj9AjysC3OuKA+tMD/kDEDAF9mICPDU7ix0JA=", + "lastModified": 1744932701, + "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c8cd81426f45942bb2906d5ed2fe21d2f19d95b7", + "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", "type": "github" }, "original": { From cca3ba7d092f0b4180697d0b33291c5d7c1ce7a2 Mon Sep 17 00:00:00 2001 From: Bloxx12 Date: Wed, 9 Apr 2025 15:31:18 +0200 Subject: [PATCH 5/5] hosts/default.nix: cleanup --- hosts/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hosts/default.nix b/hosts/default.nix index 7a34711..820c9b6 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -27,17 +27,17 @@ inputs: let modules = concatLists [ # This is used to pre-emptively set the hostPlatform for nixpkgs. # Also, we set the system hostname here. - [ - # self.nixosModules.user - ] (singleton { networking.hostName = hostname; nixpkgs.hostPlatform = system; }) (flatten ( concatLists [ + # configuration for the host, passed as an argument. (singleton ./${hostname}/default.nix) + # common configuration, which all hosts share. (singleton ./common.nix) + # Import all files called module.nix from my modules directory. ( filter (hasSuffix "module.nix") ( map toString (listFilesRecursive ../modules)