Initial commit
This commit is contained in:
commit
5648fe3686
31 changed files with 827 additions and 0 deletions
5
m/masters/default.nix
Normal file
5
m/masters/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./nero.nix
|
||||
];
|
||||
}
|
38
m/masters/nero.nix
Normal file
38
m/masters/nero.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
types = lib.types;
|
||||
masters = config.maid.masters;
|
||||
hm = config.maid.hm;
|
||||
|
||||
mkUser = name: {
|
||||
enable = lib.mkEnableOption name;
|
||||
override = lib.mkOption {
|
||||
type = types.attrs;
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
options.maid.masters = {
|
||||
nero = mkUser "nero";
|
||||
};
|
||||
|
||||
config = lib.mkIf masters.nero.enable {
|
||||
sops.secrets."users/nero/passwordHash" = {
|
||||
neededForUsers = true;
|
||||
sopsFile = ../../secrets/users.yaml;
|
||||
};
|
||||
|
||||
home-manager.users.nero = lib.mkIf hm.enable (import nero/home.nix);
|
||||
|
||||
users.users.nero = {
|
||||
isNormalUser = true;
|
||||
uid = 1337;
|
||||
hashedPasswordFile = config.sops.secrets."users/nero/passwordHash".path;
|
||||
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBaWnT7mpLERhm3zIWglNy094a7F7d7cpEImLZYwwWoS nero@lil-maid"
|
||||
];
|
||||
} // masters.nero.override;
|
||||
};
|
||||
}
|
20
m/masters/nero/home.nix
Normal file
20
m/masters/nero/home.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [];
|
||||
|
||||
home.username = "nero";
|
||||
home.homeDirectory = "/home/nero";
|
||||
home.stateVersion = "24.05";
|
||||
|
||||
home.file = {
|
||||
".cargo/config.toml" = {
|
||||
text = ''
|
||||
[net]
|
||||
git-fetch-with-cli = true
|
||||
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
rustflags = ["-C", "link-arg=--ld-path=${pkgs.mold}/bin/mold"]
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue