Commit Graph

53 Commits

Author SHA1 Message Date
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
48752f56b1
fix: use buildGoModule for netbird overlay
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-10-05 20:51:41 +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
3efee8e004
chore: update flake.lock
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-10-05 20:50:32 +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
87776a4867
chore: update flake.lock
* remove nixpkgs-immich

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-30 12:11:21 +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
6aefe6d33b
chore: update flake.lock
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-29 23:37:15 +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
d3fd3e2c57
fix: enable firewall on bicboye
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-29 23:28:13 +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
fe14cb6753
chore: unset iommu set to soft in kernelParams
This issue has been resolved with b65a4dbfcb

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-29 23:06:15 +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
92a41608af
flake: add hyprland input as comment
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-23 11:52:12 +05:30
8dc7bf18d3
chore: remove system76-scheduler and fix resume
* system76-scheduler was unused. Or it did not really make much of a difference
  over the default scheduler.
* added `iommu=soft` to kernel param to make the ssd work fine after suspend.
  This might be related to the pcie_aspm policy we had set before. I need to test
  if removing the aspm policy has fixed this issue.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-23 11:48:19 +05:30
ff91127e85
chore: disable check for updates in wezterm
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-23 11:43:29 +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
57ced606da
chore: set buildGoModule to go-1.23 for netbird
New netbird version requires go-1.23, and the patch to make
buildGoModules default to 1.23 is not yet in unstable

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-23 11:38:09 +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
e3b7f53837
chore: make firefox changes
* remove gnome theme configuration
* allow firefox to use document fonts intead of system fonts

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-23 11:29:45 +05:30
003c30efa3
chore: update flake.lock
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-22 16:45:47 +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
66e7dab5aa
chore: update netbird to 0.29.4
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-22 15:06:11 +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
10c26f143d
fix: switch to the latest testing kernel on thonkpad
The new Intel Core Ultra does not work that well with older kernel versions
especially since the initial support was added in 6.8. Currently, the testing
kernel is much more stable that the latest package on this processor.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-22 15:01:29 +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
49d65b9cb4
chore: cleanup thonkpad and use mesa git from chaotic/nyx
Trying out the experimental mesa drivers for the latest Intel Xe support on Wayland

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-22 14:58:24 +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
6e4c5f741b
chore: update flake lock
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-15 11:22:23 +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
381924aee1
feat: upgrade from thinkpad x1 9th-gen to 12th-gen
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-02 20:51:39 +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
8f4c7fe4cc
feat: add modules to bicboye
* change interface name from `enp6s0` to `enp2s0`
* add arr suite + ntfy deployment, monitoring
* add keys for ssh access
* add default_server configuration to nginx for security

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-02 19:19:09 +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
73cd391baf
chore: rekey agenix secrets, add grafana and unifi-unpoller
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-02 19:13:18 +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
ef02b8168d
feat: setup bicboye server on new hardware
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-02 19:08:33 +05:30