From 4743732cdef11dad87b7dd2a655ea89b9e56bd24 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 25 Jun 2024 02:10:39 +0200 Subject: [PATCH 1/5] Update tuigreet style --- system/roles/workstation/display/login/greetd.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/system/roles/workstation/display/login/greetd.nix b/system/roles/workstation/display/login/greetd.nix index 9590df6..b6e60a7 100644 --- a/system/roles/workstation/display/login/greetd.nix +++ b/system/roles/workstation/display/login/greetd.nix @@ -11,6 +11,9 @@ deviceType = config.myOptions.device.roles.type; acceptedTypes = ["laptop" "desktop"]; + greetingMsg = "'Access is restricted to authorized personnel only.'"; + tuiGreetTheme = "'border=magenta;text=cyan;prompt=green;time=red;action=white;button=yellow;container=black;input=gray'"; + sessionData = config.services.displayManager.sessionData.desktops; sessionPaths = concatStringsSep ":" [ "${sessionData}/share/xsessions" @@ -25,14 +28,16 @@ "--remember" "--remember-user-session" "--asterisks" + "--greeting ${greetingMsg}" "--sessions '${sessionPaths}'" + "--theme ${tuiGreetTheme}" ]; }; in { config = mkIf (builtins.elem deviceType acceptedTypes) { services.greetd = { enable = true; - vt = 2; + vt = 1; # settings = { From 9ab8cf34ac7ef6e04eb9a8a26841c3e89abafb35 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 25 Jun 2024 02:11:01 +0200 Subject: [PATCH 2/5] Persist tuigreet previous session & user data --- system/roles/workstation/display/login/greetd.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system/roles/workstation/display/login/greetd.nix b/system/roles/workstation/display/login/greetd.nix index b6e60a7..c366e87 100644 --- a/system/roles/workstation/display/login/greetd.nix +++ b/system/roles/workstation/display/login/greetd.nix @@ -59,5 +59,8 @@ in { TTYVHangup = true; TTYVTDisallocate = true; }; + + # Persist info about previous session & user + myOptions.system.impermanence.root.extraDirectories = [ "/var/cache/tuigreet" ]; }; } From b8c6ed6ca45b7b3a5e88acb58dc46c011d95b2db Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Wed, 26 Jun 2024 16:39:33 +0200 Subject: [PATCH 3/5] Only pass inputs to hosts (contains everything) --- flake.nix | 5 ++--- hosts/default.nix | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 2b03ea5..de75be2 100644 --- a/flake.nix +++ b/flake.nix @@ -39,8 +39,7 @@ }; }; - outputs = {self, nixpkgs, ...} @ inputs: let - in { - nixosConfigurations = import ./hosts {inherit nixpkgs inputs self;}; + outputs = {self, nixpkgs, ...} @ inputs: { + nixosConfigurations = import ./hosts {inherit inputs;}; }; } diff --git a/hosts/default.nix b/hosts/default.nix index e334112..d5e7492 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,5 +1,6 @@ -{ self, inputs, ... }: +{ inputs, ... }: let + inherit (inputs) self; inherit (inputs.nixpkgs) lib; # A list of shared modules that ALL systems need From 2dcd368572373ef589ade8c12cbb33541beecb3c Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Wed, 26 Jun 2024 16:40:33 +0200 Subject: [PATCH 4/5] Remove vboxnix host --- hosts/default.nix | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/hosts/default.nix b/hosts/default.nix index d5e7492..084916d 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -11,17 +11,6 @@ let ]; in { - vboxnix = lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit lib inputs self; }; - modules = [ - ./vbox_nix - inputs.home-manager.nixosModules.home-manager - inputs.impermanence.nixosModules.impermanence - inputs.lanzaboote.nixosModules.lanzaboote - ] ++ shared; - }; - herugrim = lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit lib inputs self; }; From 5580328f0abe4bbaeef9d40d0d62953c27e78b03 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Wed, 26 Jun 2024 17:19:42 +0200 Subject: [PATCH 5/5] Add default nix shell (for nix develop) --- flake.nix | 1 + shells/default.nix | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 shells/default.nix diff --git a/flake.nix b/flake.nix index de75be2..c3929a8 100644 --- a/flake.nix +++ b/flake.nix @@ -41,5 +41,6 @@ outputs = {self, nixpkgs, ...} @ inputs: { nixosConfigurations = import ./hosts {inherit inputs;}; + devShells = import ./shells {inherit inputs;}; }; } diff --git a/shells/default.nix b/shells/default.nix new file mode 100644 index 0000000..5934283 --- /dev/null +++ b/shells/default.nix @@ -0,0 +1,21 @@ +{inputs, ...}: let + inherit (inputs) nixpkgs; + + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; +in { + ${system} = { + default = pkgs.mkShell { + name = "nixdots"; + meta.description = "The default development shell for my NixOS configuration"; + packages = with pkgs; [ + git # flakes require git + nil # nix ls + statix # lints and suggestions + deadnix # clean up unused nix code + alejandra # nix formatter + ]; + shellHook = "exec $SHELL"; + }; + }; +}