remove unneded options, add users.nix
This commit is contained in:
parent
32403d2a2a
commit
1bb25bda0e
4 changed files with 34 additions and 30 deletions
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
|
@ -79,10 +78,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
other = {
|
other = {
|
||||||
system = {
|
system.username = "cr";
|
||||||
hostname = "hermit";
|
|
||||||
username = "cr";
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1 +1,9 @@
|
||||||
_: {imports = [./home-manager.nix ./system.nix ./xdg.nix ./git.nix];}
|
_: {
|
||||||
|
imports = [
|
||||||
|
./home-manager.nix
|
||||||
|
./system.nix
|
||||||
|
./xdg.nix
|
||||||
|
./git.nix
|
||||||
|
/users.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
|
@ -1,32 +1,10 @@
|
||||||
{
|
{lib, ...}: let
|
||||||
config,
|
inherit (lib) mkOption types;
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib; let
|
|
||||||
cfg = config.modules.other.system;
|
|
||||||
in {
|
in {
|
||||||
options.modules.other.system = {
|
options.modules.other.system = {
|
||||||
hostname = mkOption {
|
|
||||||
description = "hostname for this system";
|
|
||||||
type = types.str;
|
|
||||||
};
|
|
||||||
|
|
||||||
username = mkOption {
|
username = mkOption {
|
||||||
description = "username for this system";
|
description = "username for this system";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
gitPath = mkOption {
|
|
||||||
description = "path to the flake directory";
|
|
||||||
type = types.str;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
users.users.${cfg.username} = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = ["wheel" "networking"];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
22
modules/other/users.nix
Normal file
22
modules/other/users.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{config, ...}: let
|
||||||
|
inherit (config.meta.mainUser) username;
|
||||||
|
in {
|
||||||
|
users = {
|
||||||
|
mutableUsers = false;
|
||||||
|
users = {
|
||||||
|
${username} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"networking"
|
||||||
|
"video"
|
||||||
|
"networkmanager"
|
||||||
|
"audio"
|
||||||
|
"nix"
|
||||||
|
];
|
||||||
|
hashedPasswordFile = "/etc/passwords/cr";
|
||||||
|
};
|
||||||
|
root.hashedPasswordFile = "/persist/passwords/root";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue