-
Notifications
You must be signed in to change notification settings - Fork 42
/
configuration.nix
115 lines (101 loc) · 2.38 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
[root@testnix:~]# cat /etc/nixos/configuration.nix
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
#./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
#boot.zfs.extraPools = [ "zfstest" ];
services.zfs.autoScrub.enable = true;
time.timeZone = "America/New_York";
users.users.alex = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" ];
};
users.users.alex.openssh.authorizedKeys.keyFiles = [
/etc/nixos/ssh/authorized_keys
];
users.users.root.openssh.authorizedKeys.keyFiles = [
/etc/nixos/ssh/authorized_keys
];
environment.systemPackages = with pkgs; [
docker-compose
htop
hddtemp
intel-gpu-tools
iotop
lm_sensors
mergerfs
mc
ncdu
nmap
nvme-cli
sanoid
snapraid
tailscale
tdns-cli
tmux
tree
vim
wget
];
networking = {
firewall.enable = false;
hostName = "testnix";
hostId = "e5f2dc02";
interfaces = {
enp1s0 = {
useDHCP = false;
ipv4.addresses = [ {
address = "10.42.0.50";
prefixLength = 20;
} ];
};
};
defaultGateway = "10.42.0.254";
nameservers = [ "10.42.0.253" ];
};
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
settings.PermitRootLogin = "yes";
};
services.tailscale.enable = true;
virtualisation = {
docker = {
enable = true;
autoPrune = {
enable = true;
dates = "weekly";
};
};
};
services = {
xserver = {
enable = true;
displayManager = {
lightdm.enable = true;
defaultSession = "xfce";
#defaultSession = "xfce+bspwm";
};
desktopManager.xfce.enable = true;
windowManager.bspwm.enable = true;
};
};
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
warn-dirty = false;
};
};
system.copySystemConfiguration = true;
system.stateVersion = "23.05";
}