forked from cory/tildefriends
nix(module): module boilerplate
This commit is contained in:
parent
b43b8da9ab
commit
d67e47ae4b
22
flake.nix
22
flake.nix
@ -35,5 +35,27 @@
|
||||
graphviz
|
||||
];
|
||||
};
|
||||
|
||||
nixosModules.default = {
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
# Shorter name to access final settings a
|
||||
# user of hello.nix module HAS ACTUALLY SET.
|
||||
# cfg is a typical convention.
|
||||
cfg = config.services.tildefriends;
|
||||
in {
|
||||
options.services.tildefriends = {
|
||||
enable = lib.mkEnableOption "Enable Tilde Friends";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.services.tildefriends = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
serviceConfig.ExecStart = "${pkgs.tildefriends}/bin/tildefriends";
|
||||
};
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user