This repository was archived by the owner on Feb 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdefault.nix
68 lines (61 loc) · 1.71 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{ configuration
, system ? "x86_64-linux"
}:
let
eval-config = import <nixpkgs/nixos/lib/eval-config.nix>;
baseModules = [stub-module]
++ import <microgram/nixos/vendor-module-list.nix>;
lib = import <nixpkgs/lib>;
stub = with lib; mkOption {
type = types.attrsOf types.unspecified;
default = {
enable = false;
nssmdns = false;
nsswins = false;
syncPasswordsByPam = false;
isContainer = false;
devices = [];
};
};
stub-module = {
options = {
services.xserver = stub;
services.bind = stub;
services.dnsmasq = stub;
services.avahi = stub;
services.samba = stub;
services.mstpd = stub;
services.resolved = stub;
services.fprintd = stub;
security.grsecurity = stub;
services.virtualboxGuest = stub;
users.ldap = stub;
krb5 = stub;
powerManagement = stub;
security.pam.usb = stub;
security.pam.mount = stub;
security.pam.oath = stub;
boot.isContainer = lib.mkOption { default = false; };
boot.initrd.luks = stub;
networking.wireless = stub;
networking.connman = stub;
virtualisation.vswitch = stub;
};
config = {
services.virtualboxGuest = true; # renamed
services.xserver.enable = false;
powerManagement.enable = false;
powerManagement.resumeCommands = "";
powerManagement.powerUpCommands = "";
powerManagement.powerDownCommands = "";
nixpkgs.config = (import <microgram/sdk.nix>).nixpkgs-config;
};
};
eval = eval-config {
inherit system baseModules;
modules = [ configuration ];
};
in rec {
inherit (eval) config options;
system = eval.config.system.build.toplevel;
}