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-color-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 = {
166 networkmanager.enable = true;
167 nameservers = ["8.8.8.8" "8.8.4.4"];
168 };
169 # pipewire
170 services.pulseaudio.enable = false;
171 security.rtkit.enable = true;
172 services.pipewire = {
173 enable = true;
174 alsa.enable = true;
175 alsa.support32Bit = true;
176 pulse.enable = true;
177 # If you want to use JACK applications, uncomment this
178 #jack.enable = true;
179
180 # use the example session manager (no others are packaged yet so this is enabled by default,
181 # no need to redefine it in your config for now)
182 #media-session.enable = true;
183 };
184
185 hardware.graphics.enable = true;
186 services.xserver.videoDrivers = ["nvidia"];
187 hardware.nvidia = {
188 modesetting.enable = true;
189 powerManagement.enable = true;
190 powerManagement.finegrained = false;
191 open = false;
192 nvidiaSettings = true;
193
194 package = config.boot.kernelPackages.nvidiaPackages.latest;
195 };
196 hardware.opentabletdriver.enable = true;
197
198 services.ratbagd.enable = true;
199
200 services = {
201 syncthing = {
202 # enable = true;
203 openDefaultPorts = true;
204 settings = {
205 devices = {
206 "Bismuth" = { id = "HVYM6NR-CSG4XFD-6V76ABE-TFFXKSC-Q4NWO3R-ZPGAUBP-OSMVOGD-GCASDAT"; };
207 };
208 };
209 };
210 };
211 services.openssh = {
212 enable = true;
213 settings.PasswordAuthentication = false;
214 settings.KbdInteractiveAuthentication = false;
215 };
216
217 users.users."emily".openssh.authorizedKeys.keys = [
218 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBR3yUt3t1RB0QzRDBKtiY5P5gk+kCWr+7/cSVg2DO3"
219 ];
220
221 #################
222 # from sys/cli/ #
223 #################
224
225 environment.systemPackages = with pkgs; [
226 bat
227 btop
228 dua
229 figlet
230 git
231 htop
232 inputs'.agenix.packages.default
233 just
234 kitty
235 lolcat
236 p7zip
237 ripgrep
238 smartmontools
239 swayfx
240 tealdeer
241 tmux
242 tree
243 unzip
244 wget
245 wget
246 wofi
247 yazi
248 gocryptfs
249 ];
250
251 programs.neovim = {
252 enable = true;
253 configure = {
254 customRC = ''
255 nnoremap ; :
256 set number
257 set relativenumber
258 set expandtab
259 set shiftwidth=2
260 '';
261 };
262 viAlias = true;
263 vimAlias = true;
264 defaultEditor = true;
265 };
266
267 services.smartd.enable = true;
268}