From 93f7d38aceb6e1672464531c248db1bd0aa05849 Mon Sep 17 00:00:00 2001 From: chaos Date: Fri, 2 Aug 2024 13:04:16 +0100 Subject: [PATCH] add guest user --- hosts/lappy-t495/lappy-t495.nix | 10 ++++++++++ users/chaos.nix | 1 + users/guest.nix | 14 ++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 users/guest.nix diff --git a/hosts/lappy-t495/lappy-t495.nix b/hosts/lappy-t495/lappy-t495.nix index 8966c30..ee2a3b8 100644 --- a/hosts/lappy-t495/lappy-t495.nix +++ b/hosts/lappy-t495/lappy-t495.nix @@ -8,6 +8,7 @@ in { imports = flatten (with tree; [ users.root users.chaos + users.guest (with tree.presets.nixos; [ desktopGui @@ -32,6 +33,15 @@ in { ./hardware.nix ]); + home-manager.users.guest = { + imports = with tree; [ + profiles.home-manager.base + presets.home-manager.gaming + presets.home-manager.guiDesktop + ]; + home.stateVersion = "24.05"; + }; + networking.firewall = { enable = true; allowPing = true; diff --git a/users/chaos.nix b/users/chaos.nix index e8a92a5..d3281b4 100644 --- a/users/chaos.nix +++ b/users/chaos.nix @@ -16,6 +16,7 @@ "i2c" "kvm" "usbmux" + "dialout" ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEZpvkllLt7HinNpisOx7hWT2br68UoCg0sXKTxHEeUB chaos@chaos" diff --git a/users/guest.nix b/users/guest.nix new file mode 100644 index 0000000..d67d623 --- /dev/null +++ b/users/guest.nix @@ -0,0 +1,14 @@ +{...}: { + users.users.guest = { + uid = 1001; + isNormalUser = true; + extraGroups = [ + "video" + "input" + "uinput" + "audio" + "rtkit" + "usbmux" + ]; + }; +}