Skip to content

Commit c19d679

Browse files
Mic92zowoq
andcommitted
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. Co-authored-by: zowoq <[email protected]>
1 parent 239c82e commit c19d679

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

nixos/common/default.nix

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

611
imports = [
@@ -15,6 +20,11 @@
1520
./zfs.nix
1621
];
1722

23+
# Create users with https://github.com/nikstur/userborn rather than our perl script.
24+
# Don't enable if we detect impermanence, which is not compatible with it: https://github.com/nix-community/impermanence/pull/223
25+
# as well as agenix: https://github.com/ryantm/agenix/pull/255
26+
services.userborn.enable = lib.mkIf (!(options.environment ? persistence || options ? age)) (lib.mkDefault true);
27+
1828
# Use systemd during boot as well except:
1929
# - systems with raids as this currently require manual configuration: https://github.com/NixOS/nixpkgs/issues/210210
2030
# - for containers we currently rely on the `stage-2` init script that sets up our /etc

0 commit comments

Comments
 (0)