From 27323e52cc79e88d972419d3f3e4971ade3572ff Mon Sep 17 00:00:00 2001 From: benaryorg Date: Thu, 23 Oct 2025 18:43:11 +0000 Subject: [PATCH] nixos/systemd: CPUAccounting is deprecated systemd 258 has the following changes noted in systemd.resource-control(5): > `CPUAccounting=` setting is deprecated, because it is always available on the unified cgroup hierarchy and such setting has no effect. This commit removes it from the three services using it directly, as well as one instance of example text. Signed-off-by: benaryorg --- nixos/modules/services/cluster/kubernetes/kubelet.nix | 1 - nixos/modules/services/scheduling/prefect.nix | 2 -- nixos/modules/system/boot/systemd/user.nix | 2 +- nixos/modules/virtualisation/waagent.nix | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/nixos/modules/services/cluster/kubernetes/kubelet.nix b/nixos/modules/services/cluster/kubernetes/kubelet.nix index 9ab5d0baf8c7..31616a22e1af 100644 --- a/nixos/modules/services/cluster/kubernetes/kubelet.nix +++ b/nixos/modules/services/cluster/kubernetes/kubelet.nix @@ -364,7 +364,6 @@ in ''; serviceConfig = { Slice = "kubernetes.slice"; - CPUAccounting = true; MemoryAccounting = true; Restart = "on-failure"; RestartSec = "1000ms"; diff --git a/nixos/modules/services/scheduling/prefect.nix b/nixos/modules/services/scheduling/prefect.nix index 72179533cfe8..ae42d30168ab 100644 --- a/nixos/modules/services/scheduling/prefect.nix +++ b/nixos/modules/services/scheduling/prefect.nix @@ -173,7 +173,6 @@ in ProtectKernelLogs = true; ProtectControlGroups = true; MemoryAccounting = true; - CPUAccounting = true; ExecStart = "${pkgs.prefect}/bin/prefect server start --host ${cfg.host} --port ${toString cfg.port}"; Restart = "always"; @@ -216,7 +215,6 @@ in ProtectKernelLogs = true; ProtectControlGroups = true; MemoryAccounting = true; - CPUAccounting = true; ExecStart = '' ${pkgs.prefect}/bin/prefect worker start \ --pool ${poolName} \ diff --git a/nixos/modules/system/boot/systemd/user.nix b/nixos/modules/system/boot/systemd/user.nix index 48903742a919..d9a9631fba92 100644 --- a/nixos/modules/system/boot/systemd/user.nix +++ b/nixos/modules/system/boot/systemd/user.nix @@ -71,7 +71,7 @@ in systemd.user.extraConfig = mkOption { default = ""; type = types.lines; - example = "DefaultCPUAccounting=yes"; + example = "DefaultTimeoutStartSec=60"; description = '' Extra config options for systemd user instances. See {manpage}`systemd-user.conf(5)` for available options. diff --git a/nixos/modules/virtualisation/waagent.nix b/nixos/modules/virtualisation/waagent.nix index 407aa261b764..83113c1902df 100644 --- a/nixos/modules/virtualisation/waagent.nix +++ b/nixos/modules/virtualisation/waagent.nix @@ -370,7 +370,6 @@ in Type = "simple"; Restart = "always"; Slice = "azure.slice"; - CPUAccounting = true; MemoryAccounting = true; }; }; -- knotmirror 0.0.1