modularize users

and other stuff
This commit is contained in:
Fabian Montero 2024-12-02 19:25:34 -06:00
parent 1add39aae0
commit 119c0ab771
Signed by untrusted user: fabian
GPG key ID: 1FFAC35E1798174F
6 changed files with 128 additions and 55 deletions

View file

@ -1,8 +1,9 @@
{
config,
pkgs,
lib,
pkgs,
flakes,
modulesPath,
...
}:
with lib; {
@ -10,27 +11,21 @@ with lib; {
flakes.vpsadminos.nixosConfigurations.container
flakes.home-manager.nixosModules.home-manager
flakes.impermanence.nixosModule
./hardware-configuration.nix
./srv
];
local.sys = {
baseline.enable = true;
users.fabian = {
enable = true;
sshKeyPublicFile = [ public_files/pki/fabian.ssh ];
};
};
networking.hostName = "vps";
users = {
users.fabian = {
isNormalUser = true;
uid = 1000;
group = "fabian";
shell = pkgs.zsh;
extraGroups = ["users" "wheel" "networkmanager" "dialout" "libvirtd"];
openssh.authorizedKeys.keyFiles = [public_files/pki/fabian.ssh];
};
groups.fabian.gid = 1000;
};
services.openssh = {
settings.PasswordAuthentication = false;
};
@ -54,19 +49,5 @@ with lib; {
DefaultTimeoutStartSec=900s
'';
fileSystems = {
"/mnt/export2008" = {
device = "172.16.129.19:/nas/5876";
fsType = "nfs";
options = ["nofail" "noatime"];
};
"/mnt/export2011" = {
device = "172.16.129.151:/nas/5876/bepasty";
fsType = "nfs";
options = ["nofail" "noatime" "noexec"];
};
};
time.timeZone = "Europe/Amsterdam";
}