tangled
alpha
login
or
join now
anirudh.fi
/
dotfiles
5
fork
atom
my nix dotfiles
5
fork
atom
overview
issues
pulls
pipelines
nix/denna: add host
anirudh.fi
2 years ago
14174aae
3962a87f
+137
2 changed files
expand all
collapse all
unified
split
hosts
denna
configuration.nix
hardware-configuration.nix
+93
hosts/denna/configuration.nix
···
1
1
+
{ config, pkgs, lib, ... }:
2
2
+
3
3
+
{
4
4
+
imports =
5
5
+
[
6
6
+
./hardware-configuration.nix
7
7
+
];
8
8
+
9
9
+
boot.loader.systemd-boot.enable = true;
10
10
+
boot.loader.efi.canTouchEfiVariables = true;
11
11
+
12
12
+
networking.hostName = "denna";
13
13
+
networking.networkmanager.enable = true;
14
14
+
15
15
+
time.timeZone = "Europe/Helsinki";
16
16
+
17
17
+
i18n.defaultLocale = "en_US.UTF-8";
18
18
+
19
19
+
i18n.extraLocaleSettings = {
20
20
+
LC_ADDRESS = "en_US.UTF-8";
21
21
+
LC_IDENTIFICATION = "en_US.UTF-8";
22
22
+
LC_MEASUREMENT = "en_US.UTF-8";
23
23
+
LC_MONETARY = "en_US.UTF-8";
24
24
+
LC_NAME = "en_US.UTF-8";
25
25
+
LC_NUMERIC = "en_US.UTF-8";
26
26
+
LC_PAPER = "en_US.UTF-8";
27
27
+
LC_TELEPHONE = "en_US.UTF-8";
28
28
+
LC_TIME = "en_US.UTF-8";
29
29
+
};
30
30
+
31
31
+
sound.enable = true;
32
32
+
hardware.pulseaudio.enable = true;
33
33
+
hardware.opengl = {
34
34
+
enable = true;
35
35
+
extraPackages = with pkgs; [
36
36
+
intel-media-driver
37
37
+
vaapiIntel
38
38
+
vaapiVdpau
39
39
+
libvdpau-va-gl
40
40
+
intel-compute-runtime
41
41
+
];
42
42
+
};
43
43
+
44
44
+
security = {
45
45
+
doas.enable = true;
46
46
+
sudo.enable = true;
47
47
+
doas.extraConfig = ''
48
48
+
permit nopass :wheel
49
49
+
'';
50
50
+
doas.extraRules = [{
51
51
+
users = [ "icy" ];
52
52
+
}];
53
53
+
};
54
54
+
55
55
+
users.users.icy = {
56
56
+
isNormalUser = true;
57
57
+
description = "icy";
58
58
+
extraGroups = [ "networkmanager" "wheel" "docker" ];
59
59
+
packages = with pkgs; [ ];
60
60
+
};
61
61
+
62
62
+
users.users.git = {
63
63
+
isNormalUser = true;
64
64
+
description = "git";
65
65
+
extraGroups = [ "networkmanager" "wheel" ];
66
66
+
homeMode = "755";
67
67
+
packages = with pkgs; [ ];
68
68
+
};
69
69
+
70
70
+
71
71
+
nixpkgs.config.allowUnfree = true;
72
72
+
environment.systemPackages = with pkgs; [
73
73
+
vim
74
74
+
wget
75
75
+
git
76
76
+
];
77
77
+
78
78
+
services = {
79
79
+
openssh.enable = true;
80
80
+
tailscale.enable = true;
81
81
+
# nix-snapshotter.enable = true;
82
82
+
};
83
83
+
84
84
+
# services.k3s = {
85
85
+
# enable = true;
86
86
+
# role = "agent";
87
87
+
# extraFlags = "--disable=traefik --disable=servicelb --disable=metrics-server --bind-address=100.85.88.64 --node-ip=100.85.88.64 --node-external-ip=100.85.88.64";
88
88
+
# };
89
89
+
90
90
+
nix.settings.experimental-features = [ "nix-command" "flakes" ];
91
91
+
system.stateVersion = "24.05";
92
92
+
}
93
93
+
+44
hosts/denna/hardware-configuration.nix
···
1
1
+
# Do not modify this file! It was generated by ‘nixos-generate-config’
2
2
+
# and may be overwritten by future invocations. Please make changes
3
3
+
# to /etc/nixos/configuration.nix instead.
4
4
+
{ config, lib, pkgs, modulesPath, ... }:
5
5
+
6
6
+
{
7
7
+
imports =
8
8
+
[
9
9
+
(modulesPath + "/installer/scan/not-detected.nix")
10
10
+
];
11
11
+
12
12
+
boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
13
13
+
boot.initrd.kernelModules = [ ];
14
14
+
boot.kernelModules = [ "kvm-intel" ];
15
15
+
boot.extraModulePackages = [ ];
16
16
+
17
17
+
fileSystems."/" =
18
18
+
{
19
19
+
device = "/dev/disk/by-uuid/92a27eb2-9814-48fd-8f76-cc152d5a8700";
20
20
+
fsType = "ext4";
21
21
+
};
22
22
+
23
23
+
fileSystems."/boot" =
24
24
+
{
25
25
+
device = "/dev/disk/by-uuid/219A-16D2";
26
26
+
fsType = "vfat";
27
27
+
options = [ "fmask=0022" "dmask=0022" ];
28
28
+
};
29
29
+
30
30
+
swapDevices = [ ];
31
31
+
32
32
+
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
33
33
+
# (the default) this is the recommended approach. When using systemd-networkd it's
34
34
+
# still possible to use this option, but it's recommended to use it in conjunction
35
35
+
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
36
36
+
networking.useDHCP = lib.mkDefault true;
37
37
+
# networking.interfaces.enp0s20f0u3u1u2.useDHCP = lib.mkDefault true;
38
38
+
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
39
39
+
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
40
40
+
41
41
+
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
42
42
+
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
43
43
+
}
44
44
+