syndicate-flake/nixos/modules/synit/etc/default.nix

33 lines
770 B
Nix
Raw Normal View History

2022-09-14 20:24:11 +00:00
{ config, pkgs, ... }:
let
substituteDirectory = args:
pkgs.stdenvNoCC.mkDerivation ({
name = if args ? name then args.name else baseNameOf (toString args.src);
builder = ./substitute-dir.sh;
preferLocalBuild = true;
allowSubstitutes = false;
} // args);
in {
environment.etc = {
2023-07-01 13:42:59 +00:00
"mdev.conf".text = ''
.* 0:0 660
'';
2022-09-14 20:24:11 +00:00
"syndicate/boot".source = substituteDirectory {
src = ./boot;
getty = "${pkgs.busybox}/bin/busybox getty";
inherit (config.services.getty) loginProgram;
};
"syndicate/core".source = substituteDirectory {
src = ./core;
2023-06-27 12:12:59 +00:00
inherit (pkgs) mdevd;
2022-09-14 20:24:11 +00:00
hostnameOneShot =
"${pkgs.busybox}/bin/busybox hostname ${config.networking.hostName}";
};
};
}