modified user to be modular, separated machine specific configs

This commit is contained in:
2024-11-05 19:46:59 -05:00
parent e19f24b5dd
commit 55d5cea59f
5 changed files with 30 additions and 22 deletions

View File

@ -9,13 +9,6 @@
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Auto upgrade nix package and the daemon service.
# services.nix-daemon.enable = true;
# Use this instead of services.nix-daemon.enable if you
# don't wan't the daemon service to be managed for you.
# nix.useDaemon = true;
services.nix-daemon.enable = true;
nix.package = pkgs.nix;
# do garbage collection weekly to keep disk usage low

View File

@ -1,4 +1,5 @@
{
lib,
pkgs,
userName,
hostname,
@ -15,13 +16,21 @@
# Set up user accounts
# Don't forget to set a password with passwd!
users.users."${userName}" = {
home =
if pkgs.stdenv.isDarwin
then "/Users/${userName}"
else "/home/${userName}";
description = userName;
};
users.users."${userName}" = lib.mkMerge [
{
home =
if pkgs.stdenv.isDarwin
then "/Users/${userName}"
else "/home/${userName}";
description = userName;
}
(lib.mkIf (pkgs.stdenv.isLinux) {
group = "${userName}";
isNormalUser = true;
})
];
users.groups.wyatt = {};
nix.settings.trusted-users = [userName];