mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 15:11:34 +01:00
Rename the namespace of the system-modules
This commit is contained in:
parent
61f32cb7ea
commit
06623cd93a
34 changed files with 162 additions and 153 deletions
|
|
@ -1,61 +1,63 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
inherit (config) myConfig;
|
||||
inherit (config.myConfig.tailscale) caddyServe;
|
||||
inherit (config.custom) services;
|
||||
inherit (config.custom.services.tailscale) caddyServe;
|
||||
in
|
||||
{
|
||||
system.stateVersion = "24.11";
|
||||
|
||||
myConfig = {
|
||||
custom = {
|
||||
boot.loader.systemdBoot.enable = true;
|
||||
sops.enable = true;
|
||||
|
||||
tailscale = {
|
||||
enable = true;
|
||||
ssh.enable = true;
|
||||
exitNode.enable = true;
|
||||
services = {
|
||||
tailscale = {
|
||||
enable = true;
|
||||
ssh.enable = true;
|
||||
exitNode.enable = true;
|
||||
|
||||
serve = {
|
||||
isFunnel = true;
|
||||
target = toString ./hedgedoc-redirect.html;
|
||||
};
|
||||
serve = {
|
||||
isFunnel = true;
|
||||
target = toString ./hedgedoc-redirect.html;
|
||||
};
|
||||
|
||||
caddyServe = {
|
||||
nextcloud = {
|
||||
subdomain = "cloud";
|
||||
inherit (myConfig.nextcloud) port;
|
||||
};
|
||||
actualbudget = {
|
||||
subdomain = "budget";
|
||||
inherit (myConfig.actualbudget) port;
|
||||
};
|
||||
forgejo = {
|
||||
subdomain = "git";
|
||||
inherit (myConfig.forgejo) port;
|
||||
caddyServe = {
|
||||
nextcloud = {
|
||||
subdomain = "cloud";
|
||||
inherit (services.nextcloud) port;
|
||||
};
|
||||
actualbudget = {
|
||||
subdomain = "budget";
|
||||
inherit (services.actualbudget) port;
|
||||
};
|
||||
forgejo = {
|
||||
subdomain = "git";
|
||||
inherit (services.forgejo) port;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nextcloud = {
|
||||
enable = true;
|
||||
inherit (caddyServe.nextcloud) subdomain;
|
||||
backups.enable = true;
|
||||
};
|
||||
actualbudget = {
|
||||
enable = true;
|
||||
inherit (caddyServe.actualbudget) subdomain;
|
||||
backups.enable = true;
|
||||
};
|
||||
forgejo = {
|
||||
enable = true;
|
||||
inherit (caddyServe.forgejo) subdomain;
|
||||
};
|
||||
nextcloud = {
|
||||
enable = true;
|
||||
inherit (caddyServe.nextcloud) subdomain;
|
||||
backups.enable = true;
|
||||
};
|
||||
actualbudget = {
|
||||
enable = true;
|
||||
inherit (caddyServe.actualbudget) subdomain;
|
||||
backups.enable = true;
|
||||
};
|
||||
forgejo = {
|
||||
enable = true;
|
||||
inherit (caddyServe.forgejo) subdomain;
|
||||
};
|
||||
|
||||
syncthing = {
|
||||
enable = true;
|
||||
deviceId = "5R2MH7T-Q2ZZS2P-ZMSQ2UJ-B6VBHES-XYLNMZ6-7FYC27L-4P7MGJ2-FY4ITQD";
|
||||
isServer = true;
|
||||
backups.enable = true;
|
||||
syncthing = {
|
||||
enable = true;
|
||||
deviceId = "5R2MH7T-Q2ZZS2P-ZMSQ2UJ-B6VBHES-XYLNMZ6-7FYC27L-4P7MGJ2-FY4ITQD";
|
||||
isServer = true;
|
||||
backups.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,35 +3,37 @@
|
|||
system.stateVersion = "24.11";
|
||||
networking.domain = "sprouted.cloud";
|
||||
|
||||
myConfig = {
|
||||
custom = {
|
||||
boot.loader.grub.enable = true;
|
||||
sops.enable = true;
|
||||
|
||||
tailscale = {
|
||||
enable = true;
|
||||
ssh.enable = true;
|
||||
};
|
||||
services = {
|
||||
tailscale = {
|
||||
enable = true;
|
||||
ssh.enable = true;
|
||||
};
|
||||
|
||||
hedgedoc = {
|
||||
enable = true;
|
||||
subdomain = "docs";
|
||||
backups.enable = true;
|
||||
};
|
||||
hedgedoc = {
|
||||
enable = true;
|
||||
subdomain = "docs";
|
||||
backups.enable = true;
|
||||
};
|
||||
|
||||
crowdsec = {
|
||||
enable = true;
|
||||
firewallBouncer.enable = true;
|
||||
sources = [
|
||||
"iptables"
|
||||
"caddy"
|
||||
];
|
||||
crowdsec = {
|
||||
enable = true;
|
||||
firewallBouncer.enable = true;
|
||||
sources = [
|
||||
"iptables"
|
||||
"caddy"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts."docs.${config.networking.domain}".extraConfig = ''
|
||||
reverse_proxy localhost:${toString config.myConfig.hedgedoc.port}
|
||||
reverse_proxy localhost:${toString config.custom.services.hedgedoc.port}
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@
|
|||
}
|
||||
);
|
||||
|
||||
myConfig = {
|
||||
custom = {
|
||||
sops.enable = true;
|
||||
boot = {
|
||||
loader.systemdBoot.enable = true;
|
||||
silent = true;
|
||||
|
|
@ -23,21 +24,22 @@
|
|||
dm.tuigreet.enable = true;
|
||||
de.hyprland.enable = true;
|
||||
|
||||
wlan.enable = true;
|
||||
bluetooth.enable = true;
|
||||
|
||||
sound.enable = true;
|
||||
virtualisation.enable = true;
|
||||
sops.enable = true;
|
||||
gc.enable = true;
|
||||
geoclue.enable = true;
|
||||
tailscale = {
|
||||
enable = true;
|
||||
ssh.enable = true;
|
||||
};
|
||||
syncthing = {
|
||||
enable = true;
|
||||
deviceId = "Q4YPD3V-GXZPHSN-PT5X4PU-FBG4GX2-IASBX75-7NYMG75-4EJHBMZ-4WGDDAP";
|
||||
|
||||
services = {
|
||||
wlan.enable = true;
|
||||
bluetooth.enable = true;
|
||||
sound.enable = true;
|
||||
gc.enable = true;
|
||||
geoclue.enable = true;
|
||||
tailscale = {
|
||||
enable = true;
|
||||
ssh.enable = true;
|
||||
};
|
||||
syncthing = {
|
||||
enable = true;
|
||||
deviceId = "Q4YPD3V-GXZPHSN-PT5X4PU-FBG4GX2-IASBX75-7NYMG75-4EJHBMZ-4WGDDAP";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@
|
|||
}
|
||||
);
|
||||
|
||||
myConfig = {
|
||||
custom = {
|
||||
sops.enable = true;
|
||||
boot = {
|
||||
loader.systemdBoot.enable = true;
|
||||
silent = true;
|
||||
|
|
@ -23,20 +24,22 @@
|
|||
dm.tuigreet.enable = true;
|
||||
de.hyprland.enable = true;
|
||||
|
||||
sound.enable = true;
|
||||
virtualisation.enable = true;
|
||||
sops.enable = true;
|
||||
gc.enable = true;
|
||||
geoclue.enable = true;
|
||||
tailscale = {
|
||||
enable = true;
|
||||
ssh.enable = true;
|
||||
};
|
||||
syncthing = {
|
||||
enable = true;
|
||||
deviceId = "FAJS5WM-UAWGW2U-FXCGPSP-VAUOTGM-XUKSEES-D66PMCJ-WBODJLV-XTNCRA7";
|
||||
|
||||
services = {
|
||||
sound.enable = true;
|
||||
gc.enable = true;
|
||||
geoclue.enable = true;
|
||||
tailscale = {
|
||||
enable = true;
|
||||
ssh.enable = true;
|
||||
};
|
||||
syncthing = {
|
||||
enable = true;
|
||||
deviceId = "FAJS5WM-UAWGW2U-FXCGPSP-VAUOTGM-XUKSEES-D66PMCJ-WBODJLV-XTNCRA7";
|
||||
};
|
||||
};
|
||||
|
||||
steam.enable = true;
|
||||
programs.steam.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
}@moduleArgs:
|
||||
{
|
||||
options.myConfig.de.hyprland.enable = lib.mkEnableOption "" // {
|
||||
default = moduleArgs.osConfig.myConfig.de.hyprland.enable or false;
|
||||
default = moduleArgs.osConfig.custom.de.hyprland.enable or false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.myConfig.de.hyprland.enable {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ config, lib, ... }@moduleArgs:
|
||||
{
|
||||
options.myConfig.tailscale.enable = lib.mkEnableOption "" // {
|
||||
default = moduleArgs.osConfig.myConfig.tailscale.enable or false;
|
||||
default = moduleArgs.osConfig.custom.services.tailscale.enable or false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.myConfig.tailscale.enable {
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ let
|
|||
user = config.users.users.actual.name;
|
||||
in
|
||||
{
|
||||
options.myConfig.actualbudget.backups.enable = lib.mkEnableOption "";
|
||||
options.custom.services.actualbudget.backups.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.actualbudget.backups.enable {
|
||||
config = lib.mkIf config.custom.services.actualbudget.backups.enable {
|
||||
security.polkit = {
|
||||
enable = true;
|
||||
extraConfig =
|
||||
|
|
@ -28,7 +28,7 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
myConfig.resticBackup.actual = {
|
||||
custom.services.resticBackup.actual = {
|
||||
inherit user;
|
||||
healthchecks.enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.myConfig.actualbudget;
|
||||
cfg = config.custom.services.actualbudget;
|
||||
in
|
||||
{
|
||||
options.myConfig.actualbudget = {
|
||||
options.custom.services.actualbudget = {
|
||||
enable = lib.mkEnableOption "";
|
||||
subdomain = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.myConfig.bluetooth.enable = lib.mkEnableOption "";
|
||||
options.custom.services.bluetooth.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.bluetooth.enable {
|
||||
config = lib.mkIf config.custom.services.bluetooth.enable {
|
||||
hardware = {
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.myConfig.boot.loader.grub.enable = lib.mkEnableOption "";
|
||||
options.custom.boot.loader.grub.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.boot.loader.grub.enable {
|
||||
config = lib.mkIf config.custom.boot.loader.grub.enable {
|
||||
boot = {
|
||||
tmp.cleanOnBoot = true;
|
||||
loader.grub.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.myConfig.boot.loader.systemdBoot.enable = lib.mkEnableOption "";
|
||||
options.custom.boot.loader.systemdBoot.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.boot.loader.systemdBoot.enable {
|
||||
config = lib.mkIf config.custom.boot.loader.systemdBoot.enable {
|
||||
boot = {
|
||||
tmp.cleanOnBoot = true;
|
||||
loader = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.myConfig.boot.silent = lib.mkEnableOption "";
|
||||
options.custom.boot.silent = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.boot.silent {
|
||||
config = lib.mkIf config.custom.boot.silent {
|
||||
boot = {
|
||||
loader.timeout = 0;
|
||||
kernelParams = [
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.myConfig.crowdsec;
|
||||
cfg = config.custom.services.crowdsec;
|
||||
in
|
||||
{
|
||||
imports = [ inputs.crowdsec.nixosModules.crowdsec ];
|
||||
|
||||
options.myConfig.crowdsec = {
|
||||
options.custom.services.crowdsec = {
|
||||
enable = lib.mkEnableOption "";
|
||||
apiPort = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.myConfig.crowdsec;
|
||||
cfg = config.custom.services.crowdsec;
|
||||
in
|
||||
{
|
||||
imports = [ inputs.crowdsec.nixosModules.crowdsec-firewall-bouncer ];
|
||||
|
||||
options.myConfig.crowdsec.firewallBouncer.enable = lib.mkEnableOption "";
|
||||
options.custom.services.crowdsec.firewallBouncer.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf cfg.firewallBouncer.enable {
|
||||
services.crowdsec-firewall-bouncer = {
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
options.myConfig.de.hyprland.enable = lib.mkEnableOption "";
|
||||
options.custom.de.hyprland.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.de.hyprland.enable {
|
||||
config = lib.mkIf config.custom.de.hyprland.enable {
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
options.myConfig.dm.tuigreet.enable = lib.mkEnableOption "";
|
||||
options.custom.dm.tuigreet.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.dm.tuigreet.enable {
|
||||
config = lib.mkIf config.custom.dm.tuigreet.enable {
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.myConfig.forgejo;
|
||||
cfg = config.custom.services.forgejo;
|
||||
|
||||
user = config.users.users.forgejo.name;
|
||||
in
|
||||
{
|
||||
options.myConfig.forgejo = {
|
||||
options.custom.services.forgejo = {
|
||||
enable = lib.mkEnableOption "";
|
||||
subdomain = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.myConfig.gc.enable = lib.mkEnableOption "";
|
||||
options.custom.services.gc.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.gc.enable {
|
||||
config = lib.mkIf config.custom.services.gc.enable {
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.myConfig.geoclue.enable = lib.mkEnableOption "";
|
||||
options.custom.services.geoclue.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.geoclue.enable {
|
||||
config = lib.mkIf config.custom.services.geoclue.enable {
|
||||
services.geoclue2 = {
|
||||
enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ let
|
|||
user = config.users.users.hedgedoc.name;
|
||||
in
|
||||
{
|
||||
options.myConfig.hedgedoc.backups.enable = lib.mkEnableOption "";
|
||||
options.custom.services.hedgedoc.backups.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.hedgedoc.backups.enable {
|
||||
config = lib.mkIf config.custom.services.hedgedoc.backups.enable {
|
||||
security.polkit = {
|
||||
enable = true;
|
||||
extraConfig =
|
||||
|
|
@ -28,7 +28,7 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
myConfig.resticBackup.hedgedoc = {
|
||||
custom.services.resticBackup.hedgedoc = {
|
||||
inherit user;
|
||||
healthchecks.enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.myConfig.hedgedoc;
|
||||
cfg = config.custom.services.hedgedoc;
|
||||
|
||||
user = config.users.users.hedgedoc.name;
|
||||
|
||||
manage_users = "CMD_CONFIG_FILE=/run/hedgedoc/config.json NODE_ENV=production ${lib.getExe' pkgs.hedgedoc "manage_users"}";
|
||||
in
|
||||
{
|
||||
options.myConfig.hedgedoc = {
|
||||
options.custom.services.hedgedoc = {
|
||||
enable = lib.mkEnableOption "";
|
||||
subdomain = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
|
|
|
|||
|
|
@ -5,16 +5,16 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.myConfig.nextcloud;
|
||||
cfg = config.custom.services.nextcloud;
|
||||
|
||||
dataDir = config.services.nextcloud.home;
|
||||
user = config.users.users.nextcloud.name;
|
||||
in
|
||||
{
|
||||
options.myConfig.nextcloud.backups.enable = lib.mkEnableOption "";
|
||||
options.custom.services.nextcloud.backups.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf cfg.backups.enable {
|
||||
myConfig.resticBackup.nextcloud = {
|
||||
custom.services.resticBackup.nextcloud = {
|
||||
inherit user;
|
||||
healthchecks.enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.myConfig.nextcloud;
|
||||
cfg = config.custom.services.nextcloud;
|
||||
|
||||
user = config.users.users.nextcloud.name;
|
||||
in
|
||||
{
|
||||
options.myConfig.nextcloud = {
|
||||
options.custom.services.nextcloud = {
|
||||
enable = lib.mkEnableOption "";
|
||||
subdomain = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.myConfig.printing.enable = lib.mkEnableOption "";
|
||||
options.custom.services.printing.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.printing.enable {
|
||||
config = lib.mkIf config.custom.services.printing.enable {
|
||||
services = {
|
||||
printing.enable = true;
|
||||
avahi = {
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
backupServices = lib.filterAttrs (_: value: value.enable) config.myConfig.resticBackup;
|
||||
backupServices = lib.filterAttrs (_: value: value.enable) config.custom.services.resticBackup;
|
||||
|
||||
healthchecksEnable = (lib.filterAttrs (_: value: value.healthchecks.enable) backupServices) != { };
|
||||
in
|
||||
{
|
||||
options.myConfig.resticBackup = lib.mkOption {
|
||||
options.custom.services.resticBackup = lib.mkOption {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule {
|
||||
options = {
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@
|
|||
{
|
||||
imports = [ inputs.sops-nix.nixosModules.sops ];
|
||||
|
||||
options.myConfig.sops.enable = lib.mkEnableOption "";
|
||||
options.custom.sops.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.sops.enable {
|
||||
config = lib.mkIf config.custom.sops.enable {
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
defaultSopsFile = "${self}/hosts/${config.networking.hostName}/secrets.yaml";
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.myConfig.sound.enable = lib.mkEnableOption "";
|
||||
options.custom.services.sound.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.sound.enable {
|
||||
config = lib.mkIf config.custom.services.sound.enable {
|
||||
security.rtkit.enable = true;
|
||||
services = {
|
||||
pulseaudio.enable = false;
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
options.myConfig.steam.enable = lib.mkEnableOption "";
|
||||
options.custom.programs.steam.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.steam.enable {
|
||||
config = lib.mkIf config.custom.programs.steam.enable {
|
||||
programs = {
|
||||
steam.enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.myConfig.syncthing;
|
||||
cfg = config.custom.services.syncthing;
|
||||
|
||||
user = config.users.users.syncthing.name;
|
||||
in
|
||||
{
|
||||
options.myConfig.syncthing.backups.enable = lib.mkEnableOption "";
|
||||
options.custom.services.syncthing.backups.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf cfg.backups.enable {
|
||||
assertions = [
|
||||
|
|
@ -37,7 +37,7 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
myConfig.resticBackup.syncthing = {
|
||||
custom.services.resticBackup.syncthing = {
|
||||
inherit user;
|
||||
healthchecks.enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.myConfig.syncthing;
|
||||
cfg = config.custom.services.syncthing;
|
||||
in
|
||||
{
|
||||
options.myConfig.syncthing = {
|
||||
options.custom.services.syncthing = {
|
||||
enable = lib.mkEnableOption "";
|
||||
isServer = lib.mkEnableOption "";
|
||||
deviceId = lib.mkOption {
|
||||
|
|
@ -32,10 +32,10 @@ in
|
|||
devices =
|
||||
self.nixosConfigurations
|
||||
|> lib.filterAttrs (name: _: name != config.networking.hostName)
|
||||
|> lib.filterAttrs (_: value: value.config.myConfig.syncthing.enable)
|
||||
|> lib.filterAttrs (_: value: value.config.custom.services.syncthing.enable)
|
||||
|> lib.mapAttrs (
|
||||
name: value: {
|
||||
id = value.config.myConfig.syncthing.deviceId;
|
||||
id = value.config.custom.services.syncthing.deviceId;
|
||||
addresses = [ "tcp://${name}.${value.config.networking.domain}:22000" ];
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
nodes = config.myConfig.tailscale.caddyServe |> lib.filterAttrs (_: value: value.enable);
|
||||
nodes = config.custom.services.tailscale.caddyServe |> lib.filterAttrs (_: value: value.enable);
|
||||
|
||||
caddy-tailscale = pkgs.caddy.withPlugins {
|
||||
plugins = [ "github.com/tailscale/caddy-tailscale@v0.0.0-20250207163903-69a970c84556" ];
|
||||
|
|
@ -13,7 +13,7 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
options.myConfig.tailscale.caddyServe = lib.mkOption {
|
||||
options.custom.services.tailscale.caddyServe = lib.mkOption {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule (
|
||||
{ name, ... }:
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.myConfig.tailscale;
|
||||
cfg = config.custom.services.tailscale;
|
||||
in
|
||||
{
|
||||
options.myConfig.tailscale = {
|
||||
options.custom.services.tailscale = {
|
||||
enable = lib.mkEnableOption "";
|
||||
subdomain = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
options.myConfig.virtualisation.enable = lib.mkEnableOption "";
|
||||
options.custom.virtualisation.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.virtualisation.enable {
|
||||
config = lib.mkIf config.custom.virtualisation.enable {
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ let
|
|||
];
|
||||
in
|
||||
{
|
||||
options.myConfig.wlan.enable = lib.mkEnableOption "";
|
||||
options.custom.services.wlan.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.wlan.enable (
|
||||
config = lib.mkIf config.custom.services.wlan.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
networking.wireless.iwd = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue