-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
69 lines (64 loc) · 2.03 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
{ inputs, config, lib, pkgs, ... }:
with lib;
with lib.my;
with inputs;
{
imports =
[
home-manager.nixosModules.home-manager
]
++ (mapModulesRec' (toString ./modules) import)
++ (mapModulesRec' (toString ./new/modules) import);
# Common config for all nixos machines; and to ensure the flake operates soundly
environment.variables.DOTFILES = dotFilesDir;
environment.variables.NIXPKGS_ALLOW_UNFREE = "1";
nix =
let
filteredInputs = filterAttrs (n: _: n != "self") inputs;
nixPathInputs = mapAttrsToList (n: v: "${n}=${v}") filteredInputs;
registryInputs = mapAttrs (_: v: { flake = v; }) filteredInputs;
in
{
package = pkgs.nixVersions.stable;
extraOptions = "experimental-features = nix-command flakes";
nixPath = nixPathInputs ++ [
"nixpkgs-overlays=${config.dotfiles.dir}/overlays"
"dotfiles=${config.dotfiles.dir}"
];
settings = {
substituters = [
"https://cachix.org/api/v1/cache/emacs"
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://nixpkgs.cachix.org"
];
trusted-public-keys = [
"emacs.cachix.org-1:b1SMJNLY/mZF6GxQE+eDBeps7WnkT0Po55TAyzwOxTY="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs.cachix.org-1:q91R6hxbwFvDqTSDKwDAV4T5PxqXGxswD8vhONFMeOE="
];
auto-optimise-store = true;
};
registry = registryInputs // { dotfiles.flake = inputs.self; };
};
system.configurationRevision = with inputs; mkIf (self ? rev) self.rev;
system.stateVersion = "21.05";
boot.loader = {
efi.canTouchEfiVariables = true;
systemd-boot.configurationLimit = 10;
systemd-boot.enable = mkDefault true;
timeout = 1;
};
environment.systemPackages = with pkgs; [
cached-nix-shell
coreutils
git
gnumake
killall
vim
wget
nvd # Nix version diff tool
file
];
}