Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

userborn: enable by default #575

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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