feat: remove old "freeform" globals and use new structured globals

This commit is contained in:
oddlama 2024-07-31 15:49:44 +02:00
parent 4e717fab96
commit a128dd5f40
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
35 changed files with 214 additions and 59 deletions

View file

@ -4,9 +4,9 @@
settings = {
add_newline = false;
format = lib.concatStrings [
"$username"
"$hostname"
" $directory "
"($username )"
"($hostname )"
"$directory "
"($git_branch )"
"($git_commit )"
"$git_state"

View file

@ -1,17 +1,18 @@
{
config,
lib,
globals,
pkgs,
minimal,
...
}: let
myuser = config.repo.secrets.global.myuser.name;
myuser = globals.myuser.name;
in
lib.optionalAttrs (!minimal) {
users.groups.${myuser}.gid = config.users.users.${myuser}.uid;
users.users.${myuser} = {
uid = 1000;
inherit (config.repo.secrets.global.myuser) hashedPassword;
inherit (globals.myuser) hashedPassword;
createHome = true;
group = myuser;
extraGroups = ["wheel" "input" "video"];

View file

@ -1,10 +1,11 @@
{
config,
globals,
pkgs,
...
}: {
users.users.root = {
inherit (config.repo.secrets.global.root) hashedPassword;
inherit (globals.root) hashedPassword;
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA5Uq+CDy5Pmt3If5M6d8K/Q7HArU6sZ7sgoj3T521Wm"];
shell = pkgs.zsh;
};