feat(services): add and enable trok module

This commit is contained in:
tux
2026-09-07 20:39:39 +05:30
parent ea526e6f88
commit 884dd188c3
6 changed files with 86 additions and 12 deletions

45
flake.lock generated
View File

@@ -1417,16 +1417,16 @@
}, },
"nixpkgs_19": { "nixpkgs_19": {
"locked": { "locked": {
"lastModified": 1774386573, "lastModified": 1740547748,
"narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=", "narHash": "sha256-Ly2fBL1LscV+KyCqPRufUBuiw+zmWrlJzpWOWbahplg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9", "rev": "3a05eebede89661660945da1f151959900903b6a",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@@ -1447,6 +1447,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_20": {
"locked": {
"lastModified": 1774386573,
"narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1782918843, "lastModified": 1782918843,
@@ -1799,6 +1815,7 @@
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"tnvim": "tnvim", "tnvim": "tnvim",
"treefmt-nix": "treefmt-nix_2", "treefmt-nix": "treefmt-nix_2",
"trok": "trok",
"tshell": "tshell", "tshell": "tshell",
"vicinae-extensions": "vicinae-extensions", "vicinae-extensions": "vicinae-extensions",
"voxtype": "voxtype", "voxtype": "voxtype",
@@ -2168,6 +2185,24 @@
"type": "github" "type": "github"
} }
}, },
"trok": {
"inputs": {
"nixpkgs": "nixpkgs_19"
},
"locked": {
"lastModified": 1788792599,
"narHash": "sha256-BBW8R8SJhJGym0nX/q2MTfmKuPdFUOg/jAqmUQjb+1M=",
"owner": "tuxdotrs",
"repo": "trok",
"rev": "a616409ee03c1d50c8fd6d3a24ff1eea52c13f96",
"type": "github"
},
"original": {
"owner": "tuxdotrs",
"repo": "trok",
"type": "github"
}
},
"tshell": { "tshell": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -2284,7 +2319,7 @@
"voxtype": { "voxtype": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_19" "nixpkgs": "nixpkgs_20"
}, },
"locked": { "locked": {
"lastModified": 1780004034, "lastModified": 1780004034,

View File

@@ -84,5 +84,6 @@
voxtype.url = "github:peteonrails/voxtype/v0.7.5"; voxtype.url = "github:peteonrails/voxtype/v0.7.5";
opencode.url = "github:anomalyco/opencode"; opencode.url = "github:anomalyco/opencode";
serpantinum.url = "github:ilyamiro/serpantinum"; serpantinum.url = "github:ilyamiro/serpantinum";
trok.url = "github:tuxdotrs/trok";
}; };
} }

View File

@@ -7,6 +7,7 @@
modifications = final: prev: { modifications = final: prev: {
tnvim = inputs.tnvim.packages.${prev.stdenv.hostPlatform.system}.default; tnvim = inputs.tnvim.packages.${prev.stdenv.hostPlatform.system}.default;
tshell = inputs.tshell.packages.${prev.stdenv.hostPlatform.system}.default; tshell = inputs.tshell.packages.${prev.stdenv.hostPlatform.system}.default;
trok = inputs.trok.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;
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};

View File

@@ -11,6 +11,7 @@
jq jq
dig dig
lsof lsof
trok
]; ];
}; };
} }

View File

@@ -1,4 +1,4 @@
{ config, ... }: { inputs, config, ... }:
{ {
flake.modules.nixos.alpha = flake.modules.nixos.alpha =
{ {
@@ -7,12 +7,17 @@
... ...
}@innerArgs: }@innerArgs:
{ {
imports = with config.flake.modules.nixos; [ imports =
boot with config.flake.modules.nixos;
networking [
virtualisation boot
services networking
]; virtualisation
services
]
++ [
inputs.trok.nixosModules.default
];
tnix = { tnix = {
boot = { boot = {
@@ -55,6 +60,10 @@
enable = true; enable = true;
environmentFile = innerArgs.config.sops.secrets."mediaflow-proxy".path; environmentFile = innerArgs.config.sops.secrets."mediaflow-proxy".path;
}; };
trok = {
enable = true;
};
}; };
virtualisation = { virtualisation = {

View File

@@ -0,0 +1,27 @@
{ inputs, ... }: {
flake.modules.nixos.services =
{
config,
lib,
...
}:
with lib;
let
cfg = config.tnix.services.trok;
in
{
imports = [
inputs.trok.nixosModules.default
];
options.tnix.services.trok = {
enable = mkEnableOption "trok";
};
config = mkIf cfg.enable {
services.trok = {
enable = true;
};
};
};
}