me like nix
1{
2 config,
3 pkgs,
4 inputs,
5 ...
6}:
7
8{
9 imports = [
10 # Include the results of the hardware scan.
11 ./hardware-configuration.nix
12 ];
13
14 nix.settings.experimental-features = [
15 "nix-command"
16 "flakes"
17 ];
18
19 # Bootloader.
20 boot.loader.systemd-boot.enable = true;
21 boot.loader.efi.canTouchEfiVariables = true;
22
23 # Use latest kernel.
24 boot.kernelPackages = pkgs.linuxPackages_latest;
25
26 networking.hostName = "nixos"; # Define your hostname.
27 # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
28
29 # Configure network proxy if necessary
30 # networking.proxy.default = "http://user:password@proxy:port/";
31 # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
32
33 # Enable networking
34 networking.networkmanager.enable = true;
35
36 # Set your time zone.
37 time.timeZone = "America/New_York";
38
39 # Select internationalisation properties.
40 i18n.defaultLocale = "en_US.UTF-8";
41
42 i18n.extraLocaleSettings = {
43 LC_ADDRESS = "en_US.UTF-8";
44 LC_IDENTIFICATION = "en_US.UTF-8";
45 LC_MEASUREMENT = "en_US.UTF-8";
46 LC_MONETARY = "en_US.UTF-8";
47 LC_NAME = "en_US.UTF-8";
48 LC_NUMERIC = "en_US.UTF-8";
49 LC_PAPER = "en_US.UTF-8";
50 LC_TELEPHONE = "en_US.UTF-8";
51 LC_TIME = "en_US.UTF-8";
52 };
53
54 programs.niri = {
55 enable = true;
56 package = pkgs.niri;
57 };
58
59 services.greetd = {
60 enable = true;
61 settings = {
62 default_session = {
63 command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd niri";
64 user = "greeter";
65 };
66 };
67 };
68
69 xdg.portal = {
70 enable = true;
71
72 # Specify the backends you want to use.
73 # The order matters, the first one is the primary.
74 extraPortals = with pkgs; [
75 xdg-desktop-portal-wlr
76 xdg-desktop-portal-gtk
77 ];
78 # Set the default portal for common interfaces.
79 # "wlr" is for wlroots-based compositors like niri.
80 # "gtk" is a fallback for file pickers and other things.
81 config.common.default = [
82 "wlr"
83 "gtk"
84 ];
85 };
86
87 # Enable CUPS to print documents.
88 services.printing.enable = true;
89
90 # Enable sound with pipewire.
91 services.pulseaudio.enable = false;
92 security.polkit.enable = true;
93 security.rtkit.enable = true;
94 services.pipewire = {
95 enable = true;
96 alsa.enable = true;
97 alsa.support32Bit = true;
98 pulse.enable = true;
99 # If you want to use JACK applications, uncomment this
100 #jack.enable = true;
101
102 # use the example session manager (no others are packaged yet so this is enabled by default,
103 # no need to redefine it in your config for now)
104 #media-session.enable = true;
105 };
106
107 services.udisks2.enable = true;
108
109 # Define a user account. Don't forget to set a password with ‘passwd’.
110 users.groups.storage = { };
111 users.users.sean = {
112 isNormalUser = true;
113 description = "Sean Aye";
114 extraGroups = [
115 "networkmanager"
116 "wheel"
117 "video"
118 "disk"
119 "storage"
120 ];
121 shell = pkgs.fish;
122 };
123
124 programs.fish.enable = true;
125 programs._1password.enable = true;
126 programs._1password-gui = {
127 enable = true;
128 polkitPolicyOwners = [ "sean" ];
129 };
130
131 programs.steam = {
132 enable = true;
133 };
134
135 # Allow unfree packages
136 nixpkgs.config.allowUnfree = true;
137
138 # List packages installed in system profile. To search, run:
139 # $ nix search wget
140 environment.systemPackages = with pkgs; [
141 git
142 wl-clipboard
143 ];
144 environment.variables = {
145 EDITOR = "hx";
146 VISUAL = "hx";
147 SUDO_EDITOR = "hx";
148 };
149
150 # List services that you want to enable:
151 nixarr = {
152 enable = true;
153 vpn = {
154 enable = true;
155 wgConf = "/data/wireguard.conf";
156 };
157
158 jellyfin = {
159 enable = true;
160 openFirewall = true;
161 };
162
163 transmission = {
164 enable = true;
165 vpn.enable = true;
166 };
167 sabnzbd = {
168 enable = true;
169 vpn.enable = true;
170 openFirewall = true;
171 };
172
173 prowlarr.enable = true;
174 radarr.enable = true;
175 sonarr.enable = true;
176 jellyseerr = {
177 enable = true;
178 openFirewall = true;
179 };
180
181 recyclarr = {
182 enable = true;
183 configuration = {
184 sonarr = {
185 series = {
186 base_url = "http://localhost:8989";
187 api_key = "!env_var SONARR_API_KEY";
188 quality_definition = {
189 type = "series";
190 };
191 delete_old_custom_formats = true;
192 custom_formats = [
193 {
194 trash_ids = [
195 "85c61753df5da1fb2aab6f2a47426b09" # BR-DISK
196 "9c11cd3f07101cdba90a2d81cf0e56b4" # LQ
197 ];
198 assign_scores_to = [
199 {
200 name = "WEB-DL (1080p)";
201 score = -10000;
202 }
203 ];
204 }
205 ];
206 };
207 };
208 radarr = {
209 movies = {
210 base_url = "http://localhost:7878";
211 api_key = "!env_var RADARR_API_KEY";
212 quality_definition = {
213 type = "movie";
214 };
215 delete_old_custom_formats = true;
216 custom_formats = [
217 {
218 trash_ids = [
219 "570bc9ebecd92723d2d21500f4be314c" # Remaster
220 "eca37840c13c6ef2dd0262b141a5482f" # 4K Remaster
221 ];
222 assign_scores_to = [
223 {
224 name = "HD Bluray + WEB";
225 score = 25;
226 }
227 ];
228 }
229 ];
230 };
231 };
232 };
233 };
234 };
235
236 # Enable the OpenSSH daemon.
237 # services.openssh.enable = true;
238
239 # Open ports in the firewall.
240 networking.firewall.allowedTCPPorts = [
241 8096
242 5055
243 ];
244 networking.firewall.allowedUDPPorts = [
245 8096
246 5055
247 ];
248 # Or disable the firewall altogether.
249 # networking.firewall.enable = false;
250
251 # This value determines the NixOS release from which the default
252 # settings for stateful data, like file locations and database versions
253 # on your system were taken. It‘s perfectly fine and recommended to leave
254 # this value at the release version of the first install of this system.
255 # Before changing this value read the documentation for this option
256 # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
257 system.stateVersion = "25.05"; # Did you read the comment?
258
259}