move to snowfall
This commit is contained in:
parent
9d7ad7c973
commit
769d4b0df5
188 changed files with 2203 additions and 3041 deletions
31
modules/nixos/services/dlna/default.nix
Normal file
31
modules/nixos/services/dlna/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.custom; let
|
||||
cfg = config.services.dlna;
|
||||
in {
|
||||
options.services.dlna = with types; {
|
||||
enable = mkBoolOpt false "Enable MiniDLNA service";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.minidlna = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
notify_interval = 60;
|
||||
friendly_name = "ZACKPC";
|
||||
media_dir = ["A,/home/zack/Music"];
|
||||
inotify = "yes";
|
||||
};
|
||||
};
|
||||
|
||||
users.users.minidlna = {
|
||||
extraGroups = ["users"];
|
||||
};
|
||||
};
|
||||
}
|
||||
34
modules/nixos/services/vpn/default.nix
Normal file
34
modules/nixos/services/vpn/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.custom; let
|
||||
cfg = config.services.vpn;
|
||||
in {
|
||||
options.services.vpn = with types; {
|
||||
enable = mkBoolOpt false "Enable MiniDLNA service";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.mullvad-vpn.enable = true;
|
||||
services.openvpn.servers = {
|
||||
work = {
|
||||
config = ''config /home/zack/Downloads/zachary_myers.ovpn'';
|
||||
updateResolvConf = true;
|
||||
};
|
||||
};
|
||||
|
||||
# disable autoconnect for now
|
||||
# systemd.services."mullvad-daemon".postStart = let
|
||||
# mullvad = config.services.mullvad-vpn.package;
|
||||
# in ''
|
||||
# while ! ${mullvad}/bin/mullvad status >/dev/null; do sleep 1; done
|
||||
# ${mullvad}/bin/mullvad auto-connect set on
|
||||
# ${mullvad}/bin/mullvad tunnel set ipv6 on
|
||||
# ${mullvad}/bin/mullvad connect
|
||||
# '';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue