-
Notifications
You must be signed in to change notification settings - Fork 1
/
piret.nix
142 lines (126 loc) · 4.13 KB
/
piret.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{
nixpkgs,
system,
hostName,
}: {
root = {
imports = [
"${nixpkgs}/nixos/modules/installer/scan/not-detected.nix"
];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/9ca66df7-2812-470b-9ac7-69594af39e38";
fsType = "btrfs";
options = ["subvol=@"];
};
"/boot" = {
device = "/dev/disk/by-uuid/12CE-A600";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};
};
boot.initrd.luks.devices = {
"luks-9199b301-3f97-4c18-8149-9ff01094c792".device = "/dev/disk/by-uuid/9199b301-3f97-4c18-8149-9ff01094c792";
"luks-e7d3a4b7-7ac7-466e-b402-dbe5b34a616c".device = "/dev/disk/by-uuid/e7d3a4b7-7ac7-466e-b402-dbe5b34a616c";
};
swapDevices = [
{device = "/dev/disk/by-uuid/0463f7f5-d50b-4a87-afc0-9c0b737e801d";}
];
};
module = {
pkgs,
config,
lib,
...
}: {
system.stateVersion = "24.05";
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
networking.useDHCP = lib.mkDefault true;
networking.networkmanager.enable = true;
networking.search = ["ts.hrzn.ee"];
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
time.hardwareClockInLocalTime = true;
# For delayed login issue: https://github.com/NixOS/nixpkgs/issues/239770#issuecomment-1868508908
# ... not that it seems to help.
security.pam.services.kde.fprintAuth = false;
environment.systemPackages = [pkgs.doas-sudo-shim];
security.sudo.enable = false;
vyxos = {
desktop.enable = true;
secrets = {
additionalAuthorizedKeys = [
"kivikakk-celica"
"kivikakk-estrellita"
];
encrypted = {
"aerc-password" = {
owner = config.vyxos.vyxUser;
group = config.users.users.${config.vyxos.vyxUser}.group;
};
"charlottia-id_ed25519" = {
path = "/home/${config.vyxos.vyxUser}/.ssh/charlottia-id_ed25519";
owner = config.vyxos.vyxUser;
group = config.users.users.${config.vyxos.vyxUser}.group;
};
};
};
borg.enable = true;
};
home-manager.users.${config.vyxos.vyxUser} = {
accounts.email.accounts.asherah.passwordCommand = "cat ${config.vyxos.secrets.decrypted."aerc-password".path}";
home.file.".ssh/charlottia-id_ed25519.pub".source = ../sources/charlottia-id_ed25519.pub;
};
services.tailscale.enable = true;
services.comenzar.enable = true;
services.syncthing = {
enable = true;
user = config.vyxos.vyxUser;
dataDir = "/home/${config.vyxos.vyxUser}";
overrideDevices = true;
overrideFolders = true;
settings = {
devices = {
"seraphim" = {id = "6Y34MJE-RJ6Q35O-ZN3PXPA-3RWUUBM-YJLHCOD-NTN66LP-2JDA6OA-MMWWPAS";};
};
folders = {
"d" = {
id = "3arpa-gzuah";
path = "~/d";
devices = ["seraphim"];
ignorePerms = false;
};
"a" = {
id = "kvd7y-fmzxq";
path = "~/a";
devices = ["seraphim"];
ignorePerms = false;
};
"m" = {
id = "nwhuq-pzsym";
path = "~/m";
devices = ["seraphim"];
ignorePerms = false;
};
"t" = {
id = "zffxt-z9epq";
path = "~/t";
devices = ["seraphim"];
ignorePerms = false;
};
};
options.urAccepted = -1; # Disable telemetry.
};
};
# iCEBreaker and OrangeCrab(?).
services.udev.extraRules = ''
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0660", GROUP="dialout", TAG+="uaccess"
ATTRS{idVendor}=="0925", ATTRS{idProduct}=="3881", MODE="0660", GROUP="dialout", TAG+="uaccess"
'';
};
}