-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfiguration.nix
More file actions
67 lines (50 loc) · 1.88 KB
/
Copy pathconfiguration.nix
File metadata and controls
67 lines (50 loc) · 1.88 KB
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
{ pkgs, lib, modulesPath, ... }: {
imports = [ (modulesPath + "/profiles/minimal.nix") ];
options = { };
config = {
# We are stateless, so we don't use this, but nix will warn without it.
system.stateVersion = "24.11";
# Shut up nixos warning about missing root
fileSystems."/" = lib.mkImageMediaOverride {
fsType = "tmpfs";
options = [ "mode=0755" ];
};
# Disable the remount rw systemd service
systemd.services.systemd-remount-fs.enable = lib.mkForce false;
# Don't build the GRUB menu builder script, since we don't need it
# here and it causes a cyclic dependency.
boot.loader.grub.enable = false;
# No need to build kernel or initrd
boot.kernel.enable = false;
boot.initrd.enable = false;
networking.hostName = "";
#networking.dhcpcd.enable = false;
# Uncomment if you want log output on console
#services.journald.console = "/dev/console";
# The system is static.
users.mutableUsers = false;
# Empty password for root
users.users.root.initialHashedPassword = "";
# Log in root automatically
services.getty.autologinUser = "root";
# Disable the oom killer
systemd.oomd.enable = false;
# Disable firewall
networking.firewall.enable = false;
# The system cannot be rebuilt
nix.enable = false;
# No logical volume management
services.lvm.enable = false;
# Enable ssh and allow root login without password
services.sshd.enable = true;
services.openssh.settings.PermitRootLogin = "yes";
services.openssh.settings.PermitEmptyPasswords = "yes";
security.pam.services.sshd.allowNullPassword = true;
# For mounting virtiofs passed to run-kernel via --share share:/path/to/place
fileSystems."/mnt" = {
fsType = "virtiofs";
device = "share";
};
environment.systemPackages = [ pkgs.coreutils pkgs.python3 pkgs.wget ];
};
}