Compare commits

..

86 Commits

Author SHA1 Message Date
tux
8a6ac1a533 feat(hosts): add zcode and persist state directories 2026-09-18 23:12:01 +05:30
tux
c009f2be73 chore: persist ly save.txt file 2026-09-18 20:33:04 +05:30
tux
8ef160a991 feat(hosts): add coder and persist coderv2 dir 2026-09-18 20:32:30 +05:30
tux
c179b45ac1 feat(services): add coder nixos module 2026-09-18 19:22:58 +05:30
tux
ac750098b1 feat(overlays): add davinci-resolve source override 2026-09-18 17:37:19 +05:30
tux
75ecf511e6 chore: update flake inputs 2026-09-18 17:35:47 +05:30
tux
e48e2903ac feat(desktop): update serpantinum configuration 2026-09-18 02:13:28 +05:30
tux
69882de18a feat(desktop): enable voxtype on-demand loading 2026-09-18 01:51:16 +05:30
tux
e1632cb506 feat(desktop): switch to brave-origin 2026-09-18 01:14:18 +05:30
tux
43b3be09e5 chore: persist claude, orca and gh dirs 2026-09-17 22:47:13 +05:30
tux
f960a5eb04 feat(sirius): add galaxy-buds-client 2026-09-17 21:55:09 +05:30
tux
23dfd5b998 feat(flake): add llm-agents input and packages 2026-09-17 21:54:02 +05:30
tux
2b3e4661b3 feat(packages): add omasnap 2026-09-17 21:31:29 +05:30
tux
cdce741599 chore: add .config/nix to persist dir 2026-09-17 16:52:01 +05:30
tux
e520cf6767 feat(opencode): add zai-coding-plan 2026-09-16 19:58:29 +05:30
tux
30e33cb768 feat(desktop): add agent settings to zed 2026-09-16 15:21:26 +05:30
tux
dc750c6bfe feat(config): switch default models to deepseek-v4.1 2026-09-16 15:20:59 +05:30
tux
80469632b1 feat(core): enable all terminfo 2026-09-16 12:48:45 +05:30
tux
9bb2e1f11d style(desktop): update cursor size 2026-09-15 14:37:35 +05:30
tux
3b9774a20d feat(desktop): add cursor trail to kitty 2026-09-15 05:39:48 +05:30
tux
932bf56972 docs: update README 2026-09-13 02:28:42 +05:30
tux
dedda22aea chore: add serpantinum to persist dir 2026-09-12 18:12:11 +05:30
tux
ef09a8a5d4 style(desktop): update kitty foreground color 2026-09-12 17:42:48 +05:30
tux
51c6925364 feat(shell): add hm-override script 2026-09-12 17:29:59 +05:30
tux
dbd2353273 feat(desktop): add kitty module 2026-09-12 17:18:06 +05:30
tux
b6aa11fb56 chore: update flake inputs 2026-09-11 06:43:14 +05:30
tux
f08e67c36e chore(flake): update trok and tfolio flake inputs 2026-09-11 06:43:03 +05:30
tux
bd977c0941 refactor(vicinae): update configuration and extensions 2026-09-11 04:23:47 +05:30
tux
e6ffe8698f refactor(distrobox): drop waydroid configuration 2026-09-11 02:35:04 +05:30
tux
ac3a0404bc feat(core): add nix-ld nixos module 2026-09-11 02:08:13 +05:30
tux
cba375a888 chore(vicinae): remove broken extensions 2026-09-11 02:06:54 +05:30
tux
acb825e1db feat(obs-studio): enable obs-advanced-masks plugin 2026-09-11 02:06:17 +05:30
tux
344d8bdd4a style: format code 2026-09-11 01:59:55 +05:30
tux
49a341d6b3 feat(serpantinum): enable idle configuration 2026-09-10 15:36:02 +05:30
tux
9c77654697 chore: add rustup to persist dir 2026-09-10 00:38:27 +05:30
tux
dacbe6bc24 chore: update tnvim flake input 2026-09-10 00:38:13 +05:30
tux
33a1e9da9c chore: add zed to persist dir 2026-09-10 00:13:56 +05:30
tux
c6b12d6ff9 feat(discord): enable extra plugins 2026-09-09 02:51:44 +05:30
tux
3f6fb2e504 chore: add serpantinum to persist dir 2026-09-08 23:46:03 +05:30
tux
8026816b8f Merge pull request #2 from tuxdotrs/dev
refactor modules and configurations following dendritic pattern
2026-09-08 16:47:29 +05:30
tux
060ecbe7da docs(readme): update host specifications and components 2026-09-08 16:35:07 +05:30
tux
a01bd43ec9 refactor(serpantinum): flatten right widgets list 2026-09-08 15:52:06 +05:30
tux
54049a60ec chore: update folio flake input 2026-09-08 15:49:16 +05:30
tux
30929f3a7b feat(services): add and enable tfolio module 2026-09-08 05:48:24 +05:30
tux
9f190436e9 chore: update trok flake input 2026-09-07 23:36:01 +05:30
tux
884dd188c3 feat(services): add and enable trok module 2026-09-07 20:39:58 +05:30
tux
ea526e6f88 refactor(shell): configure clean vim shell alias 2026-09-07 18:47:41 +05:30
tux
edb3678ddd feat: add serpantinum shell 2026-09-07 18:47:07 +05:30
tux
b87e0889e0 chore: update flake inputs 2026-09-04 16:16:07 +05:30
tux
7a7ba68016 feat(gaming): configure lutris 2026-09-03 16:25:34 +05:30
tux
4f5db036b6 chore(flake): switch nix-on-droid to upstream 2026-09-02 00:09:59 +05:30
tux
85fa1f78d0 chore(zsh): configure PATH and stui shortcut 2026-09-01 22:05:51 +05:30
tux
b578e3b462 feat: enable hyprland module 2026-09-01 21:56:34 +05:30
tux
d0c1416f16 feat(ai-harness): add ponytail plugin 2026-08-30 23:14:26 +05:30
tux
91942539d7 chore: update flake inputs 2026-08-30 23:06:50 +05:30
tux
40276742bb feat(ghostty): enable cursor shader animation 2026-08-24 21:14:15 +05:30
tux
915c30c804 feat(desktop): replace tpanel with tshell 2026-08-24 21:13:46 +05:30
tux
7f0d55c597 feat(opencode): add flake input and overlay 2026-08-22 16:58:23 +05:30
tux
ba22699df3 chore(hosts): add .bun to persist dir 2026-08-22 14:21:35 +05:30
tux
c9a56d4a22 chore: update tpanel flake input 2026-08-22 14:19:47 +05:30
tux
42e073ea63 chore: update flake inputs 2026-08-21 20:37:38 +05:30
tux
033007490f chore: update flake inputs 2026-08-19 00:54:36 +05:30
tux
9e2559b1b7 feat(hosts): add impala to system packages 2026-08-18 23:54:09 +05:30
tux
8c755a5aa1 feat(hosts): add voxtype to persist dir 2026-08-13 17:17:10 +05:30
tux
69c2254f00 feat(desktop): add voxtype module 2026-08-13 17:14:29 +05:30
tux
31f4218115 feat(audio): include alsa-utils and pavucontrol 2026-08-13 04:15:04 +05:30
tux
7614a68027 feat(arcturus): enable hermes-agent service 2026-08-12 20:51:18 +05:30
tux
c0a6af4e97 feat(services): add hermes-agent nixos module 2026-08-12 20:51:07 +05:30
tux
a522f73de5 refactor(flake): move hosts module to flake 2026-08-12 16:39:35 +05:30
tux
cc2766509e refactor(hosts): streamline host and node builders 2026-08-12 16:35:52 +05:30
tux
95cd68aac2 feat(arcturus): enable copyparty 2026-08-12 15:54:26 +05:30
tux
967b4f118b feat(services): add copyparty nixos module 2026-08-12 15:53:59 +05:30
tux
f0d42515c4 refactor: remove unused arguments 2026-08-12 05:42:52 +05:30
tux
f7a96f76f7 chore: update flake inputs 2026-08-12 05:34:24 +05:30
tux
ec2e9e0721 feat(hosts): add deploy-rs nodes and checks 2026-08-12 05:34:16 +05:30
tux
9269257065 feat(vega): add core system utilities 2026-08-12 03:50:02 +05:30
tux
8ec633a0f0 fix(droid): use custom nix-on-droid branch 2026-08-12 03:40:22 +05:30
tux
e48e2cda51 refactor(droid): rename module namespace to nixondroid 2026-08-12 03:38:23 +05:30
tux
fbd006ae4c refactor(hosts): scope networking to vega host 2026-08-11 21:08:50 +05:30
tux
67c44b336c refactor(hosts): consolidate host configurations 2026-08-11 20:45:37 +05:30
tux
93dcaeb05e feat(droid): add nix-on-droid support and vega host 2026-08-11 18:59:16 +05:30
tux
0f842359b3 chore: update flake inputs 2026-08-11 14:04:09 +05:30
tux
9e37341838 feat(sirius): enable cardwire service 2026-08-10 22:30:45 +05:30
tux
4b828d974f feat(canopus): replace supergfxd with cardwire 2026-08-10 21:59:03 +05:30
tux
cf52a84c81 fix(boot): ensure machine-id is persisted 2026-08-10 20:44:46 +05:30
tux
c5d8729a28 chore: update flake inputs 2026-08-10 02:57:21 +05:30
114 changed files with 4690 additions and 2985 deletions

208
README.md
View File

@@ -15,196 +15,48 @@
## Table of Contents ## Table of Contents
- [Hosts](#hosts) - [Hosts](#hosts)
- [Installation](#installation)
- [Components](#components) - [Components](#components)
- [Showcase](#showcase) - [Showcase](#showcase)
- [Pain](#spent-weeks-on-this-system-configuration-) - [Pain](#spent-months-on-this-system-configuration-)
## Hosts ## Hosts
| | Hostname | Board | CPU | RAM | GPU | Purpose | | | Hostname | Board | CPU | RAM | GPU | Purpose |
| --- | ---------- | ----------------- | ------------------ | ----- | ------------------------- | -------------------------------------------------------------------------------- | | --- | ---------- | ----------------- | ------------------ | ---- | ------------------------- | --------------------------------------------------------------------- |
| 🖥️ | `sirius` | MSI X570-A Pro | Ryzen 7 5700X3D | 64GB | RTX 3080 TI + RTX 3060 TI | Triple-monitor desktop running Windows Subsystem for Linux. | | 🖥️ | `sirius` | MSI X570-A Pro | Ryzen 7 5700X3D | 64GB | RTX 3080 TI + RTX 3060 TI | Triple-monitor desktop for work, gaming, and media consumption. |
| 💻 | `canopus` | Asus Zephyrus G15 | Ryzen 9 5900HS | 16GB | RTX 3060 | Optimized for productivity on the go and some gaming. | | 💻 | `canopus` | Asus Zephyrus G15 | Ryzen 9 5900HS | 16GB | RTX 3060 | Portable workstation for work, gaming, and media on the go. |
| ☁️ | `homelab` | Minisforum MS-A1 | Ryzen 7 8700G | 32GB | Radeon 780M | WIP | | ☁️ | `arcturus` | Minisforum MS-A1 | Ryzen 7 8700G | 32GB | Radeon 780M | Homelab server for self-hosted services and infrastructure workloads. |
| ☁️ | `arcturus` | KVM | 4 Core | 8GB | | Primary server responsible for exposing my homelab applications to the internet. | | ☁️ | `alpha` | KVM | 2 Core | 4GB | | Public-facing server for exposing homelab services to the internet. |
| ☁️ | `alpha` | KVM | 4 Core | 4GB | | Monitors uptime and health status of all services across the infrastructure. | | 📱 | `vega` | Samsung S25 Ultra | Snapdragon 8 Elite | 12GB | Adreno 830 | Primary mobile for daily usage. (Locked) |
| 🥔 | `vega` | Raspberry Pi 3B+ | Cortex A53 | 1GB | | Running AdGuard Home for network-wide ad blocking. | | 📱 | `capella` | Motorola Edge 30 | Snapdragon 778G+ | 8GB | Adreno 642L | Secondary mobile for tinkering and experimentation. (Rooted) |
| 📱 | `capella` | Samsung S25 Ultra | Snapdragon 8 Elite | 12GB | Adreno 830 | Primary mobile for daily usage. (Locked) |
| 📱 | `rigel` | Motorola Edge 30 | Snapdragon 778G+ | 8GB | Adreno 642L | Secondary mobile for some fun. (Rooted) |
| ☁️ | `node` | ASRock B565D4 | Ryzen 9 5950X | 128GB | | Running Ethereum and BSC nodes. |
## Installation
> [!NOTE]
> This will get your base system ready, but keep in mind that many things might not work correctly — such as monitor resolution, font size, and more.
### Prerequisites
Boot into the NixOS bootable USB before proceeding with the installation steps.
### Installation Steps
#### 1. Clone the repository
```bash
git clone https://github.com/tuxdotrs/nix-config.git
cd nix-config
```
#### 2. Gain root privileges
```bash
sudo su
```
#### 3. Set up disk partitioning
Install the required tools:
```bash
nix-shell -p disko neovim
```
Partition your disk using disko. **This will wipe your drive.** Replace `DISK_PATH` with your actual disk path (e.g., `/dev/vda` or `/dev/nvme0n1`):
```bash
disko --mode disko ./hosts/canopus/disko.nix --arg device '"DISK_PATH"'
```
#### 4. Configure your disk
Edit the configuration file:
```bash
nvim ./hosts/canopus/default.nix
```
In the imports statement, replace:
```nix
(import ./disko.nix {device = "/dev/nvme0n1";})
```
with:
```nix
(import ./disko.nix {device = "DISK_PATH";})
```
Make sure to replace `DISK_PATH` with your actual disk path.
#### 5. Generate hardware configuration
```bash
nixos-generate-config --no-filesystems --root /mnt
```
Copy the generated hardware configuration to the repository:
```bash
cp /mnt/etc/nixos/hardware-configuration.nix ./hosts/canopus/hardware.nix
```
#### 6. Install NixOS
```bash
nixos-install --root /mnt --flake .#canopus
```
#### 7. Enter into the new system
```bash
nixos-enter --root /mnt
```
#### 8. Set up directories and permissions
```bash
mkdir -p /persist/home
chown -R tux:users /persist/home
```
#### 9. Set passwords
Set the root password:
```bash
passwd root
```
Set the user password:
```bash
passwd tux
```
#### 10. Reboot
```bash
reboot
```
Your NixOS system should now boot into a beautiful DE.
## Components ## Components
| | Wayland | Xorg | | | Wayland | Xorg |
| ------------- | -------- | ---------------- | | ------------- | -------- | ---- |
| DM | ly | ly | | DM | ly | - |
| WM/DE | Hyprland | AwesomeWM | | WM/DE | Hyprland | - |
| Compositor | Hyprland | Picom (Jonaburg) | | Compositor | Hyprland | - |
| Bar | tPanel | Wibar | | Bar | Tshell | - |
| Hotkeys | Hyprland | Awful | | Hotkeys | Hyprland | - |
| Launcher | tPanel | Rofi | | Launcher | Tshell | - |
| Notifications | tPanel | Naughty | | Notifications | Tshell | - |
| Terminal | Wezterm | Wezterm | | Terminal | Wezterm | - |
| Editor | Neovim | Neovim | | Editor | Neovim | - |
## Showcase ## Showcase
### Desktop Hyprland | **Desktop** | **Tshell** |
| :-------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------: |
| <img src="https://raw.githubusercontent.com/tuxdotrs/nix-config/refs/heads/main/assets/hyprland/desktop.png" width="100%"> | <img src="https://raw.githubusercontent.com/tuxdotrs/nix-config/refs/heads/main/assets/hyprland/tPanel.png" width="100%"> |
| **Workflow** | **Neovim** |
| <img src="https://raw.githubusercontent.com/tuxdotrs/nix-config/refs/heads/main/assets/hyprland/workflow.png" width="100%"> | <img src="https://github.com/user-attachments/assets/f881c672-8d77-43ec-b637-df5004c7d11f" width="100%"> |
| **Floating Terminal** | **Lazygit** |
| <img src="https://github.com/user-attachments/assets/3339ecf8-3264-4179-a093-337c844592a6" width="100%"> | <img src="https://github.com/user-attachments/assets/6df15881-fc2b-41b1-af3b-124fe0599b94" width="100%"> |
| **Telescope** | **Firefox** |
| <img src="https://github.com/user-attachments/assets/03be05bc-8ede-4d6e-a341-2761d89b7288" width="100%"> | <img src="https://github.com/user-attachments/assets/6f12173b-2480-404e-b01a-599115a886c0" width="100%"> |
![Desktop](https://raw.githubusercontent.com/tuxdotrs/nix-config/refs/heads/main/assets/hyprland/desktop.png) ## Spent months on this system configuration 😢
### tPanel
![tPanel](https://raw.githubusercontent.com/tuxdotrs/nix-config/refs/heads/main/assets/hyprland/tPanel.png)
### Workflow
![Workflow](https://raw.githubusercontent.com/tuxdotrs/nix-config/refs/heads/main/assets/hyprland/workflow.png)
## Showcase
### Desktop AwesomeWM
![2024-08-08_18-33](https://github.com/user-attachments/assets/1cdcc387-0f68-486c-a76c-a36ad2acb78d)
![2024-08-08_18-18](https://github.com/user-attachments/assets/f3fc4da5-6c0d-4cda-934d-b68ca6494e02)
### Neovim
![2024-08-08_18-16](https://github.com/user-attachments/assets/f881c672-8d77-43ec-b637-df5004c7d11f)
### Floating Terminal
![2024-08-08_18-16_1](https://github.com/user-attachments/assets/3339ecf8-3264-4179-a093-337c844592a6)
### Lazygit
![2024-08-08_18-16_2](https://github.com/user-attachments/assets/6df15881-fc2b-41b1-af3b-124fe0599b94)
### Telescope
![2024-08-08_18-16_3](https://github.com/user-attachments/assets/03be05bc-8ede-4d6e-a341-2761d89b7288)
### Firefox
![2024-08-08_18-26](https://github.com/user-attachments/assets/6f12173b-2480-404e-b01a-599115a886c0)
## Spent weeks on this system configuration 😢
<div align="center"> <div align="center">
<img src="https://user-images.githubusercontent.com/97862450/265550523-2f66a8b6-4347-40af-89c6-12db3a61cc7c.jpeg" width="60%"> <img src="https://user-images.githubusercontent.com/97862450/265550523-2f66a8b6-4347-40af-89c6-12db3a61cc7c.jpeg" width="60%">

1525
flake.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{ {
description = "tux's nix configurations"; description = "tux's nix configurations";
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules); outputs = inputs: inputs.flake-parts.lib.mkFlake {inherit inputs;} (inputs.import-tree ./modules);
inputs = { inputs = {
flake-parts = { flake-parts = {
@@ -24,8 +24,18 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
tpanel = { tshell = {
url = "github:tuxdotrs/tpanel"; url = "github:tuxdotrs/tshell";
inputs.nixpkgs.follows = "nixpkgs";
};
trok = {
url = "github:tuxdotrs/trok";
inputs.nixpkgs.follows = "nixpkgs";
};
tfolio = {
url = "git+ssh://git@github.com/tuxdotrs/tfolio.git";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@@ -54,6 +64,17 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
cardwire = {
url = "github:opengamingcollective/cardwire";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-on-droid = {
url = "github:nix-community/nix-on-droid/master";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
import-tree.url = "github:vic/import-tree"; import-tree.url = "github:vic/import-tree";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11-small"; nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11-small";
@@ -68,5 +89,11 @@
nixcord.url = "github:kaylorben/nixcord"; nixcord.url = "github:kaylorben/nixcord";
nur.url = "github:nix-community/nur"; nur.url = "github:nix-community/nur";
lanzaboote.url = "github:nix-community/lanzaboote/v1.1.0"; lanzaboote.url = "github:nix-community/lanzaboote/v1.1.0";
copyparty.url = "github:9001/copyparty";
hermes-agent.url = "github:NousResearch/hermes-agent";
voxtype.url = "github:peteonrails/voxtype/v0.7.5";
opencode.url = "github:anomalyco/opencode";
serpantinum.url = "github:ilyamiro/serpantinum";
llm-agents.url = "github:numtide/llm-agents.nix";
}; };
} }

33
modules/droid/core/hm.nix Normal file
View File

@@ -0,0 +1,33 @@
{
inputs,
config,
...
}: {
flake.modules.nixOnDroid.core = {
hostName,
userName,
userEmail,
...
}: {
home-manager = {
backupFileExtension = "bak";
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit
inputs
hostName
userName
userEmail
;
};
config = {
imports = [
config.flake.modules.homeManager.shell
config.flake.modules.homeManager.${hostName}
];
};
};
};
}

View File

@@ -0,0 +1,7 @@
{
flake.modules.nixOnDroid.core = {
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
};
}

View File

@@ -0,0 +1,106 @@
{
flake.modules.nixOnDroid.networking = {
config,
lib,
pkgs,
...
}: let
# utility functions
concatLines = list: builtins.concatStringsSep "\n" list;
prefixLines = mapper: list: concatLines (map mapper list);
# could be put in the config
configPath = "ssh/sshd_config";
keysFolder = "/etc/ssh";
authorizedKeysFolder = "/etc/ssh/authorized_keys.d";
supportedKeysTypes = [
"rsa"
"ed25519"
];
sshd-start-bin = "sshd-start";
# real config
cfg = config.tnix.networking.openssh;
pathOfKeyOf = type: "${keysFolder}/ssh_host_${type}_key";
generateKeyOf = type: ''
${lib.getExe' pkgs.openssh "ssh-keygen"} \
-t "${type}" \
-f "${pathOfKeyOf type}" \
-N ""
'';
generateKeyWhenNeededOf = type: ''
if [ ! -f ${pathOfKeyOf type} ]; then
mkdir --parents ${keysFolder}
${generateKeyOf type}
fi
'';
sshd-start = pkgs.writeScriptBin sshd-start-bin ''
#!${pkgs.runtimeShell}
${prefixLines generateKeyWhenNeededOf supportedKeysTypes}
mkdir --parents "${authorizedKeysFolder}"
echo "${lib.concatStringsSep "\n" cfg.authorizedKeys}" > ${authorizedKeysFolder}/${config.user.userName}
echo "Starting sshd in non-daemonized way on port ${lib.concatMapStrings toString cfg.ports}"
${lib.getExe' pkgs.openssh "sshd"} \
-f "/etc/${configPath}" \
-D # don't detach into a daemon process
'';
in {
options.tnix.networking.openssh = {
enable = lib.mkEnableOption ''
Whether to enable the OpenSSH secure shell daemon, which
allows secure remote logins.
'';
ports = lib.mkOption {
type = lib.types.listOf lib.types.port;
default = [22];
description = ''
Specifies on which ports the SSH daemon listens.
'';
};
authorizedKeys = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
description = ''
Specify a list of public keys to be added to the authorized_keys file.
'';
};
};
config = lib.mkIf cfg.enable {
environment.etc = {
"${configPath}".text = ''
${prefixLines (port: "Port ${toString port}") cfg.ports}
AuthorizedKeysFile ${authorizedKeysFolder}/%u
LogLevel VERBOSE
'';
};
environment.packages = [
sshd-start
pkgs.openssh
];
build.activationAfter.sshd = ''
SERVER_PID=$(${lib.getExe' pkgs.procps "ps"} -a | ${lib.getExe' pkgs.toybox "grep"} sshd || true)
if [ -z "$SERVER_PID" ]; then
$DRY_RUN_CMD ${lib.getExe sshd-start}
fi
'';
};
};
}

View File

@@ -1,4 +1,3 @@
{ inputs, ... }: {inputs, ...}: {
{ imports = [inputs.flake-parts.flakeModules.modules];
imports = [ inputs.flake-parts.flakeModules.modules ];
} }

118
modules/flake/hosts.nix Normal file
View File

@@ -0,0 +1,118 @@
{
self,
inputs,
config,
...
}: let
mkNixOSHost = hostName: {
userName ? "tux",
userEmail ? "t@tux.rs",
system ? "x86_64-linux",
unstable ? true,
}: let
nixpkgs =
if unstable
then inputs.nixpkgs
else inputs.nixpkgs-stable;
in
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit
hostName
userName
userEmail
system
;
};
modules = [
config.flake.modules.nixos.core
config.flake.modules.nixos.${hostName}
];
};
mkDroidHost = hostName: {
userName ? "nix-on-droid",
userEmail ? "t@tux.rs",
system ? "aarch64-linux",
unstable ? true,
}: let
nixpkgs =
if unstable
then inputs.nixpkgs
else inputs.nixpkgs-stable;
in
inputs.nix-on-droid.lib.nixOnDroidConfiguration {
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
joypixels.acceptLicense = true;
};
overlays = builtins.attrValues inputs.self.overlays;
};
extraSpecialArgs = {
inherit
hostName
userName
userEmail
;
};
modules = [
config.flake.modules.nixOnDroid.core
config.flake.modules.nixOnDroid.${hostName}
];
};
mkNixOSNode = hostName: {system ? "x86_64-linux"}: {
hostname = hostName;
profiles.system = {
user = "root";
path = inputs.deploy-rs.lib.${system}.activate.nixos self.nixosConfigurations.${hostName};
};
};
activateNixOnDroid = system: configuration:
inputs.deploy-rs.lib.${system}.activate.custom configuration.activationPackage
"${configuration.activationPackage}/activate";
mkDroidNode = hostName: {system ? "aarch64-linux"}: {
hostname = hostName;
profiles.system = {
sshUser = "nix-on-droid";
user = "nix-on-droid";
magicRollback = true;
sshOpts = [
"-p"
"8033"
];
path = activateNixOnDroid system self.nixOnDroidConfigurations.${hostName};
};
};
in {
flake = {
nixosConfigurations = builtins.mapAttrs mkNixOSHost {
sirius = {};
canopus = {};
arcturus = {};
alpha = {};
vps = {};
};
nixOnDroidConfigurations = builtins.mapAttrs mkDroidHost {
vega = {};
};
deploy.nodes =
builtins.mapAttrs (hostName: _: mkNixOSNode hostName {}) self.nixosConfigurations
// builtins.mapAttrs (hostName: _: mkDroidNode hostName {}) self.nixOnDroidConfigurations;
};
perSystem = {
checks =
builtins.mapAttrs (
_: hostConfig: hostConfig.config.system.build.toplevel
)
self.nixosConfigurations;
};
}

View File

@@ -1,20 +1,32 @@
{ {inputs, ...}: {
inputs,
...
}:
{
flake.overlays = { flake.overlays = {
modifications = final: prev: { modifications = final: prev: {
omasnap = prev.callPackage ../../packages/omasnap.nix {};
tnvim = inputs.tnvim.packages.${prev.stdenv.hostPlatform.system}.default; tnvim = inputs.tnvim.packages.${prev.stdenv.hostPlatform.system}.default;
tpanel = inputs.tpanel.packages.${prev.stdenv.hostPlatform.system}.default; tshell = inputs.tshell.packages.${prev.stdenv.hostPlatform.system}.default;
trok = inputs.trok.packages.${prev.stdenv.hostPlatform.system}.default;
tfolio = inputs.tfolio.packages.${prev.stdenv.hostPlatform.system}.default;
cyber-tux = inputs.cyber-tux.packages.${prev.stdenv.hostPlatform.system}.default; cyber-tux = inputs.cyber-tux.packages.${prev.stdenv.hostPlatform.system}.default;
ags = inputs.tpanel.packages.${prev.stdenv.hostPlatform.system}.ags.default;
wezterm-git = inputs.wezterm-flake.packages.${prev.stdenv.hostPlatform.system}.default; wezterm-git = inputs.wezterm-flake.packages.${prev.stdenv.hostPlatform.system}.default;
hyprland-git = inputs.hyprland.packages.${prev.stdenv.hostPlatform.system}; hyprland-git = inputs.hyprland.packages.${prev.stdenv.hostPlatform.system};
awww = inputs.awww.packages.${prev.stdenv.hostPlatform.system}.awww; awww = inputs.awww.packages.${prev.stdenv.hostPlatform.system}.awww;
vicinae-extensions = inputs.vicinae-extensions.packages.${prev.stdenv.hostPlatform.system}; vicinae-extensions = inputs.vicinae-extensions.packages.${prev.stdenv.hostPlatform.system};
voxtype = inputs.voxtype.packages.${prev.stdenv.hostPlatform.system};
opencode-git = inputs.opencode.packages.${prev.stdenv.hostPlatform.system}.default;
nix-index-small = nix-index-small =
inputs.nix-index-database.packages.${prev.stdenv.hostPlatform.system}.nix-index-with-small-db; inputs.nix-index-database.packages.${prev.stdenv.hostPlatform.system}.nix-index-with-small-db;
davinci-resolve = prev.davinci-resolve.override {
runCommandLocal = name: env: cmd:
if prev.lib.hasSuffix "-src.zip" name
then
prev.runCommandLocal name (env
// {
outputHash = "sha256-+3SB32EHpH9/0hM3h8CrO6f7V4ZAmxUFh3P8m6QDeO0=";
})
cmd
else prev.runCommandLocal name env cmd;
};
}; };
stable-packages = final: _prev: { stable-packages = final: _prev: {
@@ -25,14 +37,18 @@
}; };
nur = inputs.nur.overlays.default; nur = inputs.nur.overlays.default;
copyparty = inputs.copyparty.overlays.default;
llm-agents = inputs.llm-agents.overlays.shared-nixpkgs;
}; };
perSystem = perSystem = {system, ...}: let
{ system, ... }: pkgs = import inputs.nixpkgs {
{ inherit system;
_module.args.pkgs = import inputs.nixpkgs { overlays = builtins.attrValues inputs.self.overlays;
inherit system;
overlays = builtins.attrValues inputs.self.overlays;
};
}; };
in {
_module.args.pkgs = pkgs;
packages.omasnap = pkgs.omasnap;
};
} }

View File

@@ -1,5 +1,4 @@
{ inputs, ... }: {inputs, ...}: {
{
imports = [ imports = [
inputs.treefmt-nix.flakeModule inputs.treefmt-nix.flakeModule
]; ];
@@ -9,7 +8,7 @@
projectRootFile = "flake.nix"; projectRootFile = "flake.nix";
flakeCheck = true; flakeCheck = true;
programs = { programs = {
nixfmt.enable = true; alejandra.enable = true;
}; };
}; };
}; };

View File

@@ -1,13 +1,11 @@
{ {
flake.modules.homeManager.core = flake.modules.homeManager.core = {userName, ...}: {
{ userName, ... }: programs.home-manager.enable = true;
{ systemd.user.startServices = "sd-switch";
programs.home-manager.enable = true;
systemd.user.startServices = "sd-switch";
home = { home = {
username = "${userName}"; username = "${userName}";
homeDirectory = "/home/${userName}"; homeDirectory = "/home/${userName}";
};
}; };
};
} }

View File

@@ -1,18 +1,15 @@
{ inputs, ... }: {inputs, ...}: {
{ flake.modules.homeManager.core = {
flake.modules.homeManager.core = lib,
{ osConfig ? {},
lib, ...
osConfig ? { }, }: {
... nixpkgs = lib.mkIf (!(osConfig.home-manager.useGlobalPkgs or false)) {
}: config = {
{ allowUnfree = true;
nixpkgs = lib.mkIf (!(osConfig.home-manager.useGlobalPkgs or false)) { joypixels.acceptLicense = true;
config = {
allowUnfree = true;
joypixels.acceptLicense = true;
};
overlays = builtins.attrValues inputs.self.overlays;
}; };
overlays = builtins.attrValues inputs.self.overlays;
}; };
};
} }

View File

@@ -1,38 +1,37 @@
{ {
flake.modules.homeManager.desktop = flake.modules.homeManager.desktop = {
{ pkgs,
pkgs, config,
config, ...
... }: let
}: configDir = "${config.xdg.configHome}/BraveSoftware/Brave-Origin";
let
configDir = "${config.xdg.configHome}/BraveSoftware/Brave-Browser";
extensionJson = ext: { extensionJson = ext: {
name = "${configDir}/External Extensions/${ext.id}.json"; name = "${configDir}/External Extensions/${ext.id}.json";
value.text = builtins.toJSON { value.text = builtins.toJSON {
external_update_url = "https://clients2.google.com/service/update2/crx"; external_update_url = "https://clients2.google.com/service/update2/crx";
};
}; };
extensions = [
{ id = "nkbihfbeogaeaoehlefnkodbefgpgknn"; } # Metamask
{ id = "gppongmhjkpfnbhagpmjfkannfbllamg"; } # Wappalyzer
{ id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden
{ id = "bfnaelmomeimhlpmgjnjophhpkkoljpa"; } # Phantom
{ id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; } # DarkReader
];
in
{
programs.chromium = {
enable = true;
package = pkgs.brave;
commandLineArgs = [
"--disable-features=WebRtcAllowInputVolumeAdjustment"
"--force-device-scale-factor=1.0"
];
};
home.file = builtins.listToAttrs (map extensionJson extensions);
}; };
extensions = [
{id = "nkbihfbeogaeaoehlefnkodbefgpgknn";} # Metamask
{id = "gppongmhjkpfnbhagpmjfkannfbllamg";} # Wappalyzer
{id = "nngceckbapebfimnlniiiahkandclblb";} # Bitwarden
{id = "bfnaelmomeimhlpmgjnjophhpkkoljpa";} # Phantom
{id = "eimadpbcbfnmbkopoojfekhnkhdbieeh";} # DarkReader
];
in {
programs.chromium = {
enable = true;
package = pkgs.brave-origin;
commandLineArgs = [
"--disable-features=WebRtcAllowInputVolumeAdjustment"
"--force-device-scale-factor=1.0"
];
};
home.packages = [pkgs.brave];
home.file = builtins.listToAttrs (map extensionJson extensions);
};
} }

View File

@@ -1,45 +1,58 @@
{ {
flake.modules.homeManager.desktop = flake.modules.homeManager.desktop = {
{ inputs, userName, ... }: inputs,
{ userName,
imports = [ ...
inputs.nixcord.homeModules.nixcord }: {
]; imports = [
inputs.nixcord.homeModules.nixcord
];
programs.nixcord = { programs.nixcord = {
enable = true; enable = true;
user = userName; user = userName;
discord.enable = false; discord.enable = false;
vesktop.enable = true; vesktop.enable = true;
config = { config = {
themeLinks = [ themeLinks = [
"https://raw.githubusercontent.com/refact0r/system24/refs/heads/main/archive/flavors/spotify-text.theme.css" "https://raw.githubusercontent.com/refact0r/system24/refs/heads/main/archive/flavors/spotify-text.theme.css"
]; ];
frameless = true; frameless = true;
plugins = { plugins = {
hideMedia.enable = true; hideMedia.enable = true;
ignoreActivities = { anonymiseFileNames.enable = true;
enable = true; copyFileContents.enable = true;
ignorePlaying = true; noTypingAnimation.enable = true;
ignoreWatching = true; readAllNotificationsButton.enable = true;
}; silentTyping.enable = true;
validUser.enable = true;
biggerStreamPreview.enable = true;
ignoreActivities = {
enable = true;
ignorePlaying = true;
ignoreWatching = true;
};
sortFriendRequests = {
enable = true;
showDates = true;
}; };
}; };
dorion = { };
theme = "dark"; dorion = {
zoom = "1.1"; theme = "dark";
blur = "acrylic"; zoom = "1.1";
sysTray = true; blur = "acrylic";
openOnStartup = true; sysTray = true;
autoClearCache = true; openOnStartup = true;
disableHardwareAccel = false; autoClearCache = true;
rpcServer = true; disableHardwareAccel = false;
rpcProcessScanner = true; rpcServer = true;
pushToTalk = true; rpcProcessScanner = true;
pushToTalkKeys = [ "RControl" ]; pushToTalk = true;
desktopNotifications = true; pushToTalkKeys = ["RControl"];
unreadBadge = true; desktopNotifications = true;
}; unreadBadge = true;
}; };
}; };
};
} }

View File

@@ -1,75 +1,73 @@
{ {
flake.modules.homeManager.desktop = flake.modules.homeManager.desktop = {
{ pkgs,
pkgs, userName,
userName, ...
... }: {
}: programs.firefox = {
{ enable = true;
programs.firefox = {
enable = true;
package = pkgs.firefox.override { package = pkgs.firefox.override {
extraPolicies = { extraPolicies = {
CaptivePortal = false; CaptivePortal = false;
DisableFirefoxStudies = true; DisableFirefoxStudies = true;
DisablePocket = true; DisablePocket = true;
DisableTelemetry = true; DisableTelemetry = true;
DisableFirefoxAccounts = false; DisableFirefoxAccounts = false;
NoDefaultBookmarks = true; NoDefaultBookmarks = true;
OfferToSaveLogins = false; OfferToSaveLogins = false;
OfferToSaveLoginsDefault = false; OfferToSaveLoginsDefault = false;
PasswordManagerEnabled = false; PasswordManagerEnabled = false;
FirefoxHome = { FirefoxHome = {
Search = true; Search = true;
Pocket = false; Pocket = false;
Snippets = false; Snippets = false;
TopSites = false; TopSites = false;
Highlights = false; Highlights = false;
};
UserMessaging = {
ExtensionRecommendations = false;
SkipOnboarding = true;
};
}; };
}; UserMessaging = {
ExtensionRecommendations = false;
profiles = { SkipOnboarding = true;
${userName} = {
id = 0;
name = "tux";
search = {
force = true;
default = "google";
};
settings = {
"general.smoothScroll" = true;
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
"layout.css.prefers-color-scheme.content-override" = 0;
"browser.compactmode.show" = true;
"browser.tabs.firefox-view" = false;
"browser.bookmarks.addedImportButton" = false;
"extensions.pocket.enabled" = false;
"browser.fullscreen.autohide" = false;
};
extraConfig = ''
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
user_pref("full-screen-api.ignore-widgets", true);
user_pref("media.ffmpeg.vaapi.enabled", true);
user_pref("media.rdd-vpx.enabled", true);
'';
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
facebook-container
metamask
darkreader
bitwarden
wappalyzer
clearurls
];
}; };
}; };
}; };
profiles = {
${userName} = {
id = 0;
name = "tux";
search = {
force = true;
default = "google";
};
settings = {
"general.smoothScroll" = true;
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
"layout.css.prefers-color-scheme.content-override" = 0;
"browser.compactmode.show" = true;
"browser.tabs.firefox-view" = false;
"browser.bookmarks.addedImportButton" = false;
"extensions.pocket.enabled" = false;
"browser.fullscreen.autohide" = false;
};
extraConfig = ''
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
user_pref("full-screen-api.ignore-widgets", true);
user_pref("media.ffmpeg.vaapi.enabled", true);
user_pref("media.rdd-vpx.enabled", true);
'';
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
facebook-container
metamask
darkreader
bitwarden
wappalyzer
clearurls
];
};
};
}; };
};
} }

View File

@@ -13,6 +13,8 @@
font-size = 12; font-size = 12;
font-family = "JetBrainsMono Nerd Font"; font-family = "JetBrainsMono Nerd Font";
theme = "poimandres"; theme = "poimandres";
custom-shader = "shaders/cursor_warp.glsl";
custom-shader-animation = "always";
}; };
themes = { themes = {

View File

@@ -1,40 +1,43 @@
{ {
flake.modules.homeManager.desktop = flake.modules.homeManager.desktop = {
{ config, pkgs, ... }: config,
{ pkgs,
# TODO: Hyprland 0.55 switched to Lua-based configuration. ...
# Until the Home Manager module is updated, we symlink our config instead. }: {
# TODO: Hyprland 0.55 switched to Lua-based configuration.
# wayland.windowManager.hyprland = { # HM module is updated but I'm too lazy at this point so we symlink our config instead.
# enable = true; wayland.windowManager.hyprland = {
# package = null; enable = true;
# portalPackage = null; package = null;
# xwayland.enable = true; portalPackage = null;
# systemd.variables = [ "--all" ]; xwayland.enable = true;
# }; configType = "hyprlang";
systemd.variables = ["--all"];
home.file = {
".config/hypr/config".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Projects/hypr/config";
".config/hypr/hyprland.lua".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Projects/hypr/hyprland.lua";
};
home.packages = with pkgs; [
ags
awww
grim
slurp
hyprshot
wl-clipboard
wl-screenrec
(writeShellScriptBin "hypr-screenshot" ''
hyprshot -m region -r ppm - | satty --filename -
'')
(writeShellScriptBin "hypr-screenrecord" ''
wl-screenrec -g "$(slurp)"
'')
];
}; };
home.file = {
".config/hypr/config".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Projects/hypr/config";
".config/hypr/hyprland.lua".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Projects/hypr/hyprland.lua";
};
home.packages = with pkgs; [
ags
awww
grim
slurp
hyprshot
wl-clipboard
wl-screenrec
omasnap
(writeShellScriptBin "hypr-screenshot" ''
hyprshot -m region -r ppm - | satty --filename -
'')
(writeShellScriptBin "hypr-screenrecord" ''
wl-screenrec -g "$(slurp)"
'')
];
};
} }

View File

@@ -0,0 +1,86 @@
{
flake.modules.homeManager.desktop = {pkgs, ...}: {
programs.kitty = {
enable = true;
package = pkgs.kitty;
font = {
name = "JetBrainsMono Nerd Font";
size = 12.0;
};
shellIntegration.enableZshIntegration = true;
settings = {
background_opacity = "1.0";
enable_audio_bell = false;
confirm_os_window_close = 0;
cursor_trail = 3;
# Window
window_padding_width = 10;
foreground = "#f1f1f1";
background = "#0f0f0f";
# Borders
active_border_color = "#3d59a1";
inactive_border_color = "#101014";
bell_border_color = "#fffac2";
# Colors
color0 = "#0f0f0f";
color8 = "#a6accd";
color1 = "#d0679d";
color9 = "#d0679d";
color2 = "#5de4c7";
color10 = "#5de4c7";
color3 = "#fffac2";
color11 = "#fffac2";
color4 = "#89ddff";
color12 = "#add7ff";
color5 = "#fcc5e9";
color13 = "#fae4fc";
color6 = "#add7ff";
color14 = "#89ddff";
color7 = "#ffffff";
color15 = "#ffffff";
# Cursor
cursor = "#ffffff";
cursor_text_color = "#0f0f0f";
# Selection
selection_foreground = "none";
selection_background = "#28344a";
# URLs
url_color = "#5de4c7";
# Tab bar
tab_bar_edge = "bottom";
tab_bar_style = "fade";
tab_fade = "1";
active_tab_foreground = "#3d59a1";
active_tab_background = "#16161e";
active_tab_font_style = "bold";
inactive_tab_foreground = "#787c99";
inactive_tab_background = "#16161e";
inactive_tab_font_style = "bold";
tab_bar_background = "#101014";
};
};
};
}

View File

@@ -1,25 +1,21 @@
{ inputs, ... }: {inputs, ...}: {
{ flake.modules.homeManager.desktop = {
flake.modules.homeManager.desktop = config,
{ pkgs,
config, lib,
pkgs, ...
lib, }:
... with lib; let
}:
with lib;
let
cfg = config.tnix.services.lan-mouse; cfg = config.tnix.services.lan-mouse;
in in {
{ imports = [inputs.lan-mouse.homeManagerModules.default];
imports = [ inputs.lan-mouse.homeManagerModules.default ];
options.tnix.services.lan-mouse = { options.tnix.services.lan-mouse = {
enable = mkEnableOption "Enable Lan-Mouse"; enable = mkEnableOption "Enable Lan-Mouse";
settings = mkOption { settings = mkOption {
type = (pkgs.formats.toml { }).type; type = (pkgs.formats.toml {}).type;
default = { }; default = {};
description = '' description = ''
TOML configuration for lan-mouse. TOML configuration for lan-mouse.
See <https://github.com/feschber/lan-mouse/> for available options. See <https://github.com/feschber/lan-mouse/> for available options.
@@ -28,7 +24,6 @@
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.lan-mouse = { programs.lan-mouse = {
enable = true; enable = true;
systemd = true; systemd = true;

View File

@@ -1,17 +1,13 @@
{ inputs, ... }: {inputs, ...}: {
{ flake.modules.homeManager.desktop = {
flake.modules.homeManager.desktop = config,
{ pkgs,
config, lib,
pkgs, ...
lib, }:
... with lib; let
}:
with lib;
let
cfg = config.tnix.desktop.mangowm; cfg = config.tnix.desktop.mangowm;
in in {
{
imports = [ imports = [
inputs.mango.hmModules.mango inputs.mango.hmModules.mango
]; ];
@@ -21,12 +17,12 @@
monitorRule = mkOption { monitorRule = mkOption {
type = with types; listOf str; type = with types; listOf str;
default = [ ]; default = [];
}; };
tagRule = mkOption { tagRule = mkOption {
type = with types; listOf str; type = with types; listOf str;
default = [ ]; default = [];
}; };
}; };

View File

@@ -1,24 +1,21 @@
{ {
flake.modules.homeManager.desktop = flake.modules.homeManager.desktop = {pkgs, ...}: {
{ pkgs, ... }: programs.mpv = {
{ enable = true;
programs.mpv = {
enable = true;
scripts = ( scripts = (
with pkgs.mpvScripts; with pkgs.mpvScripts; [
[ modernz
modernz thumbfast
thumbfast mpris
mpris mpv-image-viewer.image-positioning
mpv-image-viewer.image-positioning ]
] );
);
config = { config = {
osc = "no"; osc = "no";
border = "no"; border = "no";
};
}; };
}; };
};
} }

View File

@@ -0,0 +1,77 @@
{inputs, ...}: {
flake.modules.nixos.desktop = {
imports = [
inputs.serpantinum.nixosModules.default
];
programs.serpantinum.enable = true;
};
flake.modules.homeManager.desktop = {pkgs, ...}: {
imports = [
inputs.serpantinum.homeManagerModules.default
];
home.packages = with pkgs; [pulseaudioFull];
programs.serpantinum = {
enable = true;
systemd.enable = true;
settings = {
wallpaperDir = "/home/tux/Wallpapers";
general = {
language = "en";
weatherUnit = "metric";
weatherInterval = 30;
avatarPath = "/home/tux/Wallpapers/tux.png";
muteSfx = true;
};
bar = {
position = "top";
style = "modular";
time = {
format = "hh:mm:ss A";
};
width = 5;
workspaceCount = 7;
modules = {
left = [
"left"
"workspaces"
"sysmon"
"wifi"
];
center = ["vis"];
right = [
"media"
"vol"
"bat"
"tray"
"timedate"
];
};
};
theme = {
fontFamily = "JetBrains Mono SemiBold";
borderRadius = 12;
matugen = true;
};
notifications = {
dnd = false;
position = "top right";
sound = true;
};
idle = {
enabled = true;
manualInhibit = true;
};
};
};
};
}

View File

@@ -1,32 +1,30 @@
{ {
flake.modules.homeManager.desktop = flake.modules.homeManager.desktop = {pkgs, ...}: {
{ pkgs, ... }: home.pointerCursor = {
{ enable = true;
home.pointerCursor = { package = pkgs.bibata-cursors;
enable = true; name = "Bibata-Modern-Ice";
package = pkgs.bibata-cursors; size = 24;
name = "Bibata-Modern-Ice";
size = 28;
};
qt = {
enable = true;
style.name = "adwaita-dark";
};
gtk = {
enable = true;
theme = {
name = "adw-gtk3-dark";
package = pkgs.adw-gtk3;
};
iconTheme = {
package = pkgs.tela-icon-theme;
name = "Tela-black";
};
};
# Make GTK4/libadwaita apps prefer dark too (they ignore gtk.theme).
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
}; };
qt = {
enable = true;
style.name = "adwaita-dark";
};
gtk = {
enable = true;
theme = {
name = "adw-gtk3-dark";
package = pkgs.adw-gtk3;
};
iconTheme = {
package = pkgs.tela-icon-theme;
name = "Tela-black";
};
};
# Make GTK4/libadwaita apps prefer dark too (they ignore gtk.theme).
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
};
} }

View File

@@ -1,69 +1,60 @@
{ {
flake.modules.homeManager.desktop = flake.modules.homeManager.desktop = {pkgs, ...}: {
{ programs.vicinae = {
pkgs, enable = true;
... systemd = {
}:
{
programs.vicinae = {
enable = true; enable = true;
systemd = { autoStart = true;
enable = true; };
autoStart = true; useLayerShell = true;
extensions = with pkgs.vicinae-extensions; [
nix
ssh
awww-switcher
process-manager
pulseaudio
port-killer
];
settings = {
close_on_focus_loss = false;
consider_preedit = true;
pop_to_root_on_close = true;
favicon_service = "twenty";
search_files_in_root = true;
font = {
normal = {
size = 10;
family = "JetBrainsMono Nerd Font";
};
}; };
useLayerShell = true; theme = {
light = {
extensions = with pkgs.vicinae-extensions; [ name = "vicinae-light";
# @TODO broken in upstream repo icon_theme = "default";
# bluetooth
nix
ssh
awww-switcher
process-manager
pulseaudio
wifi-commander
port-killer
silverbullet
];
settings = {
close_on_focus_loss = true;
consider_preedit = true;
pop_to_root_on_close = true;
favicon_service = "twenty";
search_files_in_root = true;
font = {
normal = {
size = 10;
family = "JetBrainsMono Nerd Font";
};
}; };
theme = { dark = {
light = { name = "vicinae-dark";
name = "vicinae-light"; icon_theme = "default";
icon_theme = "default";
};
dark = {
name = "vicinae-dark";
icon_theme = "default";
};
};
launcher_window = {
opacity = 0.98;
}; };
};
launcher_window = {
opacity = 0.98;
};
imports = [ "/run/secrets/vicinae.json" ]; imports = ["/run/secrets/vicinae.json"];
providers = { providers = {
"@sovereign/vicinae-extension-awww-switcher-0" = { "@sovereign/vicinae-extension-awww-switcher-0" = {
"preferences" = { "preferences" = {
"transitionDuration" = "1"; "transitionDuration" = "1";
"transitionType" = "center"; "transitionType" = "center";
"wallpaperPath" = "/home/tux/Wallpapers/"; "wallpaperPath" = "/home/tux/Wallpapers/";
};
}; };
}; };
}; };
}; };
}; };
};
} }

View File

@@ -0,0 +1,26 @@
{inputs, ...}: {
flake.modules.homeManager.desktop = {pkgs, ...}: {
imports = [
inputs.voxtype.homeManagerModules.default
];
programs.voxtype = {
enable = true;
package = pkgs.voxtype.onnx-cuda;
engine = "parakeet";
model.path = "/home/tux/.local/share/voxtype/models/parakeet-tdt-0.6b-v3";
service.enable = true;
settings = {
hotkey.enabled = false;
whisper = {
language = "en";
on_demand_loading = true;
};
parakeet = {
on_demand_loading = true;
};
};
};
};
}

View File

@@ -1,33 +1,31 @@
{ {
flake.modules.homeManager.desktop = flake.modules.homeManager.desktop = {pkgs, ...}: {
{ pkgs, ... }: programs.wezterm = {
{ enable = true;
programs.wezterm = { package = pkgs.wezterm-git;
enable = true; enableZshIntegration = false;
package = pkgs.wezterm-git;
enableZshIntegration = false;
extraConfig = '' extraConfig = ''
local wezterm = require 'wezterm' local wezterm = require 'wezterm'
local config = {} local config = {}
config.check_for_updates = false config.check_for_updates = false
config.window_close_confirmation = 'NeverPrompt' config.window_close_confirmation = 'NeverPrompt'
config.color_scheme = 'Poimandres' config.color_scheme = 'Poimandres'
config.colors = { config.colors = {
background = "#0f0f0f" background = "#0f0f0f"
} }
config.enable_tab_bar = false config.enable_tab_bar = false
config.font = wezterm.font_with_fallback { config.font = wezterm.font_with_fallback {
'JetBrainsMono Nerd Font', 'JetBrainsMono Nerd Font',
} }
config.font_size = 12.0 config.font_size = 12.0
config.window_background_opacity = 1 config.window_background_opacity = 1
config.audible_bell = "Disabled" config.audible_bell = "Disabled"
return config return config
''; '';
};
}; };
};
} }

View File

@@ -29,6 +29,25 @@
diagnostics = false; diagnostics = false;
metrics = false; metrics = false;
}; };
agent = {
dock = "right";
favorite_models = [];
model_parameters = [];
};
collaboration_panel = {
button = false;
};
agent_servers = {
opencode = {
default_config_options = {
model = "opencode-go/deepseek-v4.1-flash";
};
type = "registry";
};
};
}; };
}; };
}; };

View File

@@ -0,0 +1,8 @@
{
flake.modules.homeManager.desktop = {osConfig, ...}: {
programs.lutris = {
enable = true;
steamPackage = osConfig.programs.steam.package;
};
};
}

View File

@@ -1,27 +1,25 @@
{ {
flake.modules.homeManager.shell = flake.modules.homeManager.shell = {
{ userName,
userName, userEmail,
userEmail, ...
... }: {
}: programs.git = {
{ enable = true;
programs.git = { signing = {
enable = true; key = "~/.ssh/id_ed25519.pub";
signing = { signByDefault = true;
key = "~/.ssh/id_ed25519.pub"; };
signByDefault = true; lfs.enable = true;
}; settings = {
lfs.enable = true; user = {
settings = { name = "${userName}";
user = { email = "${userEmail}";
name = "${userName}";
email = "${userEmail}";
};
init.defaultBranch = "main";
commit.gpgSign = true;
gpg.format = "ssh";
}; };
init.defaultBranch = "main";
commit.gpgSign = true;
gpg.format = "ssh";
}; };
}; };
};
} }

View File

@@ -0,0 +1,7 @@
{
flake.modules.homeManager.shell = {
programs.gh = {
enable = true;
};
};
}

View File

@@ -1,16 +1,86 @@
{ {
flake.modules.homeManager.shell = flake.modules.homeManager.shell = {pkgs, ...}: {
{ pkgs, ... }: home.packages = with pkgs; [
{ systemctl-tui
home.packages = with pkgs; [ zip
systemctl-tui unzip
zip pciutils
unzip usbutils
pciutils jq
usbutils dig
jq lsof
dig trok
lsof
]; (writeShellScriptBin "hm-override" ''
}; #!/usr/bin/env bash
set -euo pipefail
usage() {
echo "Usage:"
echo " $0 <filename> Override symlink"
echo " $0 <filename> --restore Restore symlink"
echo " $0 <filename> -r Restore symlink"
exit 1
}
if [[ $# -lt 1 || $# -gt 2 ]]; then
usage
fi
FILE="$1"
LINK_BACKUP="''${FILE}.backup-link"
# Restore
if [[ "''${2:-}" == "--restore" || "''${2:-}" == "-r" ]]; then
if [[ ! -f "$LINK_BACKUP" ]]; then
echo "Error: no backup symlink found: $LINK_BACKUP"
exit 1
fi
TARGET="$(cat "$LINK_BACKUP")"
# Remove the temporary override.
rm -f "$FILE"
# Restore the original symlink.
ln -s "$TARGET" "$FILE"
# Remove the temporary symlink target backup.
rm "$LINK_BACKUP"
echo "Restored: $FILE -> $TARGET"
exit 0
fi
# Override mode
if [[ ! -L "$FILE" ]]; then
echo "Error: $FILE is not a symlink"
exit 1
fi
if [[ -e "$LINK_BACKUP" ]]; then
echo "Error: backup already exists: $LINK_BACKUP"
echo "Restore the existing override before running again."
exit 1
fi
# Remember the original symlink target.
TARGET="$(readlink "$FILE")"
printf '%s\n' "$TARGET" > "$LINK_BACKUP"
# Copy the contents before removing the symlink.
cp "$FILE" "$FILE.tmp"
# Replace the symlink with a regular writable file.
rm "$FILE"
mv "$FILE.tmp" "$FILE"
chmod u+w "$FILE"
echo "Overridden: $FILE"
echo "Original: $FILE -> $TARGET"
'')
];
};
} }

View File

@@ -1,42 +1,38 @@
{ {
flake.modules.homeManager.shell = flake.modules.homeManager.shell = {pkgs, ...}: {
{ pkgs, ... }: home.file = {
{ ".config/nvim" = {
home.file = { recursive = true;
".config/nvim" = { source = "${pkgs.tnvim}";
recursive = true;
source = "${pkgs.tnvim}";
};
};
programs = {
neovim = {
enable = true;
defaultEditor = true;
};
vim.enable = true;
};
home = {
packages = with pkgs; [
python3
nodejs
bun
pnpm
go
rustup
typescript
neovide
nil
statix
deadnix
alejandra
luarocks
gdu
gcc
wakatime-cli
];
}; };
}; };
programs = {
neovim = {
enable = true;
defaultEditor = true;
};
};
home = {
packages = with pkgs; [
python3
nodejs
bun
pnpm
go
rustup
typescript
neovide
nil
statix
deadnix
alejandra
luarocks
gdu
gcc
wakatime-cli
];
};
};
} }

View File

@@ -1,12 +1,13 @@
{ {
flake.modules.homeManager.shell = { flake.modules.homeManager.shell = {pkgs, ...}: {
programs.opencode = { programs.opencode = {
enable = true; enable = true;
package = pkgs.opencode-git;
tui = { tui = {
theme = "system"; theme = "system";
}; };
settings = { settings = {
model = "opencode-go/kimi-k3"; model = "opencode-go/deepseek-v4.1-flash";
provider = { provider = {
google = { google = {
options = { options = {
@@ -23,7 +24,13 @@
apiKey = "{file:/run/secrets/opencode-go-api-key}"; apiKey = "{file:/run/secrets/opencode-go-api-key}";
}; };
}; };
zai-coding-plan = {
options = {
apiKey = "{file:/run/secrets/zai-coding-plan-api-key}";
};
};
}; };
plugin = ["@dietrichgebert/ponytail"];
}; };
}; };
}; };

View File

@@ -1,155 +1,138 @@
{ {
flake.modules.homeManager.shell = flake.modules.homeManager.shell = {pkgs, ...}: let
{ pkgs, ... }: bg = "default";
let fg = "default";
bg = "default"; bg2 = "brightblack";
fg = "default"; fg2 = "white";
bg2 = "brightblack"; color = c: "#{@${c}}";
fg2 = "white";
color = c: "#{@${c}}";
indicator = indicator = let
let accent = color "indicator_color";
accent = color "indicator_color"; content = " ";
content = " "; in "#[reverse,fg=${accent}]#{?client_prefix,${content},}";
in
"#[reverse,fg=${accent}]#{?client_prefix,${content},}";
current_window = current_window = let
let accent = color "main_accent";
accent = color "main_accent"; index = "#[reverse,fg=${accent},bg=${fg}] #I ";
index = "#[reverse,fg=${accent},bg=${fg}] #I "; name = "#[fg=${bg2},bg=${fg2}] #W ";
name = "#[fg=${bg2},bg=${fg2}] #W "; # flags = "#{?window_flags,#{window_flags}, }";
# flags = "#{?window_flags,#{window_flags}, }"; in "${index}${name}";
in
"${index}${name}";
window_status = window_status = let
let accent = color "window_color";
accent = color "window_color"; index = "#[reverse,fg=${accent},bg=${fg}] #I ";
index = "#[reverse,fg=${accent},bg=${fg}] #I "; name = "#[fg=${bg2},bg=${fg2}] #W ";
name = "#[fg=${bg2},bg=${fg2}] #W "; # flags = "#{?window_flags,#{window_flags}, }";
# flags = "#{?window_flags,#{window_flags}, }"; in "${index}${name}";
in
"${index}${name}";
battery = battery = let
let percentage = pkgs.writeShellScript "percentage" (
percentage = pkgs.writeShellScript "percentage" ( if pkgs.stdenv.isDarwin
if pkgs.stdenv.isDarwin then then ''
'' echo $(pmset -g batt | grep -o "[0-9]\+%" | tr '%' ' ')
echo $(pmset -g batt | grep -o "[0-9]\+%" | tr '%' ' ') ''
'' else ''
else path="/org/freedesktop/UPower/devices/DisplayDevice"
'' echo $(${pkgs.upower}/bin/upower -i $path | grep -o "[0-9]\+%" | tr '%' ' ')
path="/org/freedesktop/UPower/devices/DisplayDevice" ''
echo $(${pkgs.upower}/bin/upower -i $path | grep -o "[0-9]\+%" | tr '%' ' ') );
'' state = pkgs.writeShellScript "state" (
); if pkgs.stdenv.isDarwin
state = pkgs.writeShellScript "state" ( then ''
if pkgs.stdenv.isDarwin then echo $(pmset -g batt | awk '{print $4}')
'' ''
echo $(pmset -g batt | awk '{print $4}') else ''
'' path="/org/freedesktop/UPower/devices/DisplayDevice"
else echo $(${pkgs.upower}/bin/upower -i $path | grep state | awk '{print $2}')
'' ''
path="/org/freedesktop/UPower/devices/DisplayDevice" );
echo $(${pkgs.upower}/bin/upower -i $path | grep state | awk '{print $2}') icon = pkgs.writeShellScript "icon" ''
'' percentage=$(${percentage})
); state=$(${state})
icon = pkgs.writeShellScript "icon" '' if [ "$state" == "charging" ] || [ "$state" == "fully-charged" ]; then echo "󰂄"
percentage=$(${percentage}) elif [ $percentage -ge 75 ]; then echo "󱊣"
state=$(${state}) elif [ $percentage -ge 50 ]; then echo "󱊢"
if [ "$state" == "charging" ] || [ "$state" == "fully-charged" ]; then echo "󰂄" elif [ $percentage -ge 25 ]; then echo "󱊡"
elif [ $percentage -ge 75 ]; then echo "󱊣" elif [ $percentage -ge 0 ]; then echo "󰂎"
elif [ $percentage -ge 50 ]; then echo "󱊢" fi
elif [ $percentage -ge 25 ]; then echo "󱊡" '';
elif [ $percentage -ge 0 ]; then echo "󰂎" color = pkgs.writeShellScript "color" ''
fi percentage=$(${percentage})
''; state=$(${state})
color = pkgs.writeShellScript "color" '' if [ "$state" == "charging" ] || [ "$state" == "fully-charged" ]; then echo "green"
percentage=$(${percentage}) elif [ $percentage -ge 75 ]; then echo "green"
state=$(${state}) elif [ $percentage -ge 50 ]; then echo "${fg2}"
if [ "$state" == "charging" ] || [ "$state" == "fully-charged" ]; then echo "green" elif [ $percentage -ge 30 ]; then echo "yellow"
elif [ $percentage -ge 75 ]; then echo "green" elif [ $percentage -ge 0 ]; then echo "red"
elif [ $percentage -ge 50 ]; then echo "${fg2}" fi
elif [ $percentage -ge 30 ]; then echo "yellow" '';
elif [ $percentage -ge 0 ]; then echo "red" in "#[fg=#(${color})]#(${icon}) #[fg=${fg}]#(${percentage})%";
fi
'';
in
"#[fg=#(${color})]#(${icon}) #[fg=${fg}]#(${percentage})%";
pwd = pwd = let
let accent = color "main_accent";
accent = color "main_accent"; icon = "#[fg=${accent}] ";
icon = "#[fg=${accent}] "; format = "#[fg=${fg}]#{b:pane_current_path}";
format = "#[fg=${fg}]#{b:pane_current_path}"; in "${icon}${format}";
in
"${icon}${format}";
git = git = let
let icon = pkgs.writeShellScript "branch" ''
icon = pkgs.writeShellScript "branch" '' git -C "$1" branch && echo " "
git -C "$1" branch && echo " " '';
''; branch = pkgs.writeShellScript "branch" ''
branch = pkgs.writeShellScript "branch" '' git -C "$1" rev-parse --abbrev-ref HEAD
git -C "$1" rev-parse --abbrev-ref HEAD '';
''; in "#[fg=magenta]#(${icon} #{pane_current_path})#(${branch} #{pane_current_path})";
in
"#[fg=magenta]#(${icon} #{pane_current_path})#(${branch} #{pane_current_path})";
separator = "#[fg=${fg}]|"; separator = "#[fg=${fg}]|";
in in {
{ programs.tmux = {
programs.tmux = { enable = true;
enable = true; baseIndex = 1;
baseIndex = 1; escapeTime = 0;
escapeTime = 0; mouse = true;
mouse = true; extraConfig = ''
extraConfig = '' set-option -sa terminal-overrides ",xterm*:Tc"
set-option -sa terminal-overrides ",xterm*:Tc" set-option -g status-position top
set-option -g status-position top unbind r
unbind r bind r source-file ~/.config/tmux/tmux.conf
bind r source-file ~/.config/tmux/tmux.conf
# remap prefix from C-b to C-Space # remap prefix from C-b to C-Space
# unbind C-b # unbind C-b
# set -g prefix C-Space # set -g prefix C-Space
# bind C-Space send-prefix # bind C-Space send-prefix
# split panes using | and - # split panes using | and -
unbind '"' unbind '"'
unbind % unbind %
bind | split-window -h bind | split-window -h
bind - split-window -v bind - split-window -v
# Start windows and panes at 1, not 0 # Start windows and panes at 1, not 0
set -g base-index 1 set -g base-index 1
set -g pane-base-index 1 set -g pane-base-index 1
set-window-option -g pane-base-index 1 set-window-option -g pane-base-index 1
set-option -g renumber-windows on set-option -g renumber-windows on
# switch panes using Alt-arrow without prefix # switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L bind -n M-Left select-pane -L
bind -n M-Right select-pane -R bind -n M-Right select-pane -R
bind -n M-Up select-pane -U bind -n M-Up select-pane -U
bind -n M-Down select-pane -D bind -n M-Down select-pane -D
set-option -g default-terminal "screen-256color" set-option -g default-terminal "screen-256color"
set-option -g status-right-length 100 set-option -g status-right-length 100
set-option -g @indicator_color "yellow" set-option -g @indicator_color "yellow"
set-option -g @window_color "magenta" set-option -g @window_color "magenta"
set-option -g @main_accent "blue" set-option -g @main_accent "blue"
set-option -g pane-active-border fg=black set-option -g pane-active-border fg=black
set-option -g pane-border-style fg=black set-option -g pane-border-style fg=black
set-option -g status-style "bg=${bg} fg=${fg}" set-option -g status-style "bg=${bg} fg=${fg}"
set-option -g status-left "${indicator}" set-option -g status-left "${indicator}"
set-option -g status-right "${git} ${pwd} ${separator} ${battery}" set-option -g status-right "${git} ${pwd} ${separator} ${battery}"
set-option -g window-status-current-format "${current_window}" set-option -g window-status-current-format "${current_window}"
set-option -g window-status-format "${window_status}" set-option -g window-status-format "${window_status}"
set-option -g window-status-separator "" set-option -g window-status-separator ""
''; '';
};
}; };
};
} }

View File

@@ -2,7 +2,7 @@
flake.modules.homeManager.shell = { flake.modules.homeManager.shell = {
programs.zoxide = { programs.zoxide = {
enable = true; enable = true;
options = [ "--cmd cd" ]; options = ["--cmd cd"];
enableZshIntegration = true; enableZshIntegration = true;
}; };
}; };

View File

@@ -1,27 +1,28 @@
{ lib, ... }: {lib, ...}: {
{ flake.modules.homeManager.shell = {pkgs, ...}: {
flake.modules.homeManager.shell = programs.zsh = {
{ pkgs, ... }: enable = true;
{ history = {
programs.zsh = { append = true;
enable = true; share = true;
history = { expireDuplicatesFirst = true;
append = true; ignoreDups = true;
share = true; size = 1000000;
expireDuplicatesFirst = true; save = 1000000;
ignoreDups = true; path = "$HOME/.local/share/zsh/.zsh_history";
size = 1000000;
save = 1000000;
path = "$HOME/.local/share/zsh/.zsh_history";
};
fastSyntaxHighlighting.enable = true;
autosuggestion.enable = true;
initContent = ''
${lib.getExe pkgs.fastfetch}
bindkey "^A" vi-beginning-of-line
bindkey "^E" vi-end-of-line
bindkey '^R' fzf-history-widget
'';
}; };
fastSyntaxHighlighting.enable = true;
autosuggestion.enable = true;
initContent = ''
${lib.getExe pkgs.fastfetch}
bindkey "^A" vi-beginning-of-line
bindkey "^E" vi-end-of-line
bindkey '^R' fzf-history-widget
PATH=$PATH:~/.cargo/bin:~/.local/bin
alias stui='systemctl-tui'
alias vim='nvim --clean'
'';
}; };
};
} }

View File

@@ -1,121 +1,143 @@
{ config, ... }:
{ {
flake.modules.nixos.alpha = inputs,
{ config,
hostName, ...
userName, }: {
... flake.modules.nixos.alpha = {
}@innerArgs: hostName,
{ userName,
imports = with config.flake.modules.nixos; [ ...
} @ innerArgs: {
imports = with config.flake.modules.nixos;
[
boot boot
networking networking
virtualisation virtualisation
services services
]
++ [
inputs.trok.nixosModules.default
inputs.tfolio.nixosModules.default
]; ];
tnix = { tnix = {
boot = { boot = {
legacy.enable = true; legacy.enable = true;
impermanence = { impermanence = {
enable = true; enable = true;
home = { home = {
directories = [ directories = [
".local/share/nvim" ".local/share/nvim"
".local/share/zsh" ".local/share/zsh"
".local/share/zoxide" ".local/share/zoxide"
".local/state/lazygit" ".local/state/lazygit"
".local/share/opencode" ".local/share/opencode"
]; ];
};
}; };
}; };
networking = {
openssh.enable = true;
netbird-client.enable = true;
};
services = {
pangolin = {
enable = true;
domain = "pangolin.lab.tux.rs";
baseDomain = "lab.tux.rs";
environmentFile = innerArgs.config.sops.secrets."pangolin".path;
};
uptime-kuma = {
enable = true;
domain = "status.lab.tux.rs";
};
mediaflow-proxy = {
enable = true;
environmentFile = innerArgs.config.sops.secrets."mediaflow-proxy".path;
};
};
virtualisation = {
docker.enable = true;
};
}; };
sops.secrets = { networking = {
tux-password = { openssh = {
sopsFile = ./secrets.yaml; enable = true;
neededForUsers = true; ports = [
23
];
};
netbird-client.enable = true;
};
services = {
pangolin = {
enable = true;
domain = "pangolin.lab.tux.rs";
baseDomain = "lab.tux.rs";
environmentFile = innerArgs.config.sops.secrets."pangolin".path;
}; };
gemini-api-key = { uptime-kuma = {
sopsFile = ./secrets.yaml; enable = true;
owner = userName; domain = "status.lab.tux.rs";
};
openrouter-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
opencode-go-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
netbird-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
"cloudflare-credentials/email" = {
sopsFile = ./secrets.yaml;
};
"cloudflare-credentials/dns-api-token" = {
sopsFile = ./secrets.yaml;
};
aiostreams = {
sopsFile = ./secrets.yaml;
}; };
mediaflow-proxy = { mediaflow-proxy = {
sopsFile = ./secrets.yaml; enable = true;
environmentFile = innerArgs.config.sops.secrets."mediaflow-proxy".path;
}; };
pangolin = { trok = {
sopsFile = ./secrets.yaml; enable = true;
}; };
}; };
# --- Networking --- virtualisation = {
networking = { docker.enable = true;
hostName = hostName;
networkmanager.enable = true;
firewall.enable = false;
}; };
system.stateVersion = "26.05";
}; };
sops.secrets = {
tux-password = {
sopsFile = ./secrets.yaml;
neededForUsers = true;
};
gemini-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
openrouter-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
opencode-go-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
zai-coding-plan-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
netbird-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
"cloudflare-credentials/email" = {
sopsFile = ./secrets.yaml;
};
"cloudflare-credentials/dns-api-token" = {
sopsFile = ./secrets.yaml;
};
aiostreams = {
sopsFile = ./secrets.yaml;
};
mediaflow-proxy = {
sopsFile = ./secrets.yaml;
};
pangolin = {
sopsFile = ./secrets.yaml;
};
};
# --- Networking ---
networking = {
hostName = hostName;
networkmanager.enable = true;
firewall.enable = false;
};
services.tfolio.enable = true;
system.stateVersion = "26.05";
};
} }

View File

@@ -1,30 +0,0 @@
{
inputs,
config,
...
}:
let
hostName = "alpha";
userName = "tux";
userEmail = "t@tux.rs";
system = "x86_64-linux";
unstable = true;
nixpkgs = if unstable then inputs.nixpkgs else inputs.nixpkgs-stable;
in
{
flake.nixosConfigurations."${hostName}" = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit
hostName
userName
userEmail
system
;
};
modules = [
config.flake.modules.nixos.core
config.flake.modules.nixos.${hostName}
];
};
}

View File

@@ -1,22 +1,23 @@
{ inputs, ... }: {inputs, ...}: {
{ flake.modules.nixos.alpha = {
flake.modules.nixos.alpha = config,
{ config, lib, ... }: lib,
let ...
hasOptinPersistence = config.tnix.boot.impermanence.enable; }: let
isLegacy = config.tnix.boot.legacy.enable; hasOptinPersistence = config.tnix.boot.impermanence.enable;
in isLegacy = config.tnix.boot.legacy.enable;
{ in {
imports = [ imports = [
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
]; ];
disko.devices.disk.primary = { disko.devices.disk.primary = {
device = "/dev/sda"; device = "/dev/sda";
type = "disk"; type = "disk";
content = { content = {
type = "gpt"; type = "gpt";
partitions = { partitions =
{
ESP = { ESP = {
size = "1G"; size = "1G";
type = "EF00"; type = "EF00";
@@ -36,36 +37,37 @@
content = { content = {
type = "btrfs"; type = "btrfs";
# Base subvolumes that always exist # Base subvolumes that always exist
subvolumes = { subvolumes =
"/root" = { {
mountOptions = [ "/root" = {
"compress=zstd" mountOptions = [
"noatime" "compress=zstd"
"space_cache=v2" "noatime"
]; "space_cache=v2"
mountpoint = "/"; ];
mountpoint = "/";
};
"/nix" = {
mountOptions = [
"compress=zstd"
"noatime"
"noacl"
"space_cache=v2"
];
mountpoint = "/nix";
};
}
# Conditionally merge /persist only when impermanence is enabled
// lib.optionalAttrs hasOptinPersistence {
"/persist" = {
mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
];
mountpoint = "/persist";
};
}; };
"/nix" = {
mountOptions = [
"compress=zstd"
"noatime"
"noacl"
"space_cache=v2"
];
mountpoint = "/nix";
};
}
# Conditionally merge /persist only when impermanence is enabled
// lib.optionalAttrs hasOptinPersistence {
"/persist" = {
mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
];
mountpoint = "/persist";
};
};
}; };
}; };
} }
@@ -76,7 +78,7 @@
type = "EF02"; type = "EF02";
}; };
}; };
};
}; };
}; };
};
} }

View File

@@ -1,17 +1,15 @@
{ {
flake.modules.nixos.alpha = flake.modules.nixos.alpha = {
{ lib,
lib, modulesPath,
modulesPath, system,
system, ...
... }: {
}: imports = [
{ (modulesPath + "/profiles/qemu-guest.nix")
imports = [ ];
(modulesPath + "/profiles/qemu-guest.nix")
];
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault system; nixpkgs.hostPlatform = lib.mkDefault system;
}; };
} }

View File

@@ -1,4 +1,3 @@
{ ... }:
{ {
flake.modules.homeManager.alpha = { flake.modules.homeManager.alpha = {
home.stateVersion = "26.05"; home.stateVersion = "26.05";

View File

@@ -2,6 +2,7 @@ tux-password: ENC[AES256_GCM,data:tvx3nMoIuQSotxHDWLs7UesnyWY3u3EwkqAIzCw3Z2AJse
gemini-api-key: ENC[AES256_GCM,data:Bo3Z5Jhce0UOBn77I2AcrXYbBgPLDx0eOjPC8J63E/VWNhMPbbxb,iv:iWOsTACOMcK3oqq848WnJ5Ku3tYy1aadmLB4IMgoyqg=,tag:BPzlXoP8/iJaj8c/YFCWyg==,type:str] gemini-api-key: ENC[AES256_GCM,data:Bo3Z5Jhce0UOBn77I2AcrXYbBgPLDx0eOjPC8J63E/VWNhMPbbxb,iv:iWOsTACOMcK3oqq848WnJ5Ku3tYy1aadmLB4IMgoyqg=,tag:BPzlXoP8/iJaj8c/YFCWyg==,type:str]
openrouter-api-key: ENC[AES256_GCM,data:D+/ImUTg7UvBTh0fMlWMZ0O/GsQS/R4Hz+CO4l42R6mn+zk+udvw79BctXdWWyrFf2ZNOTJ/99QTtWOUOvHISWaEJogXyb+93g==,iv:c7OtgBu1Zaf7lA4InIsKOAPbAvTl3gaO7QGCFNx21Bo=,tag:KXiASj/qC1YzK6DUox57ug==,type:str] openrouter-api-key: ENC[AES256_GCM,data:D+/ImUTg7UvBTh0fMlWMZ0O/GsQS/R4Hz+CO4l42R6mn+zk+udvw79BctXdWWyrFf2ZNOTJ/99QTtWOUOvHISWaEJogXyb+93g==,iv:c7OtgBu1Zaf7lA4InIsKOAPbAvTl3gaO7QGCFNx21Bo=,tag:KXiASj/qC1YzK6DUox57ug==,type:str]
opencode-go-api-key: ENC[AES256_GCM,data:ipKkNcRqBERIQ6f6yFzVm999s+UwJys4elHWhzpL441RfOaG9MmRWMcD+wRLJ7DSWFjYu6uUPF7TKez8J6abWeKDgg==,iv:FDSYE3R8zKVxWiP2S/sCVcwEu3fEXg/hCeqCRSF+c6g=,tag:5RDuMFGMoN6xwAYj0HiyjQ==,type:str] opencode-go-api-key: ENC[AES256_GCM,data:ipKkNcRqBERIQ6f6yFzVm999s+UwJys4elHWhzpL441RfOaG9MmRWMcD+wRLJ7DSWFjYu6uUPF7TKez8J6abWeKDgg==,iv:FDSYE3R8zKVxWiP2S/sCVcwEu3fEXg/hCeqCRSF+c6g=,tag:5RDuMFGMoN6xwAYj0HiyjQ==,type:str]
zai-coding-plan-api-key: ENC[AES256_GCM,data:HrNfR+Ux/Iyt4qkD1uXzDFQb+l0ltMMrbRahEG3pofFbw98VXfRFbhspcxh9vEyqkw==,iv:lzkLxPV7Q38dn0IEgtchVMrvnVBz4e5q282704x/hmU=,tag:IKzE6Tp6D93nJHoEvCPGBQ==,type:str]
netbird-key: ENC[AES256_GCM,data:NilfyafnGhFVYD6q4+jJQxlhXNdNC8BQ1CZfu8a5wc693Y1h,iv:Rpl0OpkQdBMPpIJ08t9Z0AjDAW6c97pFZKO1KPu8ipY=,tag:du3d0SQWuqJtJSwhSgJE4g==,type:str] netbird-key: ENC[AES256_GCM,data:NilfyafnGhFVYD6q4+jJQxlhXNdNC8BQ1CZfu8a5wc693Y1h,iv:Rpl0OpkQdBMPpIJ08t9Z0AjDAW6c97pFZKO1KPu8ipY=,tag:du3d0SQWuqJtJSwhSgJE4g==,type:str]
cloudflare-credentials: cloudflare-credentials:
email: ENC[AES256_GCM,data:K9L6H4dqNNgbCFg=,iv:jirDJb+Y2sXrup6/doRmOdd8tV7zLnttcgG75r4Fs04=,tag:XeyMVC+Q9TEuTxSfOeR2Uw==,type:str] email: ENC[AES256_GCM,data:K9L6H4dqNNgbCFg=,iv:jirDJb+Y2sXrup6/doRmOdd8tV7zLnttcgG75r4Fs04=,tag:XeyMVC+Q9TEuTxSfOeR2Uw==,type:str]
@@ -29,7 +30,7 @@ sops:
4TkObqH8ddGpbd7cX5a/wboTjYuEdAviWxjK2oBPgtcFc1f03X3tmA== 4TkObqH8ddGpbd7cX5a/wboTjYuEdAviWxjK2oBPgtcFc1f03X3tmA==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
recipient: age1mzxxxzhy3us3rd960ufqv7vlxj5cnug86md6x69llg9ujzw2pqws057llf recipient: age1mzxxxzhy3us3rd960ufqv7vlxj5cnug86md6x69llg9ujzw2pqws057llf
lastmodified: "2026-08-07T20:02:00Z" lastmodified: "2026-09-16T14:21:00Z"
mac: ENC[AES256_GCM,data:VrA2OPCcVvAzYjZTkHPxytclISP24P1FqiIQjSGQItkMLieom80N6933hB0Tdn3BM6600bHt2NweSqHjGx//pn2Gbur4pxeN3TpF9tKXc12IcAThUL9g48fMbk5y+kWWVUF1Pezod0YnzWAlalUXFqvKinfm4RqPNjDjndA/dcI=,iv:xfs9XD5ZIQ6dyMMZ8OE5FEs/hrSr/T2VwC7XvZ7xC2A=,tag:jYWo2kgwwltKB+njiYaPkQ==,type:str] mac: ENC[AES256_GCM,data:Aqg1cboHKW5QrJooVIqgbHTFg9EpTEnfCv/RRSp0efzyXvDrR7eG5WTvJPE9IbrmS190yvOlT0fw1Bhzyr8kiyoO71sbyUessw5IMUGcLP+m2FNtt8osc7fSTGseojv3MXBndOMDEOpT+Clv6hbv/rr5eGbb05oK6rW97/pDDfU=,iv:s/9PAHHQ0mHQJosKGclSnumHqm6CG3fDVKD5eT4Q1Y0=,tag:3pgycAwYUz9aEOy4/aW30Q==,type:str]
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.13.3 version: 3.13.3

View File

@@ -1,129 +1,175 @@
{ config, ... }: {config, ...}: {
{ flake.modules.nixos.arcturus = {
flake.modules.nixos.arcturus = pkgs,
{ hostName,
hostName, userName,
userName, ...
... } @ innerArgs: {
}@innerArgs: imports = with config.flake.modules.nixos; [
{ boot
imports = with config.flake.modules.nixos; [ networking
boot virtualisation
networking services
virtualisation ];
services
];
tnix = { tnix = {
boot = { boot = {
secure-boot.enable = true; secure-boot.enable = true;
impermanence = { impermanence = {
enable = true; enable = true;
home = { home = {
directories = [ directories = [
"Distrobox" "Distrobox"
".config/sops" ".bun"
".local/share/nvim" ".rustup"
".local/share/opencode" ".config/sops"
".local/share/zsh" ".config/nix"
".local/share/zoxide" ".local/share/nvim"
".local/state/lazygit" ".local/share/opencode"
]; ".local/share/zsh"
".local/share/zoxide"
".local/state/lazygit"
];
files = [ files = [
".wakatime.cfg" ".wakatime.cfg"
]; ];
};
}; };
}; };
networking = {
openssh.enable = true;
netbird-client.enable = true;
newt = {
enable = true;
environmentFile = innerArgs.config.sops.secrets.newt.path;
};
};
services = {
cyber-tux = {
enable = true;
environmentFile = innerArgs.config.sops.secrets.discord-token.path;
};
vaultwarden = {
enable = true;
domain = "bw.lab.tux.rs";
configurePangolin = true;
};
};
virtualisation = {
docker.enable = true;
distrobox.enable = true;
};
}; };
sops.secrets = {
tux-password = {
sopsFile = ./secrets.yaml;
neededForUsers = true;
};
discord-token = {
sopsFile = ./secrets.yaml;
};
gemini-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
openrouter-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
opencode-go-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
netbird-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
newt = {
sopsFile = ./secrets.yaml;
owner = userName;
};
};
# --- Networking ---
networking = { networking = {
hostName = hostName; openssh.enable = true;
networkmanager = { netbird-client.enable = true;
newt = {
enable = true; enable = true;
wifi.backend = "iwd"; environmentFile = innerArgs.config.sops.secrets.newt.path;
}; };
wireless.iwd = {
enable = true;
settings = {
Network = {
EnableIPv6 = true;
};
Settings = {
AutoConnect = true;
};
};
};
firewall.enable = false;
}; };
system.stateVersion = "26.05"; services = {
hermes-agent = {
enable = true;
environmentFiles = [innerArgs.config.sops.secrets.hermes.path];
};
cyber-tux = {
enable = true;
environmentFile = innerArgs.config.sops.secrets.discord-token.path;
};
vaultwarden = {
enable = true;
domain = "bw.lab.tux.rs";
configurePangolin = true;
};
copyparty = {
enable = true;
domain = "files.lab.tux.rs";
accounts.${userName}.passwordFile = innerArgs.config.sops.secrets.copyparty.path;
volumes = {
"/" = {
path = "/var/lib/copyparty/data";
access = {
r = "*";
rwmdgGha = [userName];
};
};
};
configurePangolin = true;
};
coder = {
enable = true;
domain = "coder.lab.tux.rs";
configurePangolin = true;
};
};
virtualisation = {
docker.enable = true;
distrobox.enable = true;
};
}; };
sops.secrets = {
tux-password = {
sopsFile = ./secrets.yaml;
neededForUsers = true;
};
discord-token = {
sopsFile = ./secrets.yaml;
};
gemini-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
openrouter-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
opencode-go-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
zai-coding-plan-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
netbird-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
newt = {
sopsFile = ./secrets.yaml;
owner = userName;
};
copyparty = {
sopsFile = ./secrets.yaml;
owner = innerArgs.config.services.copyparty.user;
};
hermes = {
sopsFile = ./secrets.yaml;
};
};
# --- Networking ---
networking = {
hostName = hostName;
networkmanager = {
enable = true;
wifi.backend = "iwd";
};
wireless.iwd = {
enable = true;
settings = {
Network = {
EnableIPv6 = true;
};
Settings = {
AutoConnect = true;
};
};
};
firewall.enable = false;
};
environment.systemPackages = with pkgs; [
impala
];
system.stateVersion = "26.05";
};
} }

View File

@@ -1,30 +0,0 @@
{
inputs,
config,
...
}:
let
hostName = "arcturus";
userName = "tux";
userEmail = "t@tux.rs";
system = "x86_64-linux";
unstable = true;
nixpkgs = if unstable then inputs.nixpkgs else inputs.nixpkgs-stable;
in
{
flake.nixosConfigurations."${hostName}" = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit
hostName
userName
userEmail
system
;
};
modules = [
config.flake.modules.nixos.core
config.flake.modules.nixos.${hostName}
];
};
}

View File

@@ -1,41 +1,42 @@
{ inputs, ... }: {inputs, ...}: {
{ flake.modules.nixos.arcturus = {
flake.modules.nixos.arcturus = config,
{ config, lib, ... }: lib,
let ...
hasOptinPersistence = config.tnix.boot.impermanence.enable; }: let
in hasOptinPersistence = config.tnix.boot.impermanence.enable;
{ in {
imports = [ imports = [
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
]; ];
disko.devices.disk.primary = { disko.devices.disk.primary = {
device = "/dev/nvme0n1"; device = "/dev/nvme0n1";
type = "disk"; type = "disk";
content = { content = {
type = "gpt"; type = "gpt";
partitions = { partitions = {
ESP = { ESP = {
size = "1G"; size = "1G";
type = "EF00"; type = "EF00";
content = { content = {
type = "filesystem"; type = "filesystem";
format = "vfat"; format = "vfat";
mountpoint = "/boot"; mountpoint = "/boot";
mountOptions = [ mountOptions = [
"defaults" "defaults"
"umask=0077" "umask=0077"
]; ];
};
}; };
root = { };
size = "100%"; root = {
type = "8300"; size = "100%";
content = { type = "8300";
type = "btrfs"; content = {
# Base subvolumes that always exist type = "btrfs";
subvolumes = { # Base subvolumes that always exist
subvolumes =
{
"/root" = { "/root" = {
mountOptions = [ mountOptions = [
"compress=zstd" "compress=zstd"
@@ -65,10 +66,10 @@
mountpoint = "/persist"; mountpoint = "/persist";
}; };
}; };
};
}; };
}; };
}; };
}; };
}; };
};
} }

View File

@@ -1,36 +1,33 @@
{ config, ... }: {config, ...}: {
{ flake.modules.nixos.arcturus = {
flake.modules.nixos.arcturus = lib,
{ pkgs,
lib, system,
pkgs, ...
system, } @ innerArgs: {
... imports = with config.flake.modules.nixos; [
}@innerArgs: hardware
{ ];
imports = with config.flake.modules.nixos; [
hardware
];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
"nvme" "nvme"
"xhci_pci" "xhci_pci"
"ahci" "ahci"
"usbhid" "usbhid"
"usb_storage" "usb_storage"
"sd_mod" "sd_mod"
]; ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
hardware.cpu.amd.updateMicrocode = lib.mkDefault innerArgs.config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault innerArgs.config.hardware.enableRedistributableFirmware;
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault system; nixpkgs.hostPlatform = lib.mkDefault system;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
nvtopPackages.amd nvtopPackages.amd
]; ];
}; };
} }

View File

@@ -1,4 +1,3 @@
{ ... }:
{ {
flake.modules.homeManager.arcturus = { flake.modules.homeManager.arcturus = {
home.stateVersion = "26.05"; home.stateVersion = "26.05";

View File

@@ -3,8 +3,11 @@ discord-token: ENC[AES256_GCM,data:uzxkrNRRplL/1MfvPZ/EL+I8UACuZQBHZ95BSHuxW0nBj
gemini-api-key: ENC[AES256_GCM,data:gLZSoYTdKY+rwIpYiXvN9n9PGkUD6q8Oe7dHnYkjEjwDf5qpjubg,iv:ySoNgQWTu9DjvbashF4ulyYP8fJUl4yrCTeBQ0jrGmw=,tag:FctubsQv50AP78JvTb9bpQ==,type:str] gemini-api-key: ENC[AES256_GCM,data:gLZSoYTdKY+rwIpYiXvN9n9PGkUD6q8Oe7dHnYkjEjwDf5qpjubg,iv:ySoNgQWTu9DjvbashF4ulyYP8fJUl4yrCTeBQ0jrGmw=,tag:FctubsQv50AP78JvTb9bpQ==,type:str]
openrouter-api-key: ENC[AES256_GCM,data:6xONCl9lqOoO7b4CEyCz9607tICDUAkpglRjGS5nYq2ppg2UKqYTrWD1BGCA5Xfs/CWskniVhoNG3vscjKiYCCh9gbM6aqdmTQ==,iv:7Iwc9t00HOOBjA7URXcUO41badqYyJCkFHM/uPkLFxY=,tag:Cl39kitr2e0//HVwAdsdUQ==,type:str] openrouter-api-key: ENC[AES256_GCM,data:6xONCl9lqOoO7b4CEyCz9607tICDUAkpglRjGS5nYq2ppg2UKqYTrWD1BGCA5Xfs/CWskniVhoNG3vscjKiYCCh9gbM6aqdmTQ==,iv:7Iwc9t00HOOBjA7URXcUO41badqYyJCkFHM/uPkLFxY=,tag:Cl39kitr2e0//HVwAdsdUQ==,type:str]
opencode-go-api-key: ENC[AES256_GCM,data:dmeRKn7TWHnqvpyPQpcEG6yHTb2bRby/rh10ytL0jHj5R+lRmNVdmqUF92GTznY9vEaB6ZYCJecWhpm8g4upNfOWBg==,iv:9UMJpAlD8gpcNiN+liu3nawoAZQKapEg7sCp561N9E8=,tag:OZlASpOa5BQaQwFWjoLCRw==,type:str] opencode-go-api-key: ENC[AES256_GCM,data:dmeRKn7TWHnqvpyPQpcEG6yHTb2bRby/rh10ytL0jHj5R+lRmNVdmqUF92GTznY9vEaB6ZYCJecWhpm8g4upNfOWBg==,iv:9UMJpAlD8gpcNiN+liu3nawoAZQKapEg7sCp561N9E8=,tag:OZlASpOa5BQaQwFWjoLCRw==,type:str]
zai-coding-plan-api-key: ENC[AES256_GCM,data:lLegmS/RIo7JoBoAyVdcS++rXS8W62cwz+zVsv4dPnlfjGFO/nVlI5InqC34sPxLRQ==,iv:BRC7eYVmdZuWwb+2k2FrnlJih63HXrcvhVp/K5t5td8=,tag:aP8x+Xcnkz2t0hn7erCkKw==,type:str]
netbird-key: ENC[AES256_GCM,data:q6eKisca04qn/CvALrvXF79MsToDhvLRLv2JTiUBAZglCC9m,iv:jj0/ZD7IDgopprTVUgSfJmdAJmUP3iqewU3dqssGYbk=,tag:6IPRdCm2FGdlTEIX7jt3qA==,type:str] netbird-key: ENC[AES256_GCM,data:q6eKisca04qn/CvALrvXF79MsToDhvLRLv2JTiUBAZglCC9m,iv:jj0/ZD7IDgopprTVUgSfJmdAJmUP3iqewU3dqssGYbk=,tag:6IPRdCm2FGdlTEIX7jt3qA==,type:str]
copyparty: ENC[AES256_GCM,data:QXt8IgTekg9rzFyuzpg=,iv:vJYfHqCiheq290K9TGACHNHyOWzIn60j1Kz502SE27w=,tag:ECt7Wavlqw1V6zgXiRZtUg==,type:str]
newt: ENC[AES256_GCM,data:r5Rd81ZrzrIYbXtFkypbJltoGCOYrW6P4IpwGCtaH7lqCg7wD/WMboMx13HN4Mm0J4qbBpDakpfVv9qUTrisYP1xwpKkmY1kqPlFWRZN8hzuuNS2Tv3qUjavTp5XGotVPLHj1Cg/cwGcf8EAssYTwTy7H0PgdQKwqigQD1f1s/j4iXQ=,iv:1xP38/Ayt1xvn2fJGa5zgOrVNOw2J5taG1Orx6uNgZI=,tag:H9JXu9gzyyvTPWgXaoTsiw==,type:str] newt: ENC[AES256_GCM,data:r5Rd81ZrzrIYbXtFkypbJltoGCOYrW6P4IpwGCtaH7lqCg7wD/WMboMx13HN4Mm0J4qbBpDakpfVv9qUTrisYP1xwpKkmY1kqPlFWRZN8hzuuNS2Tv3qUjavTp5XGotVPLHj1Cg/cwGcf8EAssYTwTy7H0PgdQKwqigQD1f1s/j4iXQ=,iv:1xP38/Ayt1xvn2fJGa5zgOrVNOw2J5taG1Orx6uNgZI=,tag:H9JXu9gzyyvTPWgXaoTsiw==,type:str]
hermes: ENC[AES256_GCM,data:9A2T2LIeVGo805k5E8wPHmqfjqQ6Dp7srQrVXHLsJRk+9N9bo2pMZUvAZm9FI89zPyK7tMnmLd56Jwf+W+mmQqbupnmN66jxOxOaB0MQ9/6/1oNHvaii337ed6fviLy6hx24pEOpY3OXwSEdNftwJqzc7YXLZK3UX8thhDDdxd0TSj3VUBd0ZHDWd4NpsgtjRRyVDBjHsnF0vzSZXtomithnHqeVHpp/jWPc+ZGrpnVvU8wxNMGLlDtr4A==,iv:dYCaTygVp1hqunPmBcNaYr7JxrdxfH1pcBE6B5HMgzk=,tag:/fddnR3n6+erzWF+m/bgGQ==,type:str]
sops: sops:
age: age:
- enc: | - enc: |
@@ -25,7 +28,7 @@ sops:
TLKEYsPQgOJ7s8P9gw2uPUY6HRz86CtiC6EbO27u0+8BbI85x1QScg== TLKEYsPQgOJ7s8P9gw2uPUY6HRz86CtiC6EbO27u0+8BbI85x1QScg==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
recipient: age1huqa3hc7wcxk4dpelrzny437nzrx4fnll3d8g9ahznzk268yju5qufapxy recipient: age1huqa3hc7wcxk4dpelrzny437nzrx4fnll3d8g9ahznzk268yju5qufapxy
lastmodified: "2026-08-09T11:21:03Z" lastmodified: "2026-09-16T14:20:26Z"
mac: ENC[AES256_GCM,data:XFy+AiJRfrLhbX3j+0oO24qiHD5Hj2bVFqTMbUOOzsJzR0r8FBrwSNAZ0FVlFPFPAMitAIpZySS+kvbmEdZUfZ0soo83F5qwH6i/H5PZxqyDHst/Ig6Mrypp2DZMNZXNlqyLLmuaNGDf2pqApxCM3eSsgvCsNxdapRKlLSFJou4=,iv:D7gB4J4dhCfRo+1DaUAvOe3dWpoGvzIFouCJBNpwKiY=,tag:eLBZq/+Lce2S5Hu9OIC3gw==,type:str] mac: ENC[AES256_GCM,data:I33KZL3u+7jfOFu0qn4LVx2nACiURSd6RcEn0ojfT62yC/TcXlGGu4QeN1Dx4Nta77n/h8RzDTcZtiUJylLhiVBmqyMOoNaBOmLDJ+P1L7weYLoWMoaDP7IWyzttGkNTgvyv2nW5IxbdcTZwrcSlPtdupsJeNy76ATHO+eUsvGQ=,iv:FvQKGH5Vzm36huGDnMr15wQL9vsH2hsAhvu0BE/NfEI=,tag:fzAzzgmv3vjWs1VYhh4GeA==,type:str]
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.13.3 version: 3.13.3

View File

@@ -1,134 +1,161 @@
{ config, ... }: {config, ...}: {
{ flake.modules.nixos.canopus = {
flake.modules.nixos.canopus = pkgs,
{ hostName,
pkgs, userName,
hostName, ...
userName, }: {
... imports = with config.flake.modules.nixos; [
}: boot
{ networking
imports = with config.flake.modules.nixos; [ desktop
boot gaming
networking virtualisation
desktop ];
gaming
virtualisation
];
tnix = { tnix = {
boot = { boot = {
secure-boot.enable = true; secure-boot.enable = true;
impermanence = { impermanence = {
enable = true; enable = true;
home = { home = {
directories = [ directories = [
"Distrobox" "Distrobox"
".steam" ".steam"
".cache/awww" ".bun"
".config/BraveSoftware" ".rustup"
".config/zed" ".cache/awww"
".config/Vencord" ".cache/serpantinum"
".config/vesktop" ".config/BraveSoftware"
".config/sops" ".config/zed"
".config/obs-studio" ".config/Vencord"
".config/easyeffects" ".config/vesktop"
".config/DankMaterialShell" ".config/sops"
".local/share/Steam" ".config/nix"
".local/share/nvim" ".config/coderv2"
".local/share/opencode" ".config/obs-studio"
".local/share/zsh" ".config/easyeffects"
".local/share/zoxide" ".config/DankMaterialShell"
".local/state/lazygit" ".local/share/Steam"
".local/share/vicinae" ".local/share/lutris"
".local/share/TelegramDesktop" ".local/share/net.lutris.Lutris"
".local/share/GalaxyBudsClient" ".local/share/nvim"
]; ".local/share/opencode"
".local/share/zsh"
".local/share/zoxide"
".local/share/voxtype"
".local/state/lazygit"
".local/share/vicinae"
".local/share/TelegramDesktop"
".local/share/GalaxyBudsClient"
".local/state/serpantinum"
".local/share/zed"
files = [ ".claude"
".wakatime.cfg" ".orca"
]; ".config/orca"
}; ".zcode"
".config/ZCode"
];
files = [
".wakatime.cfg"
".claude.json"
".config/gh/hosts.yml"
];
}; };
}; };
networking = {
openssh.enable = true;
netbird-client.enable = true;
};
virtualisation = {
docker.enable = true;
docker.nvidia.enable = false;
qemu.enable = true;
waydroid.enable = true;
distrobox.enable = true;
};
}; };
sops.secrets = {
tux-password = {
sopsFile = ./secrets.yaml;
neededForUsers = true;
};
gemini-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
openrouter-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
opencode-go-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
netbird-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
vicinae-json = {
sopsFile = ./secrets.yaml;
owner = userName;
};
};
# --- Networking ---
networking = { networking = {
hostName = hostName; openssh.enable = true;
networkmanager = { netbird-client.enable = true;
enable = true;
wifi.backend = "iwd";
};
wireless.iwd = {
enable = true;
settings = {
Network = {
EnableIPv6 = true;
};
Settings = {
AutoConnect = true;
};
};
};
firewall.enable = false;
}; };
environment.systemPackages = with pkgs; [ virtualisation = {
davinci-resolve docker.enable = true;
telegram-desktop docker.nvidia.enable = false;
galaxy-buds-client qemu.enable = true;
]; waydroid.enable = true;
distrobox.enable = true;
};
# !!! DO NOT CHANGE THIS !!! programs.nix-ld.enable = true;
# This should match the version used at initial install.
system.stateVersion = "26.05";
}; };
sops.secrets = {
tux-password = {
sopsFile = ./secrets.yaml;
neededForUsers = true;
};
gemini-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
openrouter-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
opencode-go-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
zai-coding-plan-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
netbird-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
vicinae-json = {
sopsFile = ./secrets.yaml;
owner = userName;
};
};
# --- Networking ---
networking = {
hostName = hostName;
networkmanager = {
enable = true;
wifi.backend = "iwd";
};
wireless.iwd = {
enable = true;
settings = {
Network = {
EnableIPv6 = true;
};
Settings = {
AutoConnect = true;
};
};
};
firewall.enable = false;
};
environment.systemPackages = with pkgs; [
davinci-resolve
telegram-desktop
galaxy-buds-client
impala
llm-agents.claude-code
llm-agents.orca
llm-agents.zcode
coder
];
# !!! DO NOT CHANGE THIS !!!
# This should match the version used at initial install.
system.stateVersion = "26.05";
};
} }

View File

@@ -1,30 +0,0 @@
{
inputs,
config,
...
}:
let
hostName = "canopus";
userName = "tux";
userEmail = "t@tux.rs";
system = "x86_64-linux";
unstable = true;
nixpkgs = if unstable then inputs.nixpkgs else inputs.nixpkgs-stable;
in
{
flake.nixosConfigurations."${hostName}" = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit
hostName
userName
userEmail
system
;
};
modules = [
config.flake.modules.nixos.core
config.flake.modules.nixos.${hostName}
];
};
}

View File

@@ -1,49 +1,50 @@
{ inputs, ... }: {inputs, ...}: {
{ flake.modules.nixos.canopus = {
flake.modules.nixos.canopus = config,
{ config, lib, ... }: lib,
let ...
hasOptinPersistence = config.tnix.boot.impermanence.enable; }: let
in hasOptinPersistence = config.tnix.boot.impermanence.enable;
{ in {
imports = [ imports = [
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
]; ];
disko.devices.disk.primary = { disko.devices.disk.primary = {
device = "/dev/nvme0n1"; device = "/dev/nvme0n1";
type = "disk"; type = "disk";
content = { content = {
type = "gpt"; type = "gpt";
partitions = { partitions = {
ESP = { ESP = {
size = "1G"; size = "1G";
type = "EF00"; type = "EF00";
content = { content = {
type = "filesystem"; type = "filesystem";
format = "vfat"; format = "vfat";
mountpoint = "/boot"; mountpoint = "/boot";
mountOptions = [ mountOptions = [
"defaults" "defaults"
"umask=0077" "umask=0077"
]; ];
};
}; };
swap = { };
size = "32G"; swap = {
content = { size = "32G";
type = "swap"; content = {
discardPolicy = "both"; type = "swap";
resumeDevice = true; discardPolicy = "both";
}; resumeDevice = true;
}; };
root = { };
size = "100%"; root = {
type = "8300"; size = "100%";
content = { type = "8300";
type = "btrfs"; content = {
# Base subvolumes that always exist type = "btrfs";
subvolumes = { # Base subvolumes that always exist
subvolumes =
{
"/root" = { "/root" = {
mountOptions = [ mountOptions = [
"compress=zstd" "compress=zstd"
@@ -73,10 +74,10 @@
mountpoint = "/persist"; mountpoint = "/persist";
}; };
}; };
};
}; };
}; };
}; };
}; };
}; };
};
} }

View File

@@ -1,150 +1,150 @@
{ inputs, config, ... }:
{ {
flake.modules.nixos.canopus = inputs,
{ config,
lib, ...
pkgs, }: {
system, flake.modules.nixos.canopus = {
... lib,
}@innerArgs: pkgs,
{ system,
imports = ...
with config.flake.modules.nixos; } @ innerArgs: {
[ imports = with config.flake.modules.nixos;
hardware [
] hardware
++ [ inputs.nixos-hardware.nixosModules.asus-zephyrus-ga503 ]; ]
++ [
boot.kernelParams = [ "nvidia-drm.modeset=1" ]; inputs.nixos-hardware.nixosModules.asus-zephyrus-ga503
boot.initrd.availableKernelModules = [ inputs.cardwire.nixosModules.default
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
]; ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
hardware = { boot.kernelParams = ["nvidia-drm.modeset=1"];
nvidia = { boot.initrd.availableKernelModules = [
modesetting.enable = true; "nvme"
open = false; "xhci_pci"
nvidiaSettings = true; "ahci"
}; "usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
cpu.amd.updateMicrocode = lib.mkDefault innerArgs.config.hardware.enableRedistributableFirmware; hardware = {
nvidia = {
modesetting.enable = true;
open = false;
nvidiaSettings = true;
}; };
services = { cpu.amd.updateMicrocode = lib.mkDefault innerArgs.config.hardware.enableRedistributableFirmware;
xserver.videoDrivers = [ "nvidia" ];
power-profiles-daemon.enable = true;
upower.enable = true;
supergfxd = {
enable = true;
settings = {
mode = "Hybrid";
vfio_enable = false;
vfio_save = false;
always_reboot = false;
no_logind = false;
logout_timeout_s = 180;
hotplug_type = "None";
};
};
asusd = {
enable = true;
asusdConfig.text = ''
(
charge_control_end_threshold: 80,
disable_nvidia_powerd_on_battery: true,
ac_command: "",
bat_command: "",
platform_profile_linked_epp: true,
platform_profile_on_battery: Quiet,
platform_profile_on_ac: Performance,
change_platform_profile_on_battery: true,
change_platform_profile_on_ac: true,
profile_quiet_epp: Power,
profile_balanced_epp: BalancePower,
profile_custom_epp: Performance,
profile_performance_epp: Performance,
ac_profile_tunings: {},
dc_profile_tunings: {},
armoury_settings: {},
)
'';
profileConfig.text = ''
(
active_profile: Quiet,
)
'';
fanCurvesConfig.text = ''
(
profiles: (
balanced: [
(
fan: CPU,
pwm: (20, 40, 60, 85, 110, 140, 170, 200),
temp: (45, 55, 62, 68, 74, 80, 86, 92),
enabled: true,
),
(
fan: GPU,
pwm: (20, 40, 60, 85, 110, 140, 170, 200),
temp: (45, 55, 62, 68, 74, 80, 86, 92),
enabled: true,
),
],
performance: [
(
fan: CPU,
pwm: (35, 60, 90, 120, 150, 180, 220, 255),
temp: (45, 55, 62, 68, 74, 80, 86, 92),
enabled: true,
),
(
fan: GPU,
pwm: (35, 60, 90, 120, 150, 180, 220, 255),
temp: (45, 55, 62, 68, 74, 80, 86, 92),
enabled: true,
),
],
quiet: [
(
fan: CPU,
pwm: (0, 10, 20, 35, 55, 80, 110, 140),
temp: (45, 55, 62, 68, 74, 80, 86, 92),
enabled: true,
),
(
fan: GPU,
pwm: (0, 10, 20, 35, 55, 80, 110, 140),
temp: (45, 55, 62, 68, 74, 80, 86, 92),
enabled: true,
),
],
custom: [],
),
)
'';
};
};
networking.useDHCP = lib.mkDefault true;
nixpkgs.config.cudaSupport = true;
nixpkgs.hostPlatform = lib.mkDefault system;
environment.systemPackages = with pkgs; [
nvtopPackages.full
];
}; };
services = {
xserver.videoDrivers = ["nvidia"];
power-profiles-daemon.enable = true;
upower.enable = true;
cardwire = {
enable = true;
settings = {
auto_apply_gpu_state = true;
experimental_nvidia_block = true;
battery_auto_switch = true;
battery_auto_switch_mode = "hybrid";
};
};
asusd = {
enable = true;
asusdConfig.text = ''
(
charge_control_end_threshold: 80,
disable_nvidia_powerd_on_battery: true,
ac_command: "",
bat_command: "",
platform_profile_linked_epp: true,
platform_profile_on_battery: Quiet,
platform_profile_on_ac: Performance,
change_platform_profile_on_battery: true,
change_platform_profile_on_ac: true,
profile_quiet_epp: Power,
profile_balanced_epp: BalancePower,
profile_custom_epp: Performance,
profile_performance_epp: Performance,
ac_profile_tunings: {},
dc_profile_tunings: {},
armoury_settings: {},
)
'';
profileConfig.text = ''
(
active_profile: Quiet,
)
'';
fanCurvesConfig.text = ''
(
profiles: (
balanced: [
(
fan: CPU,
pwm: (20, 40, 60, 85, 110, 140, 170, 200),
temp: (45, 55, 62, 68, 74, 80, 86, 92),
enabled: true,
),
(
fan: GPU,
pwm: (20, 40, 60, 85, 110, 140, 170, 200),
temp: (45, 55, 62, 68, 74, 80, 86, 92),
enabled: true,
),
],
performance: [
(
fan: CPU,
pwm: (35, 60, 90, 120, 150, 180, 220, 255),
temp: (45, 55, 62, 68, 74, 80, 86, 92),
enabled: true,
),
(
fan: GPU,
pwm: (35, 60, 90, 120, 150, 180, 220, 255),
temp: (45, 55, 62, 68, 74, 80, 86, 92),
enabled: true,
),
],
quiet: [
(
fan: CPU,
pwm: (0, 10, 20, 35, 55, 80, 110, 140),
temp: (45, 55, 62, 68, 74, 80, 86, 92),
enabled: true,
),
(
fan: GPU,
pwm: (0, 10, 20, 35, 55, 80, 110, 140),
temp: (45, 55, 62, 68, 74, 80, 86, 92),
enabled: true,
),
],
custom: [],
),
)
'';
};
};
networking.useDHCP = lib.mkDefault true;
nixpkgs.config.cudaSupport = true;
nixpkgs.hostPlatform = lib.mkDefault system;
environment.systemPackages = with pkgs; [
nvtopPackages.full
];
};
} }

View File

@@ -1,6 +1,5 @@
{ config, ... }: {config, ...}: {
{ flake.modules.homeManager.canopus = {pkgs, ...}: {
flake.modules.homeManager.canopus = { pkgs, ... }: {
imports = with config.flake.modules.homeManager; [ imports = with config.flake.modules.homeManager; [
desktop desktop
]; ];
@@ -27,8 +26,7 @@
enable = true; enable = true;
settings = { settings = {
authorized_fingerprints = { authorized_fingerprints = {
"f4:4b:17:61:f7:01:a4:a2:e1:c7:8c:1c:7a:f3:8b:87:14:3d:05:3d:a0:8b:cc:e7:88:d8:d8:d2:a4:c2:75:8b" = "f4:4b:17:61:f7:01:a4:a2:e1:c7:8c:1c:7a:f3:8b:87:14:3d:05:3d:a0:8b:cc:e7:88:d8:d8:d2:a4:c2:75:8b" = "sirius";
"sirius";
}; };
}; };
}; };
@@ -42,7 +40,7 @@
position = "0x0", position = "0x0",
scale = "1", scale = "1",
disabled = false disabled = false
})' && })' &&
hyprctl eval 'hl.monitor({ hyprctl eval 'hl.monitor({
output = "HDMI-A-1", output = "HDMI-A-1",
mode = "preferred", mode = "preferred",
@@ -58,7 +56,7 @@
position = "0x0", position = "0x0",
scale = "1", scale = "1",
disabled = false disabled = false
})' && })' &&
hyprctl eval 'hl.monitor({ hyprctl eval 'hl.monitor({
output = "HDMI-A-1", output = "HDMI-A-1",
mode = "preferred", mode = "preferred",
@@ -71,7 +69,7 @@
hyprctl eval 'hl.monitor({ hyprctl eval 'hl.monitor({
output = "eDP-1", output = "eDP-1",
disabled = true disabled = true
})' && })' &&
hyprctl eval 'hl.monitor({ hyprctl eval 'hl.monitor({
output = "HDMI-A-1", output = "HDMI-A-1",
mode = "preferred", mode = "preferred",

View File

@@ -2,12 +2,12 @@ tux-password: ENC[AES256_GCM,data:Xb4/JMAZCBnBheDCJdRRGXLnMJ1ej8HbN+AUqA/+2sdYES
gemini-api-key: ENC[AES256_GCM,data:Q6+actg0oyUWiUJVy/9yZmea1QyGu2o8LfMsuAVFD6k7kp0dYIrl,iv:ukyouqrHxzVpBBE98KL6PW8P3j+seemm/e0Gl1urUcM=,tag:Z7MM3dJ414CmdxE72cdzNA==,type:str] gemini-api-key: ENC[AES256_GCM,data:Q6+actg0oyUWiUJVy/9yZmea1QyGu2o8LfMsuAVFD6k7kp0dYIrl,iv:ukyouqrHxzVpBBE98KL6PW8P3j+seemm/e0Gl1urUcM=,tag:Z7MM3dJ414CmdxE72cdzNA==,type:str]
openrouter-api-key: ENC[AES256_GCM,data:SalhWKR6artX/kOVKZGpKSmrgsQDU/heshrdkK3wotOZ3BRn/ZqZRBldvl1JPSenMAMvE2LWUdmBQmwG/id7L7JL1O/+lUHIQw==,iv:hLlHayFJgUkWOirVLfqP0pGRBZAqGKe+EE2yG1ELGNk=,tag:0qoo0tb+xWjjQXr4n1qGmw==,type:str] openrouter-api-key: ENC[AES256_GCM,data:SalhWKR6artX/kOVKZGpKSmrgsQDU/heshrdkK3wotOZ3BRn/ZqZRBldvl1JPSenMAMvE2LWUdmBQmwG/id7L7JL1O/+lUHIQw==,iv:hLlHayFJgUkWOirVLfqP0pGRBZAqGKe+EE2yG1ELGNk=,tag:0qoo0tb+xWjjQXr4n1qGmw==,type:str]
opencode-go-api-key: ENC[AES256_GCM,data:zbeTcaXJZFVfYnM/7sgblJFU9WfeosX/44KsXvrzKwiLPfGLLYYo9AFaCvWzzG6jHuSZC5OYrBWfOZv4+3omfCgglQ==,iv:LscUQE+PNhXGim9PSqc9nZIZichWSgAn/zsNxQ/HM/o=,tag:MaBCobnRM42fopiibibe5Q==,type:str] opencode-go-api-key: ENC[AES256_GCM,data:zbeTcaXJZFVfYnM/7sgblJFU9WfeosX/44KsXvrzKwiLPfGLLYYo9AFaCvWzzG6jHuSZC5OYrBWfOZv4+3omfCgglQ==,iv:LscUQE+PNhXGim9PSqc9nZIZichWSgAn/zsNxQ/HM/o=,tag:MaBCobnRM42fopiibibe5Q==,type:str]
zai-coding-plan-api-key: ENC[AES256_GCM,data:osUoFOvBgu+PtNiTIDIm3JoxsBJnQ9I8zY//9oeTpJxIvMctSWYnT4GYP4oI5mClZg==,iv:z5qxUPomGF1avLyk8PrAS3t+34ZGlQMRjbxVJ4JH9Cc=,tag:Qbz/LYAMXejXU4RS3RUPqA==,type:str]
netbird-key: ENC[AES256_GCM,data:swmaa+RjxeUmEl8hS2riGrW4lP5jdks9HM3x57/FLpOuqFtR,iv:MrpVjiocrPi+dBGPk7pwgSUNlJ1eryRpMjC8+jkU+T0=,tag:j6sqpQ02apqc6FwkdDvk9g==,type:str] netbird-key: ENC[AES256_GCM,data:swmaa+RjxeUmEl8hS2riGrW4lP5jdks9HM3x57/FLpOuqFtR,iv:MrpVjiocrPi+dBGPk7pwgSUNlJ1eryRpMjC8+jkU+T0=,tag:j6sqpQ02apqc6FwkdDvk9g==,type:str]
vicinae-json: ENC[AES256_GCM,data:FarBf6l8pl3hF7kGKPIWztUhwiKoQXmyTufCuJ120K/bPh1Bfiyi+ETt4DLYOGI6FJXfpVz4BbZOA29bXTLhVPxH0QtyBu/F5uEqA015b/c8VevDJSyy9huR13qO9ksLbMBt8RfWbAd9j26t7A1C8/mMyiJOEXCCTV9CEIW3xWrsYmhwsT8RYM+PwrPSeN1gQXHSMyRUjf/kOdJoda8+iXpLfjo4II4r2ELpbqi8QxhrRdsJsoOfAymFM784NtlTjE+h6S4TMehmoF/9ARif6I5SGQ0WfIKt/8orTGCPllL+NupLziSnpIGRGSybdArD+o5NCw59GOAbVRADxq8rCESwEkq3cF+hm8HabfYbiQ==,iv:Y/hXLFTJT3gNF3B6tgKoAh7njVuneoUzjVTlsCZiySw=,tag:2hfrwph6IccJdRu/yGu3XA==,type:str] vicinae-json: ENC[AES256_GCM,data:FarBf6l8pl3hF7kGKPIWztUhwiKoQXmyTufCuJ120K/bPh1Bfiyi+ETt4DLYOGI6FJXfpVz4BbZOA29bXTLhVPxH0QtyBu/F5uEqA015b/c8VevDJSyy9huR13qO9ksLbMBt8RfWbAd9j26t7A1C8/mMyiJOEXCCTV9CEIW3xWrsYmhwsT8RYM+PwrPSeN1gQXHSMyRUjf/kOdJoda8+iXpLfjo4II4r2ELpbqi8QxhrRdsJsoOfAymFM784NtlTjE+h6S4TMehmoF/9ARif6I5SGQ0WfIKt/8orTGCPllL+NupLziSnpIGRGSybdArD+o5NCw59GOAbVRADxq8rCESwEkq3cF+hm8HabfYbiQ==,iv:Y/hXLFTJT3gNF3B6tgKoAh7njVuneoUzjVTlsCZiySw=,tag:2hfrwph6IccJdRu/yGu3XA==,type:str]
sops: sops:
age: age:
- recipient: age14vktfes95f33vuefwnmuvryas7az04u76dsgyhfvsx73czkvmp2q7njkl4 - enc: |
enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBqS2RZdVJaNTlRamZPMkll YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBqS2RZdVJaNTlRamZPMkll
MDRVSVl1b2x2LzZpdlBrdmZtdyt3UE15RldRCldXUXE2a1BFeHg5NGNPbW5IMDht MDRVSVl1b2x2LzZpdlBrdmZtdyt3UE15RldRCldXUXE2a1BFeHg5NGNPbW5IMDht
@@ -15,8 +15,8 @@ sops:
bThQTFdZU29ISm93TWcwVk5ZTkhRWm8KCcprmLGhahgDkXCBpzjctHgao+gc+rKC bThQTFdZU29ISm93TWcwVk5ZTkhRWm8KCcprmLGhahgDkXCBpzjctHgao+gc+rKC
xLIwheUyFJOGK+ixqcdoZ/PC0kY68hVLt1YzLAyxFi4Ur1wltPrNug== xLIwheUyFJOGK+ixqcdoZ/PC0kY68hVLt1YzLAyxFi4Ur1wltPrNug==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
- recipient: age1x36yr8h993srfj29sfpzt4wyz52nztvncpmhgmfs0j26qvfecq3qvcm0an recipient: age14vktfes95f33vuefwnmuvryas7az04u76dsgyhfvsx73czkvmp2q7njkl4
enc: | - enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBGVW13WFE1Ylh3Uk1HNU1i YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBGVW13WFE1Ylh3Uk1HNU1i
bU9kRzFqTmhkQlRzMlRkM0VhMlNmMDUyK25NCkZYUStxM2tScGozRXJGekxGa1RX bU9kRzFqTmhkQlRzMlRkM0VhMlNmMDUyK25NCkZYUStxM2tScGozRXJGekxGa1RX
@@ -24,7 +24,8 @@ sops:
V1N3eUVjZ0VZRjBZdXRPNng3Y3JoUTAKQau9CG9XfvM+5JZVRwaJr/o/sXMaJiy2 V1N3eUVjZ0VZRjBZdXRPNng3Y3JoUTAKQau9CG9XfvM+5JZVRwaJr/o/sXMaJiy2
wo2YcDb+4vfT4Wr+/8J3ccQgbLRZH916X5ZPL+A+nFyVXVKOCl3ENg== wo2YcDb+4vfT4Wr+/8J3ccQgbLRZH916X5ZPL+A+nFyVXVKOCl3ENg==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2026-05-12T06:33:00Z" recipient: age1x36yr8h993srfj29sfpzt4wyz52nztvncpmhgmfs0j26qvfecq3qvcm0an
mac: ENC[AES256_GCM,data:htDJdEx34Q5NG8vwbBimnFENZawbLZ4FC0DkyG6J5RYP0BFnycKcKGsYR87SvIjcJZXvfZ0e6fXdtc78dd6I0sQtrQ7aNn4Iktbu/AkPmntsBwpIjVI99X9zUyQB87go/oX15yuyt8loB6ds2RkL/pfFsgLbFc10JHsBy+WcEzI=,iv:HvY+5LYzyHpRm8XCSKrN8ra/LJT9v23TPSsZg/4QVNU=,tag:k+d45+zgBYq4vlWmmc8ZkQ==,type:str] lastmodified: "2026-09-16T14:20:36Z"
mac: ENC[AES256_GCM,data:mhJvvn/+VBfNrP1pXRweLSNVlHq9/DLDcKQv8k9ZVsEcd077ifEAqduOXVKXcXDM0VTuBzArw9hmih+kZbCHoUZAQrk8LF7FC4a4FFwXG9p45uKWbUloTuq5w3MCxyU8IoyiAufZcWUlYFQjZ8K4n8N0bVrGQGHogemnrBXTUIo=,iv:H3tKQOuIe/pEIp0pUWCSar8VDompXNZ4BZfD1Wg4pb0=,tag:lyPR4Prlal1bpSRLmGfy7A==,type:str]
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.12.2 version: 3.13.3

View File

@@ -1,133 +1,162 @@
{ config, ... }: {config, ...}: {
{ flake.modules.nixos.sirius = {
flake.modules.nixos.sirius = pkgs,
{ hostName,
pkgs, userName,
hostName, ...
userName, }: {
... imports = with config.flake.modules.nixos; [
}: boot
{ networking
imports = with config.flake.modules.nixos; [ desktop
boot gaming
networking virtualisation
desktop ];
gaming
virtualisation
];
tnix = { tnix = {
boot = { boot = {
secure-boot.enable = true; secure-boot.enable = true;
impermanence = { impermanence = {
enable = true; enable = true;
home = { home = {
directories = [ directories = [
"Distrobox" "Distrobox"
".steam" ".steam"
".cache/awww" ".bun"
".config/BraveSoftware" ".rustup"
".config/zed" ".cache/awww"
".config/Vencord" ".cache/serpantinum"
".config/vesktop" ".config/BraveSoftware"
".config/sops" ".config/zed"
".config/obs-studio" ".config/Vencord"
".config/easyeffects" ".config/vesktop"
".config/DankMaterialShell" ".config/sops"
".local/share/Steam" ".config/nix"
".local/share/nvim" ".config/coderv2"
".local/share/opencode" ".config/obs-studio"
".local/share/zsh" ".config/easyeffects"
".local/share/zoxide" ".config/DankMaterialShell"
".local/state/lazygit" ".local/share/Steam"
".local/share/vicinae" ".local/share/lutris"
".local/share/TelegramDesktop" ".local/share/net.lutris.Lutris"
]; ".local/share/nvim"
".local/share/opencode"
".local/share/zsh"
".local/share/zoxide"
".local/share/voxtype"
".local/state/lazygit"
".local/share/vicinae"
".local/share/TelegramDesktop"
".local/share/GalaxyBudsClient"
".local/state/serpantinum"
".local/share/zed"
files = [ ".claude"
".wakatime.cfg" ".orca"
".config/lan-mouse/lan-mouse.pem" ".config/orca"
]; ".zcode"
}; ".config/ZCode"
];
files = [
".wakatime.cfg"
".config/lan-mouse/lan-mouse.pem"
".claude.json"
".config/gh/hosts.yml"
];
}; };
}; };
networking = {
openssh.enable = true;
netbird-client.enable = true;
};
virtualisation = {
docker.enable = true;
docker.nvidia.enable = true;
qemu.enable = true;
waydroid.enable = true;
distrobox.enable = true;
};
}; };
sops.secrets = {
tux-password = {
sopsFile = ./secrets.yaml;
neededForUsers = true;
};
gemini-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
openrouter-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
opencode-go-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
netbird-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
vicinae-json = {
sopsFile = ./secrets.yaml;
owner = userName;
};
};
# --- Networking ---
networking = { networking = {
hostName = hostName; openssh.enable = true;
networkmanager = { netbird-client.enable = true;
enable = true;
wifi.backend = "iwd";
};
wireless.iwd = {
enable = true;
settings = {
Network = {
EnableIPv6 = true;
};
Settings = {
AutoConnect = true;
};
};
};
firewall.enable = false;
}; };
environment.systemPackages = with pkgs; [ virtualisation = {
davinci-resolve docker.enable = true;
telegram-desktop docker.nvidia.enable = true;
]; qemu.enable = true;
waydroid.enable = true;
distrobox.enable = true;
};
# !!! DO NOT CHANGE THIS !!! programs.nix-ld.enable = true;
# This should match the version used at initial install.
system.stateVersion = "26.05";
}; };
sops.secrets = {
tux-password = {
sopsFile = ./secrets.yaml;
neededForUsers = true;
};
gemini-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
openrouter-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
opencode-go-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
zai-coding-plan-api-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
netbird-key = {
sopsFile = ./secrets.yaml;
owner = userName;
};
vicinae-json = {
sopsFile = ./secrets.yaml;
owner = userName;
};
};
# --- Networking ---
networking = {
hostName = hostName;
networkmanager = {
enable = true;
wifi.backend = "iwd";
};
wireless.iwd = {
enable = true;
settings = {
Network = {
EnableIPv6 = true;
};
Settings = {
AutoConnect = true;
};
};
};
firewall.enable = false;
};
environment.systemPackages = with pkgs; [
davinci-resolve
telegram-desktop
galaxy-buds-client
impala
llm-agents.claude-code
llm-agents.orca
llm-agents.zcode
coder
];
# !!! DO NOT CHANGE THIS !!!
# This should match the version used at initial install.
system.stateVersion = "26.05";
};
} }

View File

@@ -1,30 +0,0 @@
{
inputs,
config,
...
}:
let
hostName = "sirius";
userName = "tux";
userEmail = "t@tux.rs";
system = "x86_64-linux";
unstable = true;
nixpkgs = if unstable then inputs.nixpkgs else inputs.nixpkgs-stable;
in
{
flake.nixosConfigurations."${hostName}" = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit
hostName
userName
userEmail
system
;
};
modules = [
config.flake.modules.nixos.core
config.flake.modules.nixos.${hostName}
];
};
}

View File

@@ -1,49 +1,50 @@
{ inputs, ... }: {inputs, ...}: {
{ flake.modules.nixos.sirius = {
flake.modules.nixos.sirius = config,
{ config, lib, ... }: lib,
let ...
hasOptinPersistence = config.tnix.boot.impermanence.enable; }: let
in hasOptinPersistence = config.tnix.boot.impermanence.enable;
{ in {
imports = [ imports = [
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
]; ];
disko.devices.disk.primary = { disko.devices.disk.primary = {
device = "/dev/nvme1n1"; device = "/dev/nvme1n1";
type = "disk"; type = "disk";
content = { content = {
type = "gpt"; type = "gpt";
partitions = { partitions = {
ESP = { ESP = {
size = "1G"; size = "1G";
type = "EF00"; type = "EF00";
content = { content = {
type = "filesystem"; type = "filesystem";
format = "vfat"; format = "vfat";
mountpoint = "/boot"; mountpoint = "/boot";
mountOptions = [ mountOptions = [
"defaults" "defaults"
"umask=0077" "umask=0077"
]; ];
};
}; };
swap = { };
size = "70G"; swap = {
content = { size = "70G";
type = "swap"; content = {
discardPolicy = "both"; type = "swap";
resumeDevice = true; discardPolicy = "both";
}; resumeDevice = true;
}; };
root = { };
size = "100%"; root = {
type = "8300"; size = "100%";
content = { type = "8300";
type = "btrfs"; content = {
# Base subvolumes that always exist type = "btrfs";
subvolumes = { # Base subvolumes that always exist
subvolumes =
{
"/root" = { "/root" = {
mountOptions = [ mountOptions = [
"compress=zstd" "compress=zstd"
@@ -73,10 +74,10 @@
mountpoint = "/persist"; mountpoint = "/persist";
}; };
}; };
};
}; };
}; };
}; };
}; };
}; };
};
} }

View File

@@ -1,51 +1,61 @@
{ config, ... }:
{ {
flake.modules.nixos.sirius = inputs,
{ config,
lib, ...
pkgs, }: {
system, flake.modules.nixos.sirius = {
... lib,
}@innerArgs: pkgs,
{ system,
imports = with config.flake.modules.nixos; [ ...
} @ innerArgs: {
imports = with config.flake.modules.nixos;
[
hardware hardware
]
++ [
inputs.cardwire.nixosModules.default
]; ];
boot.kernelParams = [ "nvidia-drm.modeset=1" ]; boot.kernelParams = ["nvidia-drm.modeset=1"];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
"nvme" "nvme"
"xhci_pci" "xhci_pci"
"ahci" "ahci"
"usbhid" "usbhid"
"usb_storage" "usb_storage"
"sd_mod" "sd_mod"
]; ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
hardware = { hardware = {
nvidia = { nvidia = {
modesetting.enable = true; modesetting.enable = true;
open = false; open = false;
nvidiaSettings = true; nvidiaSettings = true;
};
cpu.amd.updateMicrocode = lib.mkDefault innerArgs.config.hardware.enableRedistributableFirmware;
}; };
services = { cpu.amd.updateMicrocode = lib.mkDefault innerArgs.config.hardware.enableRedistributableFirmware;
xserver.videoDrivers = [ "nvidia" ];
power-profiles-daemon.enable = true;
};
networking.useDHCP = lib.mkDefault true;
nixpkgs.config.cudaSupport = true;
nixpkgs.hostPlatform = lib.mkDefault system;
environment.systemPackages = with pkgs; [
nvtopPackages.full
];
}; };
services = {
xserver.videoDrivers = ["nvidia"];
power-profiles-daemon.enable = true;
cardwire = {
enable = true;
settings.auto_apply_gpu_state = true;
};
};
networking.useDHCP = lib.mkDefault true;
nixpkgs.config.cudaSupport = true;
nixpkgs.hostPlatform = lib.mkDefault system;
environment.systemPackages = with pkgs; [
nvtopPackages.full
];
};
} }

View File

@@ -1,5 +1,4 @@
{ config, ... }: {config, ...}: {
{
flake.modules.homeManager.sirius = { flake.modules.homeManager.sirius = {
imports = with config.flake.modules.homeManager; [ imports = with config.flake.modules.homeManager; [
desktop desktop
@@ -45,7 +44,7 @@
position = "bottom"; position = "bottom";
hostname = "canopus"; hostname = "canopus";
activate_on_startup = true; activate_on_startup = true;
ips = [ "192.168.8.2" ]; ips = ["192.168.8.2"];
} }
]; ];
}; };

View File

@@ -2,12 +2,12 @@ tux-password: ENC[AES256_GCM,data:JWQVd2MYX2U4UP4II62ixG9hWI5MtgHAFhl8aCmyrYPl1H
gemini-api-key: ENC[AES256_GCM,data:Y9YgXp/tB3Q1Rb5YMsZLgWCq+bdeIjsXAVeO3Yh7nZ8MwDH7d5De,iv:FIXxJCn6JDYsHIoNn8f8Un3z9ZPVbxdjR48Ux88poRg=,tag:bMJ4i69HTspnhzsrsxkbrw==,type:str] gemini-api-key: ENC[AES256_GCM,data:Y9YgXp/tB3Q1Rb5YMsZLgWCq+bdeIjsXAVeO3Yh7nZ8MwDH7d5De,iv:FIXxJCn6JDYsHIoNn8f8Un3z9ZPVbxdjR48Ux88poRg=,tag:bMJ4i69HTspnhzsrsxkbrw==,type:str]
openrouter-api-key: ENC[AES256_GCM,data:HfZgZz4NyCLLM9woTZp2I6JGOlVcFblw2OMjx8k0TG5ZU2ycBCF6bKqp3wFibUxXcHy+nIfjI82fkLeSyIaGILRLYCJCc8BHKw==,iv:umUcn8MRaj7JXo6IFrGMXOu+jsFSCEikMxsQxfaFS/Q=,tag:l2s61C4EpJoKv8cc9nYGFA==,type:str] openrouter-api-key: ENC[AES256_GCM,data:HfZgZz4NyCLLM9woTZp2I6JGOlVcFblw2OMjx8k0TG5ZU2ycBCF6bKqp3wFibUxXcHy+nIfjI82fkLeSyIaGILRLYCJCc8BHKw==,iv:umUcn8MRaj7JXo6IFrGMXOu+jsFSCEikMxsQxfaFS/Q=,tag:l2s61C4EpJoKv8cc9nYGFA==,type:str]
opencode-go-api-key: ENC[AES256_GCM,data:BGERcZg5Jpnznc4cXeYFMhPk9kKBkd9GvIuQBV9TW3JE1utgrLLYK6mKNCQqrEStRFiO2jUUnBm3opUNL4SuEHFLpw==,iv:fgFAwx6z9yruK27PvAJX/Q2CS9gU+LJ5zMUK/f/rzpo=,tag:BPu3M+jppPB8sLoLmfuY/Q==,type:str] opencode-go-api-key: ENC[AES256_GCM,data:BGERcZg5Jpnznc4cXeYFMhPk9kKBkd9GvIuQBV9TW3JE1utgrLLYK6mKNCQqrEStRFiO2jUUnBm3opUNL4SuEHFLpw==,iv:fgFAwx6z9yruK27PvAJX/Q2CS9gU+LJ5zMUK/f/rzpo=,tag:BPu3M+jppPB8sLoLmfuY/Q==,type:str]
zai-coding-plan-api-key: ENC[AES256_GCM,data:u5RHaBq5WHit+GjcKYnr6vN7jkputBtt3G0lCNBciMgBnBzIcZd/JjJcNaKXfbal5w==,iv:x+mG1aoct7yfm4Hvu1mMqBq8MiF8UZbQ8SFjA99qTIw=,tag:9cEIO2tuhqE6df2M2N/R+g==,type:str]
netbird-key: ENC[AES256_GCM,data:qXAnRnLM2TlzpOvWG4exJv0+pUvpe0FpRN5xOWx3+KNt+yhq,iv:X+yl4o1RSYMCMWdVXo1hpzy+6IdKXUpsKPtYNSiHiCY=,tag:I8HbnD5iw6EJ1TdsNrhvfw==,type:str] netbird-key: ENC[AES256_GCM,data:qXAnRnLM2TlzpOvWG4exJv0+pUvpe0FpRN5xOWx3+KNt+yhq,iv:X+yl4o1RSYMCMWdVXo1hpzy+6IdKXUpsKPtYNSiHiCY=,tag:I8HbnD5iw6EJ1TdsNrhvfw==,type:str]
vicinae-json: ENC[AES256_GCM,data:JjxolEgS6uakqR4eHOx3VyrOO5kaL4dj1jcEiLWsrktCU32UB7OmP1kJEVomA1rZjODpFHL89+FRpcNFspTFrc365WlANE81RLg/M2Ja1MiLYaDFNcBGtqMX9Yc1muor53Xl7t+rTSvDIj1oE1L7xPPcjCLfwC5QDzJjCBWj9FhCxnU5BwvoJNv9vgA6xnkzAOYSPZK/ihULMD0DxyqOUEa5ECGX62OPM9Gbr7jEviaItYzOOxaRs/yQVqizodGGl/BcK6fPqvOYSxip9ABYRVSI9ZvysY7ofAkeX91ardPwVG5VvEYfxZwBvGFjV7ZfTzVkK+BiUUNrvciAETHqwkjHftPpfJjxWsgLr8lbOA==,iv:HjDE/sqVDnxeww7r2upxH57rc1+LpuMKnhhyGXoc1Ms=,tag:d2kZeWkg17eVoNACIQ3Q9A==,type:str] vicinae-json: ENC[AES256_GCM,data:JjxolEgS6uakqR4eHOx3VyrOO5kaL4dj1jcEiLWsrktCU32UB7OmP1kJEVomA1rZjODpFHL89+FRpcNFspTFrc365WlANE81RLg/M2Ja1MiLYaDFNcBGtqMX9Yc1muor53Xl7t+rTSvDIj1oE1L7xPPcjCLfwC5QDzJjCBWj9FhCxnU5BwvoJNv9vgA6xnkzAOYSPZK/ihULMD0DxyqOUEa5ECGX62OPM9Gbr7jEviaItYzOOxaRs/yQVqizodGGl/BcK6fPqvOYSxip9ABYRVSI9ZvysY7ofAkeX91ardPwVG5VvEYfxZwBvGFjV7ZfTzVkK+BiUUNrvciAETHqwkjHftPpfJjxWsgLr8lbOA==,iv:HjDE/sqVDnxeww7r2upxH57rc1+LpuMKnhhyGXoc1Ms=,tag:d2kZeWkg17eVoNACIQ3Q9A==,type:str]
sops: sops:
age: age:
- recipient: age14vktfes95f33vuefwnmuvryas7az04u76dsgyhfvsx73czkvmp2q7njkl4 - enc: |
enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBQNGdHcDc4bTFkR0EyZlUr YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBQNGdHcDc4bTFkR0EyZlUr
eXovR1lyeTZJTDg5R281MFFuMHVwOXZXYzNvCkpIT1g3K05WUUswaEVjVVJWQkJq eXovR1lyeTZJTDg5R281MFFuMHVwOXZXYzNvCkpIT1g3K05WUUswaEVjVVJWQkJq
@@ -15,8 +15,8 @@ sops:
Z0JwWWR0STUybjVhSXdDR3NiKzV1eDQK22HmMuyqYaR/eGuALkAPB1Y5bN2KwIt3 Z0JwWWR0STUybjVhSXdDR3NiKzV1eDQK22HmMuyqYaR/eGuALkAPB1Y5bN2KwIt3
pamM8vbnjB//hXoyrv4vsoDk9WzLGFGjgiw2qsM2HQgzQqtrwF1/1A== pamM8vbnjB//hXoyrv4vsoDk9WzLGFGjgiw2qsM2HQgzQqtrwF1/1A==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
- recipient: age1maxsx5tq2h3d92rfyl8ekcdan5gu5cpch4qs3c56cu7qag02xgvs3h0gqc recipient: age14vktfes95f33vuefwnmuvryas7az04u76dsgyhfvsx73czkvmp2q7njkl4
enc: | - enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA1N3ZBd1pHODFtZkZxaHNP YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA1N3ZBd1pHODFtZkZxaHNP
OXlXUzVFS0ZIam1IWVkxNldOdTEwY0s4aUNZCjVlcnF1aXJxUUlQSXhteXJ6OU1W OXlXUzVFS0ZIam1IWVkxNldOdTEwY0s4aUNZCjVlcnF1aXJxUUlQSXhteXJ6OU1W
@@ -24,7 +24,8 @@ sops:
M3JocWZJeXFxenhXOENBVWpvNkd3bm8KqhNLzCyEAI643jGWpZF/uTchHmBj8ozU M3JocWZJeXFxenhXOENBVWpvNkd3bm8KqhNLzCyEAI643jGWpZF/uTchHmBj8ozU
HtpOzKsshif66D0XOHeJQfQamJI4TyKsj3Sk3j9rstsLmN2lxTRGHg== HtpOzKsshif66D0XOHeJQfQamJI4TyKsj3Sk3j9rstsLmN2lxTRGHg==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2026-05-10T00:35:50Z" recipient: age1maxsx5tq2h3d92rfyl8ekcdan5gu5cpch4qs3c56cu7qag02xgvs3h0gqc
mac: ENC[AES256_GCM,data:u27zQ1PPnWy5Parbh/1DkVP3ICmHnLZJKaLbN3dZEVONgqOWi32LV3t0iNhtLWwVnzFPBusRWahQiqAkUdnQtrXF0OtjPCpLuIw86xB75QPGbet0GZlLNb8/xPshChZe4v520csdJMWiy3vYeKrk8LxMSViAGhmhYK2a5NbGhzI=,iv:/9vePmvCNqoP0kx24fP3HfCjS2FkjBmI5B+SycvKKW4=,tag:gE1/DnLolwhoyfMJYejGIQ==,type:str] lastmodified: "2026-09-16T14:20:48Z"
mac: ENC[AES256_GCM,data:i2I6vo/tKTLq44Tu6vI2Cqp0EqQPbwuuRM2WUflD58UCr7huXIKnKrxmB1Hz/fdmpZPiCZ2dSlmOh733fKFclRmpHJLScYRX4+lFXEzToYExZlybVergxC6Cr4IaiB+A/HZIkW6iKK/ULr2mtXYNCqQgDQw8BgJuV2M/bAMM/V4=,iv:9akzmVH4CMMdDS5aukeLOxncMLKfvQCw2BYl36WAfOM=,tag:4F26bqEI8fEtNugqjHCUOg==,type:str]
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.12.2 version: 3.13.3

View File

@@ -0,0 +1,51 @@
{config, ...}: {
flake.modules.nixOnDroid.vega = {
pkgs,
userEmail,
...
}: {
imports = with config.flake.modules.nixOnDroid; [
networking
];
# @TODO: Broken currently
# android-integration.am.enable = true;
# android-integration.termux-open-url.enable = true;
# android-integration.xdg-open.enable = true;
# android-integration.termux-setup-storage.enable = true;
# android-integration.termux-reload-settings.enable = true;
terminal.font = let
firacode = pkgs.nerd-fonts.fira-code;
fontPath = "share/fonts/truetype/NerdFonts/FiraCode/FiraCodeNerdFont-Regular.ttf";
in "${firacode}/${fontPath}";
time.timeZone = "Asia/Kolkata";
tnix.networking.openssh = {
enable = true;
ports = [8033];
authorizedKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D ${userEmail}"
];
};
user = {
uid = 10481;
gid = 10481;
shell = "${pkgs.zsh}/bin/zsh";
};
environment.etcBackupExtension = ".backup";
environment.motd = "";
environment.packages = with pkgs; [
ncurses
procps
util-linux
rsync
gnutar
];
system.stateVersion = "24.05";
};
}

View File

@@ -0,0 +1,8 @@
{lib, ...}: {
flake.modules.homeManager.vega = {
# @TODO: Broken currently - By default it's enabled by neovim module
programs.vim.enable = lib.mkForce false;
home.stateVersion = "26.05";
};
}

View File

@@ -1,50 +1,44 @@
{ config, ... }: {config, ...}: {
{ flake.modules.nixos.vps = {hostName, ...}: {
flake.modules.nixos.vps = imports = with config.flake.modules.nixos; [
{ boot
hostName, networking
... virtualisation
}: services
{ ];
imports = with config.flake.modules.nixos; [
boot
networking
virtualisation
services
];
tnix = { tnix = {
boot = { boot = {
legacy.enable = true; legacy.enable = true;
impermanence = { impermanence = {
enable = true; enable = true;
home = { home = {
directories = [ directories = [
".local/share/nvim" ".local/share/nvim"
".local/share/zsh" ".local/share/zsh"
".local/share/zoxide" ".local/share/zoxide"
".local/state/lazygit" ".local/state/lazygit"
]; ];
};
}; };
}; };
networking.openssh.enable = true;
virtualisation = {
docker.enable = true;
};
}; };
# --- Networking --- networking.openssh.enable = true;
networking = {
hostName = hostName;
networkmanager.enable = true;
firewall.enable = false;
};
system.stateVersion = "26.05"; virtualisation = {
docker.enable = true;
};
}; };
# --- Networking ---
networking = {
hostName = hostName;
networkmanager.enable = true;
firewall.enable = false;
};
system.stateVersion = "26.05";
};
} }

View File

@@ -1,30 +0,0 @@
{
inputs,
config,
...
}:
let
hostName = "vps";
userName = "tux";
userEmail = "t@tux.rs";
system = "x86_64-linux";
unstable = true;
nixpkgs = if unstable then inputs.nixpkgs else inputs.nixpkgs-stable;
in
{
flake.nixosConfigurations."${hostName}" = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit
hostName
userName
userEmail
system
;
};
modules = [
config.flake.modules.nixos.core
config.flake.modules.nixos.${hostName}
];
};
}

View File

@@ -1,22 +1,23 @@
{ inputs, ... }: {inputs, ...}: {
{ flake.modules.nixos.vps = {
flake.modules.nixos.vps = config,
{ config, lib, ... }: lib,
let ...
hasOptinPersistence = config.tnix.boot.impermanence.enable; }: let
isLegacy = config.tnix.boot.legacy.enable; hasOptinPersistence = config.tnix.boot.impermanence.enable;
in isLegacy = config.tnix.boot.legacy.enable;
{ in {
imports = [ imports = [
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
]; ];
disko.devices.disk.primary = { disko.devices.disk.primary = {
device = "/dev/sda"; device = "/dev/sda";
type = "disk"; type = "disk";
content = { content = {
type = "gpt"; type = "gpt";
partitions = { partitions =
{
ESP = { ESP = {
size = "1G"; size = "1G";
type = "EF00"; type = "EF00";
@@ -36,36 +37,37 @@
content = { content = {
type = "btrfs"; type = "btrfs";
# Base subvolumes that always exist # Base subvolumes that always exist
subvolumes = { subvolumes =
"/root" = { {
mountOptions = [ "/root" = {
"compress=zstd" mountOptions = [
"noatime" "compress=zstd"
"space_cache=v2" "noatime"
]; "space_cache=v2"
mountpoint = "/"; ];
mountpoint = "/";
};
"/nix" = {
mountOptions = [
"compress=zstd"
"noatime"
"noacl"
"space_cache=v2"
];
mountpoint = "/nix";
};
}
# Conditionally merge /persist only when impermanence is enabled
// lib.optionalAttrs hasOptinPersistence {
"/persist" = {
mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
];
mountpoint = "/persist";
};
}; };
"/nix" = {
mountOptions = [
"compress=zstd"
"noatime"
"noacl"
"space_cache=v2"
];
mountpoint = "/nix";
};
}
# Conditionally merge /persist only when impermanence is enabled
// lib.optionalAttrs hasOptinPersistence {
"/persist" = {
mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
];
mountpoint = "/persist";
};
};
}; };
}; };
} }
@@ -76,7 +78,7 @@
type = "EF02"; type = "EF02";
}; };
}; };
};
}; };
}; };
};
} }

View File

@@ -1,17 +1,15 @@
{ {
flake.modules.nixos.vps = flake.modules.nixos.vps = {
{ lib,
lib, modulesPath,
modulesPath, system,
system, ...
... }: {
}: imports = [
{ (modulesPath + "/profiles/qemu-guest.nix")
imports = [ ];
(modulesPath + "/profiles/qemu-guest.nix")
];
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault system; nixpkgs.hostPlatform = lib.mkDefault system;
}; };
} }

View File

@@ -1,4 +1,3 @@
{ ... }:
{ {
flake.modules.homeManager.vps = { flake.modules.homeManager.vps = {
home.stateVersion = "26.05"; home.stateVersion = "26.05";

View File

@@ -1,70 +1,71 @@
{ inputs, ... }: {inputs, ...}: {
{ flake.modules.nixos.boot = {
flake.modules.nixos.boot = config,
{ lib,
config, userName,
lib, ...
userName, }: let
... cfg = config.tnix.boot;
}: in {
let imports = [
cfg = config.tnix.boot; inputs.impermanence.nixosModules.impermanence
in ];
{
imports = [
inputs.impermanence.nixosModules.impermanence
];
options.tnix.boot.impermanence = { options.tnix.boot.impermanence = {
enable = lib.mkEnableOption "Enable impermanence"; enable = lib.mkEnableOption "Enable impermanence";
directories = lib.mkOption { directories = lib.mkOption {
type = lib.types.listOf lib.types.str; type = lib.types.listOf lib.types.str;
default = [ ]; default = [];
};
files = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
};
}; };
options.tnix.boot.impermanence.home = { files = lib.mkOption {
directories = lib.mkOption { type = lib.types.listOf lib.types.str;
type = lib.types.listOf lib.types.str; default = [];
default = [ ]; };
}; };
files = lib.mkOption { options.tnix.boot.impermanence.home = {
type = lib.types.listOf lib.types.str; directories = lib.mkOption {
default = [ ]; type = lib.types.listOf lib.types.str;
}; default = [];
}; };
config = lib.mkIf cfg.impermanence.enable { files = lib.mkOption {
programs.fuse.userAllowOther = true; type = lib.types.listOf lib.types.str;
fileSystems."/persist".neededForBoot = true; default = [];
environment.persistence."/persist" = { };
hideMounts = true; };
directories = [
config = lib.mkIf cfg.impermanence.enable {
programs.fuse.userAllowOther = true;
fileSystems."/persist".neededForBoot = true;
environment.persistence."/persist" = {
hideMounts = true;
directories =
[
"/var/log" "/var/log"
"/var/lib" "/var/lib"
"/etc/NetworkManager/system-connections" "/etc/NetworkManager/system-connections"
] ]
++ cfg.impermanence.directories; ++ cfg.impermanence.directories;
files = [ files =
[
"/etc/machine-id"
"/etc/ssh/ssh_host_ed25519_key" "/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub" "/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key" "/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub" "/etc/ssh/ssh_host_rsa_key.pub"
"/etc/ly/save.txt"
] ]
++ cfg.impermanence.files; ++ cfg.impermanence.files;
}; };
home-manager.users.${userName} = { home-manager.users.${userName} = {
home.persistence."/persist" = { home.persistence."/persist" = {
directories = [ directories =
[
"Downloads" "Downloads"
"Music" "Music"
"Wallpapers" "Wallpapers"
@@ -76,46 +77,46 @@
] ]
++ cfg.impermanence.home.directories; ++ cfg.impermanence.home.directories;
files = cfg.impermanence.home.files; files = cfg.impermanence.home.files;
};
}; };
};
boot.initrd.systemd = { boot.initrd.systemd = {
enable = true; enable = true;
services.wipe-my-fs = { services.wipe-my-fs = {
wantedBy = [ "initrd.target" ]; wantedBy = ["initrd.target"];
after = [ "initrd-root-device.target" ]; after = ["initrd-root-device.target"];
before = [ "sysroot.mount" ]; before = ["sysroot.mount"];
unitConfig.DefaultDependencies = "no"; unitConfig.DefaultDependencies = "no";
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
script = '' script = ''
mkdir /btrfs_tmp mkdir /btrfs_tmp
mount /dev/disk/by-partlabel/disk-primary-root /btrfs_tmp mount /dev/disk/by-partlabel/disk-primary-root /btrfs_tmp
if [[ -e /btrfs_tmp/root ]]; then if [[ -e /btrfs_tmp/root ]]; then
mkdir -p /btrfs_tmp/old_roots mkdir -p /btrfs_tmp/old_roots
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S") timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp" mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
fi fi
delete_subvolume_recursively() { delete_subvolume_recursively() {
IFS=$'\n' IFS=$'\n'
for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
delete_subvolume_recursively "/btrfs_tmp/$i" delete_subvolume_recursively "/btrfs_tmp/$i"
done done
btrfs subvolume delete "$1" btrfs subvolume delete "$1"
} }
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do
delete_subvolume_recursively "$i" delete_subvolume_recursively "$i"
done done
btrfs subvolume create /btrfs_tmp/root btrfs subvolume create /btrfs_tmp/root
umount /btrfs_tmp umount /btrfs_tmp
''; '';
};
}; };
}; };
}; };
};
} }

View File

@@ -1,29 +1,32 @@
{ {
flake.modules.nixos.boot = flake.modules.nixos.boot = {
{ config, lib, ... }: config,
let lib,
cfg = config.tnix.boot; ...
in }: let
{ cfg = config.tnix.boot;
options.tnix.boot.legacy = { in {
enable = lib.mkEnableOption "legacy boot (GRUB) instead of systemd-boot"; options.tnix.boot.legacy = {
}; enable = lib.mkEnableOption "legacy boot (GRUB) instead of systemd-boot";
config = lib.mkMerge [
{
boot.loader = {
timeout = 1;
efi.canTouchEfiVariables = true;
};
}
(lib.mkIf (!cfg.legacy.enable && !cfg.secure-boot.enable) {
boot.loader.systemd-boot.enable = true;
})
(lib.mkIf cfg.legacy.enable {
boot.loader.grub.enable = true;
})
];
}; };
config = lib.mkMerge [
{
boot.binfmt.emulatedSystems = ["aarch64-linux"];
boot.loader = {
timeout = 1;
efi.canTouchEfiVariables = true;
};
}
(lib.mkIf (!cfg.legacy.enable && !cfg.secure-boot.enable) {
boot.loader.systemd-boot.enable = true;
})
(lib.mkIf cfg.legacy.enable {
boot.loader.grub.enable = true;
})
];
};
} }

View File

@@ -1,12 +1,10 @@
{ {
flake.modules.nixos.boot = flake.modules.nixos.boot = {pkgs, ...}: {
{ pkgs, ... }: boot = {
{ consoleLogLevel = 0;
boot = { initrd.verbose = false;
consoleLogLevel = 0; kernelPackages = pkgs.linuxPackages_zen;
initrd.verbose = false; supportedFilesystems = ["ntfs"];
kernelPackages = pkgs.linuxPackages_zen;
supportedFilesystems = [ "ntfs" ];
};
}; };
};
} }

View File

@@ -1,43 +1,39 @@
{ inputs, ... }: {inputs, ...}: {
{ flake.modules.nixos.boot = {
flake.modules.nixos.boot = config,
{ lib,
config, pkgs,
lib, ...
pkgs, }: let
... cfg = config.tnix.boot;
}: in {
let imports = [inputs.lanzaboote.nixosModules.lanzaboote];
cfg = config.tnix.boot;
in
{
imports = [ inputs.lanzaboote.nixosModules.lanzaboote ];
options.tnix.boot.secure-boot = { options.tnix.boot.secure-boot = {
enable = lib.mkEnableOption "Enable secure-boot"; enable = lib.mkEnableOption "Enable secure-boot";
}; };
config = lib.mkIf cfg.secure-boot.enable { config = lib.mkIf cfg.secure-boot.enable {
assertions = [ assertions = [
{ {
assertion = !cfg.legacy.enable; assertion = !cfg.legacy.enable;
message = "secure-boot and legacy boot (GRUB) cannot be enabled at the same time"; message = "secure-boot and legacy boot (GRUB) cannot be enabled at the same time";
} }
]; ];
environment.systemPackages = [ pkgs.sbctl ]; environment.systemPackages = [pkgs.sbctl];
# Lanzaboote replaces systemd-boot, so force it off # Lanzaboote replaces systemd-boot, so force it off
boot.loader.systemd-boot.enable = lib.mkForce false; boot.loader.systemd-boot.enable = lib.mkForce false;
boot.lanzaboote = { boot.lanzaboote = {
enable = true; enable = true;
autoGenerateKeys.enable = true; autoGenerateKeys.enable = true;
autoEnrollKeys.enable = true; autoEnrollKeys.enable = true;
configurationLimit = 10; configurationLimit = 10;
pkiBundle = "/var/lib/sbctl"; pkiBundle = "/var/lib/sbctl";
};
}; };
}; };
};
} }

View File

@@ -0,0 +1,5 @@
{
flake.modules.nixos.core = {...}: {
environment.enableAllTerminfo = true;
};
}

View File

@@ -1,37 +1,38 @@
{ inputs, config, ... }:
{ {
flake.modules.nixos.core = inputs,
{ config,
hostName, ...
userName, }: {
userEmail, flake.modules.nixos.core = {
... hostName,
}: userName,
{ userEmail,
imports = [ ...
inputs.home-manager.nixosModules.home-manager }: {
]; imports = [
inputs.home-manager.nixosModules.home-manager
];
home-manager = { home-manager = {
backupFileExtension = "bak"; backupFileExtension = "bak";
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { extraSpecialArgs = {
inherit inherit
inputs inputs
hostName hostName
userName userName
userEmail userEmail
; ;
}; };
users.${userName} = { users.${userName} = {
imports = [ imports = [
config.flake.modules.homeManager.core config.flake.modules.homeManager.core
config.flake.modules.homeManager.shell config.flake.modules.homeManager.shell
config.flake.modules.homeManager.${hostName} config.flake.modules.homeManager.${hostName}
]; ];
};
}; };
}; };
};
} }

View File

@@ -1,20 +1,18 @@
{ {
flake.modules.nixos.core = flake.modules.nixos.core = {
{ config,
config, userName,
userName, ...
... }: {
}: programs.nh = {
{ enable = true;
programs.nh = {
enable = true;
clean = { clean = {
enable = !config.nix.gc.automatic; enable = !config.nix.gc.automatic;
dates = "weekly"; dates = "weekly";
};
flake = "/home/${userName}/Projects/nixos-config";
}; };
flake = "/home/${userName}/Projects/nixos-config";
}; };
};
} }

View File

@@ -1,6 +1,5 @@
{ inputs, ... }: {inputs, ...}: {
{ flake.modules.nixos.core = {pkgs, ...}: {
flake.modules.nixos.core = { pkgs, ... }: {
imports = [ imports = [
inputs.nix-index-database.nixosModules.default inputs.nix-index-database.nixosModules.default
]; ];

View File

@@ -0,0 +1,18 @@
{...}: {
flake.modules.nixos.core = {
config,
lib,
...
}:
with lib; let
cfg = config.tnix.programs.nix-ld;
in {
options.tnix.programs.nix-ld = {
enable = mkEnableOption "nix-ld";
};
config = mkIf cfg.enable {
programs.nix-ld.enable = true;
};
};
}

View File

@@ -1,83 +1,86 @@
{ {
flake.modules.nixos.core = flake.modules.nixos.core = {userName, ...}: {
{ userName, ... }: nix = {
{ channel.enable = false;
nix = {
channel.enable = false;
gc = { gc = {
automatic = true; automatic = true;
options = "--delete-older-than 7d"; options = "--delete-older-than 7d";
dates = "weekly"; dates = "weekly";
persistent = true; persistent = true;
}; };
optimise.automatic = true; optimise.automatic = true;
settings = { settings = {
experimental-features = [ extra-platforms = [
"nix-command" "aarch64-linux"
"flakes" "arm-linux"
]; ];
max-jobs = "auto"; experimental-features = [
"nix-command"
"flakes"
];
# Make legacy nix commands use the XDG base directories instead of creating directories in $HOME. max-jobs = "auto";
use-xdg-base-directories = true;
# The maximum number of parallel TCP connections used to fetch files from binary caches and by other downloads. # Make legacy nix commands use the XDG base directories instead of creating directories in $HOME.
# It defaults to 25. 0 means no limit. use-xdg-base-directories = true;
http-connections = 128;
# This option defines the maximum number of substitution jobs that Nix will try to run in # The maximum number of parallel TCP connections used to fetch files from binary caches and by other downloads.
# parallel. The default is 16. The minimum value one can choose is 1 and lower values will be # It defaults to 25. 0 means no limit.
# interpreted as 1. http-connections = 128;
max-substitution-jobs = 128;
# The number of lines of the tail of the log to show if a build fails. # This option defines the maximum number of substitution jobs that Nix will try to run in
log-lines = 25; # parallel. The default is 16. The minimum value one can choose is 1 and lower values will be
# interpreted as 1.
max-substitution-jobs = 128;
# When free disk space in /nix/store drops below min-free during a build, Nix performs a # The number of lines of the tail of the log to show if a build fails.
# garbage-collection until max-free bytes are available or there is no more garbage. log-lines = 25;
# A value of 0 (the default) disables this feature.
min-free = 128000000; # 128 MB
max-free = 1000000000; # 1 GB
# Prevent garbage collection from altering nix-shells managed by nix-direnv # When free disk space in /nix/store drops below min-free during a build, Nix performs a
# https://github.com/nix-community/nix-direnv#installation # garbage-collection until max-free bytes are available or there is no more garbage.
keep-outputs = true; # A value of 0 (the default) disables this feature.
keep-derivations = true; min-free = 128000000; # 128 MB
max-free = 1000000000; # 1 GB
# If set to true, Nix will keep building derivations even if some fail. The default is false. # Prevent garbage collection from altering nix-shells managed by nix-direnv
keep-going = true; # https://github.com/nix-community/nix-direnv#installation
keep-outputs = true;
keep-derivations = true;
# Automatically detect files in the store that have identical contents, and replaces # If set to true, Nix will keep building derivations even if some fail. The default is false.
# them with hard links to a single copy. This saves disk space. keep-going = true;
auto-optimise-store = true;
# Whether to warn about dirty Git/Mercurial trees. # Automatically detect files in the store that have identical contents, and replaces
warn-dirty = false; # them with hard links to a single copy. This saves disk space.
auto-optimise-store = true;
# The timeout (in seconds) for establishing connections in the binary cache substituter. # Whether to warn about dirty Git/Mercurial trees.
# It corresponds to curls connect-timeout option. A value of 0 means no limit. warn-dirty = false;
connect-timeout = 5;
# Allow the use of cachix # The timeout (in seconds) for establishing connections in the binary cache substituter.
trusted-users = [ # It corresponds to curls connect-timeout option. A value of 0 means no limit.
"root" connect-timeout = 5;
"${userName}"
];
allowed-users = [
"root"
"${userName}"
];
builders-use-substitutes = true; # Allow the use of cachix
trusted-users = [
"root"
"${userName}"
];
allowed-users = [
"root"
"${userName}"
];
# If set to true, Nix will fall back to building from source if a binary substitute builders-use-substitutes = true;
# fails. This is equivalent to the fallback flag. The default is false.
fallback = true; # If set to true, Nix will fall back to building from source if a binary substitute
}; # fails. This is equivalent to the fallback flag. The default is false.
fallback = true;
}; };
}; };
};
} }

View File

@@ -1,5 +1,4 @@
{ inputs, ... }: {inputs, ...}: {
{
flake.modules.nixos.core = { flake.modules.nixos.core = {
nixpkgs = { nixpkgs = {
config = { config = {

View File

@@ -1,9 +1,7 @@
{ {
flake.modules.nixos.core = flake.modules.nixos.core = {
{ pkgs, ... }: security = {
{ sudo.wheelNeedsPassword = false;
security = {
sudo.wheelNeedsPassword = false;
};
}; };
};
} }

View File

@@ -1,25 +1,21 @@
{ inputs, ... }: {inputs, ...}: {
{ flake.modules.nixos.core = {
flake.modules.nixos.core = config,
{ pkgs,
config, ...
pkgs, }: let
... isEd25519 = k: k.type == "ed25519";
}: getKeyPath = k: k.path;
let keys = builtins.filter isEd25519 config.services.openssh.hostKeys;
isEd25519 = k: k.type == "ed25519"; in {
getKeyPath = k: k.path; imports = [inputs.sops-nix.nixosModules.sops];
keys = builtins.filter isEd25519 config.services.openssh.hostKeys;
in
{
imports = [ inputs.sops-nix.nixosModules.sops ];
sops.age = { sops.age = {
sshKeyPaths = map getKeyPath keys; sshKeyPaths = map getKeyPath keys;
keyFile = "/var/lib/sops-nix/key.txt"; keyFile = "/var/lib/sops-nix/key.txt";
generateKey = true; generateKey = true;
};
environment.systemPackages = with pkgs; [ sops ];
}; };
environment.systemPackages = with pkgs; [sops];
};
} }

View File

@@ -33,6 +33,10 @@
"wezterm.cachix.org-1:kAbhjYUC9qvblTE+s7S+kl5XM1zVa4skO+E/1IDWdH0=" "wezterm.cachix.org-1:kAbhjYUC9qvblTE+s7S+kl5XM1zVa4skO+E/1IDWdH0="
"cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M="
]; ];
extra-substituters = ["https://cache.numtide.com"];
extra-trusted-public-keys = [
"niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g="
];
}; };
}; };
} }

View File

@@ -1,51 +1,48 @@
{ {
flake.modules.nixos.core = flake.modules.nixos.core = {
{ pkgs,
pkgs, lib,
lib, config,
config, userName,
userName, userEmail,
userEmail, ...
... }: let
}: hasPasswordSecret = lib.hasAttrByPath ["sops" "secrets" "tux-password"] config;
let in {
hasPasswordSecret = lib.hasAttrByPath [ "sops" "secrets" "tux-password" ] config; programs.zsh.enable = true;
in
{
programs.zsh.enable = true;
time.timeZone = "Asia/Kolkata"; time.timeZone = "Asia/Kolkata";
i18n = { i18n = {
defaultLocale = "en_US.UTF-8"; defaultLocale = "en_US.UTF-8";
extraLocaleSettings = lib.genAttrs [ extraLocaleSettings = lib.genAttrs [
"LC_ADDRESS" "LC_ADDRESS"
"LC_IDENTIFICATION" "LC_IDENTIFICATION"
"LC_MEASUREMENT" "LC_MEASUREMENT"
"LC_MONETARY" "LC_MONETARY"
"LC_NAME" "LC_NAME"
"LC_NUMERIC" "LC_NUMERIC"
"LC_PAPER" "LC_PAPER"
"LC_TELEPHONE" "LC_TELEPHONE"
"LC_TIME" "LC_TIME"
] (_: "en_IN"); ] (_: "en_IN");
}; };
users = { users = {
mutableUsers = false; mutableUsers = false;
defaultUserShell = pkgs.zsh; defaultUserShell = pkgs.zsh;
users.${userName} = { users.${userName} = {
hashedPasswordFile = lib.mkIf hasPasswordSecret config.sops.secrets.tux-password.path; hashedPasswordFile = lib.mkIf hasPasswordSecret config.sops.secrets.tux-password.path;
initialPassword = lib.mkIf (!hasPasswordSecret) userName; initialPassword = lib.mkIf (!hasPasswordSecret) userName;
isNormalUser = true; isNormalUser = true;
extraGroups = [ extraGroups = [
"networkmanager" "networkmanager"
"wheel" "wheel"
"storage" "storage"
]; ];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D ${userEmail}" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D ${userEmail}"
]; ];
};
}; };
}; };
};
} }

View File

@@ -1,11 +1,9 @@
{ {
flake.modules.nixos.desktop = flake.modules.nixos.desktop = {pkgs, ...}: {
{ pkgs, ... }: fonts.packages = with pkgs.nerd-fonts; [
{ fira-code
fonts.packages = with pkgs.nerd-fonts; [ jetbrains-mono
fira-code bigblue-terminal
jetbrains-mono ];
bigblue-terminal };
];
};
} }

View File

@@ -1,13 +1,11 @@
{ {
flake.modules.nixos.desktop = flake.modules.nixos.desktop = {pkgs, ...}: {
{ pkgs, ... }: programs.gpu-screen-recorder = {
{ enable = true;
programs.gpu-screen-recorder = {
enable = true;
};
environment.systemPackages = with pkgs; [
gpu-screen-recorder-gtk
];
}; };
environment.systemPackages = with pkgs; [
gpu-screen-recorder-gtk
];
};
} }

View File

@@ -1,11 +1,9 @@
{ {
flake.modules.nixos.desktop = flake.modules.nixos.desktop = {pkgs, ...}: {
{ pkgs, ... }: programs.hyprland = {
{ enable = true;
programs.hyprland = { package = pkgs.hyprland-git.hyprland;
enable = true; portalPackage = pkgs.hyprland-git.xdg-desktop-portal-hyprland;
package = pkgs.hyprland-git.hyprland;
portalPackage = pkgs.hyprland-git.xdg-desktop-portal-hyprland;
};
}; };
};
} }

View File

@@ -1,36 +1,30 @@
{ {inputs, ...}: {
inputs, flake.modules.nixos.desktop = {
... pkgs,
}: lib,
{ ...
flake.modules.nixos.desktop = }: {
{ imports = [
pkgs, inputs.mango.nixosModules.mango
lib, ];
...
}: programs.mango.enable = true;
{
imports = [ xdg.portal = {
inputs.mango.nixosModules.mango enable = lib.mkDefault true;
extraPortals = with pkgs; [
hyprland-git.xdg-desktop-portal-hyprland
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
]; ];
config.mango = {
programs.mango.enable = true; default = lib.mkForce [
"hyprland"
xdg.portal = { "gtk"
enable = lib.mkDefault true;
extraPortals = with pkgs; [
hyprland-git.xdg-desktop-portal-hyprland
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
]; ];
config.mango = { "org.freedesktop.impl.portal.ScreenCast" = lib.mkForce ["hyprland"];
default = lib.mkForce [ "org.freedesktop.impl.portal.ScreenShot" = lib.mkForce ["hyprland"];
"hyprland"
"gtk"
];
"org.freedesktop.impl.portal.ScreenCast" = lib.mkForce [ "hyprland" ];
"org.freedesktop.impl.portal.ScreenShot" = lib.mkForce [ "hyprland" ];
};
}; };
}; };
};
} }

View File

@@ -1,7 +1,5 @@
{ {
flake.modules.nixos.desktop = flake.modules.nixos.desktop = {pkgs, ...}: {
{ pkgs, ... }: environment.systemPackages = with pkgs; [brightnessctl];
{ };
environment.systemPackages = with pkgs; [ brightnessctl ];
};
} }

View File

@@ -1,15 +1,14 @@
{ {
flake.modules.nixos.desktop = flake.modules.nixos.desktop = {pkgs, ...}: {
{ pkgs, ... }: programs.obs-studio = {
{ enable = true;
programs.obs-studio = { enableVirtualCamera = true;
enable = true; plugins = with pkgs.obs-studio-plugins; [
enableVirtualCamera = true; obs-vaapi
plugins = with pkgs.obs-studio-plugins; [ wlrobs
obs-vaapi obs-source-record
wlrobs obs-advanced-masks
obs-source-record ];
];
};
}; };
};
} }

View File

@@ -1,18 +1,16 @@
{ {
flake.modules.nixos.desktop = flake.modules.nixos.desktop = {pkgs, ...}: {
{ pkgs, ... }: services = {
{ gvfs.enable = true;
services = { tumbler.enable = true;
gvfs.enable = true;
tumbler.enable = true;
};
programs.thunar = {
enable = true;
plugins = with pkgs; [
thunar-archive-plugin
thunar-volman
];
};
}; };
programs.thunar = {
enable = true;
plugins = with pkgs; [
thunar-archive-plugin
thunar-volman
];
};
};
} }

View File

@@ -1,7 +0,0 @@
{
flake.modules.nixos.desktop =
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ tpanel ];
};
}

View File

@@ -0,0 +1,5 @@
{
flake.modules.nixos.desktop = {pkgs, ...}: {
environment.systemPackages = with pkgs; [tshell];
};
}

View File

@@ -1,11 +1,9 @@
{ {
flake.modules.nixos.gaming = flake.modules.nixos.gaming = {pkgs, ...}: {
{ pkgs, ... }: programs.steam = {
{ enable = true;
programs.steam = { protontricks.enable = true;
enable = true; extraCompatPackages = with pkgs; [proton-ge-bin];
protontricks.enable = true;
extraCompatPackages = with pkgs; [ proton-ge-bin ];
};
}; };
};
} }

View File

@@ -1,5 +1,5 @@
{ {
flake.modules.nixos.hardware = { flake.modules.nixos.hardware = {pkgs, ...}: {
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
@@ -9,5 +9,10 @@
pulse.enable = true; pulse.enable = true;
wireplumber.enable = true; wireplumber.enable = true;
}; };
environment.systemPackages = with pkgs; [
alsa-utils
pavucontrol
];
}; };
} }

View File

@@ -1,5 +1,5 @@
{ {
flake.modules.nixos.hardware = { pkgs, ... }: { flake.modules.nixos.hardware = {pkgs, ...}: {
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;
}; };

View File

@@ -1,16 +1,13 @@
{ {
flake.modules.nixos.networking = flake.modules.nixos.networking = {
{ config,
config, lib,
lib, hostName,
hostName, ...
... }:
}: with lib; let
with lib;
let
cfg = config.tnix.networking.netbird-client; cfg = config.tnix.networking.netbird-client;
in in {
{
options.tnix.networking.netbird-client = { options.tnix.networking.netbird-client = {
enable = mkEnableOption "Enable netbird client"; enable = mkEnableOption "Enable netbird client";
}; };

View File

@@ -1,15 +1,12 @@
{ {
flake.modules.nixos.networking = flake.modules.nixos.networking = {
{ config,
config, lib,
lib, ...
... }:
}: with lib; let
with lib;
let
cfg = config.tnix.networking.newt; cfg = config.tnix.networking.newt;
in in {
{
options.tnix.networking.newt = { options.tnix.networking.newt = {
enable = mkEnableOption "Newt"; enable = mkEnableOption "Newt";

View File

@@ -1,25 +1,22 @@
{ {
flake.modules.nixos.networking = flake.modules.nixos.networking = {
{ config,
config, lib,
lib, ...
... }:
}: with lib; let
with lib;
let
cfg = config.tnix.networking.openssh; cfg = config.tnix.networking.openssh;
# Sops needs acess to the keys before the persist dirs are even mounted; so # Sops needs acess to the keys before the persist dirs are even mounted; so
# just persisting the keys won't work, we must point at /persist # just persisting the keys won't work, we must point at /persist
hasOptinPersistence = config.tnix.boot.impermanence.enable; hasOptinPersistence = config.tnix.boot.impermanence.enable;
in in {
{
options.tnix.networking.openssh = { options.tnix.networking.openssh = {
enable = mkEnableOption "Enable OpenSSH server"; enable = mkEnableOption "Enable OpenSSH server";
ports = mkOption { ports = mkOption {
type = types.listOf types.port; type = types.listOf types.port;
default = [ 22 ]; default = [22];
description = '' description = ''
Specifies on which ports the SSH daemon listens. Specifies on which ports the SSH daemon listens.
''; '';

View File

@@ -1,17 +1,14 @@
{ {
flake.modules.nixos.services = flake.modules.nixos.services = {
{ config,
config, lib,
lib, ...
... }:
}: with lib; let
with lib;
let
cfg = config.tnix.services.aiostreams; cfg = config.tnix.services.aiostreams;
port = toString cfg.port; port = toString cfg.port;
acmeHost = config.tnix.services.nginx.domain; acmeHost = config.tnix.services.nginx.domain;
in in {
{
options.tnix.services.aiostreams = { options.tnix.services.aiostreams = {
enable = mkEnableOption "AIOStreams"; enable = mkEnableOption "AIOStreams";

View File

@@ -0,0 +1,95 @@
{
flake.modules.nixos.services = {
config,
lib,
options,
...
}:
with lib; let
cfg = config.tnix.services.coder;
port = toString cfg.port;
in {
options.tnix.services.coder = {
enable = mkEnableOption "Coder";
host = mkOption {
type = types.str;
default = "127.0.0.1";
description = "Host on which Coder listens";
};
port = mkOption {
type = types.port;
default = 1116;
description = "Port on which Coder listens";
};
environment = options.services.coder.environment;
domain = mkOption {
type = types.str;
default = "";
description = "Domain on which Coder is available";
};
configureNginx = mkOption {
type = types.bool;
default = false;
description = "Whether to configure Nginx as a reverse proxy for Coder";
};
configurePangolin = mkOption {
type = types.bool;
default = false;
description = "Whether to configure Pangolin as a reverse proxy for Coder";
};
};
config = mkIf cfg.enable {
users.users.coder.extraGroups = ["docker"];
services = {
coder = {
enable = true;
accessUrl = "https://${cfg.domain}";
listenAddress = "${cfg.host}:${port}";
environment = cfg.environment;
};
nginx.virtualHosts.${cfg.domain} = mkIf cfg.configureNginx {
forceSSL = acmeHost != "";
useACMEHost = mkIf (acmeHost != "") acmeHost;
locations."/" = {
proxyPass = "http://${cfg.host}:${port}";
proxyWebsockets = true;
};
};
newt.blueprint.proxy-resources = mkIf cfg.configurePangolin {
gitea = {
auth = {
sso-enabled = false;
};
full-domain = cfg.domain;
name = "coder";
protocol = "http";
targets = [
{
hostname = "localhost";
method = "http";
port = cfg.port;
healthcheck = {
hostname = "localhost";
port = cfg.port;
scheme = "http";
method = "GET";
path = "/";
};
}
];
};
};
};
};
};
}

View File

@@ -0,0 +1,115 @@
{inputs, ...}: {
flake.modules.nixos.services = {
config,
lib,
pkgs,
options,
...
}:
with lib; let
cfg = config.tnix.services.copyparty;
port = toString cfg.port;
acmeHost = config.tnix.services.nginx.domain;
in {
imports = [
inputs.copyparty.nixosModules.default
];
options.tnix.services.copyparty = {
enable = mkEnableOption "Copyparty";
host = mkOption {
type = types.str;
default = "127.0.0.1";
description = "Host on which Copyparty listens";
};
port = mkOption {
type = types.port;
default = 1115;
description = "Port on which Copyparty listens";
};
domain = mkOption {
type = types.str;
default = "";
description = "Domain on which Copyparty is available";
};
accounts = options.services.copyparty.accounts;
volumes = options.services.copyparty.volumes;
configureNginx = mkOption {
type = types.bool;
default = false;
description = "Whether to configure Nginx as a reverse proxy for Copyparty";
};
configurePangolin = mkOption {
type = types.bool;
default = false;
description = "Whether to configure Pangolin as a reverse proxy for Copyparty";
};
};
config = mkIf cfg.enable {
assertions = [
{
assertion = cfg.domain != "";
message = "tnix.services.copyparty.domain must be set when tnix.services.copyparty.enable is true.";
}
];
services = {
copyparty = {
enable = true;
settings = {
i = cfg.host;
p = cfg.port;
no-reload = true;
ignored-flag = false;
};
accounts = cfg.accounts;
volumes = cfg.volumes;
package = pkgs.copyparty.override {
extraPackages = [pkgs.exiftool];
};
};
nginx.virtualHosts.${cfg.domain} = mkIf cfg.configureNginx {
forceSSL = acmeHost != "";
useACMEHost = mkIf (acmeHost != "") acmeHost;
locations."/" = {
proxyPass = "http://${cfg.host}:${port}";
proxyWebsockets = true;
};
};
newt.blueprint.proxy-resources = mkIf cfg.configurePangolin {
copyparty = {
auth = {
sso-enabled = false;
};
full-domain = cfg.domain;
name = "copyparty";
protocol = "http";
targets = [
{
hostname = "localhost";
method = "http";
port = cfg.port;
healthcheck = {
hostname = "localhost";
port = cfg.port;
scheme = "http";
method = "GET";
path = "/";
};
}
];
};
};
};
};
};
}

Some files were not shown because too many files have changed in this diff Show More