refactor(users): move owner config to users config in manifest
This commit is contained in:
parent
2439544ccf
commit
94728cdc83
2 changed files with 7 additions and 4 deletions
|
@ -14,8 +14,9 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.manifest = {
|
flake.manifest = {
|
||||||
owner = {
|
users.rafiq = {
|
||||||
username = "rafiq";
|
primary = true;
|
||||||
|
username = "rafiq"; # If we don't set this here we have to do some weird shit
|
||||||
email = "rafiq@rrv.sh";
|
email = "rafiq@rrv.sh";
|
||||||
shell = "fish";
|
shell = "fish";
|
||||||
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILdsZyY3gu8IGB8MzMnLdh+ClDxQQ2RYG9rkeetIKq8n rafiq";
|
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILdsZyY3gu8IGB8MzMnLdh+ClDxQQ2RYG9rkeetIKq8n rafiq";
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (config.flake.manifest) owner;
|
inherit (config.flake.lib) flattenAttrs;
|
||||||
|
inherit (lib.attrsets) filterAttrs;
|
||||||
|
owner = flattenAttrs (filterAttrs (_: v: (v.primary or false)) config.flake.manifest.users);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.nixos.default =
|
flake.modules.nixos.default =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue