refactor: move syncthing configs out of flake file
This commit is contained in:
parent
761246a4a4
commit
d613dee364
3 changed files with 9 additions and 12 deletions
|
|
@ -94,7 +94,6 @@
|
|||
mkNixosSystem = util.mkNixosSystem;
|
||||
mkDarwinSystem = util.mkDarwinSystem;
|
||||
mkHome = util.mkHome;
|
||||
syncthingConfiguration = util.syncthingConfiguration;
|
||||
|
||||
nixosSystems = {
|
||||
horizon = mkNixosSystem "horizon";
|
||||
|
|
@ -170,7 +169,5 @@
|
|||
darwinConfigurations = darwinSystems;
|
||||
|
||||
homeConfigurations = homeConfigurations;
|
||||
|
||||
syncthingConfiguration = syncthingConfiguration;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
outputs,
|
||||
syncthingConfiguration,
|
||||
...
|
||||
}: let
|
||||
mountDir = "/mnt/sync";
|
||||
|
|
@ -27,7 +27,7 @@ in {
|
|||
configDir = configDir;
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
configuration = outputs.syncthingConfiguration;
|
||||
configuration = syncthingConfiguration;
|
||||
deviceName = config.networking.hostName;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,12 @@
|
|||
home-manager-config
|
||||
../modules/system-modules
|
||||
];
|
||||
|
||||
syncthingConfiguration = nix-syncthing.lib.syncthingConfiguration {
|
||||
modules = [
|
||||
(import ../configurations/syncthing)
|
||||
];
|
||||
};
|
||||
in {
|
||||
forEachPkgs = lambda: forEachSystem (system: lambda system (pkgsFor system));
|
||||
|
||||
|
|
@ -64,7 +70,7 @@ in {
|
|||
|
||||
mkNixosSystem = host:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs util;};
|
||||
specialArgs = {inherit inputs outputs util syncthingConfiguration;};
|
||||
modules =
|
||||
system-modules
|
||||
++ [
|
||||
|
|
@ -109,10 +115,4 @@ in {
|
|||
../configurations/home-manager/${user}
|
||||
];
|
||||
};
|
||||
|
||||
syncthingConfiguration = nix-syncthing.lib.syncthingConfiguration {
|
||||
modules = [
|
||||
(import ../configurations/syncthing)
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue