style: format code

This commit is contained in:
tux
2026-09-11 01:59:55 +05:30
parent 49a341d6b3
commit 344d8bdd4a
87 changed files with 2528 additions and 2719 deletions

View File

@@ -1,138 +1,138 @@
{ inputs, config, ... }:
{
flake.modules.nixos.alpha =
{
hostName,
userName,
...
}@innerArgs:
{
imports =
with config.flake.modules.nixos;
[
boot
networking
virtualisation
services
]
++ [
inputs.trok.nixosModules.default
inputs.tfolio.nixosModules.default
];
inputs,
config,
...
}: {
flake.modules.nixos.alpha = {
hostName,
userName,
...
} @ innerArgs: {
imports = with config.flake.modules.nixos;
[
boot
networking
virtualisation
services
]
++ [
inputs.trok.nixosModules.default
inputs.tfolio.nixosModules.default
];
tnix = {
boot = {
legacy.enable = true;
tnix = {
boot = {
legacy.enable = true;
impermanence = {
enable = true;
impermanence = {
enable = true;
home = {
directories = [
".local/share/nvim"
".local/share/zsh"
".local/share/zoxide"
".local/state/lazygit"
".local/share/opencode"
];
};
};
};
networking = {
openssh = {
enable = true;
ports = [
23
home = {
directories = [
".local/share/nvim"
".local/share/zsh"
".local/share/zoxide"
".local/state/lazygit"
".local/share/opencode"
];
};
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;
};
trok = {
enable = true;
};
};
virtualisation = {
docker.enable = true;
};
};
sops.secrets = {
tux-password = {
sopsFile = ./secrets.yaml;
neededForUsers = true;
networking = {
openssh = {
enable = 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 = {
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;
};
"cloudflare-credentials/email" = {
sopsFile = ./secrets.yaml;
};
"cloudflare-credentials/dns-api-token" = {
sopsFile = ./secrets.yaml;
};
aiostreams = {
sopsFile = ./secrets.yaml;
uptime-kuma = {
enable = true;
domain = "status.lab.tux.rs";
};
mediaflow-proxy = {
sopsFile = ./secrets.yaml;
enable = true;
environmentFile = innerArgs.config.sops.secrets."mediaflow-proxy".path;
};
pangolin = {
sopsFile = ./secrets.yaml;
trok = {
enable = true;
};
};
# --- Networking ---
networking = {
hostName = hostName;
networkmanager.enable = true;
firewall.enable = false;
virtualisation = {
docker.enable = true;
};
services.tfolio.enable = true;
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;
};
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,22 +1,23 @@
{ inputs, ... }:
{
flake.modules.nixos.alpha =
{ config, lib, ... }:
let
hasOptinPersistence = config.tnix.boot.impermanence.enable;
isLegacy = config.tnix.boot.legacy.enable;
in
{
imports = [
inputs.disko.nixosModules.disko
];
{inputs, ...}: {
flake.modules.nixos.alpha = {
config,
lib,
...
}: let
hasOptinPersistence = config.tnix.boot.impermanence.enable;
isLegacy = config.tnix.boot.legacy.enable;
in {
imports = [
inputs.disko.nixosModules.disko
];
disko.devices.disk.primary = {
device = "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = {
disko.devices.disk.primary = {
device = "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions =
{
ESP = {
size = "1G";
type = "EF00";
@@ -36,36 +37,37 @@
content = {
type = "btrfs";
# Base subvolumes that always exist
subvolumes = {
"/root" = {
mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
];
mountpoint = "/";
subvolumes =
{
"/root" = {
mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
];
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";
};
};
};
};
};
};
}

View File

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