Loading nixos/modules/services/misc/ntfy-sh.nix +24 −11 Original line number Diff line number Diff line Loading @@ -19,6 +19,18 @@ in description = mdDoc "The ntfy.sh package to use."; }; user = mkOption { default = "ntfy-sh"; type = types.str; description = lib.mdDoc "User the ntfy-sh server runs under."; }; group = mkOption { default = "ntfy-sh"; type = types.str; description = lib.mdDoc "Primary group of ntfy-sh user."; }; settings = mkOption { type = types.submodule { freeformType = settingsFormat.type; }; Loading Loading @@ -49,9 +61,6 @@ in services.ntfy-sh.settings = { auth-file = mkDefault "/var/lib/ntfy-sh/user.db"; listen-http = mkDefault "127.0.0.1:2586"; attachment-cache-dir = mkDefault "/var/lib/ntfy-sh/attachments"; cache-file = mkDefault "/var/lib/ntfy-sh/cache-file.db"; }; systemd.services.ntfy-sh = { Loading @@ -61,15 +70,10 @@ in after = [ "network.target" ]; serviceConfig = { ExecStartPre = [ "${pkgs.coreutils}/bin/touch ${cfg.settings.auth-file}" "${pkgs.coreutils}/bin/mkdir -p ${cfg.settings.attachment-cache-dir}" "${pkgs.coreutils}/bin/touch ${cfg.settings.cache-file}" ]; ExecStart = "${cfg.package}/bin/ntfy serve -c ${configuration}"; User = cfg.user; StateDirectory = "ntfy-sh"; DynamicUser = true; AmbientCapabilities = "CAP_NET_BIND_SERVICE"; PrivateTmp = true; NoNewPrivileges = true; Loading @@ -84,8 +88,17 @@ in RestrictNamespaces = true; RestrictRealtime = true; MemoryDenyWriteExecute = true; # Upstream Requirements LimitNOFILE = 20500; }; }; users.groups = optionalAttrs (cfg.group == "ntfy-sh") { ntfy-sh = { }; }; users.users = optionalAttrs (cfg.user == "ntfy-sh") { ntfy-sh = { isSystemUser = true; group = cfg.group; }; }; }; Loading nixos/modules/tasks/network-interfaces-scripted.nix +5 −5 Original line number Diff line number Diff line Loading @@ -293,7 +293,7 @@ let script = '' # Remove Dead Interfaces echo "Removing old bridge ${n}..." ip link show "${n}" >/dev/null 2>&1 && ip link del "${n}" ip link show dev "${n}" >/dev/null 2>&1 && ip link del "${n}" echo "Adding bridge ${n}..." ip link add name "${n}" type bridge Loading Loading @@ -459,7 +459,7 @@ let path = [ pkgs.iproute2 ]; script = '' # Remove Dead Interfaces ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link show dev "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link add link "${v.interface}" name "${n}" type macvlan \ ${optionalString (v.mode != null) "mode ${v.mode}"} ip link set "${n}" up Loading Loading @@ -517,7 +517,7 @@ let path = [ pkgs.iproute2 ]; script = '' # Remove Dead Interfaces ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link show dev "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link add name "${n}" type sit \ ${optionalString (v.remote != null) "remote \"${v.remote}\""} \ ${optionalString (v.local != null) "local \"${v.local}\""} \ Loading Loading @@ -551,7 +551,7 @@ let path = [ pkgs.iproute2 ]; script = '' # Remove Dead Interfaces ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link show dev "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link add name "${n}" type ${v.type} \ ${optionalString (v.remote != null) "remote \"${v.remote}\""} \ ${optionalString (v.local != null) "local \"${v.local}\""} \ Loading Loading @@ -579,7 +579,7 @@ let path = [ pkgs.iproute2 ]; script = '' # Remove Dead Interfaces ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link show dev "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link add link "${v.interface}" name "${n}" type vlan id "${toString v.id}" # We try to bring up the logical VLAN interface. If the master Loading nixos/tests/networking.nix +25 −0 Original line number Diff line number Diff line Loading @@ -998,6 +998,31 @@ let machine.fail("ip address show wlan0 | grep -q ${testMac}") ''; }; naughtyInterfaceNames = let ifnames = [ # flags of ip-address "home" "temporary" "optimistic" "bridge_slave" "flush" # flags of ip-route "up" "type" "nomaster" "address" # other "very_loong_name" "lowerUpper" "-" ]; in { name = "naughtyInterfaceNames"; nodes.machine = { pkgs, ... }: { networking.useNetworkd = networkd; networking.bridges = listToAttrs (flip map ifnames (name: { inherit name; value.interfaces = []; })); }; testScript = '' machine.start() machine.wait_for_unit("network.target") for ifname in ${builtins.toJSON ifnames}: machine.wait_until_succeeds(f"ip link show dev '{ifname}' | grep -q '{ifname}'") ''; }; caseSensitiveRenaming = { name = "CaseSensitiveRenaming"; nodes.machine = { pkgs, ... }: { Loading nixos/tests/ntfy-sh.nix +0 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,5 @@ import ./make-test-python.nix { notif = json.loads(machine.succeed("curl -s localhost:80/test/json?poll=1")) assert msg == notif["message"], "Wrong message" machine.succeed("ntfy user list") ''; } pkgs/applications/audio/gtkcord4/default.nix +3 −3 Original line number Diff line number Diff line Loading @@ -18,13 +18,13 @@ buildGoModule rec { pname = "gtkcord4"; version = "0.0.10"; version = "0.0.11"; src = fetchFromGitHub { owner = "diamondburned"; repo = pname; rev = "v${version}"; hash = "sha256-WrKZRRJAbEzcCRcFUTa7PxahQ3YADhfWaKlB4uJjVk0="; hash = "sha256-0d656gjfFlgNdKbPJK+6KIU7zvp88j3bGIlGPwJNRdM="; }; nativeBuildInputs = [ Loading Loading @@ -57,7 +57,7 @@ buildGoModule rec { install -D -m 444 internal/icons/png/logo.png $out/share/icons/hicolor/256x256/apps/gtkcord4.png ''; vendorHash = "sha256-8Xnu3WjaaWMRkqmnQCxSc/SD65XFMIY0xamWDx4jZbw="; vendorHash = "sha256-+zbaRaGOF6w8C7lmtd3k5Rh/0a+OnqTL9Qhg1ErTHBo="; meta = with lib; { description = "GTK4 Discord client in Go, attempt #4."; Loading Loading
nixos/modules/services/misc/ntfy-sh.nix +24 −11 Original line number Diff line number Diff line Loading @@ -19,6 +19,18 @@ in description = mdDoc "The ntfy.sh package to use."; }; user = mkOption { default = "ntfy-sh"; type = types.str; description = lib.mdDoc "User the ntfy-sh server runs under."; }; group = mkOption { default = "ntfy-sh"; type = types.str; description = lib.mdDoc "Primary group of ntfy-sh user."; }; settings = mkOption { type = types.submodule { freeformType = settingsFormat.type; }; Loading Loading @@ -49,9 +61,6 @@ in services.ntfy-sh.settings = { auth-file = mkDefault "/var/lib/ntfy-sh/user.db"; listen-http = mkDefault "127.0.0.1:2586"; attachment-cache-dir = mkDefault "/var/lib/ntfy-sh/attachments"; cache-file = mkDefault "/var/lib/ntfy-sh/cache-file.db"; }; systemd.services.ntfy-sh = { Loading @@ -61,15 +70,10 @@ in after = [ "network.target" ]; serviceConfig = { ExecStartPre = [ "${pkgs.coreutils}/bin/touch ${cfg.settings.auth-file}" "${pkgs.coreutils}/bin/mkdir -p ${cfg.settings.attachment-cache-dir}" "${pkgs.coreutils}/bin/touch ${cfg.settings.cache-file}" ]; ExecStart = "${cfg.package}/bin/ntfy serve -c ${configuration}"; User = cfg.user; StateDirectory = "ntfy-sh"; DynamicUser = true; AmbientCapabilities = "CAP_NET_BIND_SERVICE"; PrivateTmp = true; NoNewPrivileges = true; Loading @@ -84,8 +88,17 @@ in RestrictNamespaces = true; RestrictRealtime = true; MemoryDenyWriteExecute = true; # Upstream Requirements LimitNOFILE = 20500; }; }; users.groups = optionalAttrs (cfg.group == "ntfy-sh") { ntfy-sh = { }; }; users.users = optionalAttrs (cfg.user == "ntfy-sh") { ntfy-sh = { isSystemUser = true; group = cfg.group; }; }; }; Loading
nixos/modules/tasks/network-interfaces-scripted.nix +5 −5 Original line number Diff line number Diff line Loading @@ -293,7 +293,7 @@ let script = '' # Remove Dead Interfaces echo "Removing old bridge ${n}..." ip link show "${n}" >/dev/null 2>&1 && ip link del "${n}" ip link show dev "${n}" >/dev/null 2>&1 && ip link del "${n}" echo "Adding bridge ${n}..." ip link add name "${n}" type bridge Loading Loading @@ -459,7 +459,7 @@ let path = [ pkgs.iproute2 ]; script = '' # Remove Dead Interfaces ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link show dev "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link add link "${v.interface}" name "${n}" type macvlan \ ${optionalString (v.mode != null) "mode ${v.mode}"} ip link set "${n}" up Loading Loading @@ -517,7 +517,7 @@ let path = [ pkgs.iproute2 ]; script = '' # Remove Dead Interfaces ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link show dev "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link add name "${n}" type sit \ ${optionalString (v.remote != null) "remote \"${v.remote}\""} \ ${optionalString (v.local != null) "local \"${v.local}\""} \ Loading Loading @@ -551,7 +551,7 @@ let path = [ pkgs.iproute2 ]; script = '' # Remove Dead Interfaces ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link show dev "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link add name "${n}" type ${v.type} \ ${optionalString (v.remote != null) "remote \"${v.remote}\""} \ ${optionalString (v.local != null) "local \"${v.local}\""} \ Loading Loading @@ -579,7 +579,7 @@ let path = [ pkgs.iproute2 ]; script = '' # Remove Dead Interfaces ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link show dev "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link add link "${v.interface}" name "${n}" type vlan id "${toString v.id}" # We try to bring up the logical VLAN interface. If the master Loading
nixos/tests/networking.nix +25 −0 Original line number Diff line number Diff line Loading @@ -998,6 +998,31 @@ let machine.fail("ip address show wlan0 | grep -q ${testMac}") ''; }; naughtyInterfaceNames = let ifnames = [ # flags of ip-address "home" "temporary" "optimistic" "bridge_slave" "flush" # flags of ip-route "up" "type" "nomaster" "address" # other "very_loong_name" "lowerUpper" "-" ]; in { name = "naughtyInterfaceNames"; nodes.machine = { pkgs, ... }: { networking.useNetworkd = networkd; networking.bridges = listToAttrs (flip map ifnames (name: { inherit name; value.interfaces = []; })); }; testScript = '' machine.start() machine.wait_for_unit("network.target") for ifname in ${builtins.toJSON ifnames}: machine.wait_until_succeeds(f"ip link show dev '{ifname}' | grep -q '{ifname}'") ''; }; caseSensitiveRenaming = { name = "CaseSensitiveRenaming"; nodes.machine = { pkgs, ... }: { Loading
nixos/tests/ntfy-sh.nix +0 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,5 @@ import ./make-test-python.nix { notif = json.loads(machine.succeed("curl -s localhost:80/test/json?poll=1")) assert msg == notif["message"], "Wrong message" machine.succeed("ntfy user list") ''; }
pkgs/applications/audio/gtkcord4/default.nix +3 −3 Original line number Diff line number Diff line Loading @@ -18,13 +18,13 @@ buildGoModule rec { pname = "gtkcord4"; version = "0.0.10"; version = "0.0.11"; src = fetchFromGitHub { owner = "diamondburned"; repo = pname; rev = "v${version}"; hash = "sha256-WrKZRRJAbEzcCRcFUTa7PxahQ3YADhfWaKlB4uJjVk0="; hash = "sha256-0d656gjfFlgNdKbPJK+6KIU7zvp88j3bGIlGPwJNRdM="; }; nativeBuildInputs = [ Loading Loading @@ -57,7 +57,7 @@ buildGoModule rec { install -D -m 444 internal/icons/png/logo.png $out/share/icons/hicolor/256x256/apps/gtkcord4.png ''; vendorHash = "sha256-8Xnu3WjaaWMRkqmnQCxSc/SD65XFMIY0xamWDx4jZbw="; vendorHash = "sha256-+zbaRaGOF6w8C7lmtd3k5Rh/0a+OnqTL9Qhg1ErTHBo="; meta = with lib; { description = "GTK4 Discord client in Go, attempt #4."; Loading