converted to flake
This commit is contained in:
23
users.nix
23
users.nix
@@ -1,5 +1,20 @@
|
||||
{ stateVersion, userName, repoPath, ... }:
|
||||
{ config, ... }:
|
||||
let
|
||||
userName = "john";
|
||||
userOptions = {
|
||||
home.stateVersion = config.system.stateVersion;
|
||||
imports = [ ./git.nix ];
|
||||
};
|
||||
# stateVersion = config.system.stateVersion;
|
||||
in
|
||||
{
|
||||
# Uses rust-based sudo
|
||||
security.sudo-rs = {
|
||||
enable = true;
|
||||
execWheelOnly = false;
|
||||
wheelNeedsPassword = false; # allows sudo without password for those in the wheel group
|
||||
};
|
||||
|
||||
users.users.${userName} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
@@ -13,9 +28,7 @@
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
users.${userName} = {
|
||||
home.stateVersion = stateVersion;
|
||||
imports = [ (import ./git.nix { inherit repoPath; }) ];
|
||||
};
|
||||
users.root = userOptions;
|
||||
users.${userName} = userOptions;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user