Compare commits

..

10 Commits

21 changed files with 247 additions and 152 deletions

6
.gitignore vendored
View File

@@ -1,8 +1,10 @@
#
.claude/
home/hosts/work/packages.local.nix
# ---> Nix # ---> Nix
# Ignore build outputs from performing a nix-build or `nix build` command # Ignore build outputs from performing a nix-build or `nix build` command
result result
result-* result-*
nixos-efi-vars.fd nixos-efi-vars.fd
home/hosts/work/packages.local.nix

View File

@@ -2,12 +2,12 @@ local ts = require("treesj")
local vim = vim local vim = vim
local keymap = vim.keymap local keymap = vim.keymap
local opt = vim.opt local opt = vim.opt
local treesitter_configs = require("nvim-treesitter.configs") local treesitter = require("nvim-treesitter")
local nixCatsUtils = require("nixCatsUtils") local nixCatsUtils = require("nixCatsUtils")
local is_nix = nixCatsUtils.isNixCats local is_nix = nixCatsUtils.isNixCats
treesitter_configs.setup({ treesitter.setup({
-- Basically added what I might need from the docs -- Basically added what I might need from the docs
-- <https://github.com/nvim-treesitter/nvim-treesitter?tab=readme-ov-file#supported-languages> -- <https://github.com/nvim-treesitter/nvim-treesitter?tab=readme-ov-file#supported-languages>
ensure_installed = is_nix and {} or { ensure_installed = is_nix and {} or {

View File

@@ -42,11 +42,11 @@
}, },
"nixCats": { "nixCats": {
"locked": { "locked": {
"lastModified": 1767159145, "lastModified": 1767604651,
"narHash": "sha256-rnx/0p6D7rKd7mjtgsdSZjpkutJMzUaVyo2mj0rmjWQ=", "narHash": "sha256-itAnxzTpWpY1s3LA/oNngOuZDXT5U5JUZP5fApwx9gs=",
"owner": "BirdeeHub", "owner": "BirdeeHub",
"repo": "nixCats-nvim", "repo": "nixCats-nvim",
"rev": "479ab18fbeabaf87564d3fb0eaf99ebebb05f2f8", "rev": "3c9bc4d7123e1b48d92f25ba505b889af541e897",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -73,16 +73,16 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1767767207, "lastModified": 1768302833,
"narHash": "sha256-Mj3d3PfwltLmukFal5i3fFt27L6NiKXdBezC1EBuZs4=", "narHash": "sha256-h5bRFy9bco+8QcK7rGoOiqMxMbmn21moTACofNLRMP4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5912c1772a44e31bf1c63c0390b90501e5026886", "rev": "61db79b0c6b838d9894923920b612048e1201926",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-unstable", "ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@@ -103,22 +103,6 @@
"type": "github" "type": "github"
} }
}, },
"plugins-crazy-node-movement": {
"flake": false,
"locked": {
"lastModified": 1693654676,
"narHash": "sha256-hQcQEp39zFN2zphMfcr97yRVcuHhBsSkzKO7XNloDpQ=",
"owner": "theHamsta",
"repo": "crazy-node-movement",
"rev": "d5cf01cc44c5715501d3d6fe439af7c8b7fa5df2",
"type": "github"
},
"original": {
"owner": "theHamsta",
"repo": "crazy-node-movement",
"type": "github"
}
},
"plugins-helm-ls-nvim": { "plugins-helm-ls-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -138,11 +122,11 @@
"plugins-m-taskwarrior-d-nvim": { "plugins-m-taskwarrior-d-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1764933759, "lastModified": 1767960157,
"narHash": "sha256-4lN/ZQTQ7uMcpjePbf2k913Bs9AYYS6da3iZbckA6oI=", "narHash": "sha256-ov0qi4LhIlwqrBzSbTJ6APC5qjl2d/vlKWJfW5ZiDrg=",
"owner": "huantrinh1802", "owner": "huantrinh1802",
"repo": "m_taskwarrior_d.nvim", "repo": "m_taskwarrior_d.nvim",
"rev": "279d2c8bcd2779500c1bea71fb9249c97cdb503b", "rev": "107247387cd81823046bc2b8e71150c8edf041d3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -221,7 +205,6 @@
"nixCats": "nixCats", "nixCats": "nixCats",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"plugins-beancount-nvim": "plugins-beancount-nvim", "plugins-beancount-nvim": "plugins-beancount-nvim",
"plugins-crazy-node-movement": "plugins-crazy-node-movement",
"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-m-taskwarrior-d-nvim": "plugins-m-taskwarrior-d-nvim",
"plugins-mcphub-nvim": "plugins-mcphub-nvim", "plugins-mcphub-nvim": "plugins-mcphub-nvim",

View File

@@ -12,10 +12,6 @@
url = "github:huantrinh1802/m_taskwarrior_d.nvim"; url = "github:huantrinh1802/m_taskwarrior_d.nvim";
flake = false; flake = false;
}; };
plugins-crazy-node-movement = {
url = "github:theHamsta/crazy-node-movement";
flake = false;
};
plugins-beancount-nvim = { plugins-beancount-nvim = {
url = "github:polarmutex/beancount.nvim"; url = "github:polarmutex/beancount.nvim";
flake = false; flake = false;
@@ -84,6 +80,7 @@
prettierd prettierd
rustfmt rustfmt
shellcheck-minimal shellcheck-minimal
stylelint
stylua stylua
tree-sitter tree-sitter
vscode-langservers-extracted vscode-langservers-extracted
@@ -136,10 +133,9 @@
pkgs.neovimPlugins.shipwright-nvim pkgs.neovimPlugins.shipwright-nvim
lush-nvim lush-nvim
zenbones-nvim zenbones-nvim
pkgs.neovimPlugins.crazy-node-movement
nvim-treesitter.withAllGrammars nvim-treesitter.withAllGrammars
# nvim-treesitter-textobjects nvim-treesitter-textobjects
# nvim-treesitter-context nvim-treesitter-context
nvim-ts-context-commentstring nvim-ts-context-commentstring
treesj treesj
sniprun sniprun
@@ -217,7 +213,7 @@
name = defaultPackageName; name = defaultPackageName;
packages = [ defaultPackage ]; packages = [ defaultPackage ];
inputsFrom = [ ]; inputsFrom = [ ];
shellHook = ''''; shellHook = "";
}; };
}; };

65
flake.lock generated
View File

@@ -29,11 +29,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1767585814, "lastModified": 1768363414,
"narHash": "sha256-7iodv57Ppq05AHVKnS9/IdhhgBYTVpTDZmz2u2enr/E=", "narHash": "sha256-9LW3RqHM13WnhhpAZjZA0i/SdPAOZg4R2kG/kUD0aO0=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "66bfeb87deb83ca2f9fa2045704b72de52c6433a", "rev": "1abc7eea7d965009e7d7fdc683985b3245933fb3",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -90,11 +90,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1767556355, "lastModified": 1768410656,
"narHash": "sha256-RDTUBDQBi9D4eD9iJQWtUDN/13MDLX+KmE+TwwNUp2s=", "narHash": "sha256-9CfEGvHgQ8KdhBI5x6RVkuvqCCM7KiVxCM1n9e3lVBA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "f894bc4ffde179d178d8deb374fcf9855d1a82b7", "rev": "85c83f70968516f571015e260fb21c774e586c0b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -125,10 +125,10 @@
"nix-secrets": { "nix-secrets": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1765747965, "lastModified": 1768414240,
"narHash": "sha256-EHZRRC3piD6vKd4hXiqC+CcDUQCOzrH/CNAF9zBqpDQ=", "narHash": "sha256-M/MObXs5oHjUGnKYMwU6Lrl/CfA1RMLGqJYytkfPXjg=",
"ref": "main", "ref": "main",
"rev": "a8e8d953f579939bd72b5f5c6ed332910b598554", "rev": "601921b44c3794e899bd31c0f302e9a9f5e6c480",
"shallow": true, "shallow": true,
"type": "git", "type": "git",
"url": "ssh://git@github.com/hektor/nix-secrets" "url": "ssh://git@github.com/hektor/nix-secrets"
@@ -142,11 +142,11 @@
}, },
"nixCats": { "nixCats": {
"locked": { "locked": {
"lastModified": 1767159145, "lastModified": 1767604651,
"narHash": "sha256-rnx/0p6D7rKd7mjtgsdSZjpkutJMzUaVyo2mj0rmjWQ=", "narHash": "sha256-itAnxzTpWpY1s3LA/oNngOuZDXT5U5JUZP5fApwx9gs=",
"owner": "BirdeeHub", "owner": "BirdeeHub",
"repo": "nixCats-nvim", "repo": "nixCats-nvim",
"rev": "479ab18fbeabaf87564d3fb0eaf99ebebb05f2f8", "rev": "3c9bc4d7123e1b48d92f25ba505b889af541e897",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -178,11 +178,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1767185284, "lastModified": 1768397375,
"narHash": "sha256-ljDBUDpD1Cg5n3mJI81Hz5qeZAwCGxon4kQW3Ho3+6Q=", "narHash": "sha256-7QqbFi3ERvKjEdAzEYPv7iSGwpUKSrQW5wPLMFq45AQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "40b1a28dce561bea34858287fbb23052c3ee63fe", "rev": "efe2094529d69a3f54892771b6be8ee4a0ebef0f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -194,11 +194,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1767379071, "lastModified": 1768127708,
"narHash": "sha256-EgE0pxsrW9jp9YFMkHL9JMXxcqi/OoumPJYwf+Okucw=", "narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "fb7944c166a3b630f177938e478f0378e64ce108", "rev": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -232,7 +232,6 @@
"nixpkgs" "nixpkgs"
], ],
"plugins-beancount-nvim": "plugins-beancount-nvim", "plugins-beancount-nvim": "plugins-beancount-nvim",
"plugins-crazy-node-movement": "plugins-crazy-node-movement",
"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-m-taskwarrior-d-nvim": "plugins-m-taskwarrior-d-nvim",
"plugins-mcphub-nvim": "plugins-mcphub-nvim", "plugins-mcphub-nvim": "plugins-mcphub-nvim",
@@ -266,22 +265,6 @@
"type": "github" "type": "github"
} }
}, },
"plugins-crazy-node-movement": {
"flake": false,
"locked": {
"lastModified": 1693654676,
"narHash": "sha256-hQcQEp39zFN2zphMfcr97yRVcuHhBsSkzKO7XNloDpQ=",
"owner": "theHamsta",
"repo": "crazy-node-movement",
"rev": "d5cf01cc44c5715501d3d6fe439af7c8b7fa5df2",
"type": "github"
},
"original": {
"owner": "theHamsta",
"repo": "crazy-node-movement",
"type": "github"
}
},
"plugins-helm-ls-nvim": { "plugins-helm-ls-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -301,11 +284,11 @@
"plugins-m-taskwarrior-d-nvim": { "plugins-m-taskwarrior-d-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1764933759, "lastModified": 1767960157,
"narHash": "sha256-4lN/ZQTQ7uMcpjePbf2k913Bs9AYYS6da3iZbckA6oI=", "narHash": "sha256-ov0qi4LhIlwqrBzSbTJ6APC5qjl2d/vlKWJfW5ZiDrg=",
"owner": "huantrinh1802", "owner": "huantrinh1802",
"repo": "m_taskwarrior_d.nvim", "repo": "m_taskwarrior_d.nvim",
"rev": "279d2c8bcd2779500c1bea71fb9249c97cdb503b", "rev": "107247387cd81823046bc2b8e71150c8edf041d3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -398,11 +381,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1767499857, "lastModified": 1768271704,
"narHash": "sha256-0zUU/PW09d6oBaR8x8vMHcAhg1MOvo3CwoXgHijzzNE=", "narHash": "sha256-jJqlW8A3OZ5tYbXphF7U8P8g/3Cn8PPwPa4YlJ/9agg=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "ecc41505948ec2ab0325f14c9862a4329c2b4190", "rev": "691b8b6713855d0fe463993867291c158472fc6f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -18,6 +18,7 @@ in
../../modules/keepassxc.nix ../../modules/keepassxc.nix
../../modules/anki.nix ../../modules/anki.nix
../../modules/browser ../../modules/browser
../../modules/shell
]; ];
home.stateVersion = "25.05"; home.stateVersion = "25.05";
@@ -29,28 +30,12 @@ in
browser.primary = "librewolf"; browser.primary = "librewolf";
shell.bash = {
enable = true;
aliases.lang-js = true;
};
programs = { programs = {
bash = {
enable = true;
enableCompletion = true;
initExtra = ''
for f in /home/${username}/.bashrc.d/*; do
[ -f "$f" ] && source "$f"
done
source /home/${username}/.bash_aliases/all
source /home/${username}/.bash_aliases/lang-js
# host-specific config goes here
# ...
export PATH=${../../../dots/.bin}:$PATH
'';
};
fzf = {
enable = true;
enableBashIntegration = true;
};
home-manager.enable = true; home-manager.enable = true;
taskwarrior.config.recurrence = lib.mkForce "on"; taskwarrior.config.recurrence = lib.mkForce "on";
}; };
@@ -61,11 +46,6 @@ in
}; };
home.file = { home.file = {
".inputrc".source = ../../../dots/.inputrc;
".bashrc.d/prompt".source = ../../../dots/.bashrc.d/prompt;
".bashrc.d/editor".source = ../../../dots/.bashrc.d/editor;
".bash_aliases/all".source = ../../../dots/.bash_aliases/all;
".bash_aliases/lang-js".source = ../../../dots/.bash_aliases/lang-js;
".config/kitty/kitty.conf".source = ../../../dots/.config/kitty/kitty.conf; ".config/kitty/kitty.conf".source = ../../../dots/.config/kitty/kitty.conf;
".config/kitty/themes/zenwritten_light.conf".source = ".config/kitty/themes/zenwritten_light.conf".source =
../../../dots/.config/kitty/themes/zenwritten_light.conf; ../../../dots/.config/kitty/themes/zenwritten_light.conf;

View File

@@ -16,6 +16,7 @@ in
../../modules/taskwarrior.nix ../../modules/taskwarrior.nix
../../modules/keepassxc.nix ../../modules/keepassxc.nix
../../modules/browser ../../modules/browser
../../modules/shell
]; ];
home.stateVersion = "25.05"; home.stateVersion = "25.05";
@@ -27,28 +28,12 @@ in
browser.primary = "librewolf"; browser.primary = "librewolf";
shell.bash = {
enable = true;
aliases.lang-js = true;
};
programs = { programs = {
bash = {
enable = true;
enableCompletion = true;
initExtra = ''
for f in /home/${username}/.bashrc.d/*; do
[ -f "$f" ] && source "$f"
done
source /home/${username}/.bash_aliases/all
source /home/${username}/.bash_aliases/lang-js
# host-specific config goes here
# ...
export PATH=${../../../dots/.bin}:$PATH
'';
};
fzf = {
enable = true;
enableBashIntegration = true;
};
home-manager.enable = true; home-manager.enable = true;
}; };
@@ -58,11 +43,6 @@ in
}; };
home.file = { home.file = {
".inputrc".source = ../../../dots/.inputrc;
".bashrc.d/prompt".source = ../../../dots/.bashrc.d/prompt;
".bashrc.d/editor".source = ../../../dots/.bashrc.d/editor;
".bash_aliases/all".source = ../../../dots/.bash_aliases/all;
".bash_aliases/lang-js".source = ../../../dots/.bash_aliases/lang-js;
".config/kitty/kitty.conf".source = ../../../dots/.config/kitty/kitty.conf; ".config/kitty/kitty.conf".source = ../../../dots/.config/kitty/kitty.conf;
".config/kitty/themes/zenwritten_light.conf".source = ".config/kitty/themes/zenwritten_light.conf".source =
../../../dots/.config/kitty/themes/zenwritten_light.conf; ../../../dots/.config/kitty/themes/zenwritten_light.conf;

View File

@@ -21,6 +21,7 @@ with pkgs;
parallel parallel
pass pass
pnpm pnpm
python3
ripgrep ripgrep
signal-desktop signal-desktop
silver-searcher silver-searcher

View File

@@ -10,13 +10,36 @@ let
in in
{ {
imports = [ imports = [
inputs.sops-nix.homeManagerModules.sops
../../modules/dconf.nix ../../modules/dconf.nix
../../modules/git.nix ../../modules/git.nix
../../modules/k9s.nix ../../modules/k9s.nix
../../modules/keepassxc.nix ../../modules/keepassxc.nix
../../modules/browser ../../modules/browser
../../modules/taskwarrior.nix
]; ];
sops = {
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
defaultSopsFile = "${inputs.nix-secrets}/secrets.yaml";
secrets = {
taskwarrior_sync_server_url = {};
taskwarrior_sync_server_client_id = {};
taskwarrior_sync_encryption_secret = {};
anki_sync_user = {};
anki_sync_key = {};
};
templates."taskrc.d/sync" = {
content = ''
sync.server.url=${config.sops.placeholder.taskwarrior_sync_server_url}
sync.server.client_id=${config.sops.placeholder.taskwarrior_sync_server_client_id}
sync.encryption_secret=${config.sops.placeholder.taskwarrior_sync_encryption_secret}
'';
};
};
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
home.stateVersion = "25.05"; home.stateVersion = "25.05";

View File

@@ -115,7 +115,7 @@ with pkgs;
xmage xmage
yamllint yamllint
yarn yarn
(python311.withPackages (ppkgs: [ (python314.withPackages (ppkgs: [
ppkgs.plyer ppkgs.plyer
ppkgs.dbus-python ppkgs.dbus-python
])) ]))

View File

@@ -1,6 +1,23 @@
{ config, pkgs, ... }:
{ {
config,
lib,
pkgs,
osConfig ? null,
...
}:
let
hmSopsAvailable = config ? sops && config.sops ? secrets;
osSopsAvailable = osConfig != null && osConfig ? sops && osConfig.sops ? secrets;
sopsAvailable = hmSopsAvailable || osSopsAvailable;
sopsSecrets = if hmSopsAvailable then config.sops.secrets else osConfig.sops.secrets;
in
{
warnings = lib.optional (
!sopsAvailable && config.programs.anki.enable
) "anki is enabled but sops secrets are not available. anki sync will not be configured.";
programs.anki = { programs.anki = {
enable = true; enable = true;
addons = with pkgs.ankiAddons; [ addons = with pkgs.ankiAddons; [
@@ -8,9 +25,9 @@
puppy-reinforcement puppy-reinforcement
review-heatmap review-heatmap
]; ];
sync = { sync = lib.mkIf sopsAvailable {
usernameFile = "${config.sops.secrets."anki_sync_user".path}"; usernameFile = "${sopsSecrets."anki_sync_user".path}";
keyFile = "${config.sops.secrets."anki_sync_key".path}"; keyFile = "${sopsSecrets."anki_sync_key".path}";
}; };
}; };
} }

View File

@@ -9,7 +9,6 @@
"librewolf" "librewolf"
]; ];
default = "firefox"; default = "firefox";
description = "Primary web browser";
}; };
secondary = lib.mkOption { secondary = lib.mkOption {
@@ -21,7 +20,6 @@
] ]
); );
default = null; default = null;
description = "Optional secondary web browser";
}; };
}; };

View File

@@ -0,0 +1,75 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.shell.bash;
username = config.home.username;
dotsPath = ../../../dots;
in
{
options.shell.bash = {
enable = lib.mkEnableOption "bash configuration";
aliases = {
all = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable common aliases";
};
lang-js = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable JavaScript/Node.js aliases";
};
};
addBinToPath = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Add dots .bin directory to PATH";
};
extraInit = lib.mkOption {
type = lib.types.lines;
default = "";
description = "Additional bash initialization";
};
};
config = lib.mkIf cfg.enable {
shell-utils.enable = lib.mkDefault true;
programs.bash = {
enable = true;
enableCompletion = true;
initExtra = ''
for f in /home/${username}/.bashrc.d/*; do
[ -f "$f" ] && source "$f"
done
${lib.optionalString cfg.aliases.all "source /home/${username}/.bash_aliases/all"}
${lib.optionalString cfg.aliases.lang-js "source /home/${username}/.bash_aliases/lang-js"}
${lib.optionalString cfg.addBinToPath "export PATH=${dotsPath}/.bin:$PATH"}
${cfg.extraInit}
'';
};
home.file =
{
".inputrc".source = dotsPath + "/.inputrc";
".bashrc.d/prompt".source = dotsPath + "/.bashrc.d/prompt";
".bashrc.d/editor".source = dotsPath + "/.bashrc.d/editor";
}
// lib.optionalAttrs cfg.aliases.all {
".bash_aliases/all".source = dotsPath + "/.bash_aliases/all";
}
// lib.optionalAttrs cfg.aliases.lang-js {
".bash_aliases/lang-js".source = dotsPath + "/.bash_aliases/lang-js";
};
};
}

View File

@@ -0,0 +1,7 @@
{
imports = [
./bash.nix
./utils.nix
./prompt.nix
];
}

View File

@@ -0,0 +1,17 @@
{
config,
lib,
pkgs,
...
}:
{
options.starship = {
enable = lib.mkEnableOption "starship prompt";
};
config = lib.mkIf config.starship.enable {
programs.starship = {
enable = true;
};
};
}

View File

@@ -0,0 +1,26 @@
{
config,
lib,
pkgs,
...
}:
{
options.shell-utils = {
enable = lib.mkEnableOption "shell utilities";
};
config = lib.mkIf config.shell-utils.enable {
programs.fzf = {
enable = true;
enableBashIntegration = lib.mkDefault true;
};
home.packages = with pkgs; [
ripgrep
bat
jq
entr
parallel
];
};
}

View File

@@ -1,12 +1,24 @@
{ {
config, config,
lib,
pkgs, pkgs,
osConfig ? null,
... ...
}: }:
let
hmSopsAvailable = config ? sops && config.sops ? templates;
osSopsAvailable = osConfig != null && osConfig ? sops && osConfig.sops ? templates;
sopsAvailable = hmSopsAvailable || osSopsAvailable;
sopsTemplates = if hmSopsAvailable then config.sops.templates else osConfig.sops.templates;
in
{ {
warnings =
lib.optional (!sopsAvailable && config.programs.taskwarrior.enable)
"taskwarrior is enabled, but sops templates are not available. taskwarrior sync will not be configured.";
home.packages = with pkgs; [ home.packages = with pkgs; [
python314
libnotify libnotify
]; ];
@@ -35,17 +47,10 @@
package = taskwarrior3; package = taskwarrior3;
colorTheme = "dark-256"; colorTheme = "dark-256";
config = { config = {
# sync = {
# server.url = "${builtins.readFile config.sops.secrets."taskwarrior_sync_server_url".path}";
# server.client_id = "${builtins.readFile
# config.sops.secrets."taskwarrior_sync_server_client_id".path
# }";
# encryption_secret = "${builtins.readFile
# config.sops.secrets."taskwarrior_sync_encryption_secret".path
# }";
# };
recurrence = "off"; recurrence = "off";
}; };
extraConfig = "include ${config.sops.templates."taskrc.d/sync".path}"; extraConfig = lib.optionalString sopsAvailable ''
include ${sopsTemplates."taskrc.d/sync".path}
'';
}; };
} }

View File

@@ -81,6 +81,7 @@ in
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
users.${username} = import ../../home/hosts/andromache { users.${username} = import ../../home/hosts/andromache {
inherit lib; inherit lib;
inherit inputs; inherit inputs;

View File

@@ -75,6 +75,7 @@ in
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
users.${username} = import ../../home/hosts/astyanax { users.${username} = import ../../home/hosts/astyanax {
inherit inputs; inherit inputs;
inherit config; inherit config;

View File

@@ -58,6 +58,7 @@ in
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
users.${username} = import ../../home/hosts/vm { users.${username} = import ../../home/hosts/vm {
inherit inputs; inherit inputs;
inherit config; inherit config;

View File

@@ -16,7 +16,6 @@ in
}; };
config = { config = {
sops = { sops = {
validateSopsFiles = false;
defaultSopsFile = "${builtins.toString inputs.nix-secrets}/secrets.yaml"; defaultSopsFile = "${builtins.toString inputs.nix-secrets}/secrets.yaml";
defaultSopsFormat = "yaml"; defaultSopsFormat = "yaml";
age.keyFile = "/home/${cfg.username}/.config/sops/age/keys.txt"; age.keyFile = "/home/${cfg.username}/.config/sops/age/keys.txt";