[home] Refactor into roles
This commit is contained in:
22
home/roles/sync/default.nix
Normal file
22
home/roles/sync/default.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.home.roles.sync;
|
||||
in
|
||||
{
|
||||
options.home.roles.sync = {
|
||||
enable = mkEnableOption "Enable file synchronization services";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
syncthingtray
|
||||
];
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user