-
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
-
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
# Copyright 2025 Shota FUJI <pockawoooh@gmail.com>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#
# SPDX-License-Identifier: 0BSD
#
# NixOS module for queenbee, desktop machine (GMKtec EVO-T1)
{
config,
pkgs,
nixpkgs,
home-manager,
agenix,
disko,
...
}:
{
imports = [
agenix.nixosModules.default
disko.nixosModules.default
../../../hardwares/gmktec-evo-t1/disko.nix
../../../hardwares/gmktec-evo-t1/hardware-configuration.nix
../nixos/state-version.nix
../home-manager
../essentials
../shell
../hive
../wayland-desktop
];
config = {
boot = {
loader = {
timeout = 0;
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
plymouth = {
enable = true;
theme = "breeze";
};
# Enable "Silent boot"
# https://wiki.nixos.org/wiki/Plymouth
consoleLogLevel = 3;
initrd.verbose = false;
kernelParams = [
"quiet"
"udev.log_level=3"
"systemd.show_status=auto"
];
# Load graphics functionality early, otherwise Plymouth does not render.
initrd.availableKernelModules = [ "i915" ];
};
networking.hostName = "hive";
networking.firewall = {
allowPing = true;
allowedUDPPorts = [
# Plac's Roon Server discovery.
9003
];
};
time.timeZone = "Asia/Tokyo";
users.users = {
queenbee = {
uid = 1000;
isNormalUser = true;
extraGroups = [
"wheel"
"incus-admin"
];
};
};
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
publish.enable = true;
publish.userServices = true;
};
services.samba = {
enable = true;
openFirewall = true;
settings = {
global = {
workgroup = "WORKGROUP";
"server string" = "hive";
"netbios name" = "hive";
security = "user";
"hosts allow" = "localhost 127.0.0.1 fd33::0/64 192.168.0.0/16";
"hosts deny" = "0.0.0.0/0";
"guest account" = "nobody";
"access based share enum" = "yes";
"map to guest" = "Bad User";
# https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X
"vfs objects" = "fruit streams_xattr";
"fruit:metadata" = "stream";
"fruit:model" = "MacSamba";
"fruit:veto_appledouble" = "no";
"fruit:nfs_aces" = "no";
"fruit:wipe_intentionally_left_blank_rfork" = "yes";
"fruit:delete_empty_adfiles" = "yes";
"fruit:posix_rename" = "yes";
};
wg = {
path = "/home/queenbee/share/wg";
browseable = "yes";
"read only" = "no";
"guest ok" = "no";
"create mask" = "0644";
"directory mask" = "0755";
"valid users" = "queenbee";
};
};
};
services.openssh = {
enable = true;
settings = {
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
PasswordAuthentication = false;
};
hostKeys = [
{
type = "ed25519";
comment = "agenix";
path = "/etc/ssh/ssh_host_ed25519_key";
}
];
};
networking.wg-quick.interfaces.wg0 = {
address = [ "fd33::6/128" ];
privateKeyFile = config.age.secrets."queenbee/wireguard".path;
peers = [
{
publicKey = "ZMGOs3K8XZUQE8AzepNW380BZZVy1RcOgF+2/B/RUFI=";
allowedIPs = [ "fd33::/64" ];
endpoint = "[2400:8500:1302:1176:160:251:72:148]:60545";
}
];
};
home-manager.users.queenbee = {
imports = [ ../../hm/profiles/nixos-desktop.nix ];
config = {
home.file."share/wg/.keep".source = builtins.toFile "keep" "";
};
};
virtualisation.vmVariant = {
users.users.queenbee.initialPassword = "password";
};
age.secrets."queenbee/wireguard".file = ../../../secrets/queenbee/wireguard.age;
};
}