13 Commits

26 changed files with 450 additions and 74 deletions
Generated
+45 -45
View File
@@ -35,11 +35,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780375472, "lastModified": 1782533477,
"narHash": "sha256-Q8RAJoYlakA6B2I5DVcuxzNbhCNU1nnIjqQZYP1KGrM=", "narHash": "sha256-2enYwf3n9GUkne9v4J3Ud6LpoG4Uarl3BaSQgRAAH7o=",
"owner": "caelestia-dots", "owner": "caelestia-dots",
"repo": "cli", "repo": "cli",
"rev": "d1c8c8fc09738d1b40576e97c274b4a11a2e0ac7", "rev": "e9e115568f818ee1df2d7a9e21925141b053ec6e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -58,11 +58,11 @@
"quickshell": "quickshell" "quickshell": "quickshell"
}, },
"locked": { "locked": {
"lastModified": 1780839367, "lastModified": 1782636677,
"narHash": "sha256-KAENT4Od2wwWtJzWFtR/qKzqoR673r91KLcyv4pPcNQ=", "narHash": "sha256-u01nEjf7afRMCtRjp0LV45DmhC4/n/uPY3S/HAh/V2w=",
"owner": "caelestia-dots", "owner": "caelestia-dots",
"repo": "shell", "repo": "shell",
"rev": "3bc2bd2a5c5c886f75363211d838b749ab95137e", "rev": "145a6795ee41e023e863681cec6c5db3b334ffc0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -79,11 +79,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1779822991, "lastModified": 1782492933,
"narHash": "sha256-r6e4eHEyQJEDhT6gkW3B9+OgB0pZebw2+du4bvN3vww=", "narHash": "sha256-v/BH1zfHaCFqP+4Ev9PWiGy15YrpmI9wzjxRtiFhgvA=",
"owner": "9001", "owner": "9001",
"repo": "copyparty", "repo": "copyparty",
"rev": "6e75faa62349a59f4df328a4939ba8626d89ee1a", "rev": "4c8203016f089b38281ed922a78255146f099e7b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -207,11 +207,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780679734, "lastModified": 1782702263,
"narHash": "sha256-KmRNvpNOb7QEORa06bVgjW9kITcx0VhsI7w0vhmZyD8=", "narHash": "sha256-8/MG4Su7PhnynrmsVO61IeAfrK7GuUEu+E+gwbhy1QQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "b2b7db486e06e098711dc291bb25db82850e1d16", "rev": "789a35fbdeb3c46b260096daa0b321c11be527ea",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -230,11 +230,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1780841807, "lastModified": 1781867614,
"narHash": "sha256-7N3iYAUmNjt0wgfpb1ZMVP5xRcXSrihQqOxZPM5N0Tc=", "narHash": "sha256-GHy8hEZtToo7FLxEZm0x/pn/fjg1w9sx7ZP9hRd1fcM=",
"ref": "develop", "ref": "develop",
"rev": "0e6b559d002cc7a9bcb758384623de0e8e034bbe", "rev": "d2c48605aac4ca9580d8a34aad4c65371c5a7cc1",
"revCount": 45, "revCount": 52,
"type": "git", "type": "git",
"url": "https://labs.phundrak.com/phundrak/jj-cz" "url": "https://labs.phundrak.com/phundrak/jj-cz"
}, },
@@ -247,17 +247,17 @@
"m3shapes": { "m3shapes": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1777812556, "lastModified": 1781017666,
"narHash": "sha256-E5nqOucRQBWKuT31AMekmfgMywRdHgSbU86R7t4BKKA=", "narHash": "sha256-kfHyzZaPHgqZML48OA+5JwBOsLdQJ2ci/aGPShvUB4Y=",
"owner": "soramanew", "owner": "soramanew",
"repo": "m3shapes", "repo": "m3shapes",
"rev": "356825d31f16052a782735cce264331cba0cb71b", "rev": "bdc327b29f95394a732baf3c9b19658ba23755b6",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "soramanew", "owner": "soramanew",
"repo": "m3shapes", "repo": "m3shapes",
"rev": "356825d31f16052a782735cce264331cba0cb71b", "rev": "bdc327b29f95394a732baf3c9b19658ba23755b6",
"type": "github" "type": "github"
} }
}, },
@@ -268,11 +268,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780816331, "lastModified": 1782636943,
"narHash": "sha256-0BYqs8yKWkOz2Q7+SP18N5E5gmDKSo6LSxIVIa0wWes=", "narHash": "sha256-ripjZa7BBLwL1uS5VJF3s/VpZpWt5ZIQEvkJ/FJNpQw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "1a2ea89c917781e88508d9fd2b507f2d2a0e173c", "rev": "058b1f9381fa79fcda49982370a750ff92dbba43",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -283,11 +283,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1780243769, "lastModified": 1782467914,
"narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", "narHash": "sha256-pGvFkM8N0xEkIIXDe5YYfbEAvHrk4IxBrjB/x8OomhE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", "rev": "e73de5be04e0eff4190a1432b946d469c794e7b4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -299,11 +299,11 @@
}, },
"nixpkgsStable": { "nixpkgsStable": {
"locked": { "locked": {
"lastModified": 1780511130, "lastModified": 1782498288,
"narHash": "sha256-2v9lT4ya59Lh1FqPeLnz1MoX9y/wz2huqfe9RtQZITk=", "narHash": "sha256-8/X3yyTXiE82b38n32ItbOqfWOVBl+gKa8fILyZfR4Q=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "535f3e6942cb1cead3929c604320d3db54b542b9", "rev": "3cac626ec5e3703e835f227687e88aa9e2f25701",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -342,11 +342,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780303737, "lastModified": 1781847791,
"narHash": "sha256-7HgdJBG4BgAPDyHKKxWtxj7nziqsQo6zQCXtwy+L9fs=", "narHash": "sha256-Mo2YtNEGlcySnbq0YuP3nUKMAQCMAfE+TcCffo5vzD8=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "b66495fcc5022681b56b61f928c7acbe910e722c", "rev": "68c2c85c33845385f7ab8147b32f1450b1e468e0",
"revCount": 821, "revCount": 824,
"type": "git", "type": "git",
"url": "https://git.outfoxxed.me/outfoxxed/quickshell" "url": "https://git.outfoxxed.me/outfoxxed/quickshell"
}, },
@@ -466,11 +466,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780547341, "lastModified": 1782165805,
"narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=", "narHash": "sha256-478kKQBvK6SYTOdN2h9jhKJv94nbXRbFMfuL1WshErg=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a", "rev": "56b24064fdcaedca53553b1a6d607fd23b613a24",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -487,11 +487,11 @@
"systems": "systems_4" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1780422259, "lastModified": 1782633406,
"narHash": "sha256-dWGk4SEdI189kQW5cE4Uo1Mc+P+kQEdgMcyMgTtmQOA=", "narHash": "sha256-JOSMk12GgnTLVlUSCuKkqyUF6cw82wl7t7e1WuFfg5s=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "spicetify-nix", "repo": "spicetify-nix",
"rev": "8414bbf2fcc7bc0a22c675e498e3c7365c1aec0a", "rev": "5ff9a6ca9dcbad7cccea2c97d30237468b16feda",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -507,11 +507,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780545143, "lastModified": 1782700116,
"narHash": "sha256-y9aFcK8A3pctkW9G9LdppzPDsuBa3VzToADnacjir/A=", "narHash": "sha256-E63+nvH3jkAt/hBxhMa5aykstXdqRvBSeqNRDpQNv78=",
"owner": "nix-community", "owner": "nix-community",
"repo": "srvos", "repo": "srvos",
"rev": "bc0ca7b0f7c8ca9dc55166438fec4dc2dd74f8a4", "rev": "d45cf79058f2d42c0b0dd7912bedb5d14faa00ed",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -587,11 +587,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780637620, "lastModified": 1782624757,
"narHash": "sha256-ngPdHinPyF0AMxRr32qt+TZCv0sagmooBW14u6DfjSU=", "narHash": "sha256-pqFaCAV+g8H+p0kE4vYn9ZgcEFvt644zGy7SyCdf9c8=",
"owner": "youwen5", "owner": "youwen5",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "8c62bc6a72ac5a5b8d1b41b2b88dfed9d9932c48", "rev": "907465791e7064d86d37964dd95e23280dfb68da",
"type": "github" "type": "github"
}, },
"original": { "original": {
+2 -1
View File
@@ -104,6 +104,7 @@
pkgs.nh pkgs.nh
pkgs.jujutsu pkgs.jujutsu
pkgs.git pkgs.git
inputs.jj-cz.packages.${system}.default
]; ];
}; };
@@ -186,7 +187,7 @@
srvos.nixosModules.server srvos.nixosModules.server
srvos.nixosModules.hardware-hetzner-cloud srvos.nixosModules.hardware-hetzner-cloud
srvos.nixosModules.mixins-terminfo srvos.nixosModules.mixins-terminfo
./hosts/naromk3/configuration.nix ./hosts/naromk3
]; ];
}; };
pinetab2 = pinetabConfig "x86_64-linux" ./hosts/pinetab2/gnome.nix; pinetab2 = pinetabConfig "x86_64-linux" ./hosts/pinetab2/gnome.nix;
@@ -24,8 +24,11 @@
firewall = { firewall = {
openPorts = [ openPorts = [
22 # Gitea SSH 22 # Gitea SSH
25 # SMTP
80 # HTTP 80 # HTTP
443 # HTTPS 443 # HTTPS
465 # SMTPS
993 # IMAPS
]; ];
}; };
}; };
+50
View File
@@ -0,0 +1,50 @@
{
inputs,
lib,
config,
...
}: {
imports = [./helpers.nix];
config = {
flake = {
nixosConfigurations = lib.mkMerge [
(config.flake.lib.mkNixos "x86_64-linux" "alys")
(config.flake.lib.mkNixos "x86_64-linux" "elcafe")
(config.flake.lib.mkNixos "x86_64-linux" "gampo")
(config.flake.lib.mkNixos "x86_64-linux" "marpa")
(config.flake.lib.mkNixos "x86_64-linux" "NaroMk3")
(config.flake.lib.mkNixos "x86_64-linux" "tilo")
(config.flake.lib.mkPinetab "x86_64-linux" [
inputs.self.modules.nixos.pinetab2-gnome
])
];
homeConfigurations = lib.mkMerge [
(config.flake.lib.mkHome "aarch64-linux" "phundrak" "pinetab2")
(config.flake.lib.mkHome "x86_64-linux" "creug" "elcafe")
(config.flake.lib.mkHome "x86_64-linux" "phundrak" "NaroMk3")
(config.flake.lib.mkHome "x86_64-linux" "phundrak" "alys")
(config.flake.lib.mkHome "x86_64-linux" "phundrak" "elcafe")
(config.flake.lib.mkHome "x86_64-linux" "phundrak" "gampo")
(config.flake.lib.mkHome "x86_64-linux" "phundrak" "marpa")
(config.flake.lib.mkHome "x86_64-linux" "phundrak" "tilo")
];
};
perSystem = {
config',
pkgs,
...
}: {
formatter = pkgs.alejandra;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
nh
jujutsu
git
inputs.jj-cz.packages.${config'.system}.default
];
};
};
};
}
+3
View File
@@ -0,0 +1,3 @@
{
imports = [./home-manager.nix];
}
+81
View File
@@ -0,0 +1,81 @@
{
inputs,
lib,
...
}: let
settingsToLines = with lib;
settings:
concatStringsSep "\n" (
mapAttrsToList (name: value: "set ${name} ${toString value}") settings
);
in {
flake-file.inputs.zen-browser = {
url = "github:youwen5/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
flake.modules.homeManager.firefox = {
config,
pkgs,
...
}:
with lib; let
cfg = config.flake.options.firefox;
inherit (pkgs.stdenv.hostPlatform) system;
zen = inputs.zen-browser.packages.${system}.default;
in {
options.flake.options.firefox = {
enable = mkEnableOption "enable Firefox";
useZen = mkEnableOption "use Zen instead of Firefox";
tridactyl = {
enable = mkEnableOption "enable Tridactyl";
preConfig = mkOption {
description = "Lines to add to the beginning of tridactylrc";
type = types.lines;
default = "";
};
config = mkOption {
type = with types;
attrsOf (oneOf [int str bool]);
description = "Tridactyl settings (converted to 'set key value' lines)";
default = {};
example = {
smoothscroll = true;
history = 1000;
};
};
extraConfig = mkOption {
description = "Extra lines to add to tridactylrc (for bindings, autocmds, etc)";
type = types.lines;
default = "";
};
};
};
config = mkIf cfg.enable {
home.sessionVariables.MOZ_ENABLE_WAYLAND = "1";
programs.firefox = {
inherit (cfg) enable;
package =
if cfg.useZen
then zen
else pkgs.firefox;
nativeMessagingHosts = lists.optional cfg.tridactyl.enable pkgs.tridactyl-native;
configPath = ".mozilla/firefox";
};
xdg.configFile."tridactyl/tridactylrc" = mkIf cfg.tridactyl.enable {
text = concatStringsSep "\n" (filter (s: s != "") [
cfg.tridactyl.preConfig
(settingsToLines (cfg.tridactyl.config
// {
browser =
if cfg.useZen
then "zen"
else "firefox";
}))
cfg.tridactyl.extraConfig
]);
};
};
};
}
+3
View File
@@ -0,0 +1,3 @@
{
flake.modules.nixos.amdgpu = ./nixos.nix;
}
+30
View File
@@ -0,0 +1,30 @@
{pkgs, ...}: {
hardware = {
graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
mesa rocmPackages.clr rocmPackages.clr.icd rocmPackages.rocblas
rocmPackages.hipblas rocmPackages.rpp nvtopPackages.amd
];
};
amdgpu = { initrd.enable = true; opencl.enable = true; };
};
environment.systemPackages = with pkgs; [ clinfo amdgpu_top nvtopPackages.amd ];
systemd = {
packages = with pkgs; [ lact ];
services.lactd.wantedBy = [ "multi-user.target" ];
tmpfiles.rules = let
rocmEnv = pkgs.symlinkJoin {
name = "rocm-combined";
paths = with pkgs.rocmPackages; [ clr clr.icd rocblas hipblas rpp ];
};
in [ "L+ /opt/rocm - - - - ${rocmEnv}" ];
};
environment.variables = {
ROCM_PATH = "/opt/rocm";
HIP_VISIBLE_DEVICES = "1";
ROCM_VISIBLE_DEVICES = "1";
HSA_OVERRIDE_GFX_VERSION = "10.3.0";
};
}
+27
View File
@@ -0,0 +1,27 @@
{inputs, ...}:
{
flake-file.inputs = {
rockchip = {
url = "github:raboof/nixos-rockchip/pinetab-linux-7.0";
inputs.utils.follows = "flake-utils";
inputs.nixpkgsStable.follows = "nixpkgsStable";
inputs.nixpkgsUnstable.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
};
config.flake.factory.pinetab2 = buildPlatform: variantModules: {
nixos.pinetab2 = {
imports = [
inputs.rockchip.nixosModules.sdImageRockchip
inputs.rockchip.nixosModules.dtOverlayPCIeFix
inputs.rockchip.nixosModules.noZFS
inputs.self.modules.nixos.pinetab2-base
] ++ variantModules;
rockchip.uBoot = inputs.rockchip.packages.${buildPlatform}.uBootPineTab2;
boot.kernelPackages =
inputs.rockchip.legacyPackages.${buildPlatform}.kernel_linux_7_0_pinetab_unstable;
hardware.firmware = [ inputs.rockchip.packages.aarch64-linux.bes2600 ];
};
};
}
+48
View File
@@ -0,0 +1,48 @@
{
inputs,
lib,
...
}: {
config.flake.lib = {
mkNixos = system: name: {
${name} = inputs.nixpkgs.lib.nixosSystem {
modules = [
inputs.self.modules.nixos.${name}
{nixpkgs.hostPlatform = lib.mkDefault system;}
];
};
};
mkHome = system: username: hostname: {
"${username}@${hostname}" = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = inputs.nixpkgs.legacyPackages.${system};
extraSpecialArgs = {inherit inputs;};
modules = [inputs.self.modules.homeManager.${username}.${hostname}];
};
};
mkPinetab = buildPlatform: variantModules: {
pinetab2 = inputs.nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules =
[
inputs.rockchip.nixosModules.sdImageRockchip
inputs.rockchip.nixosModules.dtOverlayPCIeFix
inputs.rockchip.nixosModules.noZFS
inputs.self.modules.nixos.pinetab2-base
]
++ variantModules
++ [
{
rockchip.uBoot = inputs.rockchip.packages.${buildPlatform}.uBootPineTab2;
boot.kernelPackages =
inputs.rockchip.legacyPackages.${buildPlatform}.kernel_linux_7_0_pinetab_unstable;
hardware.firmware = [inputs.rockchip.packages.aarch64-linux.bes2600];
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (inputs.nixpkgs.lib.getName pkg) ["bes2600-firmware"];
}
];
};
};
};
}
+20
View File
@@ -0,0 +1,20 @@
{
flake-file = {
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixpkgsStable.url = "nixpkgs/nixos-25.11";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-file.url = "github:vic/flake-file";
import-tree.url = "github:vic/import-tree";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
jj-cz = {
url = "git+https://labs.phundrak.com/phundrak/jj-cz?ref=main";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = "flake-parts";
};
}
+18
View File
@@ -0,0 +1,18 @@
{
flake.nixConfig = {
extra-trusted-public-keys = [
"marpa-local:XoO+dFN4PeauF52pYuy3Vh4Sdtl2qIdxu5aUasWKv6Q="
"phundrak.cachix.org-1:osJAkYO0ioTOPqaQCIXMfIRz1/+YYlVFkup3R2KSexk="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
];
extra-substituters = [
"http://marpa:5000?priority=5"
"https://phundrak.cachix.org?priority=10"
"https://nix-community.cachix.org?priority=20"
"https://cache.nixos.org?priority=40"
];
extra-experimental-features = [ "nix-command" "flakes" ];
http-connections = 128;
};
}
+14
View File
@@ -0,0 +1,14 @@
{inputs, ...}:
{
flake-file.inputs.srvos = {
url = "github:nix-community/srvos";
inputs.nixpkgs.follows = "nixpkgs";
};
flake.modules.nixos.hetzner-server = {
imports = [
inputs.srvos.nixosModules.server
inputs.srvos.nixosModules.hardware-hetzner-cloud
inputs.srvos.nixosModules.mixins-terminfo
];
};
}
+16
View File
@@ -0,0 +1,16 @@
{inputs, ...}:
{
flake-file.inputs.sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake.modules = {
nixos.sops = {
imports = [inputs.sops-nix.nixosModules.sops];
};
homeManager.sops = {
imports = [inputs.sops-nix.homeManagerModules.sops];
};
};
}
+13
View File
@@ -0,0 +1,13 @@
{inputs, ...}: {
flake.modules = {
nixos.phundrak = {
imports = [./nixos.nix];
home-manager.users.phundrak = {
imports = [inputs.self.modules.homeManager.phundrak];
};
};
homeManager.phundrak = {
imports = [./homeManager.nix];
};
};
}
+32
View File
@@ -0,0 +1,32 @@
{
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.flake.options.phundrak;
in {
options.flake.options.phundrak = {
sudo = mkEnableOption "Make phundrak a superuser";
trusted = mkOption {
description = "Mark phundrak as trusted by Nix";
type = types.bool;
default = cfg.sudo;
};
};
config = {
users.users.phundrak = {
isNormalUser = true;
description = "Greg";
extraGroups =
["networkmanager" "dialout" "games" "audio" "input"]
++ optional cfg.sudo "wheel";
shell = pkgs.zsh;
openssh.authorizedKeys.keyFiles = filesystem.listFilesRecursive ./keys;
};
nix.settings = mkIf cfg.trusted {
trusted-users = ["phundrak"];
};
};
}
+1 -1
View File
@@ -44,7 +44,7 @@ in {
}; };
launcher = { launcher = {
enabled = true; enabled = true;
showOnHover = true; showOnHover = false;
useFuzzy = { useFuzzy = {
apps = true; apps = true;
schemes = true; schemes = true;
+1 -4
View File
@@ -106,10 +106,7 @@ in {
"workspaces, 1, 6, default" "workspaces, 1, 6, default"
]; ];
}; };
dwindle = { dwindle.preserve_split = true;
pseudotile = true;
preserve_split = true;
};
exec-once = exec-once =
[ [
"pactl load-module module-switch-on-connect" "pactl load-module module-switch-on-connect"
+6 -1
View File
@@ -16,6 +16,11 @@ in {
options.home.dev.ai = { options.home.dev.ai = {
enable = mkEnableOption "Enables AI features"; enable = mkEnableOption "Enables AI features";
lmStudio = mkOption {
default = cfg.enable;
example = true;
description = "Enables LM Studio. Enabled by default when AI is enabled.";
};
mcpServers = mkOption { mcpServers = mkOption {
inherit (jsonFormat) type; inherit (jsonFormat) type;
default = {}; default = {};
@@ -31,7 +36,7 @@ in {
ollama.enable = mkDefault cfg.enable; ollama.enable = mkDefault cfg.enable;
opencode.enable = mkDefault cfg.enable; opencode.enable = mkDefault cfg.enable;
}; };
packages = [pkgs.lmstudio]; packages = lists.optional cfg.lmStudio pkgs.lmstudio;
}; };
programs.mcp = mkIf (cfg.mcpServers != {}) { programs.mcp = mkIf (cfg.mcpServers != {}) {
enable = true; enable = true;
+1 -21
View File
@@ -10,25 +10,7 @@ with lib; let
cfg = config.home.dev.ai.opencode; cfg = config.home.dev.ai.opencode;
defaultPackageCli = inputs.opencode.packages.${system}.opencode; defaultPackageCli = inputs.opencode.packages.${system}.opencode;
defaultPackageDesktop = inputs.opencode.packages.${system}.desktop; defaultPackageDesktop = inputs.opencode.packages.${system}.desktop;
corsString = cors:
{
null = "";
string = v: trim v;
path = v: trim (readFile v);
}
.${
if cors == null
then "null"
else typeOf cors
};
corsList = domains: lists.remove "" (lists.forEach (strings.splitString "," domains) trim); corsList = domains: lists.remove "" (lists.forEach (strings.splitString "," domains) trim);
corsDomains = domains:
lists.flatten (
lists.forEach (lists.remove "" (lists.forEach (strings.splitString "," domains) trim)) (domain: [
"--cors"
domain
])
);
in { in {
options.home.dev.ai.opencode = { options.home.dev.ai.opencode = {
enable = mkEnableOption "Enables OpenCode"; enable = mkEnableOption "Enables OpenCode";
@@ -87,9 +69,7 @@ in {
inherit (cfg) enable tui; inherit (cfg) enable tui;
enableMcpIntegration = true; enableMcpIntegration = true;
extraPackages = with pkgs; [uv]; extraPackages = with pkgs; [uv];
settings = let settings =
cors = corsString cfg.web.cors;
in
{ {
server = mkIf cfg.web.mdns.enable { server = mkIf cfg.web.mdns.enable {
mdns = true; mdns = true;
+2
View File
@@ -12,6 +12,7 @@ in {
./mpd-mpris.nix ./mpd-mpris.nix
./mpv.nix ./mpv.nix
./ncmpcpp.nix ./ncmpcpp.nix
./streamlink.nix
]; ];
options.home.media.fullDesktop = mkEnableOption "Enables everything"; options.home.media.fullDesktop = mkEnableOption "Enables everything";
@@ -20,5 +21,6 @@ in {
mpd.enable = mkDefault (cfg.fullDesktop or cfg.mpd-mpris.enable); mpd.enable = mkDefault (cfg.fullDesktop or cfg.mpd-mpris.enable);
mpv.enable = mkDefault cfg.fullDesktop; mpv.enable = mkDefault cfg.fullDesktop;
ncmpcpp.enable = mkDefault config.home.media.mpd.enable; ncmpcpp.enable = mkDefault config.home.media.mpd.enable;
streamlink.enable = mkDefault config.home.media.mpv.enable;
}; };
} }
+17
View File
@@ -0,0 +1,17 @@
{
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.home.media.streamlink;
in {
options.home.media.streamlink.enable = mkEnableOption "Enable Streamlink";
config.programs.streamlink = mkIf cfg.enable {
enable = true;
settings = {
player = "${pkgs.mpv}/bin/mpv";
};
};
}
+2
View File
@@ -30,6 +30,8 @@
}; };
permission = { permission = {
"*" = "ask"; "*" = "ask";
glob = "allow";
grep = "allow";
read = { read = {
"*" = "allow"; "*" = "allow";
"*.env" = "deny"; "*.env" = "deny";
+12 -1
View File
@@ -1,4 +1,4 @@
{ {pkgs, ...}: {
config.home.desktop.firefox = { config.home.desktop.firefox = {
enable = true; enable = true;
useZen = true; useZen = true;
@@ -13,6 +13,16 @@
smothscroll = "true"; smothscroll = "true";
}; };
extraConfig = '' extraConfig = ''
command openTwitchInMpv js -d@\
const url = new URL(document.location.href);\
const cleanUrl = url.hostname + url.pathname;\
const token = document.cookie.split("; ")\
.find(item => item.startsWith("auth-token="))?.split("=")[1];\
const auth = "--twitch-api-header=Authorization=OAuth " + token;\
const cmd = `${pkgs.streamlink}/bin/streamlink "''${auth}" "''${cleanUrl}" best`;\
tri.native.run(cmd)\
@
unbind h unbind h
unbind j unbind j
unbind k unbind k
@@ -69,6 +79,7 @@
bind < urlincrement -1 bind < urlincrement -1
bind > urlincrement 1 bind > urlincrement 1
bind ypt openTwitchInMpv
bind ypv js tri.native.run(`mpv --ytdl-format="[height >=? 480]" --ontop --fs "''${document.location.href}"`) bind ypv js tri.native.run(`mpv --ytdl-format="[height >=? 480]" --ontop --fs "''${document.location.href}"`)
bind ypm hint -JF e => tri.native.run(`mpv --ytdl-format="[height >=? 480]" --ontop --fs "''${e.href}"`) bind ypm hint -JF e => tri.native.run(`mpv --ytdl-format="[height >=? 480]" --ontop --fs "''${e.href}"`)
''; '';
+1
View File
@@ -2,6 +2,7 @@
imports = [../home.nix]; imports = [../home.nix];
home = { home = {
cli.nh.flake = "${config.home.homeDirectory}/.dotfiles"; cli.nh.flake = "${config.home.homeDirectory}/.dotfiles";
dev.ai.lmStudio = false;
desktop.hyprland.host = "gampo"; desktop.hyprland.host = "gampo";
phundrak.sshKey.content = builtins.readFile ../keys/id_gampo.pub; phundrak.sshKey.content = builtins.readFile ../keys/id_gampo.pub;
}; };
+2
View File
@@ -49,6 +49,7 @@ in {
scrcpy scrcpy
syncthing syncthing
watchmate watchmate
chatterino7
# Games # Games
atlauncher atlauncher
@@ -74,6 +75,7 @@ in {
tectonic # better LaTeX engine tectonic # better LaTeX engine
wakatime-cli wakatime-cli
zeal zeal
pandoc
## LSP servers ## LSP servers
bash-language-server bash-language-server