mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
feat: get myuser's username from repository secrets
This commit is contained in:
parent
32e346be56
commit
5bf0935eb2
2 changed files with 20 additions and 7 deletions
10
secrets/secrets.nix.age
Normal file
10
secrets/secrets.nix.age
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
age-encryption.org/v1
|
||||||
|
-> X25519 G4gcvnrT5F96VKuJKWCZnu3FaQl8Mw53cTfAw75HvDo
|
||||||
|
aW5tQryfBWLjGAhxzds0tNgD2Q7+GbC19ev0LTmnAag
|
||||||
|
-> piv-p256 xqSe8Q Ak7W7nWemREYSyuxsCGZq3anjmSBjZXxInYRjyxhlULw
|
||||||
|
a4D3LWlMB8mROXAtHeVtt8WckgBdrRwD0y2hJt9qLKg
|
||||||
|
-> \aR-grease 2J>j% 4M/Y^- x1`AZ_,W )YZ/;NT
|
||||||
|
pWcsdkCVXg9tB54p3/YcZt8VGpH+5FdZCZM6xFDvXai0AED9V9AKMWK9jOfqCQYN
|
||||||
|
RvhfpOVyL0r8
|
||||||
|
--- GYfc2AZAGyiEdSaSfw/BdsMFVQrVCYLM0rDAUtk3k9E
|
||||||
|
Ð[S©÷^}ð*ÞTϳ.ÍS"ÀÇÝôØH_ ¦zì˜iè”�`}¦,)‰x÷ƒ‹/;á”îÐtüw¢ïÖV‰¿þ
|
|
@ -2,15 +2,18 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
secrets,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; {
|
with lib; let
|
||||||
users.groups.myuser.gid = config.users.users.myuser.uid;
|
inherit (secrets) myuser;
|
||||||
users.users.myuser = {
|
in {
|
||||||
|
users.groups.${myuser}.gid = config.users.users.${myuser}.uid;
|
||||||
|
users.users.${myuser} = {
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
hashedPassword = "$6$YogAnKRz8qW2Gz.I$chgMKKrpPAfV0WuGN6ChOgUJistpCzFsHOT6mhHyj07mwI1kSfDJvnMB13frMvkpv2aGpXHVH.yxk5fYHeeET/";
|
hashedPassword = "$6$YogAnKRz8qW2Gz.I$chgMKKrpPAfV0WuGN6ChOgUJistpCzFsHOT6mhHyj07mwI1kSfDJvnMB13frMvkpv2aGpXHVH.yxk5fYHeeET/";
|
||||||
createHome = true;
|
createHome = true;
|
||||||
group = "myuser";
|
group = myuser;
|
||||||
extraGroups =
|
extraGroups =
|
||||||
["wheel" "input" "video"]
|
["wheel" "input" "video"]
|
||||||
++ optionals config.sound.enable ["audio"];
|
++ optionals config.sound.enable ["audio"];
|
||||||
|
@ -18,7 +21,7 @@ with lib; {
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.myuser = {
|
home-manager.users.${myuser} = {
|
||||||
imports = [
|
imports = [
|
||||||
#impermanence.home-manager.impermanence
|
#impermanence.home-manager.impermanence
|
||||||
../common
|
../common
|
||||||
|
@ -28,8 +31,8 @@ with lib; {
|
||||||
];
|
];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
username = config.users.users.myuser.name;
|
username = config.users.users.${myuser}.name;
|
||||||
inherit (config.users.users.myuser) uid;
|
inherit (config.users.users.${myuser}) uid;
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
p = "cd ~/projects";
|
p = "cd ~/projects";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue