]> Git — Sourcephile - julm/julm-nix.git/blob - homes/options.nix
merge home-manager config
[julm/julm-nix.git] / homes / options.nix
1 { pkgs, lib, config, ... }:
2 with builtins;
3 {
4 options.host = {
5 name = lib.mkOption {
6 type = lib.types.str;
7 default = head (match "([a-z0-9]*)\n?" (readFile "/etc/hostname"));
8 description = "hostname";
9 };
10 hardware = lib.mkOption {
11 type = with lib.types; listOf str;
12 default = filter (x: isString x && x != "") (split "[ \n]+" (readFile
13 "/sys/devices/virtual/dmi/id/product_version"));
14 description = "hardware";
15 };
16 desktop = lib.mkEnableOption "desktop profile";
17 server = lib.mkEnableOption "server profile";
18 };
19 }