File tree 6 files changed +16
-5
lines changed
6 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ directly imported from any host like so:
41
41
}
42
42
```
43
43
44
+ You can declare any combination of users and profiles that you wish, providing
45
+ a nice abstraction, free from the idiosyncratic concerns of specific hardware.
46
+
44
47
## Users
45
48
User declarations belong in the ` users ` directory.
46
49
Original file line number Diff line number Diff line change 1
1
{ suites , ... } :
2
2
{
3
3
### root password is empty by default ###
4
- imports = [ ../users/nixos ../users/root ] ++ suites . graphics ;
4
+ imports = suites . graphics ;
5
5
6
6
boot . loader . systemd-boot . enable = true ;
7
7
boot . loader . efi . canTouchEfiVariables = true ;
Original file line number Diff line number Diff line change 1
1
{ suites , ... } :
2
2
{
3
- imports = [ ../users/nixos ../users/root ] ++ suites . all ;
3
+ imports = with suites ; allProfiles ++ allUsers ;
4
4
5
5
security . mitigations . acceptRisk = true ;
6
6
Original file line number Diff line number Diff line change 1
1
{ lib , profiles } :
2
2
let
3
3
inherit ( builtins ) mapAttrs isFunction ;
4
- all =
4
+
5
+ allProfiles =
5
6
let
6
7
filtered = lib . filterAttrs ( n : _ : n != "core" ) profiles ;
7
8
in
8
9
lib . collect isFunction filtered ;
10
+
11
+ allUsers = lib . collect isFunction users ;
12
+
13
+ users = lib . flk . defaultImports ( toString ../users ) ;
9
14
in
10
15
with profiles ;
11
16
mapAttrs ( _ : v : lib . flk . profileMap v )
17
+ # define your own suites below
12
18
rec {
13
- work = [ develop virt ] ;
19
+ work = [ develop virt users . nixos users . root ] ;
14
20
15
21
graphics = work ++ [ graphical ] ;
16
22
@@ -24,5 +30,5 @@ mapAttrs (_: v: lib.flk.profileMap v)
24
30
25
31
goPlay = play ++ [ laptop ] ;
26
32
} // {
27
- inherit all ;
33
+ inherit allProfiles allUsers ;
28
34
}
Original file line number Diff line number Diff line change
1
+ { ... } :
1
2
{
2
3
home-manager . users . nixos = {
3
4
imports = [ ../profiles/git ../profiles/direnv ] ;
Original file line number Diff line number Diff line change
1
+ { ... } :
1
2
# recommend using `hashedPassword`
2
3
{
3
4
users . users . root . password = "" ;
You can’t perform that action at this time.
0 commit comments