Skip to content

Commit 72aad6a

Browse files
committed
userborn: enable by default
I have tested this for a wile without any issues. If it works find in srvos, we can propose this to nixos itself.
1 parent 239c82e commit 72aad6a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nixos/common/default.nix

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# A default configuration that applies to all servers.
22
# Common configuration across *all* the machines
3-
{ config, lib, ... }:
3+
{ config, lib, options, ... }:
44
{
55

66
imports = [
@@ -15,6 +15,10 @@
1515
./zfs.nix
1616
];
1717

18+
# Create users with https://github.com/nikstur/userborn rather than our perl script.
19+
# Don't enable if we detect impermanence, which is not compatible with it: https://github.com/nix-community/impermanence/pull/223
20+
services.userborn.enable = lib.mkDefault (options.environment ? persistence);
21+
1822
# Use systemd during boot as well except:
1923
# - systems with raids as this currently require manual configuration: https://github.com/NixOS/nixpkgs/issues/210210
2024
# - for containers we currently rely on the `stage-2` init script that sets up our /etc

0 commit comments

Comments
 (0)