mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 15:11:34 +01:00
Use lib.singleton when convenient
This commit is contained in:
parent
dd3c11d88b
commit
464b6a7850
6 changed files with 34 additions and 46 deletions
|
|
@ -23,8 +23,7 @@
|
||||||
signByDefault = true;
|
signByDefault = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
includes = [
|
includes = lib.singleton {
|
||||||
{
|
|
||||||
condition = "gitdir:~/Projects/h-da/**";
|
condition = "gitdir:~/Projects/h-da/**";
|
||||||
contents = {
|
contents = {
|
||||||
user = {
|
user = {
|
||||||
|
|
@ -33,8 +32,7 @@
|
||||||
signingkey = config.sops.secrets."ssh-key/code.fbi.h-da.de".path;
|
signingkey = config.sops.secrets."ssh-key/code.fbi.h-da.de".path;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ssh = {
|
ssh = {
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,10 @@
|
||||||
options.custom.services.cliphist.enable = lib.mkEnableOption "";
|
options.custom.services.cliphist.enable = lib.mkEnableOption "";
|
||||||
|
|
||||||
config = lib.mkIf config.custom.services.cliphist.enable {
|
config = lib.mkIf config.custom.services.cliphist.enable {
|
||||||
assertions = [
|
assertions = lib.singleton {
|
||||||
{
|
|
||||||
assertion = config.custom.programs.rofi.enable;
|
assertion = config.custom.programs.rofi.enable;
|
||||||
message = "Cliphist requires Rofi.";
|
message = "Cliphist requires Rofi.";
|
||||||
}
|
};
|
||||||
];
|
|
||||||
|
|
||||||
services.cliphist = {
|
services.cliphist = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -54,11 +54,9 @@ in
|
||||||
)
|
)
|
||||||
|> lib.concatStrings;
|
|> lib.concatStrings;
|
||||||
in
|
in
|
||||||
[
|
lib.singleton {
|
||||||
{
|
|
||||||
assertion = duplicateDomains == { };
|
assertion = duplicateDomains == { };
|
||||||
message = errorMessage;
|
message = errorMessage;
|
||||||
}
|
};
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,12 +23,10 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
assertions = [
|
assertions = lib.singleton {
|
||||||
{
|
|
||||||
assertion = lib'.isTailscaleDomain cfg.domain;
|
assertion = lib'.isTailscaleDomain cfg.domain;
|
||||||
message = "FreshRSS isn't configured with access controll.";
|
message = "FreshRSS isn't configured with access controll.";
|
||||||
}
|
};
|
||||||
];
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
domains.list = [ cfg.domain ];
|
domains.list = [ cfg.domain ];
|
||||||
|
|
|
||||||
|
|
@ -159,8 +159,7 @@ in
|
||||||
success-threshold = 4;
|
success-threshold = 4;
|
||||||
send-on-resolved = true;
|
send-on-resolved = true;
|
||||||
};
|
};
|
||||||
overrides = [
|
overrides = lib.singleton {
|
||||||
{
|
|
||||||
group = "Monitoring";
|
group = "Monitoring";
|
||||||
topic = "stork-atlas";
|
topic = "stork-atlas";
|
||||||
url = "https://ntfy.sh";
|
url = "https://ntfy.sh";
|
||||||
|
|
@ -168,8 +167,7 @@ in
|
||||||
failure-threshold = 4;
|
failure-threshold = 4;
|
||||||
success-threshold = 2;
|
success-threshold = 2;
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
];
|
|
||||||
};
|
};
|
||||||
ui.default-sort-by = "group";
|
ui.default-sort-by = "group";
|
||||||
maintenance = {
|
maintenance = {
|
||||||
|
|
|
||||||
|
|
@ -47,12 +47,10 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nginx.virtualHosts.privatebin.listen = [
|
nginx.virtualHosts.privatebin.listen = lib.singleton {
|
||||||
{
|
|
||||||
addr = "localhost";
|
addr = "localhost";
|
||||||
inherit (cfg) port;
|
inherit (cfg) port;
|
||||||
}
|
};
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
custom.persist.directories = [ config.services.privatebin.dataDir ];
|
custom.persist.directories = [ config.services.privatebin.dataDir ];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue