Commit Graph

38 Commits

Author SHA1 Message Date
abb9050f0c
chore: remove default CSP and add CSP for immich
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-10-06 17:49:49 +05:30
8e6c452854
fix: use builtin.readFile for cloudflare IPs and add sha256
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-10-06 00:03:58 +05:30
164acc1042
fix: use correct module options for fail2ban
* ignoreIPs -> ignoreIP
* Add settings block to each jail

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-10-06 00:03:01 +05:30
6887ce0427
chore: replace vaapiIntel with intel-vaapi-driver
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-10-06 00:01:20 +05:30
a6805a4ddc
chore: upgrade default postgres to 16 and remove upgrade script
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-10-06 00:00:36 +05:30
4cb83f945d
feat: add fail2ban setup for services
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-10-05 21:00:53 +05:30
12cf2f3701
chore: harden ssh security
* KbdInteractiveAuthentication: disable keyboard interactive-auth, since
  we solely rely on the SSH key for connection.
* PermitEmptyPasswords: disable empty passwords for SSH connection, again,
  since we use SSH keys.
* Protocol: Explicitly set the SSH protocol to 2, even though it is the
  default value.
* MaxAuthTries: Set auth tries to 3. This is to allow up to 3 keys to try
  connection.
* ChallengeResponseAuthentication: We do not require a challenge-response
  setup.
* AllowTcpForwarding: Allows access to locally-running ports without having
  to expose them. Since all auth methods are disabled, we can enable this.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-10-05 20:53:47 +05:30
d4dc50237a
feat: create module for nginx and prepare for fail2ban setup
* create new module for nginx
* setup cloudflare real_ip_header forwarding for fail2ban setup
* add hsts, improve qualys score

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-10-05 20:52:11 +05:30
74310f5e34
feat: replace perl activation script with rust-based implementation
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-10-05 20:51:00 +05:30
653ee4e3b6
fix: use correct module name for backups
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-30 12:24:35 +05:30
e6068d34d5
fix: use correct variable for restic secrets
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-30 12:11:48 +05:30
d532eda109
feat: add service for postgresql with upgrade and backup
* replace per-app postgresql configuration with a single, global postgres
setup
* add backup configuration to backup using restic
* add cluster upgrade script based on the NixOS Manual:
  https://nixos.org/manual/nixos/stable/#module-services-postgres-upgrading

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-30 12:01:57 +05:30
1a54eab3fb
fix: pass lib to backup module and fixup backup configuration
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-30 11:16:19 +05:30
104d4b6c8d
chore: move lanzaboote to system module and remove nixpkgs-immich input
* lanzaboote is needed to evaluate nix configuration, even if it's not used
in the system.
* removed nixpkgs-immich since nixpkgs now has immich service

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-30 11:14:57 +05:30
40d4792bc8
feat: enable restic backup service for vaultwarden and paperless
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-30 01:17:54 +05:30
d32004c45a
feat: add module for immich service
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-29 23:32:15 +05:30
965aa6ecaf
chore: reduce boot configuration limit to 5
Setting it to 10 does not play well with srvos, since it uses lib.mkDefault
to set it to 10 as well. And anyways, we don't need 10 generations to show
up during the boot menu.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-29 23:26:04 +05:30
5b2cea38f9
feat: add module for ntfy service
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-29 23:24:14 +05:30
572982dc5f
chore: exclude additional kde packages
Added plasma-browser-integration to excludedPackages list.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-29 23:05:30 +05:30
3e7c636902
chore: add hyprland cachix substituters
It's 2024, who wants to build software on their own systems?

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-23 11:42:22 +05:30
b65a4dbfcb
chore: remove pcie_aspm policy
Umm, this is a hard one as to why it was added in the first place. I think
someone had told me about it, but it seems like it's not really required, and
not recommended to be run on systems that do not support it by default.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-23 11:41:01 +05:30
bd68ccda65
feat: add hyprland, gnome configurations and changes to default
* add gnome and hyprland base setup
* remove unused intel-ocl from graphics
* move xdg-portal configuration to desktop environments

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-23 11:34:09 +05:30
dfd6c1d42b
chore: reorganize desktop environment configuration
Cleanup existing desktop environment configuration to allow adding more
desktop environments with shared configs.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-22 16:45:32 +05:30
a6fc984ceb
fix: use ter-u28 as the tty font on initial boot
At least until this gets merged: https://github.com/NixOS/nixpkgs/pull/299456

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-22 15:03:02 +05:30
f2dcc81256
chore: remove intel video driver from xserver
Seems to be not required for the current setup.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-22 14:59:32 +05:30
25ecb1c367
chore: pin nix to 2.23
A security issue currently plagues nix_git package, along with some other issues cropping up
in the newer versions. So we'll stick to the last stable, bug-free nix version for a while.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-22 14:56:53 +05:30
11b0bf7522
fix: spell paperless environment variable correctly
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-15 11:22:36 +05:30
a2991e9ca8
chore: pass websocket connections to paperless
This is required for the document upload processing to successfully run.
Without this enabled, the document upload gets stuck on:

Upload complete, waiting...

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-04 02:15:28 +05:30
abdeb98f11
chore: change filename format for paperless
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-03 01:53:38 +05:30
37a10b7fe2
chore: remove unused iproute2 from netbird
Yet another failed experiment to check why netbird fails to connect after
suspending the system. Turns out none of this was needed after all.

All that was needed was to stop systemd from managing foreign routing policy
rules:

systemd.network.config.networkConfig.ManageForeignRoutingPolicyRules = false;

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-02 20:48:47 +05:30
b6931cbb9b
chore: remove profile sync daemon
Since we've moved to firefox profiles managed by nix, declaratively,
we do not need profile sync daemon.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-02 20:47:33 +05:30
7520c9a86d
fix: use correct ssh domain and port for gitea
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-02 19:18:38 +05:30
e6b20e5def
feat: refactor unifi-controller, add unifi-unpoller for monitoring
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-02 19:17:56 +05:30
f433953ebd
feat: add monitoring module for infrastructure
* VictoriaMetrics for polling/collecting metrics
* Grafana for UI
* Multiple prometheus-exporter modules for gathering data

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-02 19:16:01 +05:30
3408ceb62c
feat: add nix module for arr suite
Can finally deploy:
* Jellyfin
* Jellyseerr
* Radarr, Prowlarr, Sonarr, Bazarr
* QBitTorrent + VueTorrent

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-02 19:14:35 +05:30
711c1f9821
chore: use terminus for console font and remove kernel param
* Lat2-Terminus16 looks nice, not sure why I replaced it.
* Remove `udev.log_level=3` from the kernel param cmdline. This option
was added to test out plymouth on boot, which surprisingly seems to not
be working right now. Will revisit this later.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-02 19:09:28 +05:30
3ee3a05d61
chore: allow docker to use iptables
Had been removed to debug issues with netbird connectivity after suspend.
Can be added back since the issue is unrelated.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-02 19:05:15 +05:30
3a3a8afe30
feat: add nixos configuration based on snowfall-lib
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-02 18:31:19 +05:30