Personal NixOS flake
1# Edit this configuration file to define what should be installed on
2# your system. Help is available in the configuration.nix(5) man page
3# and in the NixOS manual (accessible by running ‘nixos-help’).
4
5{ config, lib, pkgs, inputs', ... }:
6{
7 # Enable the X11 windowing system.
8 # You can disable this if you're only using the Wayland session.
9 services.xserver.enable = true;
10
11 # Enable the KDE Plasma Desktop Environment.
12 services.displayManager = {
13 sddm.enable = true;
14 defaultSession = "hyprland-uwsm";
15 };
16
17 services.desktopManager.plasma6.enable = true;
18
19 # Configure keymap in X11
20 services.xserver.xkb = {
21 layout = "us";
22 variant = "";
23 };
24
25 # Enable CUPS to print documents.
26 services.printing.enable = true;
27
28 # Enable touchpad support (enabled default in most desktopManager).
29 # services.xserver.libinput.enable = true;
30
31 # Define a user account. Don't forget to set a password with ‘passwd’.
32 users.users.emily = {
33 isNormalUser = true;
34 description = "Emily";
35 extraGroups = [ "networkmanager" "wheel" "docker"];
36 packages = with pkgs; [
37 kdePackages.kate
38 keepassxc
39 ];
40 };
41
42 # Install firefox.
43 programs.firefox.enable = true;
44
45 environment.shellAliases = {
46 nv = "nvim";
47 };
48
49
50 programs.steam = {
51 enable = true;
52 remotePlay.openFirewall = true;
53 dedicatedServer.openFirewall = true;
54 localNetworkGameTransfers.openFirewall = true;
55 #platformOptimizations.enable = true;
56 protontricks.enable = true;
57 extraCompatPackages = with pkgs; [
58 proton-ge-bin
59 ]
60 ;
61 };
62
63 # hyprland
64 programs.hyprland = {
65 enable = true;
66 withUWSM = true;
67 };
68 # Some programs need SUID wrappers, can be configured further or are
69 # started in user sessions.
70 # programs.mtr.enable = true;
71 # programs.gnupg.agent = {
72 # enable = true;
73 # enableSSHSupport = true;
74 # };
75
76 # List services that you want to enable:
77
78 # Enable the OpenSSH daemon.
79 # services.openssh.enable = true;
80
81 # Open ports in the firewall.
82 # networking.firewall.allowedTCPPorts = [ ... ];
83 # networking.firewall.allowedUDPPorts = [ ... ];
84 # Or disable the firewall altogether.
85 #networking.firewall.enable = false;
86
87 # This value determines the NixOS release from which the default
88 # settings for stateful data, like file locations and database versions
89 # on your system were taken. It‘s perfectly fine and recommended to leave
90 # this value at the release version of the first install of this system.
91 # Before changing this value read the documentation for this option
92 # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
93 system.stateVersion = "24.05"; # Did you read the comment?
94
95 fonts.packages = with pkgs; [
96 noto-fonts
97 noto-fonts-cjk-sans
98 noto-fonts-emoji
99 nasin-nanpa
100 nerd-fonts.fira-code
101 ];
102
103 nixpkgs.config = {
104 allowUnfree = true;
105 };
106
107 ########################
108 # from sys/default.nix #
109 ########################
110
111 nix = {
112 settings = {
113 experimental-features = ["nix-command" "flakes"];
114 trusted-users = ["root" "emily"];
115 substituters = [
116 "https://nix-community.cachix.org"
117 ];
118 trusted-public-keys = [
119 "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
120 ];
121 };
122 gc = {
123 automatic = true;
124 dates = "weekly";
125 options = "--delete-older-than 7d";
126 };
127 optimise = {
128 automatic = true;
129 dates = "weekly";
130 };
131 };
132
133 # time.timeZone = "America/New_York";
134
135 i18n = {
136 defaultLocale = "en_US.UTF-8";
137
138 extraLocaleSettings = {
139 LC_ADDRESS = "en_US.UTF-8";
140 LC_IDENTIFICATION = "en_US.UTF-8";
141 LC_MEASUREMENT = "en_US.UTF-8";
142 LC_MONETARY = "en_US.UTF-8";
143 LC_NAME = "en_US.UTF-8";
144 LC_NUMERIC = "en_US.UTF-8";
145 LC_PAPER = "en_US.UTF-8";
146 LC_TELEPHONE = "en_US.UTF-8";
147 LC_TIME = "en_US.UTF-8";
148
149 };
150 };
151
152 boot= {
153 loader = {
154 systemd-boot.enable = true;
155 efi.canTouchEfiVariables = true;
156 };
157
158 supportedFilesystems = [ "ntfs" ];
159 };
160
161
162 # feesh
163 programs.fish.enable = true;
164 users.defaultUserShell = pkgs.fish;
165 networking.networkmanager.enable = true;
166
167 # pipewire
168 services.pulseaudio.enable = false;
169 security.rtkit.enable = true;
170 services.pipewire = {
171 enable = true;
172 alsa.enable = true;
173 alsa.support32Bit = true;
174 pulse.enable = true;
175 # If you want to use JACK applications, uncomment this
176 #jack.enable = true;
177
178 # use the example session manager (no others are packaged yet so this is enabled by default,
179 # no need to redefine it in your config for now)
180 #media-session.enable = true;
181 };
182
183 hardware.graphics.enable = true;
184 services.xserver.videoDrivers = ["nvidia"];
185 hardware.nvidia = {
186 modesetting.enable = true;
187 powerManagement.enable = true;
188 powerManagement.finegrained = false;
189 open = false;
190 nvidiaSettings = true;
191
192 package = config.boot.kernelPackages.nvidiaPackages.latest;
193 };
194
195 services.ratbagd.enable = true;
196
197 services = {
198 syncthing = {
199 enable = true;
200 openDefaultPorts = true;
201 settings = {
202 gui = {
203 user = "emily";
204 password = "don'tfuuckingcommitthispasswordyoubsolutefool";
205 };
206
207 devices = {
208 "Bismuth" = { id = "HVYM6NR-CSG4XFD-6V76ABE-TFFXKSC-Q4NWO3R-ZPGAUBP-OSMVOGD-GCASDAT"; };
209 };
210 };
211 };
212 };
213 services.openssh = {
214 enable = true;
215 settings.PasswordAuthentication = false;
216 settings.KbdInteractiveAuthentication = false;
217 };
218
219 users.users."emily".openssh.authorizedKeys.keys = [
220 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBR3yUt3t1RB0QzRDBKtiY5P5gk+kCWr+7/cSVg2DO3"
221 ];
222
223 #################
224 # from sys/cli/ #
225 #################
226
227 environment.systemPackages = with pkgs; [
228 bat
229 btop
230 dua
231 figlet
232 git
233 htop
234 inputs'.agenix.packages.default
235 just
236 kitty
237 lolcat
238 p7zip
239 ripgrep
240 smartmontools
241 swayfx
242 tealdeer
243 tmux
244 tree
245 unzip
246 wget
247 wget
248 wofi
249 yazi
250 gocryptfs
251 ];
252
253 programs.neovim = {
254 enable = true;
255 configure = {
256 customRC = ''
257 nnoremap ; :
258 set number
259 set relativenumber
260 set expandtab
261 set shiftwidth=2
262 '';
263 };
264 viAlias = true;
265 vimAlias = true;
266 defaultEditor = true;
267 };
268
269 services.smartd.enable = true;
270}