Compare commits

...

4 Commits

13 changed files with 146 additions and 83 deletions

View File

@@ -1,9 +1,9 @@
require("m_taskwarrior_d").setup() -- require("m_taskwarrior_d").setup()
--
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost" }, { -- vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost" }, {
group = vim.api.nvim_create_augroup("TWTask", { clear = true }), -- group = vim.api.nvim_create_augroup("TWTask", { clear = true }),
pattern = "*.md", -- pattern = "*.md",
callback = function() -- callback = function()
vim.cmd("TWSyncTasks") -- vim.cmd("TWSyncTasks")
end, -- end,
}) -- })

View File

@@ -42,11 +42,11 @@
}, },
"nixCats": { "nixCats": {
"locked": { "locked": {
"lastModified": 1769578476, "lastModified": 1770584904,
"narHash": "sha256-4+KbiBcC6hQ3sh0UbPXjy6TOfLh9yhskRlfPzyZ2FH4=", "narHash": "sha256-9Zaz8lbKF2W9pwXZEnbiGsicHdBoU+dHt3Wv3mCJoZ8=",
"owner": "BirdeeHub", "owner": "BirdeeHub",
"repo": "nixCats-nvim", "repo": "nixCats-nvim",
"rev": "48f8be4bdafccfa19ceaaf08071a15eca36fdb1d", "rev": "538fdde784d2909700d97a8ef307783b33a86fb1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -73,11 +73,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1769740369, "lastModified": 1770843696,
"narHash": "sha256-xKPyJoMoXfXpDM5DFDZDsi9PHArf2k5BJjvReYXoFpM=", "narHash": "sha256-LovWTGDwXhkfCOmbgLVA10bvsi/P8eDDpRudgk68HA8=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6308c3b21396534d8aaeac46179c14c439a89b8a", "rev": "2343bbb58f99267223bc2aac4fc9ea301a155a16",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -119,22 +119,6 @@
"type": "github" "type": "github"
} }
}, },
"plugins-m-taskwarrior-d-nvim": {
"flake": false,
"locked": {
"lastModified": 1767960157,
"narHash": "sha256-ov0qi4LhIlwqrBzSbTJ6APC5qjl2d/vlKWJfW5ZiDrg=",
"owner": "huantrinh1802",
"repo": "m_taskwarrior_d.nvim",
"rev": "107247387cd81823046bc2b8e71150c8edf041d3",
"type": "github"
},
"original": {
"owner": "huantrinh1802",
"repo": "m_taskwarrior_d.nvim",
"type": "github"
}
},
"plugins-mcphub-nvim": { "plugins-mcphub-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -206,7 +190,6 @@
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"plugins-beancount-nvim": "plugins-beancount-nvim", "plugins-beancount-nvim": "plugins-beancount-nvim",
"plugins-helm-ls-nvim": "plugins-helm-ls-nvim", "plugins-helm-ls-nvim": "plugins-helm-ls-nvim",
"plugins-m-taskwarrior-d-nvim": "plugins-m-taskwarrior-d-nvim",
"plugins-mcphub-nvim": "plugins-mcphub-nvim", "plugins-mcphub-nvim": "plugins-mcphub-nvim",
"plugins-nvimkit-nvim": "plugins-nvimkit-nvim", "plugins-nvimkit-nvim": "plugins-nvimkit-nvim",
"plugins-shipwright-nvim": "plugins-shipwright-nvim", "plugins-shipwright-nvim": "plugins-shipwright-nvim",

View File

@@ -8,10 +8,10 @@
url = "github:rktjmp/shipwright.nvim"; url = "github:rktjmp/shipwright.nvim";
flake = false; flake = false;
}; };
plugins-m-taskwarrior-d-nvim = { # plugins-m-taskwarrior-d-nvim = {
url = "github:huantrinh1802/m_taskwarrior_d.nvim"; # url = "github:huantrinh1802/m_taskwarrior_d.nvim";
flake = false; # flake = false;
}; # };
plugins-beancount-nvim = { plugins-beancount-nvim = {
url = "github:polarmutex/beancount.nvim"; url = "github:polarmutex/beancount.nvim";
flake = false; flake = false;
@@ -164,7 +164,7 @@
kitty-scrollback-nvim kitty-scrollback-nvim
fidget-nvim fidget-nvim
rustaceanvim rustaceanvim
pkgs.neovimPlugins.m-taskwarrior-d-nvim # pkgs.neovimPlugins.m-taskwarrior-d-nvim
claude-code-nvim claude-code-nvim
]; ];
}; };

View File

@@ -40,6 +40,7 @@ in
xdg.userDirs.createDirectories = false; xdg.userDirs.createDirectories = false;
xdg.userDirs.download = "${config.home.homeDirectory}/dl"; xdg.userDirs.download = "${config.home.homeDirectory}/dl";
ai-tools.opencode.enable = true;
browser.primary = "librewolf"; browser.primary = "librewolf";
cloud.hetzner.enable = true; cloud.hetzner.enable = true;
comms.signal.enable = true; comms.signal.enable = true;

View File

@@ -37,6 +37,7 @@ in
xdg.userDirs.createDirectories = false; xdg.userDirs.createDirectories = false;
xdg.userDirs.download = "${config.home.homeDirectory}/dl"; xdg.userDirs.download = "${config.home.homeDirectory}/dl";
ai-tools.opencode.enable = true;
browser.primary = "librewolf"; browser.primary = "librewolf";
cloud.hetzner.enable = true; cloud.hetzner.enable = true;
comms.signal.enable = true; comms.signal.enable = true;

View File

@@ -11,6 +11,7 @@ in
{ {
imports = [ imports = [
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
../../modules/lib.nix
../../modules/ai-tools.nix ../../modules/ai-tools.nix
../../modules/cloud ../../modules/cloud
../../modules/comms ../../modules/comms
@@ -27,6 +28,7 @@ in
../../modules/shell ../../modules/shell
../../modules/music ../../modules/music
../../modules/taskwarrior.nix ../../modules/taskwarrior.nix
../../modules/bruno.nix
]; ];
sops = { sops = {
@@ -68,6 +70,7 @@ in
cloud.azure.enable = true; cloud.azure.enable = true;
comms.signal.enable = true; comms.signal.enable = true;
comms.teams.enable = true; comms.teams.enable = true;
ai-tools.claude-code.enable = true;
github.enable = true; github.enable = true;
gitlab.enable = true; gitlab.enable = true;

View File

@@ -1,40 +1,79 @@
{ {
lib,
config,
pkgs, pkgs,
... ...
}: }:
let
cfg = config.ai-tools;
rtk-version = "0.18.1";
in
{ {
config = { options.ai-tools = {
home.packages = with pkgs; [ claude-code.enable = lib.mkEnableOption "claude code with rtk and ccline";
aider-chat opencode.enable = lib.mkEnableOption "opencode";
(pkgs.stdenv.mkDerivation {
name = "ccline";
src = pkgs.fetchurl {
url = "https://github.com/Haleclipse/CCometixLine/releases/download/v1.0.8/ccline-linux-x64.tar.gz";
hash = "sha256-Joe3Dd6uSMGi66QT6xr2oY/Tz8rA5RuKa6ckBVJIzI0=";
};
unpackPhase = ''
tar xzf $src
'';
installPhase = ''
mkdir -p $out/bin
cp ccline $out/bin/
chmod +x $out/bin/ccline
'';
meta = with pkgs.lib; {
description = "CCometixLine Linux x64 CLI (Claude Code statusline)";
homepage = "https://github.com/Haleclipse/CCometixLine";
license = licenses.mit;
platforms = [ "x86_64-linux" ];
};
})
# claude-code
# (config.lib.nixGL.wrap code-cursor)
# github-copilot-cli
mcp-nixos
opencode
];
}; };
config = lib.mkMerge [
(lib.mkIf cfg.claude-code.enable {
home.packages = with pkgs; [
claude-code
(pkgs.stdenv.mkDerivation {
name = "ccline";
src = pkgs.fetchurl {
url = "https://github.com/Haleclipse/CCometixLine/releases/download/v1.0.8/ccline-linux-x64.tar.gz";
hash = "sha256-Joe3Dd6uSMGi66QT6xr2oY/Tz8rA5RuKa6ckBVJIzI0=";
};
unpackPhase = ''
tar xzf $src
'';
installPhase = ''
mkdir -p $out/bin
cp ccline $out/bin/
chmod +x $out/bin/ccline
'';
meta = with pkgs.lib; {
description = "CCometixLine Linux x64 CLI (Claude Code statusline)";
homepage = "https://github.com/Haleclipse/CCometixLine";
license = licenses.mit;
platforms = [ "x86_64-linux" ];
};
})
(pkgs.stdenv.mkDerivation {
name = "rtk-${rtk-version}";
version = rtk-version;
src = pkgs.fetchurl {
url = "https://github.com/rtk-ai/rtk/releases/download/v${rtk-version}/rtk-x86_64-unknown-linux-gnu.tar.gz";
hash = "sha256-XoTia5K8b00OzcKYCufwx8ApkAS31DxUCpGSU0jFs2Q=";
};
unpackPhase = ''
tar xzf $src
'';
installPhase = ''
mkdir -p $out/bin
cp rtk $out/bin/
chmod +x $out/bin/rtk
'';
meta = with pkgs.lib; {
description = "RTK - AI coding tool enhancer";
homepage = "https://www.rtk-ai.app";
license = licenses.mit;
platforms = [ "x86_64-linux" ];
};
})
mcp-nixos
];
})
(lib.mkIf cfg.opencode.enable {
home.packages = with pkgs; [
opencode
];
})
];
} }

19
home/modules/bruno.nix Normal file
View File

@@ -0,0 +1,19 @@
{ config, pkgs, ... }:
let
needsNixGL = config.lib ? nixGL;
bruno =
if needsNixGL then
pkgs.bruno.overrideAttrs (old: {
postInstall = (old.postInstall or "") + ''
wrapProgram $out/bin/bruno --add-flags "--no-sandbox"
'';
})
else
pkgs.bruno;
in
{
config = {
home.packages = [ (config.nixgl.wrap bruno) ];
};
}

View File

@@ -6,8 +6,6 @@
}: }:
{ {
config = lib.mkIf config.comms.signal.enable { config = lib.mkIf config.comms.signal.enable {
home.packages = with pkgs; [ home.packages = [ (config.nixgl.wrap pkgs.signal-desktop) ];
(if config.lib ? nixGL then config.lib.nixGL.wrap signal-desktop else signal-desktop)
];
}; };
} }

View File

@@ -7,8 +7,6 @@
{ {
config = lib.mkIf config.comms.teams.enable { config = lib.mkIf config.comms.teams.enable {
home.packages = with pkgs; [ home.packages = [ (config.nixgl.wrap pkgs.teams-for-linux) ];
(if config.lib ? nixGL then config.lib.nixGL.wrap teams-for-linux else teams-for-linux)
];
}; };
} }

View File

@@ -1,12 +1,13 @@
{ pkgs, config, lib, dotsPath, ... }: {
pkgs,
config,
dotsPath,
...
}:
{ {
config = { config = {
home.packages = [ home.packages = [ (config.nixgl.wrap pkgs.kitty) ];
(if config.lib ? nixGL
then config.lib.nixGL.wrap pkgs.kitty
else pkgs.kitty)
];
programs.bash.shellAliases = { programs.bash.shellAliases = {
icat = "kitty +kitten icat"; icat = "kitty +kitten icat";
}; };

9
home/modules/lib.nix Normal file
View File

@@ -0,0 +1,9 @@
{ config, lib, ... }:
{
options.nixgl.wrap = lib.mkOption {
type = lib.types.functionTo lib.types.package;
default = if config.lib ? nixGL then config.lib.nixGL.wrap else lib.id;
readOnly = true;
};
}

View File

@@ -4,10 +4,21 @@
... ...
}: }:
let
spotifyWithWayland = pkgs.symlinkJoin {
name = "spotify";
paths = [ pkgs.spotify ];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/spotify \
--add-flags "--enable-features=UseOzonePlatform --ozone-platform=wayland"
'';
};
in
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
ncspot ncspot
# (if config.lib ? nixGL then config.lib.nixGL.wrap spotify else spotify) spotifyWithWayland
]; ];
home.file = { home.file = {