initial commit
This commit is contained in:
commit
5679c003d8
26 changed files with 296 additions and 0 deletions
1
import/group.nix
Normal file
1
import/group.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
name: group: group
|
||||
1
import/group/module.nix
Normal file
1
import/group/module.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
name: group'module: group'module
|
||||
1
import/host.nix
Normal file
1
import/host.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
name: host: host
|
||||
1
import/module.nix
Normal file
1
import/module.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
name: module: module
|
||||
1
import/profile.nix
Normal file
1
import/profile.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
name: profile: profile
|
||||
21
import/user.nix
Normal file
21
import/user.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
let
|
||||
function = name: value: let
|
||||
result = if builtins.isAttrs value then {...}: value else value;
|
||||
result' = builtins.trace "result ${name}=${builtins.typeOf result}" result;
|
||||
in
|
||||
assert builtins.isFunction result';
|
||||
result;
|
||||
|
||||
config = { user?{}, home-manager?{} }@set:
|
||||
builtins.mapAttrs function { inherit user home-manager; };
|
||||
|
||||
in name: value: let
|
||||
result = if builtins.isFunction value
|
||||
then
|
||||
config { user = value; }
|
||||
else if builtins.any (attr: builtins.hasAttr attr value) [ "user" "home-manager" ]
|
||||
then
|
||||
config value
|
||||
else
|
||||
config { user = value; };
|
||||
in result
|
||||
1
import/user/module.nix
Normal file
1
import/user/module.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
iname: user'module: user'module
|
||||
2
import/user/profile.nix
Normal file
2
import/user/profile.nix
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
name: profile: profile
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue