-
Notifications
You must be signed in to change notification settings - Fork 1
/
configuration.nix
64 lines (54 loc) · 1.5 KB
/
configuration.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
{ config, lib, pkgs, ... }:
with lib; {
imports = [
<nixpkgs/nixos/modules/profiles/minimal.nix>
<nixpkgs/nixos/modules/profiles/all-hardware.nix>
<nixpkgs/nixos/modules/installer/netboot/netboot.nix>
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
./kexec.nix
];
# Slim the package
security.sudo.enable = false;
services.udisks2.enable = false;
networking.firewall.logRefusedConnections = false;
# User stuff
services.getty.autologinUser = "root";
users.users.root.initialHashedPassword = "";
# Packages
environment.systemPackages = with pkgs; [ gnufdisk tmux vim xfsprogs.bin ];
# Kernel stuff
hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"ehci_pci"
"ahci"
"virtio_pci"
"sd_mod"
"sr_mod"
"virtio_blk"
];
# Filesystems
boot.supportedFilesystems = [ "vfat" "xfs" "btrfs" ];
# Enable ssh
systemd.services.sshd.wantedBy = mkForce [ "multi-user.target" ];
# Hostname
networking.hostName = "emergency";
networking.dhcpcd.extraConfig = ''
noipv4ll
'';
# Perform better with low-memory
environment.variables.GC_INITIAL_HEAP_SIZE = "1M";
boot.kernel.sysctl."vm.overcommit_memory" = "1";
# nix stuff
nix = {
buildCores = 0;
gc.automatic = false;
};
nixpkgs.config.allowUnfree = true;
services.openssh = {
enable = true;
permitRootLogin = "without-password";
hostKeys = [ ]; # We will take the keys of the old system
};
}