-
Notifications
You must be signed in to change notification settings - Fork 0
/
image.nix
61 lines (54 loc) · 1.51 KB
/
image.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
{ config, pkgs, lib, ... }:
let
emptyRegistry = builtins.toFile "empty-registry.json" (
builtins.toJSON {
flakes = [];
version = 2;
}
);
in
{
imports = [ ./lazor.nix ./mkimage.nix ];
sdImage.kpart = "${config.system.build.toplevel}/kpart";
sdImage.storePaths = [ config.system.build.toplevel ];
nix = {
buildCores = 0;
autoOptimiseStore = true;
trustedUsers = [ "root" "@wheel" ];
allowedUsers = [ "root" "@wheel" ];
nixPath = [ "nixpkgs=${pkgs.path}" ];
registry.nixpkgs = {
from = { id = "nixpkgs"; type = "indirect"; };
to = { type = "path"; path = pkgs.path; };
};
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes recursive-nix ca-derivations ca-references
builders-use-substitutes = true
flake-registry = ${emptyRegistry}
'';
};
i18n.defaultLocale = "en_US.UTF-8";
time.timeZone = "UTC";
nixpkgs.config.allowUnfree = true;
users.mutableUsers = false;
users.users.root.password = "";
users.users.user = {
isNormalUser = true;
uid = 1000;
extraGroups = [ "wheel" ];
password = "";
};
networking.useDHCP = true;
networking.hostName = "nixos";
networking.wireless.enable = true;
networking.firewall.enable = true;
services.journald.forwardToSyslog = false;
services.journald.extraConfig = ''
Storage=volatile
ReadKMsg=false
RuntimeMaxUse=50M
'';
services.journald.rateLimitBurst = 100;
services.journald.rateLimitInterval = "30s";
}