converted to flake

This commit is contained in:
John Lancaster
2024-12-18 01:05:41 +00:00
parent aab33e4786
commit e210bca113
5 changed files with 166 additions and 35 deletions

View File

@@ -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;
};
}