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