-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAtropos.nix
More file actions
253 lines (224 loc) · 6.91 KB
/
Copy pathAtropos.nix
File metadata and controls
253 lines (224 loc) · 6.91 KB
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# 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, inputs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware/Atropos-SSD-hardware.nix
# カテゴリーごとに整理されたモジュール
./module/NixOS/desktop
./module/NixOS/develop
./module/NixOS/system
./module/NixOS/apps
./module/NixOS/windows
./module/NixOS/input
];
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "nodev";
boot.loader.grub.useOSProber = true;
boot.loader.grub.efiSupport = true;
boot.loader.grub.efiInstallAsRemovable = true;
boot.loader.grub.theme = ./misc/Vimix;
# Ensure NVIDIA kernel modules are loaded early so the GPU has a driver
# bound to it. This helps avoid "driver (null)" and EGL/DRI errors.
boot.kernelModules = [ "kvm-intel" "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
# Explicitly set the DRM/KMS parameters so Wayland compositors can open the
# NTFS support
boot.supportedFilesystems = [ "ntfs" ];
security.sudo = {
enable = true;
extraRules = [
{
users = [ "inoyu" ];
commands = [
{
command = "ALL";
options = [ "NOPASSWD" ];
}
];
}
];
};
hardware.opengl = {
enable = true;
driSupport32Bit = true;
};
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = true; # Turing世代なので通常は proprietary driver
forceFullCompositionPipeline = true;
};
networking.hostName = "Atropos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = false;
networking.useNetworkd = true;
networking.interfaces."wlp3s0" = {
ipv4.addresses = [{
address = "192.168.10.10"; # 利便性のため静的IPを要求
prefixLength = 24;
}];
};
networking.defaultGateway = {
interface = "wlp3s0";
address = "192.168.10.1"; # おうちのルーターのアドレス
};
networking.nameservers = [ "8.8.8.8" "1.1.1.1" ];
networking = {
wireless.enable = true;
wireless.secretsFile = "/home/inoyu/secrets/wireless.conf"; # 中身は psk=おうちwifiのpassword
wireless.networks."aterm-b43571-a" = {
pskRaw = "ext:psk";
};
};
# Set your time zone.
time.timeZone = "Asia/Tokyo";
time.hardwareClockInLocalTime = true;
# Select internationalisation properties.
i18n.defaultLocale = "ja_JP.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "ja_JP.UTF-8";
LC_IDENTIFICATION = "ja_JP.UTF-8";
LC_MEASUREMENT = "ja_JP.UTF-8";
LC_MONETARY = "ja_JP.UTF-8";
LC_NAME = "ja_JP.UTF-8";
LC_NUMERIC = "ja_JP.UTF-8";
LC_PAPER = "ja_JP.UTF-8";
LC_TELEPHONE = "ja_JP.UTF-8";
LC_TIME = "ja_JP.UTF-8";
};
fonts = {
packages = with pkgs; [
noto-fonts-cjk-serif
noto-fonts-cjk-sans
noto-fonts-color-emoji
twitter-color-emoji
source-han-sans
source-han-serif
jetbrains-mono
hackgen-nf-font
nerd-fonts._0xproto
orbitron
rounded-mgenplus
];
fontDir.enable = true;
fontconfig = {
defaultFonts = {
serif = [
"Noto Serif CJK JP"
"Noto Color Emoji"
];
sansSerif = [
"Noto Sans CJK JP"
"Noto Color Emoji"
];
monospace = [
"HackGen Console NF"
"Noto Color Emoji"
];
emoji = [ "Noto Color Emoji" ];
};
};
};
# Configure keymap in X11
services.xserver.xkb = {
layout = "jp";
variant = "";
};
services.xserver.enable = true;
services.displayManager.gdm.enable = true;
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "inoyu";
programs.fish.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.inoyu = {
isNormalUser = true;
description = "Inoyu";
extraGroups = [ "networkmanager" "wheel" "docker" "storage"];
packages = with pkgs; [];
shell = pkgs.fish;
};
# Enable automatic login for the user.
services.getty.autologinUser = "inoyu";
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
eza
vulkan-tools
bat
ripgrep
zsh-powerlevel10k
sunshine
gcc
libgcc
gnumake
cmake
extra-cmake-modules
nvtopPackages.nvidia
pciutils
nodejs
alcom
];
services.openssh.enable = true;
services.tailscale.enable = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
programs = {
git = {
enable = true;
};
zsh = {
enable = true;
promptInit = ''
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
source $HOME/.p10k.zsh
'';
};
};
# Open ports in the firewall.
networking.firewall = {
enable = true;
allowedTCPPorts = [22 3389 47984 47989 47990 48010 ];
allowedUDPPortRanges = [
{ from = 47998; to = 48000; }
{ from = 8000; to = 8010; }
];
allowedUDPPorts = [config.services.tailscale.port 3389];
trustedInterfaces = ["tailscale0"];
};
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
nix = {
settings = {
experimental-features = ["nix-command" "flakes"];
substituters = ["https://hyprland.cachix.org"];
trusted-substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
};
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.05"; # Did you read the comment?
}