-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
75 lines (62 loc) · 1.95 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
69
70
71
72
73
74
75
{ inputs, config, lib, pkgs, ... }:
with lib;
with lib.my;
with inputs; {
imports =
[
home-manager.nixosModules.home-manager
simple-nixos-mailserver.nixosModules.mailserver
]
++ (mapModulesRec' (toString ./modules) import);
# Common config for all nixos machines to ensure the flake operates soundly
environment.variables = {
DOTFILES = dotFilesDir;
NIXPKGS_ALLOW_UNFREE = "1";
};
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
'';
nixPath = (mapAttrsToList (n: v: "${n}=${v}") inputs) ++ [
"nixpkgs-overlays=${dotFilesDir}/overlays"
"dotfiles=${dotFilesDir}"
];
settings.substituters = [
"https://cache.nixos.org/"
"https://nix-community.cachix.org"
];
settings.trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
# TODO: I had conflicting values here,
# so had to update. Makes sense -- but what do each of these do?
registry = {
nixos.flake = nixpkgs;
nixpkgs.flake = nixpkgs; # nixpkgs-unstable;
};
settings.sandbox = true;
settings.trusted-users = [ username ];
gc.automatic = false; # never automatically garbage collect
};
system.configurationRevision = mkIf (self ? rev) self.rev;
system.stateVersion = "20.09";
# allow users to store fonts easily
fonts.fontDir.enable = true;
## Some reasonable, global defaults
# This is here to appease 'nix flake check' for generic hosts with no
# hardware-configuration.nix or fileSystem config.
fileSystems."/".device = mkDefault "/dev/disk/by-label/nixos";
# Use the latest kernel
# boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader = {
efi.canTouchEfiVariables = true;
systemd-boot.configurationLimit = 10;
systemd-boot.enable = mkDefault true;
};
environment.systemPackages = with pkgs; [
coreutils
wget
unzip
];
}