feat(kdeconnect): init
This commit is contained in:
@@ -25,14 +25,18 @@
|
||||
openssh.enable = true;
|
||||
sydpkgs.overlay.enable = true;
|
||||
dank-material-shell.enable = true;
|
||||
kdeconnect.enable = true;
|
||||
|
||||
steam = {
|
||||
enable = true;
|
||||
impermanenceUsers = ["crumb" "msyds"];
|
||||
impermanenceUsers = [
|
||||
# "crumb"
|
||||
"msyds"
|
||||
];
|
||||
};
|
||||
|
||||
users.users = [
|
||||
"crumb"
|
||||
# "crumb"
|
||||
"msyds"
|
||||
];
|
||||
|
||||
|
||||
20
modules/home/kdeconnect.nix
Normal file
20
modules/home/kdeconnect.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ config, lib, pkgs, osConfig, ... }:
|
||||
|
||||
let cfg = config.sydnix.kdeconnect;
|
||||
in {
|
||||
options.sydnix.kdeconnect = {
|
||||
enable = lib.mkEnableOption "KDE Connect";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
};
|
||||
|
||||
warnings = lib.optional (!osConfig.sydnix.kdeconnect.openFirewall) ''
|
||||
The KDE Connect ports were not opened in the NixOS config. Make
|
||||
sure someone's allowing these ports!!!
|
||||
'';
|
||||
};
|
||||
}
|
||||
21
modules/nixos/kdeconnect.nix
Normal file
21
modules/nixos/kdeconnect.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.sydnix.kdeconnect;
|
||||
in {
|
||||
options.sydnix.kdeconnect = {
|
||||
enable = lib.mkEnableOption "KDE Connect";
|
||||
openFirewall = lib.mkOption {
|
||||
description = ''Open required ports for KDE Connect'';
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable
|
||||
(let
|
||||
port-range = lib.optional cfg.openFirewall { from = 1714; to = 1764; };
|
||||
in {
|
||||
networking.firewall.allowedTCPPortRanges = port-range;
|
||||
networking.firewall.allowedUDPPortRanges = port-range;
|
||||
});
|
||||
}
|
||||
@@ -38,6 +38,7 @@
|
||||
clojure.enable = true;
|
||||
capitaine-cursors.enable = true;
|
||||
terraria.enable = true;
|
||||
kdeconnect.enable = true;
|
||||
sops = {
|
||||
enable = true;
|
||||
keyFile = "/persist/private-keys/age/crumb";
|
||||
|
||||
Reference in New Issue
Block a user