Skip to content

Commit

Permalink
Add retro gaming role with syncthing
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Harke committed Jan 27, 2024
1 parent bebf6ae commit 9f2ec55
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
33 changes: 33 additions & 0 deletions home/programs/syncthing/default.nix
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" ];
};
};
};
}
19 changes: 19 additions & 0 deletions home/roles/gaming/retro/default.nix
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;
};
}

0 comments on commit 9f2ec55

Please sign in to comment.