mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 19:51: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
|
|
@ -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" ];
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue