-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add retro gaming role with syncthing
- Loading branch information
Christian Harke
committed
Jan 27, 2024
1 parent
bebf6ae
commit 9f2ec55
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ lib, config, ... }: | ||
|
||
let | ||
|
||
cfg = config.custom.programs.syncthing; | ||
|
||
in | ||
|
||
{ | ||
options = { | ||
custom.programs.syncthing = { | ||
enable = lib.mkEnableOption "Syncthing"; | ||
}; | ||
}; | ||
|
||
config = lib.mkIf cfg.enable { | ||
services.syncthing = { | ||
enable = true; | ||
tray = { | ||
enable = true; | ||
command = "syncthingtray --wait"; | ||
}; | ||
}; | ||
|
||
# Syncthingtray service requires tray.target | ||
systemd.user.targets.tray = { | ||
Unit = { | ||
Description = "Home Manager System Tray"; | ||
Requires = [ "graphical-session-pre.target" ]; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ lib, config, ... }: | ||
|
||
let | ||
|
||
cfg = config.custom.roles.gaming.retro; | ||
|
||
in | ||
|
||
{ | ||
options = { | ||
custom.roles.gaming.retro = { | ||
enable = lib.mkEnableOption "Retro gaming"; | ||
}; | ||
}; | ||
|
||
config = lib.mkIf cfg.enable { | ||
custom.programs.syncthing.enable = true; | ||
}; | ||
} |