Created
December 27, 2019 15:17
-
-
Save danbst/eb55f9363c0b9151d65271ae6c20f39b to your computer and use it in GitHub Desktop.
Manage your /etc from home-manager (install home-manager as root)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, lib, ... }: { | |
imports = [ | |
(import <nixpkgs/nixos/modules/system/etc/etc.nix>) | |
]; | |
options.system.build.etc = lib.mkOption { type = lib.types.package; }; | |
options.system.activationScripts.etc = | |
lib.mkOption { type = lib.types.unspecified; }; | |
config = { | |
home.activation.setupEtc = config.lib.dag.entryAfter [ "writeBoundary" ] '' | |
exec ${ | |
pkgs.writeScript "etc-activation" | |
config.system.activationScripts.etc.text | |
} | |
''; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment