-
Notifications
You must be signed in to change notification settings - Fork 0
/
nspawn.nix
41 lines (39 loc) · 1.12 KB
/
nspawn.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
{ pkgs, lib, ... }:
{
boot.isContainer = true;
boot.loader.initScript.enable = true;
systemd.user.extraConfig = "DefaultEnvironment=PATH=/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin";
networking = {
hostName = lib.mkDefault null;
useDHCP = false;
useHostResolvConf = false;
firewall.enable = false;
proxy.default = lib.mkDefault null;
proxy.noProxy = "127.0.0.1,localhost,*.cn";
};
services.timesyncd = {
enable = true;
servers = [
"0.cn.pool.ntp.org"
"1.cn.pool.ntp.org"
"2.cn.pool.ntp.org"
"3.cn.pool.ntp.org"
];
};
time.timeZone = "Asia/Shanghai";
systemd.network.enable = true;
services.resolved.enable = true;
nix.extraOptions = ''
store = daemon
experimental-features = nix-command flakes repl-flake
'';
systemd.sockets.nix-daemon.enable = false;
systemd.services.nix-daemon.enable = false;
environment.systemPackages = with pkgs; [ neovim ];
users = {
mutableUsers = false;
allowNoPasswordLogin = true;
};
systemd.tmpfiles.rules = [ "f /var/lib/systemd/linger/root" ];
system.stateVersion = "23.11";
}