nixos-config/modules/user-settings.nix
2021-10-27 11:36:44 -04:00

16 lines
331 B
Nix

{ config, pkgs, lib, ... }:
let
cfg = config.sconfig.user-settings;
in
{
options.sconfig.user-settings = lib.mkOption {
type = lib.types.nullOr lib.types.lines;
default = null;
};
config = lib.mkIf (cfg != null) {
environment.systemPackages = [
(pkgs.writeShellScriptBin "my-settings" cfg)
];
};
}