mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-07-02 23:47:18 +02:00
Playing a little bit too much with users
This commit is contained in:
parent
08b98123f7
commit
eba4867b84
4 changed files with 26 additions and 3 deletions
1
base.nix
1
base.nix
|
@ -3,6 +3,7 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
./users/default.nix
|
||||||
./users/julien.nix
|
./users/julien.nix
|
||||||
];
|
];
|
||||||
luj.nix.enable = true;
|
luj.nix.enable = true;
|
||||||
|
|
|
@ -57,9 +57,10 @@
|
||||||
git
|
git
|
||||||
rxvt_unicode
|
rxvt_unicode
|
||||||
xorg.xbacklight
|
xorg.xbacklight
|
||||||
|
neovim
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.variables.EDITOR = "urxvt";
|
environment.variables.EDITOR = "nvim";
|
||||||
|
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
|
20
users/default.nix
Normal file
20
users/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
|
||||||
|
users.mutableUsers = false;
|
||||||
|
users.defaultUserShell = pkgs.fish;
|
||||||
|
sops.secrets.user-root-password.neededForUsers = true;
|
||||||
|
|
||||||
|
programs.fish.enable = true;
|
||||||
|
|
||||||
|
users.users.root = {
|
||||||
|
uid = config.ids.uids.root;
|
||||||
|
description = "System administrator";
|
||||||
|
home = "/root";
|
||||||
|
shell = lib.mkForce config.users.defaultUserShell;
|
||||||
|
group = "root";
|
||||||
|
passwordFile = config.sops.secrets.user-root-password.path;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
|
||||||
users.mutableUsers = false;
|
|
||||||
sops.secrets.user-julien-password.neededForUsers = true;
|
sops.secrets.user-julien-password.neededForUsers = true;
|
||||||
|
|
||||||
|
|
||||||
users.users.julien = {
|
users.users.julien = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
home = "/home/julien";
|
home = "/home/julien";
|
||||||
|
@ -18,5 +18,6 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.allowedUsers = [ "lol" "julien" ];
|
|
||||||
|
nix.allowedUsers = [ "julien" ];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue