give kiosk user a home directory
This commit is contained in:
parent
9103bfa337
commit
66e01ab6f9
2 changed files with 4 additions and 13 deletions
2
base.nix
2
base.nix
|
@ -10,6 +10,8 @@
|
|||
# STOP TRYING TO GIVE IT TO ME
|
||||
boot.supportedFilesystems.zfs = lib.mkForce false;
|
||||
|
||||
boot.tmp.useTmpfs = true;
|
||||
|
||||
# Set root password to a secure password
|
||||
users.users.root.password = "asecurepassword";
|
||||
|
||||
|
|
15
kiosk.nix
15
kiosk.nix
|
@ -5,35 +5,24 @@ in
|
|||
{
|
||||
# Create user to host kiosk
|
||||
users.users.kiosk = {
|
||||
isSystemUser = true;
|
||||
isNormalUser = true;
|
||||
group = "kiosk";
|
||||
home = "/tmp/kiosk";
|
||||
};
|
||||
users.groups.kiosk = { };
|
||||
|
||||
# Setup caged kiosk, with kiosk firefox
|
||||
# Use a temporary directory for the firefox profile
|
||||
# This removes the need for a home directory at all
|
||||
# Using a private window removes most effects of a profile anyways
|
||||
services.cage = {
|
||||
enable = true;
|
||||
user = "kiosk";
|
||||
program = ''
|
||||
${lib.getExe pkgs.firefox} \
|
||||
--profile /tmp/firefox-profile \
|
||||
--kiosk \
|
||||
--private-window "${dashboardUrl}"
|
||||
'';
|
||||
extraArguments = [ "-d" ];
|
||||
};
|
||||
|
||||
# Create temporary directory for firefox profile
|
||||
systemd.tmpfiles.settings."10-kiosk" = {
|
||||
"/tmp/firefox-profile".d = {
|
||||
user = "kiosk";
|
||||
group = "kiosk";
|
||||
};
|
||||
};
|
||||
|
||||
# Set firefox autoplay policy to always allow autoplay for dashboard
|
||||
programs.firefox.policies = {
|
||||
Permissions.Autoplay.Allow = [ dashboardUrl ];
|
||||
|
|
Loading…
Reference in a new issue