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
|
@ -2,15 +2,18 @@
|
|||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
secrets,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
users.groups.myuser.gid = config.users.users.myuser.uid;
|
||||
users.users.myuser = {
|
||||
with lib; let
|
||||
inherit (secrets) myuser;
|
||||
in {
|
||||
users.groups.${myuser}.gid = config.users.users.${myuser}.uid;
|
||||
users.users.${myuser} = {
|
||||
uid = 1000;
|
||||
hashedPassword = "$6$YogAnKRz8qW2Gz.I$chgMKKrpPAfV0WuGN6ChOgUJistpCzFsHOT6mhHyj07mwI1kSfDJvnMB13frMvkpv2aGpXHVH.yxk5fYHeeET/";
|
||||
createHome = true;
|
||||
group = "myuser";
|
||||
group = myuser;
|
||||
extraGroups =
|
||||
["wheel" "input" "video"]
|
||||
++ optionals config.sound.enable ["audio"];
|
||||
|
@ -18,7 +21,7 @@ with lib; {
|
|||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
home-manager.users.myuser = {
|
||||
home-manager.users.${myuser} = {
|
||||
imports = [
|
||||
#impermanence.home-manager.impermanence
|
||||
../common
|
||||
|
@ -28,8 +31,8 @@ with lib; {
|
|||
];
|
||||
|
||||
home = {
|
||||
username = config.users.users.myuser.name;
|
||||
inherit (config.users.users.myuser) uid;
|
||||
username = config.users.users.${myuser}.name;
|
||||
inherit (config.users.users.${myuser}) uid;
|
||||
shellAliases = {
|
||||
p = "cd ~/projects";
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue