odin: Add consoledash user that starts glances

This commit is contained in:
Erwin Boskma 2024-06-12 21:42:31 +02:00
parent a771537a65
commit 762b6c45cc
Signed by: erwin
SSH key fingerprint: SHA256:/Wk1WZdLg+vQHs3in9qq7PsIp8SMzwGSk/RLZ5zPuZk

View file

@ -94,6 +94,28 @@
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;
users.users.consoledash = {
isSystemUser = true;
home = "/var/lib/consoledash";
group = "consoledash";
createHome = true;
# Stole this from here:
# https://github.com/mcdonc/.nixconfig/blob/66f427c029eb673c44bb7df919b78485ce3e8b01/videos/restricteduser/script.rst
# shell =
# let
# rbash = pkgs.runCommandNoCC "rbash-${pkgs.bashInteractive.version}" { } ''
# mkdir -p $out/bin
# ln -s ${pkgs.bashInteractive}/bin/bash $out/bin/rbash
# '';
# in
# "${rbash}/bin/rbash";
shell = "${pkgs.glances}/bin/glances";
ignoreShellProgramCheck = true;
hashedPassword = null;
};
users.groups.consoledash = { };
programs = { programs = {
nix-ld = { nix-ld = {
enable = true; enable = true;
@ -102,6 +124,7 @@
}; };
services = { services = {
getty.autologinUser = "consoledash";
openssh.enable = true; openssh.enable = true;
lvm = { lvm = {
enable = true; enable = true;