nixos/faucet/id/default.nix

17 lines
296 B
Nix
Raw Normal View History

{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.faucet.id;
in {
options.faucet.id = mkOption {
type = with types; str;
description = "systemd machine id";
};
config = {
environment.etc.machine-id.text = cfg + "\n";
networking.hostId = substring 0 8 cfg;
};
}