blob: 5af290359f4a0cf6b788d44a191d8682a7570e99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# This configuration is centered around use cases, rather than profiles. Since
# all of the machines I manage are single-user machines, there's no point in
# creating multiple users.
#
# While the users don't differ, the use cases definitely do. I use some
# machines for homework and gaming, while others are used for web-browsing and
# development. Each use case is a subdirectory with (home-manager)
# configuration options.
#
# Note that e.g. "running a DNS server" is not a use case. That's specified in
# the respective host's `configuration.nix`.
{ config, lib, flakeInputs, ... }:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.my.use-cases;
in
{
options.my.use-cases = {
development.enable = mkEnableOption "development use case";
sysadmin.enable = mkEnableOption "sysadmin use case";
};
config = {
home-manager.users.linus = {
imports =
(lib.optional cfg.development.enable ./development) ++
(lib.optional cfg.sysadmin.enable ./sysadmin);
# TODO: Graphical linux config (remember assertion).
xdg.enable = true;
};
# Pass
home-manager.extraSpecialArgs = {
super = config;
inherit flakeInputs;
};
home-manager.useGlobalPkgs = true;
};
}
|