Commit 100dc40 1 parent 2cd4d7f commit 100dc40 Copy full SHA for 100dc40
File tree 3 files changed +55
-0
lines changed
3 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 8
8
- [ Hosts] ( ./layout/hosts.md )
9
9
- [ Profiles] ( ./layout/profiles.md )
10
10
- [ Suites] ( ./layout/suites.md )
11
+ - [ Users] ( ./layout/users.md )
Original file line number Diff line number Diff line change
1
+ # Users
2
+
3
+ Users are a special case of [ profiles] ( ./profiles.md ) that define system users
4
+ and [ home-manager] [ home-manager ] configurations. For your convenience, home
5
+ manager is wired in by default so all you have to worry about is declaring your
6
+ users. For a fully fleshed out example, check out the developers personal
7
+ [ branch] ( https://github.com/nrdxp/nixflk/tree/nrd/users/nrd/default.nix ) .
8
+
9
+ ## Basic Usage
10
+ ` users/myuser/default.nix ` :
11
+ ``` nix
12
+ { ... }:
13
+ {
14
+ users.users.myuser = {
15
+ isNormalUser = true;
16
+ };
17
+
18
+ home-manager.users.myuser = {
19
+ programs.mpv.enable = true;
20
+ };
21
+ }
22
+
23
+ ```
24
+
25
+ ## External Usage
26
+ You can easily use the defined home-manager configurations outside of NixOS
27
+ using the ` hmActivations ` meta-package defined in the flakes ` legacyPackages `
28
+ output. The [ flk] ( ../flk/flk.md ) helper script makes this even easier. Just
29
+ make sure you have home-manager
30
+ [ installed] ( https://nix-community.github.io/home-manager/index.html#ch-installation ) .
31
+
32
+ This is great for keeping your environment consistent across Unix systems,
33
+ including OSX.
34
+
35
+ ### From within the projects devshell:
36
+ ``` sh
37
+ # builds the nixos user defined in the NixOS host
38
+ flk home NixOS nixos
39
+
40
+ # activate
41
+ flk home NixOS nixos switch
42
+ ```
43
+
44
+ ### Manually from outside the project:
45
+ ``` sh
46
+ # build
47
+ nix build " github:nrdxp/nixflk#hmActivationPackages.NixOS.nixos"
48
+
49
+ # activate
50
+ ./result/activate && unlink result
51
+ ```
52
+
53
+ [ home-manager ] : https://nix-community.github.io/home-manager
Original file line number Diff line number Diff line change
1
+ ../doc/src/layout/users.md
You can’t perform that action at this time.
0 commit comments