users
This commit is contained in:
parent
240a322ec6
commit
72cd7b3696
3 changed files with 57 additions and 5 deletions
11
flake.nix
11
flake.nix
|
|
@ -32,13 +32,13 @@
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
home-manager,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
|
|
||||||
defaultConfig = {
|
defaultConfig = {
|
||||||
headless = false;
|
desktop = true;
|
||||||
home = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
makeHost = host: let
|
makeHost = host: let
|
||||||
|
|
@ -53,8 +53,11 @@
|
||||||
./hosts/${host}/hardware-configuration.nix
|
./hosts/${host}/hardware-configuration.nix
|
||||||
./system
|
./system
|
||||||
{networking.hostName = host;}
|
{networking.hostName = host;}
|
||||||
] ++ lib.optionals config.headless [ ./headless ]
|
]
|
||||||
++ lib.optionals config.desktop [ ./home ];
|
++ lib.optionals config.desktop [
|
||||||
|
home-manager
|
||||||
|
./home
|
||||||
|
];
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = lib.pipe ./hosts [
|
nixosConfigurations = lib.pipe ./hosts [
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
{...}: {
|
{...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./boot.nix
|
./boot.nix
|
||||||
|
./packages.nix
|
||||||
|
./env.nix
|
||||||
|
./btrfs.nix
|
||||||
|
./users.nix
|
||||||
|
|
||||||
|
./networking.nix
|
||||||
|
./persistence.nix
|
||||||
|
./nix.nix
|
||||||
|
./audio.nix
|
||||||
|
./ssh.nix
|
||||||
|
|
||||||
|
./syncthing.nix
|
||||||
|
./wayland.nix
|
||||||
|
./steam.nix
|
||||||
|
|
||||||
|
./nfs.nix
|
||||||
|
./fonts.nix
|
||||||
|
./bluetooth.nix
|
||||||
|
./zsh.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# lib.mkForce
|
system.stateVersion = "24.11";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
30
system/users.nix
Normal file
30
system/users.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{ config, ...}: let
|
||||||
|
host = config.networking.hostName;
|
||||||
|
in {
|
||||||
|
users.mutableUsers = false;
|
||||||
|
users.users = {
|
||||||
|
lilith = {
|
||||||
|
isNormalUser = true;
|
||||||
|
uid = 1000;
|
||||||
|
extraGroups = [ "wheel" "networkmanager" ];
|
||||||
|
hashedPasswordFile = config.sops.secrets."user/password".path;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sops.secrets = {
|
||||||
|
"user/password" = {
|
||||||
|
sopsFile = ../hosts/${host}/secrets/default.yaml;
|
||||||
|
neededForUsers = true;
|
||||||
|
};
|
||||||
|
"user/ssh/private" = {
|
||||||
|
sopsFile = ../hosts/${conf.hostname}/secrets/default.yaml;
|
||||||
|
path = "/home/lilith/.ssh/id_ed25519";
|
||||||
|
owner = "lilith";
|
||||||
|
};
|
||||||
|
"user/ssh/public" = {
|
||||||
|
sopsFile = ../hosts/${conf.hostname}/secrets/default.yaml;
|
||||||
|
path = "/home/lilith/.ssh/id_ed25519.pub";
|
||||||
|
owner = "lilith";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue