Watch
0
1
Fork
You've already forked nixos-configuration
0

Compare commits

..
4 changed files with 12 additions and 36 deletions

View file

@ -3,7 +3,7 @@ name: build
on: on:
pull_request: {} pull_request: {}
push: push:
branches: [main] branches: [ main ]
jobs: jobs:
build: build:

View file

@ -2,11 +2,11 @@ name: flake update
on: on:
schedule: schedule:
- cron: "0 3 * * *" - cron: '0 3 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
target: target:
description: "Inputs to update" description: 'Inputs to update'
type: choice type: choice
default: all default: all
options: options:

View file

@ -1,9 +1,4 @@
{ { self, ... }:
config,
lib,
...
}:
{ {
config = { config = {
boot.enableContainers = true; boot.enableContainers = true;
@ -27,25 +22,13 @@
# }; # };
# }; # };
# Global DefaultTimeoutStopSec is 10s (modern-desktop.nix), which kills systemd-nspawn # # Global DefaultTimeoutStopSec is 10s (modern-desktop.nix), which kills systemd-nspawn
# before it finishes halting, leaving cgroups busy and breaking restarts. # # before it finishes halting, leaving cgroups busy and breaking restarts.
systemd.services = # systemd.services."container@damocles".serviceConfig = {
let # TimeoutStopSec = "60s";
# The imperative template plus every declarative container: nixos-containers # # After a SIGKILL of nspawn, the kernel needs a moment to reap its cgroups.
# generates each one as its own unit, so an override on "container@" alone # # Without this, the immediate restart attempt fails with "Device or resource busy".
# would not reach them. # RestartSec = "5s";
containerUnits = [ # };
"container@"
]
++ map (name: "container@${name}") (lib.attrNames config.containers);
in
lib.genAttrs containerUnits (_: {
serviceConfig = {
TimeoutStopSec = "2min";
# After a SIGKILL of nspawn, the kernel needs a moment to reap its cgroups.
# Without this, the immediate restart attempt fails with "Device or resource busy".
RestartSec = "5s";
};
});
}; };
} }

View file

@ -29,13 +29,6 @@
"i686-linux" "i686-linux"
]; ];
# Global default (nixosModules/distributed-builds.nix) is MemoryMax=90%,
# which isn't tight enough on this machine's 31GiB to avoid OOM.
systemd.services.nix-daemon.serviceConfig = {
MemoryHigh = "60%";
MemoryMax = lib.mkForce "80%";
};
services.xserver.xkb = { services.xserver.xkb = {
# Configure keymap in X11 # Configure keymap in X11
layout = "de"; layout = "de";