Commits: 2

Move the guest password clearing logic to guest-session.nix

The BiebOS configuration is modular. Modules are loaded in flake.nix (that's the entry point). All aspects of the guest session should reside in the guest-session module. The configuration.nix file is also a module - kind of a kitchen sink. We should avoid adding more code there, and ideally decompose it into more specialized modules.

index 4ce50de..434c606 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -114,15 +114,6 @@
= };
=
=
-systemd.services.clear-guest-password = {
-	description = "Clears the guest password if there is one";
-	wantedBy = [ "multi-user.target" ];
-	serviceConfig = {
-		Type = "oneshot";
-		ExecStart = "/run/current-system/sw/bin/bash -c '/run/wrappers/bin/passwd --delete guest'";
-	};
-};
-
=  # Install firefox.
=  programs.firefox.enable = true;
=
index ad8ea6d..fb5162c 100644
--- a/guest-session.nix
+++ b/guest-session.nix
@@ -17,5 +17,14 @@
=	systemd.tmpfiles.rules = [
=		"D! /home/guest 0700 guest users"
=	];
+
+	systemd.services.clear-guest-password = {
+		description = "Clears the guest password if there is one";
+		wantedBy = [ "multi-user.target" ];
+		serviceConfig = {
+			Type = "oneshot";
+			ExecStart = "/run/current-system/sw/bin/bash -c '/run/wrappers/bin/passwd --delete guest'";
+		};
+	};
=}
=

Simplify guest password clearing command

Systemd will already run the command in a shell. No need to wrap it in another instance of bash.

index fb5162c..98725a9 100644
--- a/guest-session.nix
+++ b/guest-session.nix
@@ -23,7 +23,7 @@
=		wantedBy = [ "multi-user.target" ];
=		serviceConfig = {
=			Type = "oneshot";
-			ExecStart = "/run/current-system/sw/bin/bash -c '/run/wrappers/bin/passwd --delete guest'";
+			ExecStart = "/run/wrappers/bin/passwd --delete guest";
=		};
=	};
=}