Skip to content

Commit

Permalink
userborn: enable by default
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Mic92 and zowoq committed Dec 17, 2024
1 parent 528f3ec commit 2f5f51b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion nixos/common/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# A default configuration that applies to all servers.
# Common configuration across *all* the machines
{ config, lib, ... }:
{
config,
lib,
options,
...
}:
{

imports = [
Expand All @@ -15,6 +20,13 @@
./zfs.nix
];

# Create users with https://github.com/nikstur/userborn rather than our perl script.
# Don't enable if we detect impermanence, which is not compatible with it: https://github.com/nix-community/impermanence/pull/223
# as well as agenix: https://github.com/ryantm/agenix/pull/255
services.userborn.enable = lib.mkIf (
!((options.environment ? persistence && options.environment.persistence.enable) || options ? age)
) (lib.mkDefault true);

# Use systemd during boot as well except:
# - systems with raids as this currently require manual configuration: https://github.com/NixOS/nixpkgs/issues/210210
# - for containers we currently rely on the `stage-2` init script that sets up our /etc
Expand Down

0 comments on commit 2f5f51b

Please sign in to comment.