formatted

This commit is contained in:
Deepak Mallubhotla 2025-03-18 03:33:27 -05:00
parent 9c2e5587cf
commit e9c321b8e2
Signed by: deepak
GPG Key ID: 47831B15427F5A55
15 changed files with 885 additions and 699 deletions

50
flake.lock generated
View File

@ -315,6 +315,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": {
"locked": {
"lastModified": 1735554305,
"narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0e82ab234249d8eee3e8c91437802b32c74bb3fd",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nomodoro": { "nomodoro": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -416,6 +432,8 @@
"parrot-nvim": "parrot-nvim", "parrot-nvim": "parrot-nvim",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"spaceport-nvim": "spaceport-nvim", "spaceport-nvim": "spaceport-nvim",
"systems": "systems_3",
"treefmt-nix": "treefmt-nix",
"zsh-completions": "zsh-completions" "zsh-completions": "zsh-completions"
} }
}, },
@ -484,6 +502,38 @@
"type": "github" "type": "github"
} }
}, },
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"id": "systems",
"type": "indirect"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1739829690,
"narHash": "sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "3d0579f5cc93436052d94b73925b48973a104204",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"uv2nix": { "uv2nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [

186
flake.nix
View File

@ -1,98 +1,130 @@
{ {
description = "Configuration v1"; description = "Configuration v1";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
sops-nix.url = "github:Mic92/sops-nix"; treefmt-nix.url = "github:numtide/treefmt-nix";
sops-nix.url = "github:Mic92/sops-nix";
nixpkgs-24-05.url = "github:NixOS/nixpkgs/nixos-24.05"; nixpkgs-24-05.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs-24-11.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs-24-11.url = "github:NixOS/nixpkgs/nixos-24.11";
# only use this for Maxos, prefer specifying version explicitly # only use this for Maxos, prefer specifying version explicitly
homeManager = { homeManager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
homeManager-24-05 = { homeManager-24-05 = {
url = "github:nix-community/home-manager/release-24.05"; url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs-24-05"; inputs.nixpkgs.follows = "nixpkgs-24-05";
}; };
NixOS-WSL-2411 = { NixOS-WSL-2411 = {
url = "github:nix-community/NixOS-WSL"; url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs-24-11"; inputs.nixpkgs.follows = "nixpkgs-24-11";
}; };
homeManager-24-11 = { homeManager-24-11 = {
url = "github:nix-community/home-manager/release-24.11"; url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs-24-11"; inputs.nixpkgs.follows = "nixpkgs-24-11";
}; };
NixOS-WSL-2405 = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs-24-05";
};
NixOS-WSL-2405 = { NixOS-WSL = {
url = "github:nix-community/NixOS-WSL"; url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs-24-05"; inputs.nixpkgs.follows = "nixpkgs";
}; };
NixOS-WSL = { cmp-vimtex = {
url = "github:nix-community/NixOS-WSL"; url = "github:micangl/cmp-vimtex/master";
inputs.nixpkgs.follows = "nixpkgs"; flake = false;
}; };
spaceport-nvim = {
url = "github:CWood-sdf/spaceport.nvim/main";
flake = false;
};
cmp-vimtex = { parrot-nvim = {
url = "github:micangl/cmp-vimtex/master"; url = "github:frankroeder/parrot.nvim/main";
flake = false; flake = false;
}; };
spaceport-nvim = {
url = "github:CWood-sdf/spaceport.nvim/main";
flake = false;
};
parrot-nvim = { nomodoro = {
url = "github:frankroeder/parrot.nvim/main"; url = "github:dbinagi/nomodoro/main";
flake = false; flake = false;
}; };
nomodoro = { zsh-completions = {
url = "github:dbinagi/nomodoro/main"; url = "github:zsh-users/zsh-completions/master";
flake = false; flake = false;
}; };
zsh-completions = { claude-mcp-bundle = {
url = "github:zsh-users/zsh-completions/master"; url = "git+https://gitea.deepak.science/deepak/claude_mcp_bundle.git";
flake = false; inputs.nixpkgs.follows = "nixpkgs";
}; };
claude-mcp-bundle = {
url = "git+https://gitea.deepak.science/deepak/claude_mcp_bundle.git";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, homeManager, NixOS-WSL, NixOS-WSL-2405, nixpkgs-24-05, nixpkgs-24-11, homeManager-24-05, homeManager-24-11, cmp-vimtex, spaceport-nvim, nomodoro, ...}@inputs: outputs =
let {
customPackageOverlay = (import ./overlays/default.nix { inherit cmp-vimtex; inherit spaceport-nvim; inherit inputs; inherit nomodoro; parrot-nvim = inputs.parrot-nvim; }).overlay; self,
in systems,
{ nixpkgs,
nixosConfigurations = ( homeManager,
import ./hosts/hosts.nix { NixOS-WSL,
inherit nixpkgs; NixOS-WSL-2405,
inherit homeManager; nixpkgs-24-05,
inherit inputs; homeManager-24-05,
inherit (nixpkgs) lib; cmp-vimtex,
inherit NixOS-WSL; spaceport-nvim,
inherit NixOS-WSL-2405; nomodoro,
inherit nixpkgs-24-05; ...
inherit homeManager-24-05; }@inputs:
inherit cmp-vimtex; let
inherit customPackageOverlay; customPackageOverlay =
} (import ./overlays/default.nix {
); inherit cmp-vimtex;
inherit spaceport-nvim;
inherit inputs;
inherit nomodoro;
parrot-nvim = inputs.parrot-nvim;
}).overlay;
# Small tool to iterate over each systems
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
}; # Eval the treefmt modules from ./treefmt.nix
treefmtEval = eachSystem (pkgs: inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
in
{
nixosConfigurations = (
import ./hosts/hosts.nix {
inherit nixpkgs;
inherit homeManager;
inherit inputs;
inherit (nixpkgs) lib;
inherit NixOS-WSL;
inherit NixOS-WSL-2405;
inherit nixpkgs-24-05;
inherit homeManager-24-05;
inherit cmp-vimtex;
inherit customPackageOverlay;
}
);
formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
# for `nix flake check`
checks = eachSystem (pkgs: {
formatting = treefmtEval.${pkgs.system}.config.build.check self;
});
};
} }

View File

@ -1,4 +1,6 @@
{ pkgs ? import <nixpkgs> {} }: {
pkgs ? import <nixpkgs> { },
}:
let let
custom-fonts = pkgs.stdenvNoCC.mkDerivation { custom-fonts = pkgs.stdenvNoCC.mkDerivation {

View File

@ -4,6 +4,6 @@ keys:
creation_rules: creation_rules:
- path_regex: secrets.yaml$ - path_regex: secrets.yaml$
key_groups: key_groups:
- age: - age:
- *nixosEggYoke - *nixosEggYoke
- *nixosWSL - *nixosWSL

View File

@ -1,227 +1,252 @@
{ pkgs, config, specialArgs, lib, ...}: {
pkgs,
config,
specialArgs,
lib,
...
}:
let let
pkgs-unstable = specialArgs.nixpkgs-unstable; pkgs-unstable = specialArgs.nixpkgs-unstable;
# default_python = pkgs-unstable.python313; in
in # default_python = pkgs-unstable.python313;
{ {
programs.home-manager.enable = true; programs.home-manager.enable = true;
home.packages = [ home.packages =
pkgs.hello [
# (pkgs.writeScriptBin "nixFlakes" '' pkgs.hello
# exec ${pkgs.nixVersions.git}/bin/nix --experimental-features "nix-command flakes" "$@" # (pkgs.writeScriptBin "nixFlakes" ''
# '') # exec ${pkgs.nixVersions.git}/bin/nix --experimental-features "nix-command flakes" "$@"
pkgs.cachix # '')
pkgs.kubectl pkgs.cachix
pkgs.bat pkgs.kubectl
pkgs.eza pkgs.bat
pkgs.fd pkgs.eza
pkgs.ripgrep pkgs.fd
pkgs.just pkgs.ripgrep
pkgs.just
# lsps # cli markdown tool
pkgs.nil pkgs.glow
# pkgs.nodePackages.pyright
# pkgs.pyright
pkgs.thefuck # lsps
pkgs.fzf pkgs.nil
pkgs.sops # pkgs.nodePackages.pyright
pkgs.age # pkgs.pyright
pkgs.ydiff
pkgs.delta
pkgs-unstable.claude-code pkgs.thefuck
# default_python pkgs.fzf
# pkgs-unstable.uv pkgs.sops
# pkgs-unstable.nodejs pkgs.age
pkgs.ydiff
pkgs.delta
# From our claude bundle pkgs-unstable.claude-code
pkgs.custom-servers.arxiv-mcp-server # default_python
pkgs.custom-servers.basic-memory-server # pkgs-unstable.uv
pkgs.custom-servers.mcp-text-editor # pkgs-unstable.nodejs
] ++ pkgs.lib.optionals specialArgs.withGUI [ # From our claude bundle
pkgs.discord pkgs.custom-servers.arxiv-mcp-server
pkgs.obsidian pkgs.custom-servers.basic-memory-server
pkgs.audacity pkgs.custom-servers.mcp-text-editor
pkgs.nextcloud-client
pkgs.libreoffice-qt6-fresh
];
home.homeDirectory = "/home/deepak"; ]
home.username = "deepak"; ++ pkgs.lib.optionals specialArgs.withGUI [
pkgs.discord
pkgs.obsidian
pkgs.audacity
pkgs.nextcloud-client
pkgs.libreoffice-qt6-fresh
];
# required, was previously default home.homeDirectory = "/home/deepak";
home.stateVersion = "18.09"; home.username = "deepak";
home.sessionPath = [ # required, was previously default
"$HOME/.local/bin" home.stateVersion = "18.09";
];
home.sessionVariables = { home.sessionPath = [
# UV_PYTHON = "${default_python}"; "$HOME/.local/bin"
}; ];
programs.direnv.enable = true; home.sessionVariables =
programs.direnv.nix-direnv.enable = true; let
win_home_dir = specialArgs.win_home_dir or "/mnt/c/Users/Deepak";
in
{
# Namespace our own nixconf variables with DPK
xdg.enable = true; # Set a common directory for Windows for WSL installs
#
# Different per host
#
DPK_WIN_HOME_DIR = "${win_home_dir}";
DPK_OBSIDIAN_DIR = "/mnt/c/Users/Deepak/Documents/vault01";
services.nextcloud-client = pkgs.lib.mkIf specialArgs.withGUI { # UV_PYTHON = "${default_python}";
enable = true; };
};
programs.git = { programs.direnv.enable = true;
enable = true; programs.direnv.nix-direnv.enable = true;
userName = "Deepak Mallubhotla";
userEmail = "dmallubhotla+github@gmail.com";
signing = {
key = specialArgs.gitSigningKey;
signByDefault = true;
};
extraConfig = {
core = {
fileMode = false;
};
init = {
defaultBranch = "master";
};
};
includes = [
# this allows us to have a local gitconfig maybe?
{ path = "~/.gitconfig.local"; }
];
};
xdg.enable = true;
programs.neovim = { services.nextcloud-client = pkgs.lib.mkIf specialArgs.withGUI {
enable = true; enable = true;
package = pkgs-unstable.neovim-unwrapped; };
defaultEditor = true;
vimAlias = true;
plugins = with pkgs.vimPlugins; [ programs.git = {
{ enable = true;
plugin = vimtex; userName = "Deepak Mallubhotla";
config = "let g:nix_recommended_style = 0"; userEmail = "dmallubhotla+github@gmail.com";
} signing = {
vim-nix key = specialArgs.gitSigningKey;
# plenary and stuff for telescope signByDefault = true;
plenary-nvim telescope-nvim telescope-file-browser-nvim };
# need fzf for parrot extraConfig = {
fzf-lua core = {
ctrlp-vim fileMode = false;
# lsp stuff };
lsp-zero-nvim init = {
nvim-cmp defaultBranch = "master";
cmp-nvim-lsp };
cmp_luasnip };
nvim-lspconfig includes = [
# this allows us to have a local gitconfig maybe?
{ path = "~/.gitconfig.local"; }
];
};
vim-vinegar programs.neovim = {
enable = true;
package = pkgs-unstable.neovim-unwrapped;
defaultEditor = true;
vimAlias = true;
wiki-vim plugins = with pkgs.vimPlugins; [
vim-markdown {
cmp-buffer plugin = vimtex;
# vim-airline config = "let g:nix_recommended_style = 0";
vim-fugitive }
flash-nvim vim-nix
gitsigns-nvim # plenary and stuff for telescope
friendly-snippets plenary-nvim
luasnip telescope-nvim
which-key-nvim telescope-file-browser-nvim
# need fzf for parrot
fzf-lua
ctrlp-vim
# lsp stuff
lsp-zero-nvim
nvim-cmp
cmp-nvim-lsp
cmp_luasnip
nvim-lspconfig
overseer-nvim vim-vinegar
# prettiness wiki-vim
lualine-nvim vim-markdown
goyo-vim cmp-buffer
limelight-vim # vim-airline
nui-nvim vim-fugitive
zen-mode-nvim flash-nvim
twilight-nvim gitsigns-nvim
friendly-snippets
luasnip
which-key-nvim
# color schemes overseer-nvim
rose-pine
kanagawa-nvim
nightfox-nvim
# custom plugins from flakes # prettiness
pkgs.customVimPlugins.cmp-vimtex lualine-nvim
pkgs.customVimPlugins.spaceport-nvim goyo-vim
pkgs.customVimPlugins.nomodoro limelight-vim
pkgs.customVimPlugins.parrot-nvim nui-nvim
zen-mode-nvim
twilight-nvim
# syntax highlighting # color schemes
vim-just rose-pine
]; kanagawa-nvim
extraConfig = import ./neovim/init-vim.nix { inherit config; }; nightfox-nvim
};
programs.thefuck.enable = true; # custom plugins from flakes
pkgs.customVimPlugins.cmp-vimtex
pkgs.customVimPlugins.spaceport-nvim
pkgs.customVimPlugins.nomodoro
pkgs.customVimPlugins.parrot-nvim
programs.zsh = { # syntax highlighting
enable = true; vim-just
shellAliases = { ];
doo="./do.sh"; extraConfig = import ./neovim/init-vim.nix { inherit config; };
wttr="curl wttr.in"; };
gcd="_t=$(git rev-parse --show-toplevel) && cd \"$_t\" && pwd";
}; programs.thefuck.enable = true;
history = {
size = 10000; programs.zsh = {
path = "${lib.removePrefix "/home/deepak/" config.xdg.dataHome}/zsh/history"; enable = true;
}; shellAliases = {
oh-my-zsh = { doo = "./do.sh";
enable = true; wttr = "curl wttr.in";
plugins = [ gcd = "_t=$(git rev-parse --show-toplevel) && cd \"$_t\" && pwd";
"poetry" };
"themes" history = {
"emoji-clock" size = 10000;
"screen" path = "${lib.removePrefix "/home/deepak/" config.xdg.dataHome}/zsh/history";
"ssh-agent" };
]; oh-my-zsh = {
theme = "random"; enable = true;
}; plugins = [
plugins = [ "poetry"
{ "themes"
name = "sd"; "emoji-clock"
src = pkgs.fetchFromGitHub { "screen"
owner = "ianthehenry"; "ssh-agent"
repo = "sd"; ];
rev = "ecd1ab8d3fc3a829d8abfb8bf1e3722c9c99407b"; theme = "random";
sha256 = "0fm1r8w73vaab5r9dj5jdxsfc7pbddxf4dvvasfq8rry2dxaf7sy"; };
}; plugins = [
} {
{ name = "sd";
name = "zsh-z"; src = pkgs.fetchFromGitHub {
src = pkgs.fetchFromGitHub { owner = "ianthehenry";
owner = "agkozak"; repo = "sd";
repo = "zsh-z"; rev = "ecd1ab8d3fc3a829d8abfb8bf1e3722c9c99407b";
rev = "b5e61d03a42a84e9690de12915a006b6745c2a5f"; sha256 = "0fm1r8w73vaab5r9dj5jdxsfc7pbddxf4dvvasfq8rry2dxaf7sy";
sha256 = "1gsgmsvl1sl9m3yfapx6bp0y15py8610kywh56bgsjf9wxkrc3nl"; };
}; }
} {
pkgs.customZshPlugins.zsh-completions name = "zsh-z";
]; src = pkgs.fetchFromGitHub {
initExtra = '' owner = "agkozak";
eval "$(${pkgs.direnv}/bin/direnv hook zsh)" repo = "zsh-z";
''; rev = "b5e61d03a42a84e9690de12915a006b6745c2a5f";
}; sha256 = "1gsgmsvl1sl9m3yfapx6bp0y15py8610kywh56bgsjf9wxkrc3nl";
};
sops = { }
age.keyFile = "/home/deepak/.config/sops/age/keys.txt"; # must have no password! pkgs.customZshPlugins.zsh-completions
# It's also possible to use a ssh key, but only when it has no password: ];
#age.sshKeyPaths = [ "/home/user/path-to-ssh-key" ]; initExtra = ''
defaultSopsFile = ./secrets.yaml; eval "$(${pkgs.direnv}/bin/direnv hook zsh)"
'';
secrets = { };
anthropic_api_key = {
path = "${config.sops.defaultSymlinkPath}/anthropic_api_key"; sops = {
}; age.keyFile = "/home/deepak/.config/sops/age/keys.txt"; # must have no password!
hello = {}; # It's also possible to use a ssh key, but only when it has no password:
newkey = {}; #age.sshKeyPaths = [ "/home/user/path-to-ssh-key" ];
}; defaultSopsFile = ./secrets.yaml;
};
secrets = {
anthropic_api_key = {
path = "${config.sops.defaultSymlinkPath}/anthropic_api_key";
};
hello = { };
newkey = { };
};
};
} }

View File

@ -1,243 +1,243 @@
{ config }: { config }:
'' ''
inoremap jj <Esc> inoremap jj <Esc>
inoremap kk <Esc> inoremap kk <Esc>
lua << EOF lua << EOF
vim.opt.tabstop = 4 vim.opt.tabstop = 4
vim.opt.shiftwidth = 4 vim.opt.shiftwidth = 4
vim.opt.expandtab = false vim.opt.expandtab = false
vim.opt.list = true vim.opt.list = true
vim.opt.listchars = { eol = "¬", tab = "" , trail = '·', multispace = '·' } vim.opt.listchars = { eol = "¬", tab = "" , trail = '·', multispace = '·' }
vim.opt.foldlevelstart = 99 vim.opt.foldlevelstart = 99
vim.opt.number = true vim.opt.number = true
vim.opt.relativenumber = true vim.opt.relativenumber = true
vim.opt.ignorecase = true vim.opt.ignorecase = true
vim.opt.smartcase = true vim.opt.smartcase = true
-- scary hopefully secure in neovim -- scary hopefully secure in neovim
vim.opt.exrc = true vim.opt.exrc = true
vim.opt.spell = true vim.opt.spell = true
vim.opt.spelllang = 'en_gb' vim.opt.spelllang = 'en_gb'
vim.keymap.set("n", "<leader>N", "R<Enter><Esc>") vim.keymap.set("n", "<leader>N", "R<Enter><Esc>")
vim.g.python_recommended_style = 0 vim.g.python_recommended_style = 0
-- ctrlp setup -- ctrlp setup
vim.g.ctrlp_custom_ignore = { vim.g.ctrlp_custom_ignore = {
file = '\\v\\.(aux|bbl|blg|bcf|fdb_latexmk|fls|run.xml|tdo|toc|log|pdf)$' file = '\\v\\.(aux|bbl|blg|bcf|fdb_latexmk|fls|run.xml|tdo|toc|log|pdf)$'
} }
${builtins.readFile ./spaceport.lua} ${builtins.readFile ./spaceport.lua}
require('gitsigns').setup() require('gitsigns').setup()
-- color scheme -- color scheme
require("rose-pine").setup({}) require("rose-pine").setup({})
require("kanagawa").setup({}) require("kanagawa").setup({})
require("nightfox").setup({}) require("nightfox").setup({})
vim.cmd("colorscheme kanagawa-dragon") vim.cmd("colorscheme kanagawa-dragon")
vim.keymap.set('n', "<leader>zm", '<cmd>ZenMode<CR>', { noremap = true, desc = "Toggle zen-mode" }) vim.keymap.set('n', "<leader>zm", '<cmd>ZenMode<CR>', { noremap = true, desc = "Toggle zen-mode" })
require('flash').setup() require('flash').setup()
vim.keymap.set('n', "<leader>ft", function() require("flash").toggle() end, {desc = "Toggle flash.nvim search", noremap = true}) vim.keymap.set('n', "<leader>ft", function() require("flash").toggle() end, {desc = "Toggle flash.nvim search", noremap = true})
require('which-key').setup({}) require('which-key').setup({})
${builtins.readFile ./lsp.lua} ${builtins.readFile ./lsp.lua}
vim.keymap.set('n', "]d", vim.diagnostic.goto_next, { noremap = true, desc = "Next diagnostic" }) vim.keymap.set('n', "]d", vim.diagnostic.goto_next, { noremap = true, desc = "Next diagnostic" })
vim.keymap.set('n', "[d", vim.diagnostic.goto_prev, { noremap = true, desc = "Previous diagnostic" }) vim.keymap.set('n', "[d", vim.diagnostic.goto_prev, { noremap = true, desc = "Previous diagnostic" })
vim.keymap.set('n', "<leader>d", vim.diagnostic.open_float, { noremap = true, desc = "Open diagnostic" }) vim.keymap.set('n', "<leader>d", vim.diagnostic.open_float, { noremap = true, desc = "Open diagnostic" })
vim.g.vim_markdown_folding_level = 2 vim.g.vim_markdown_folding_level = 2
${builtins.readFile ./wiki-vim.lua} ${builtins.readFile ./wiki-vim.lua}
vim.g.vimtex_fold_enabled = true vim.g.vimtex_fold_enabled = true
${builtins.readFile ./overseer.lua} ${builtins.readFile ./overseer.lua}
require("parrot").setup({ require("parrot").setup({
providers = { providers = {
anthropic = { anthropic = {
api_key = { "cat", "${ config.sops.secrets.anthropic_api_key.path }" }, api_key = { "cat", "${config.sops.secrets.anthropic_api_key.path}" },
}, },
}, },
hooks = { hooks = {
Complete = function(prt, params) Complete = function(prt, params)
local template = [[ local template = [[
I have the following code from {{filename}}: I have the following code from {{filename}}:
```{{filetype}} ```{{filetype}}
{{selection}} {{selection}}
``` ```
Please finish the code above carefully and logically. Please finish the code above carefully and logically.
Respond just with the snippet of code that should be inserted." Respond just with the snippet of code that should be inserted."
]] ]]
local model_obj = prt.get_model "command" local model_obj = prt.get_model "command"
prt.Prompt(params, prt.ui.Target.append, model_obj, nil, template) prt.Prompt(params, prt.ui.Target.append, model_obj, nil, template)
end, end,
CompleteFullContext = function(prt, params) CompleteFullContext = function(prt, params)
local template = [[ local template = [[
I have the following code from {{filename}}: I have the following code from {{filename}}:
```{{filetype}} ```{{filetype}}
{{filecontent}} {{filecontent}}
``` ```
Please look at the following section specifically: Please look at the following section specifically:
```{{filetype}} ```{{filetype}}
{{selection}} {{selection}}
``` ```
Please finish the code above carefully and logically. Please finish the code above carefully and logically.
Respond just with the snippet of code that should be inserted. Respond just with the snippet of code that should be inserted.
]] ]]
local model_obj = prt.get_model "command" local model_obj = prt.get_model "command"
prt.Prompt(params, prt.ui.Target.append, model_obj, nil, template) prt.Prompt(params, prt.ui.Target.append, model_obj, nil, template)
end, end,
CompleteMultiContext = function(prt, params) CompleteMultiContext = function(prt, params)
local template = [[ local template = [[
I have the following code from {{filename}} and other realted files: I have the following code from {{filename}} and other realted files:
```{{filetype}} ```{{filetype}}
{{multifilecontent}} {{multifilecontent}}
``` ```
Please look at the following section specifically: Please look at the following section specifically:
```{{filetype}} ```{{filetype}}
{{selection}} {{selection}}
``` ```
Please finish the code above carefully and logically. Please finish the code above carefully and logically.
Respond just with the snippet of code that should be inserted. Respond just with the snippet of code that should be inserted.
]] ]]
local model_obj = prt.get_model "command" local model_obj = prt.get_model "command"
prt.Prompt(params, prt.ui.Target.append, model_obj, nil, template) prt.Prompt(params, prt.ui.Target.append, model_obj, nil, template)
end, end,
Explain = function(prt, params) Explain = function(prt, params)
local template = [[ local template = [[
Your task is to take the code snippet from {{filename}} and explain it with gradually increasing complexity. Your task is to take the code snippet from {{filename}} and explain it with gradually increasing complexity.
Break down the code's functionality, purpose, and key components. Break down the code's functionality, purpose, and key components.
The goal is to help the reader understand what the code does and how it works. The goal is to help the reader understand what the code does and how it works.
```{{filetype}} ```{{filetype}}
{{selection}} {{selection}}
``` ```
Use the markdown format with codeblocks and inline code. Use the markdown format with codeblocks and inline code.
Explanation of the code above: Explanation of the code above:
]] ]]
local model = prt.get_model "command" local model = prt.get_model "command"
prt.logger.info("Explaining selection with model: " .. model.name) prt.logger.info("Explaining selection with model: " .. model.name)
prt.Prompt(params, prt.ui.Target.new, model, nil, template) prt.Prompt(params, prt.ui.Target.new, model, nil, template)
end, end,
ProofReader = function(prt, params) ProofReader = function(prt, params)
local chat_prompt = [[ local chat_prompt = [[
I want you to act as a proofreader. I will provide you with texts and I want you to act as a proofreader. I will provide you with texts and
I would like you to review them for any spelling, grammar, or I would like you to review them for any spelling, grammar, or
punctuation errors. Once you have finished reviewing the text, punctuation errors. Once you have finished reviewing the text,
provide me with any necessary corrections or suggestions to improve the provide me with any necessary corrections or suggestions to improve the
text. Highlight the corrected fragments (if any) using markdown backticks. text. Highlight the corrected fragments (if any) using markdown backticks.
When you have done that subsequently provide me with a slightly better When you have done that subsequently provide me with a slightly better
version of the text, but keep close to the original text. version of the text, but keep close to the original text.
Finally provide me with an ideal version of the text. Finally provide me with an ideal version of the text.
For each of these versions, you can elide sections which include long unchanged text with NO_CHANGES_HERE. For each of these versions, you can elide sections which include long unchanged text with NO_CHANGES_HERE.
Whenever I provide you with text, you reply in this format directly: Whenever I provide you with text, you reply in this format directly:
## Summary of suggestions: ## Summary of suggestions:
{a brief list of spelling, grammar and punctuation errors, with brief snippets of the original text so I can search and find each change, followed by summaries of what types of changes are in the slightly better and ideal versions} {a brief list of spelling, grammar and punctuation errors, with brief snippets of the original text so I can search and find each change, followed by summaries of what types of changes are in the slightly better and ideal versions}
## Corrected text: ## Corrected text:
{corrected text, or say "NO_CORRECTIONS_NEEDED" instead if there are no corrections made} {corrected text, or say "NO_CORRECTIONS_NEEDED" instead if there are no corrections made}
## Slightly better text ## Slightly better text
{slightly better text} {slightly better text}
## Ideal text ## Ideal text
{ideal text} {ideal text}
]] ]]
prt.ChatNew(params, chat_prompt) prt.ChatNew(params, chat_prompt)
end, end,
ProofReader2 = function(prt, params) ProofReader2 = function(prt, params)
local chat_prompt = [[ local chat_prompt = [[
I want you to act as a professional proofreader and editor. When I provide you with text, please: I want you to act as a professional proofreader and editor. When I provide you with text, please:
1. First, identify and correct errors in 1. First, identify and correct errors in
- spelling - spelling
- grammar - grammar
- punctuation - punctuation
- syntax errors. - syntax errors.
- Technical accuracy (for domain-specific content especially) - Technical accuracy (for domain-specific content especially)
Mark corrections using markdown backticks. Mark corrections using markdown backticks.
2. Second, analyze stylistic elements including 2. Second, analyze stylistic elements including
- clarity - clarity
- conciseness - conciseness
- word choice - word choice
- sentence structure - sentence structure
- paragraph organization and transitions (as appropriate for text length) - paragraph organization and transitions (as appropriate for text length)
3. Provide your response in this structured format: 3. Provide your response in this structured format:
# Summary of the text: # Summary of the text:
Provide a concise overview of the text (1-2 sentences). Provide a concise overview of the text (1-2 sentences).
For longer texts (5+ paragraphs), include a brief outline of the content. For longer texts (5+ paragraphs), include a brief outline of the content.
## Summary of suggestions: ## Summary of suggestions:
- List specific errors found with brief context - List specific errors found with brief context
- Group similar issues together - Group similar issues together
- Note patterns if they exist - Note patterns if they exist
- Highlight 3-5 most impactful improvements - Highlight 3-5 most impactful improvements
- Summarize the types of improvements made in each version - Summarize the types of improvements made in each version
## Corrected text: ## Corrected text:
Present the text with technical errors fixed (or state "NO_CORRECTIONS_NEEDED" if appropriate) Present the text with technical errors fixed (or state "NO_CORRECTIONS_NEEDED" if appropriate)
## Enhanced text: ## Enhanced text:
Provide a version with moderate improvements to readability and flow while preserving the original voice and style. You may use [NO_CHANGES_HERE] to indicate substantial unchanged sections to keep your response more concise. Provide a version with moderate improvements to readability and flow while preserving the original voice and style. You may use [NO_CHANGES_HERE] to indicate substantial unchanged sections to keep your response more concise.
## Optimal text: ## Optimal text:
Present an ideal version that maintains the original intent but optimizes for clarity, impact, and professional quality. Use [NO_CHANGES_HERE] as mentioned above. Present an ideal version that maintains the original intent but optimizes for clarity, impact, and professional quality. Use [NO_CHANGES_HERE] as mentioned above.
Please maintain the original meaning and tone while making your suggestions. If you're uncertain about the author's intent in any section, note this and provide alternative interpretations. Please maintain the original meaning and tone while making your suggestions. If you're uncertain about the author's intent in any section, note this and provide alternative interpretations.
For very long texts, focus on the most impactful improvements. For very long texts, focus on the most impactful improvements.
]] ]]
prt.ChatNew(params, chat_prompt) prt.ChatNew(params, chat_prompt)
end, end,
}, },
}) })
vim.api.nvim_set_keymap("n", "<leader>pt", "<cmd>PrtChatToggle<CR>", { noremap = true}) vim.api.nvim_set_keymap("n", "<leader>pt", "<cmd>PrtChatToggle<CR>", { noremap = true})
require("nomodoro").setup({ require("nomodoro").setup({
work_time = 10, work_time = 10,
short_break_time = 2, short_break_time = 2,
long_break_time = 5, long_break_time = 5,
break_cycle=5, break_cycle=5,
}) })
vim.api.nvim_set_keymap("n", "<leader>nw", "<cmd>NomoWork<CR>", { noremap = true}) vim.api.nvim_set_keymap("n", "<leader>nw", "<cmd>NomoWork<CR>", { noremap = true})
vim.api.nvim_set_keymap("n", "<leader>nb", "<cmd>NomoBreak<CR>", { noremap = true}) vim.api.nvim_set_keymap("n", "<leader>nb", "<cmd>NomoBreak<CR>", { noremap = true})
vim.api.nvim_set_keymap("n", "<leader>ns", "<cmd>NomoStop<CR>", { noremap = true}) vim.api.nvim_set_keymap("n", "<leader>ns", "<cmd>NomoStop<CR>", { noremap = true})
vim.api.nvim_set_keymap("n", "<leader>nm", "<cmd>NomoMenu<CR>", { noremap = true}) vim.api.nvim_set_keymap("n", "<leader>nm", "<cmd>NomoMenu<CR>", { noremap = true})
vim.api.nvim_set_keymap("n", "<leader>tt", "<cmd>Telescope<CR>", {noremap = true}) vim.api.nvim_set_keymap("n", "<leader>tt", "<cmd>Telescope<CR>", {noremap = true})
vim.api.nvim_set_keymap("n", "<leader>tg", "<cmd>Telescope live_grep<CR>", {noremap = true}) vim.api.nvim_set_keymap("n", "<leader>tg", "<cmd>Telescope live_grep<CR>", {noremap = true})
vim.api.nvim_set_keymap("n", "<leader>to", "<cmd>Telescope find_files<CR>", {noremap = true}) vim.api.nvim_set_keymap("n", "<leader>to", "<cmd>Telescope find_files<CR>", {noremap = true})
${builtins.readFile ./lualine.lua} ${builtins.readFile ./lualine.lua}
EOF EOF
'' ''

View File

@ -4,31 +4,31 @@ anthropic_api_key: ENC[AES256_GCM,data:SgDnPjIGmoB7YAqSYMD8jmeGlK0mvZokHQ4bt1dT6
#ENC[AES256_GCM,data:K+mJhjxQRXU/T7KDYgAecxgaQQyqb8k=,iv:qUrX6c0urKVJEXl85zT223k4Sy/uLLihP3JSOgFXacQ=,tag:c0XuR7iPmjnLPpUI02qxwA==,type:comment] #ENC[AES256_GCM,data:K+mJhjxQRXU/T7KDYgAecxgaQQyqb8k=,iv:qUrX6c0urKVJEXl85zT223k4Sy/uLLihP3JSOgFXacQ=,tag:c0XuR7iPmjnLPpUI02qxwA==,type:comment]
newkey: ENC[AES256_GCM,data:lEs2EM62Gesk9EQWKjh2WBz4TUXLrmnLd/ON,iv:65XxpeHwDJIcRPxrJuLPoXFmV/bIWmil5kwy46wgTmw=,tag:o50n4w9Ut/oij7F8hzi/YQ==,type:str] newkey: ENC[AES256_GCM,data:lEs2EM62Gesk9EQWKjh2WBz4TUXLrmnLd/ON,iv:65XxpeHwDJIcRPxrJuLPoXFmV/bIWmil5kwy46wgTmw=,tag:o50n4w9Ut/oij7F8hzi/YQ==,type:str]
sops: sops:
kms: [] kms: []
gcp_kms: [] gcp_kms: []
azure_kv: [] azure_kv: []
hc_vault: [] hc_vault: []
age: age:
- recipient: age1tk3vdafrm93dyqpnjymns92z9gmcrnr23cd6fh7ten8092j4tfas84wyhe - recipient: age1tk3vdafrm93dyqpnjymns92z9gmcrnr23cd6fh7ten8092j4tfas84wyhe
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4UVNnQS9MZ0RkSmx6ZVFo YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4UVNnQS9MZ0RkSmx6ZVFo
NHA0aUxqV0luQnRQdFcvZGR1b2hGczJvcnlvCm9KaXBNVHdFODU1TlRsWGQ2MGlo NHA0aUxqV0luQnRQdFcvZGR1b2hGczJvcnlvCm9KaXBNVHdFODU1TlRsWGQ2MGlo
Wmx1UzFOZkFmL2NqNElBb1pCZDl1QU0KLS0tIGIrZGpkRUR1NU1hMmlPRVRkUzcy Wmx1UzFOZkFmL2NqNElBb1pCZDl1QU0KLS0tIGIrZGpkRUR1NU1hMmlPRVRkUzcy
ZnRZVlNSd1FKVkQyZG9TdDhUNEJ3L1kKHyAb2DINmM/XHnwZGPxJZRf2tx4GoWxe ZnRZVlNSd1FKVkQyZG9TdDhUNEJ3L1kKHyAb2DINmM/XHnwZGPxJZRf2tx4GoWxe
hk4u+HXgYM3CH5AWKOKhbfygbrejFVQiaVE9Pnzz1S5Ff/yKUpmlXA== hk4u+HXgYM3CH5AWKOKhbfygbrejFVQiaVE9Pnzz1S5Ff/yKUpmlXA==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
- recipient: age1dtgm8nwnkwpn7s0xvnzzuvk6rfhm5f5rzuw7nnwxu45p5ns56eusrfwe20 - recipient: age1dtgm8nwnkwpn7s0xvnzzuvk6rfhm5f5rzuw7nnwxu45p5ns56eusrfwe20
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIVTRrUHB3Y3k5d3hFVnJa YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIVTRrUHB3Y3k5d3hFVnJa
V0YrUXJONWN2MWxvVFJ2L1JGdHloZWtqYVFrCnR0UjZUYlJsSkZDMExqSnN5MDM4 V0YrUXJONWN2MWxvVFJ2L1JGdHloZWtqYVFrCnR0UjZUYlJsSkZDMExqSnN5MDM4
c2UwNmtTQlNMdldCUDROWC9qYVBLc2cKLS0tIEV6aG91S0tDd3lZamxaOEx3NEly c2UwNmtTQlNMdldCUDROWC9qYVBLc2cKLS0tIEV6aG91S0tDd3lZamxaOEx3NEly
bzNwN3VzMHNyd3EzQnBCM3FQQmVtQk0KO57oWaXN0rleFh9rtr31elwzyFelfYXs bzNwN3VzMHNyd3EzQnBCM3FQQmVtQk0KO57oWaXN0rleFh9rtr31elwzyFelfYXs
A+UStplMMnmHpRVF8HV5ZDPVR83s7GcvQWHmXfTGhpJeg6PN8Hr7BA== A+UStplMMnmHpRVF8HV5ZDPVR83s7GcvQWHmXfTGhpJeg6PN8Hr7BA==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2025-03-07T00:02:12Z" lastmodified: "2025-03-07T00:02:12Z"
mac: ENC[AES256_GCM,data:42fzZaJ9qWehoQVIx5yvdPUqenvuCAZOM+jHrynaM9IrOE/Uhn57UFkDEFdEyq67Lx0QrsfKtMsCgl/HXezWJsH46JYqBzO0TaBpMZ4ZfsbMbP3EmUUC0r4FNoPkyBmIXBn6mG9bSjevtgpdh4OteGu9OdxGPvOr3sC8UYmYsYc=,iv:jHp/7ckNWfNn8DNKaIbsGo6Cx2GXAQXeq8L+G/Pu8CQ=,tag:5mVDrZrDwipxAwY5wo3fgg==,type:str] mac: ENC[AES256_GCM,data:42fzZaJ9qWehoQVIx5yvdPUqenvuCAZOM+jHrynaM9IrOE/Uhn57UFkDEFdEyq67Lx0QrsfKtMsCgl/HXezWJsH46JYqBzO0TaBpMZ4ZfsbMbP3EmUUC0r4FNoPkyBmIXBn6mG9bSjevtgpdh4OteGu9OdxGPvOr3sC8UYmYsYc=,iv:jHp/7ckNWfNn8DNKaIbsGo6Cx2GXAQXeq8L+G/Pu8CQ=,tag:5mVDrZrDwipxAwY5wo3fgg==,type:str]
pgp: [] pgp: []
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.8.1 version: 3.8.1

View File

@ -1,4 +1,11 @@
{ pkgs, customPackageOverlay, stateVersion, modulesPath, hostname, ... }: {
pkgs,
customPackageOverlay,
stateVersion,
modulesPath,
hostname,
...
}:
let let
custom-fonts = import ../fonts { inherit pkgs; }; custom-fonts = import ../fonts { inherit pkgs; };
@ -20,7 +27,7 @@ in
# Enable integration with Docker Desktop (needs to be installed) # Enable integration with Docker Desktop (needs to be installed)
# docker-desktop.enable = true; # docker-desktop.enable = true;
# nativeSystemd = true; # nativeSystemd = true;
wslConf.interop.appendWindowsPath = false; wslConf.interop.appendWindowsPath = false;
@ -34,7 +41,6 @@ in
experimental-features = nix-command flakes experimental-features = nix-command flakes
''; '';
nixpkgs.overlays = [ nixpkgs.overlays = [
customPackageOverlay customPackageOverlay
]; ];
@ -46,7 +52,10 @@ in
isNormalUser = true; isNormalUser = true;
home = "/home/deepak"; home = "/home/deepak";
description = "Deepak Mallubhotla"; description = "Deepak Mallubhotla";
extraGroups = [ "wheel" "networkmanager" ]; # Enable sudo for the user. extraGroups = [
"wheel"
"networkmanager"
]; # Enable sudo for the user.
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
@ -65,7 +74,7 @@ in
# try this out to fix WSL issue # try this out to fix WSL issue
# environment.noXlibs = false; # environment.noXlibs = false;
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
fira-code fira-code
fira-code-symbols fira-code-symbols
@ -73,7 +82,6 @@ in
custom-fonts.custom-fonts custom-fonts.custom-fonts
]; ];
programs.gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;
pinentryPackage = pkgs.pinentry-qt; pinentryPackage = pkgs.pinentry-qt;

View File

@ -1,125 +1,140 @@
{ lib, inputs, nixpkgs-24-05, homeManager, homeManager-24-05, NixOS-WSL-2405, customPackageOverlay, ... }:
let
linuxSystem = "x86_64-linux";
nixpkgs-unstable = import inputs.nixpkgs {
system = linuxSystem;
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"claude-code"
];
};
in
{ {
"maxos" = lib.nixosSystem { lib,
system = linuxSystem; inputs,
specialArgs = { nixpkgs-24-05,
inherit customPackageOverlay; homeManager,
inherit nixpkgs-unstable; homeManager-24-05,
}; NixOS-WSL-2405,
modules = [ customPackageOverlay,
./maxos/configuration.nix ...
homeManager.nixosModules.home-manager { }:
home-manager.extraSpecialArgs = { let
withGUI = true; linuxSystem = "x86_64-linux";
gitSigningKey = "976F3357369149AB"; nixpkgs-unstable = import inputs.nixpkgs {
rundirnum = "1000"; system = linuxSystem;
}; config.allowUnfreePredicate =
home-manager.useGlobalPkgs = true; pkg:
home-manager.users.deepak = { builtins.elem (lib.getName pkg) [
imports = [ ../home/deepak/home.nix ]; "claude-code"
}; ];
} };
]; in
}; {
"nixosWalrus" = inputs.nixpkgs-24-11.lib.nixosSystem { "maxos" = lib.nixosSystem {
system = "x86_64-linux"; system = linuxSystem;
specialArgs = { specialArgs = {
inherit customPackageOverlay; inherit customPackageOverlay;
inherit nixpkgs-unstable; inherit nixpkgs-unstable;
hostname = "nixosWalrus"; };
stateVersion = "24.11"; modules = [
}; ./maxos/configuration.nix
modules = [ homeManager.nixosModules.home-manager
./commonWSL-configuration.nix {
inputs.sops-nix.nixosModules.sops home-manager.extraSpecialArgs = {
inputs.homeManager-24-11.nixosModules.home-manager { withGUI = true;
home-manager.extraSpecialArgs = { gitSigningKey = "976F3357369149AB";
withGUI = false; rundirnum = "1000";
gitSigningKey = "8F904A3FC7021497"; };
inherit nixpkgs-unstable; home-manager.useGlobalPkgs = true;
}; home-manager.users.deepak = {
home-manager.useGlobalPkgs = true; imports = [ ../home/deepak/home.nix ];
home-manager.users.deepak = { };
imports = [ }
../home/deepak/home.nix ];
]; };
}; "nixosWalrus" = inputs.nixpkgs-24-11.lib.nixosSystem {
home-manager.sharedModules = [ system = "x86_64-linux";
inputs.sops-nix.homeManagerModules.sops specialArgs = {
]; inherit customPackageOverlay;
inherit nixpkgs-unstable;
} hostname = "nixosWalrus";
stateVersion = "24.11";
};
modules = [
./commonWSL-configuration.nix
inputs.sops-nix.nixosModules.sops
inputs.homeManager-24-11.nixosModules.home-manager
{
home-manager.extraSpecialArgs = {
withGUI = false;
gitSigningKey = "8F904A3FC7021497";
inherit nixpkgs-unstable;
};
home-manager.useGlobalPkgs = true;
home-manager.users.deepak = {
imports = [
../home/deepak/home.nix
];
};
home-manager.sharedModules = [
inputs.sops-nix.homeManagerModules.sops
];
inputs.NixOS-WSL-2411.nixosModules.wsl }
];
};
"nixosWSL" = nixpkgs-24-05.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit customPackageOverlay;
inherit nixpkgs-unstable;
hostname = "nixosWSL";
stateVersion = "22.05";
};
modules = [
./commonWSL-configuration.nix
inputs.sops-nix.nixosModules.sops
homeManager-24-05.nixosModules.home-manager {
home-manager.extraSpecialArgs = {
withGUI = false;
gitSigningKey = "8F904A3FC7021497";
inherit nixpkgs-unstable;
};
home-manager.useGlobalPkgs = true;
home-manager.users.deepak = {
imports = [
../home/deepak/home.nix
];
};
home-manager.sharedModules = [
inputs.sops-nix.homeManagerModules.sops
];
}
NixOS-WSL-2405.nixosModules.wsl inputs.NixOS-WSL-2411.nixosModules.wsl
]; ];
}; };
"nixosEggYoke" = inputs.nixpkgs-24-11.lib.nixosSystem { "nixosWSL" = nixpkgs-24-05.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { specialArgs = {
inherit customPackageOverlay; inherit customPackageOverlay;
inherit nixpkgs-unstable; inherit nixpkgs-unstable;
hostname = "nixosEggYoke"; hostname = "nixosWSL";
stateVersion = "22.05"; stateVersion = "22.05";
}; };
modules = [ modules = [
./commonWSL-configuration.nix ./commonWSL-configuration.nix
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
inputs.homeManager-24-11.nixosModules.home-manager { homeManager-24-05.nixosModules.home-manager
home-manager.extraSpecialArgs = { {
withGUI = false; home-manager.extraSpecialArgs = {
gitSigningKey = "47831B15427F5A55"; withGUI = false;
inherit nixpkgs-unstable; gitSigningKey = "8F904A3FC7021497";
}; inherit nixpkgs-unstable;
home-manager.useGlobalPkgs = true; };
home-manager.users.deepak = { home-manager.useGlobalPkgs = true;
imports = [ ../home/deepak/home.nix ]; home-manager.users.deepak = {
}; imports = [
home-manager.sharedModules = [ ../home/deepak/home.nix
inputs.sops-nix.homeManagerModules.sops ];
]; };
} home-manager.sharedModules = [
inputs.NixOS-WSL-2411.nixosModules.wsl inputs.sops-nix.homeManagerModules.sops
]; ];
};
}
NixOS-WSL-2405.nixosModules.wsl
];
};
"nixosEggYoke" = inputs.nixpkgs-24-11.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit customPackageOverlay;
inherit nixpkgs-unstable;
hostname = "nixosEggYoke";
stateVersion = "22.05";
};
modules = [
./commonWSL-configuration.nix
inputs.sops-nix.nixosModules.sops
inputs.homeManager-24-11.nixosModules.home-manager
{
home-manager.extraSpecialArgs = {
withGUI = false;
gitSigningKey = "47831B15427F5A55";
inherit nixpkgs-unstable;
};
home-manager.useGlobalPkgs = true;
home-manager.users.deepak = {
imports = [ ../home/deepak/home.nix ];
};
home-manager.sharedModules = [
inputs.sops-nix.homeManagerModules.sops
];
}
inputs.NixOS-WSL-2411.nixosModules.wsl
];
};
} }

View File

@ -8,10 +8,10 @@ let
custom-fonts = import ../../fonts { inherit pkgs; }; custom-fonts = import ../../fonts { inherit pkgs; };
in in
{ {
imports = imports = [
[ # Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
nix = { nix = {
package = pkgs.nixFlakes; package = pkgs.nixFlakes;
@ -97,14 +97,19 @@ in
isNormalUser = true; isNormalUser = true;
home = "/home/deepak"; home = "/home/deepak";
description = "Deepak Mallubhotla"; description = "Deepak Mallubhotla";
extraGroups = [ "wheel" "networkmanager" "docker" ]; # Enable sudo for the user. extraGroups = [
"wheel"
"networkmanager"
"docker"
]; # Enable sudo for the user.
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wget vim wget
vim
firefox firefox
git git
pinentry pinentry
@ -135,7 +140,6 @@ in
# Optional (default: 41641): # Optional (default: 41641):
services.tailscale.port = 62532; services.tailscale.port = 62532;
# List services that you want to enable: # List services that you want to enable:
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.

View File

@ -1,33 +1,48 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" "wl" ]; boot.kernelModules = [
"kvm-intel"
"wl"
];
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/6d9433c6-2dab-4936-a924-d0a205381189"; device = "/dev/disk/by-uuid/6d9433c6-2dab-4936-a924-d0a205381189";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."nixosroot".device = "/dev/disk/by-uuid/3b0d4c02-d9e5-44ab-8461-30797547ed70"; boot.initrd.luks.devices."nixosroot".device =
"/dev/disk/by-uuid/3b0d4c02-d9e5-44ab-8461-30797547ed70";
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/67E3-17ED"; device = "/dev/disk/by-uuid/67E3-17ED";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices = [
[ { device = "/dev/disk/by-uuid/1e0f60e9-cf43-451d-8466-81887f27c7cf"; } { device = "/dev/disk/by-uuid/1e0f60e9-cf43-451d-8466-81887f27c7cf"; }
]; ];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
} }

View File

@ -1,4 +1,9 @@
{ pkgs, customPackageOverlay, modulesPath, ... }: {
pkgs,
customPackageOverlay,
modulesPath,
...
}:
let let
custom-fonts = import ../../fonts { inherit pkgs; }; custom-fonts = import ../../fonts { inherit pkgs; };
@ -34,7 +39,6 @@ in
experimental-features = nix-command flakes experimental-features = nix-command flakes
''; '';
nixpkgs.overlays = [ nixpkgs.overlays = [
customPackageOverlay customPackageOverlay
]; ];
@ -46,7 +50,10 @@ in
isNormalUser = true; isNormalUser = true;
home = "/home/deepak"; home = "/home/deepak";
description = "Deepak Mallubhotla"; description = "Deepak Mallubhotla";
extraGroups = [ "wheel" "networkmanager" ]; # Enable sudo for the user. extraGroups = [
"wheel"
"networkmanager"
]; # Enable sudo for the user.
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
@ -65,7 +72,7 @@ in
# try this out to fix WSL issue # try this out to fix WSL issue
environment.noXlibs = false; environment.noXlibs = false;
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
fira-code fira-code
fira-code-symbols fira-code-symbols
@ -73,7 +80,6 @@ in
custom-fonts.custom-fonts custom-fonts.custom-fonts
]; ];
programs.gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;
pinentryPackage = pkgs.pinentry-qt; pinentryPackage = pkgs.pinentry-qt;
@ -85,5 +91,4 @@ in
# Optional (default: 41641): # Optional (default: 41641):
services.tailscale.port = 62532; services.tailscale.port = 62532;
} }

View File

@ -1,4 +1,9 @@
{ pkgs, customPackageOverlay, modulesPath, ... }: {
pkgs,
customPackageOverlay,
modulesPath,
...
}:
let let
custom-fonts = import ../../fonts { inherit pkgs; }; custom-fonts = import ../../fonts { inherit pkgs; };
@ -34,7 +39,6 @@ in
experimental-features = nix-command flakes experimental-features = nix-command flakes
''; '';
nixpkgs.overlays = [ nixpkgs.overlays = [
customPackageOverlay customPackageOverlay
]; ];
@ -46,7 +50,10 @@ in
isNormalUser = true; isNormalUser = true;
home = "/home/deepak"; home = "/home/deepak";
description = "Deepak Mallubhotla"; description = "Deepak Mallubhotla";
extraGroups = [ "wheel" "networkmanager" ]; # Enable sudo for the user. extraGroups = [
"wheel"
"networkmanager"
]; # Enable sudo for the user.
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
@ -65,7 +72,7 @@ in
# Fix of WSL issue # Fix of WSL issue
environment.noXlibs = false; environment.noXlibs = false;
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
fira-code fira-code
fira-code-symbols fira-code-symbols
@ -73,10 +80,9 @@ in
custom-fonts.custom-fonts custom-fonts.custom-fonts
]; ];
programs.gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;
pinentryPackage = pkgs.pinentry-qt; pinentryPackage = pkgs.pinentry-qt;
enableSSHSupport = true; enableSSHSupport = true;
}; };
@ -85,5 +91,4 @@ in
# Optional (default: 41641): # Optional (default: 41641):
services.tailscale.port = 62532; services.tailscale.port = 62532;
} }

View File

@ -1,46 +1,54 @@
{ cmp-vimtex, spaceport-nvim, nomodoro, parrot-nvim, inputs }: {
let cmp-vimtex,
pluginoverlay= final: prev: spaceport-nvim,
let nomodoro,
cmpVimtexPlugin = prev.vimUtils.buildVimPlugin { parrot-nvim,
src = cmp-vimtex; inputs,
name = "cmp-vimtex"; }:
}; let
spaceportNvimPlugin = prev.vimUtils.buildVimPlugin { pluginoverlay =
src = spaceport-nvim; _final: prev:
name = "spaceport-nvim"; let
}; cmpVimtexPlugin = prev.vimUtils.buildVimPlugin {
nomodoroNvimPlugin = prev.vimUtils.buildVimPlugin { src = cmp-vimtex;
src = nomodoro; name = "cmp-vimtex";
name = "nomodoro"; };
}; spaceportNvimPlugin = prev.vimUtils.buildVimPlugin {
src = spaceport-nvim;
name = "spaceport-nvim";
};
nomodoroNvimPlugin = prev.vimUtils.buildVimPlugin {
src = nomodoro;
name = "nomodoro";
};
parrotNvimPlugin = prev.vimUtils.buildVimPlugin { parrotNvimPlugin = prev.vimUtils.buildVimPlugin {
src = parrot-nvim; src = parrot-nvim;
name = "parrot-nvim"; name = "parrot-nvim";
}; };
zshCompletionPlugin = { zshCompletionPlugin = {
name = "zsh-completions"; name = "zsh-completions";
src = inputs.zsh-completions; src = inputs.zsh-completions;
}; };
in in
{ {
customVimPlugins = { customVimPlugins = {
cmp-vimtex = cmpVimtexPlugin; cmp-vimtex = cmpVimtexPlugin;
spaceport-nvim = spaceportNvimPlugin; spaceport-nvim = spaceportNvimPlugin;
nomodoro = nomodoroNvimPlugin; nomodoro = nomodoroNvimPlugin;
parrot-nvim = parrotNvimPlugin; parrot-nvim = parrotNvimPlugin;
}; };
customZshPlugins = { customZshPlugins = {
zsh-completions = zshCompletionPlugin; zsh-completions = zshCompletionPlugin;
}; };
}; };
in { in
overlay = inputs.nixpkgs.lib.composeManyExtensions[ {
pluginoverlay overlay = inputs.nixpkgs.lib.composeManyExtensions [
inputs.claude-mcp-bundle.overlays.default pluginoverlay
]; inputs.claude-mcp-bundle.overlays.default
];
} }

17
treefmt.nix Normal file
View File

@ -0,0 +1,17 @@
# treefmt.nix
{ ... }:
{
projectRootFile = "treefmt.nix";
settings.global.excludes = [
"*.toml"
"*.ttf"
"*.txt"
];
programs.deadnix.enable = true;
programs.mdsh.enable = true;
programs.nixfmt.enable = true;
programs.shellcheck.enable = true;
programs.shfmt.enable = true;
programs.yamlfmt.enable = true;
}