Compare commits
2 commits
6fc0965e15
...
b0682b23d5
Author | SHA1 | Date | |
---|---|---|---|
b0682b23d5 | |||
817858d6ee |
4 changed files with 47 additions and 2 deletions
|
@ -17,7 +17,7 @@ in
|
||||||
enable = mkEnableOption "Git";
|
enable = mkEnableOption "Git";
|
||||||
userName = mkOpt types.str "Philipp" "The name to configure git with.";
|
userName = mkOpt types.str "Philipp" "The name to configure git with.";
|
||||||
userEmail = mkOpt types.str "philipp@boehm.sh" "The email to configure git with.";
|
userEmail = mkOpt types.str "philipp@boehm.sh" "The email to configure git with.";
|
||||||
signingKey = mkOpt types.str "AA5E5A3C" "The key ID to sign commits with.";
|
signingKey = mkOpt types.str "0F21E3C3" "The key ID to sign commits with.";
|
||||||
signByDefault = mkOpt types.bool true "Whether to sign commits by default.";
|
signByDefault = mkOpt types.bool true "Whether to sign commits by default.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
44
modules/nixos/services/syncthing/default.nix
Normal file
44
modules/nixos/services/syncthing/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
namespace,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.${namespace};
|
||||||
|
let
|
||||||
|
cfg = config.${namespace}.services.syncthing;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.services.syncthing = {
|
||||||
|
enable = mkEnableOption "Syncthing";
|
||||||
|
|
||||||
|
port = mkOption {
|
||||||
|
description = "The port to serve Syncthing on.";
|
||||||
|
type = types.nullOr types.int;
|
||||||
|
default = 8384;
|
||||||
|
};
|
||||||
|
|
||||||
|
ip = mkOption {
|
||||||
|
description = "The ip to serve Syncthing on.";
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = "192.168.10.3";
|
||||||
|
};
|
||||||
|
|
||||||
|
openDefaultPorts = mkEnableOption "Whether to open the default ports in the firewall.";
|
||||||
|
|
||||||
|
};
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
cfg.port
|
||||||
|
];
|
||||||
|
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
guiAddress = "${cfg.ip}:${toString cfg.port}";
|
||||||
|
openDefaultPorts = mkIf cfg.openDefaultPorts true;
|
||||||
|
dataDir = "/data/syncthing";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -19,7 +19,7 @@ in
|
||||||
services.pcscd.enable = true;
|
services.pcscd.enable = true;
|
||||||
programs.gnupg.agent = {
|
programs.gnupg.agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableSSHSupport = true;
|
enableSSHSupport = false;
|
||||||
pinentryPackage = pkgs.pinentry;
|
pinentryPackage = pkgs.pinentry;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -61,6 +61,7 @@ with lib.${namespace};
|
||||||
searxng = enabled;
|
searxng = enabled;
|
||||||
#immich = enabled; # We wait for the proper version to be in nixpkgs
|
#immich = enabled; # We wait for the proper version to be in nixpkgs
|
||||||
paperless = enabled;
|
paperless = enabled;
|
||||||
|
syncthing = enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
#container.invidious = enabled;
|
#container.invidious = enabled;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue