mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
gnome dock pins
This commit is contained in:
parent
ebb2a87ca7
commit
e30bc681cd
4 changed files with 46 additions and 3 deletions
25
nixcfgs/modules/nixos/guest.nix
Normal file
25
nixcfgs/modules/nixos/guest.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{pkgs, ...}: {
|
||||
users.users.guest = {
|
||||
isNormalUser = true;
|
||||
description = "Guest user";
|
||||
home = "/home/guest";
|
||||
extraGroups = [""]; # 可选,是否允许 sudo
|
||||
shell = pkgs.bash;
|
||||
# hashedPassword = ""; # 空密码,意味着需要手动设置或禁用登录
|
||||
# 或者直接禁止密码登录:
|
||||
hashedPassword = null;
|
||||
};
|
||||
|
||||
systemd.services."guest-reset-home" = {
|
||||
description = "Reset guest home directory on boot";
|
||||
wantedBy = ["multi-user.target"];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = ''
|
||||
rm -rf /home/guest/*
|
||||
cp -r /etc/skel/. /home/guest/
|
||||
chown -R guest:guest /home/guest
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue