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"
}
},
"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": {
"flake": false,
"locked": {
@ -416,6 +432,8 @@
"parrot-nvim": "parrot-nvim",
"sops-nix": "sops-nix",
"spaceport-nvim": "spaceport-nvim",
"systems": "systems_3",
"treefmt-nix": "treefmt-nix",
"zsh-completions": "zsh-completions"
}
},
@ -484,6 +502,38 @@
"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": {
"inputs": {
"nixpkgs": [

186
flake.nix
View File

@ -1,98 +1,130 @@
{
description = "Configuration v1";
description = "Configuration v1";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs = {
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-11.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs-24-05.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs-24-11.url = "github:NixOS/nixpkgs/nixos-24.11";
# only use this for Maxos, prefer specifying version explicitly
homeManager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# only use this for Maxos, prefer specifying version explicitly
homeManager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
homeManager-24-05 = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs-24-05";
};
homeManager-24-05 = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs-24-05";
};
NixOS-WSL-2411 = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs-24-11";
};
NixOS-WSL-2411 = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs-24-11";
};
homeManager-24-11 = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs-24-11";
};
homeManager-24-11 = {
url = "github:nix-community/home-manager/release-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 = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs-24-05";
};
NixOS-WSL = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs";
};
NixOS-WSL = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs";
};
cmp-vimtex = {
url = "github:micangl/cmp-vimtex/master";
flake = false;
};
spaceport-nvim = {
url = "github:CWood-sdf/spaceport.nvim/main";
flake = false;
};
cmp-vimtex = {
url = "github:micangl/cmp-vimtex/master";
flake = false;
};
spaceport-nvim = {
url = "github:CWood-sdf/spaceport.nvim/main";
flake = false;
};
parrot-nvim = {
url = "github:frankroeder/parrot.nvim/main";
flake = false;
};
parrot-nvim = {
url = "github:frankroeder/parrot.nvim/main";
flake = false;
};
nomodoro = {
url = "github:dbinagi/nomodoro/main";
flake = false;
};
nomodoro = {
url = "github:dbinagi/nomodoro/main";
flake = false;
};
zsh-completions = {
url = "github:zsh-users/zsh-completions/master";
flake = false;
};
zsh-completions = {
url = "github:zsh-users/zsh-completions/master";
flake = false;
};
claude-mcp-bundle = {
url = "git+https://gitea.deepak.science/deepak/claude_mcp_bundle.git";
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:
let
customPackageOverlay = (import ./overlays/default.nix { inherit cmp-vimtex; inherit spaceport-nvim; inherit inputs; inherit nomodoro; parrot-nvim = inputs.parrot-nvim; }).overlay;
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;
}
);
outputs =
{
self,
systems,
nixpkgs,
homeManager,
NixOS-WSL,
NixOS-WSL-2405,
nixpkgs-24-05,
homeManager-24-05,
cmp-vimtex,
spaceport-nvim,
nomodoro,
...
}@inputs:
let
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
custom-fonts = pkgs.stdenvNoCC.mkDerivation {

View File

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

View File

@ -1,227 +1,252 @@
{ pkgs, config, specialArgs, lib, ...}:
{
pkgs,
config,
specialArgs,
lib,
...
}:
let
pkgs-unstable = specialArgs.nixpkgs-unstable;
# default_python = pkgs-unstable.python313;
in
pkgs-unstable = specialArgs.nixpkgs-unstable;
in
# default_python = pkgs-unstable.python313;
{
programs.home-manager.enable = true;
home.packages = [
pkgs.hello
# (pkgs.writeScriptBin "nixFlakes" ''
# exec ${pkgs.nixVersions.git}/bin/nix --experimental-features "nix-command flakes" "$@"
# '')
pkgs.cachix
pkgs.kubectl
pkgs.bat
pkgs.eza
pkgs.fd
pkgs.ripgrep
pkgs.just
programs.home-manager.enable = true;
home.packages =
[
pkgs.hello
# (pkgs.writeScriptBin "nixFlakes" ''
# exec ${pkgs.nixVersions.git}/bin/nix --experimental-features "nix-command flakes" "$@"
# '')
pkgs.cachix
pkgs.kubectl
pkgs.bat
pkgs.eza
pkgs.fd
pkgs.ripgrep
pkgs.just
# lsps
pkgs.nil
# pkgs.nodePackages.pyright
# pkgs.pyright
# cli markdown tool
pkgs.glow
pkgs.thefuck
pkgs.fzf
pkgs.sops
pkgs.age
pkgs.ydiff
pkgs.delta
# lsps
pkgs.nil
# pkgs.nodePackages.pyright
# pkgs.pyright
pkgs-unstable.claude-code
# default_python
# pkgs-unstable.uv
# pkgs-unstable.nodejs
pkgs.thefuck
pkgs.fzf
pkgs.sops
pkgs.age
pkgs.ydiff
pkgs.delta
# From our claude bundle
pkgs.custom-servers.arxiv-mcp-server
pkgs.custom-servers.basic-memory-server
pkgs.custom-servers.mcp-text-editor
pkgs-unstable.claude-code
# default_python
# pkgs-unstable.uv
# pkgs-unstable.nodejs
] ++ pkgs.lib.optionals specialArgs.withGUI [
pkgs.discord
pkgs.obsidian
pkgs.audacity
pkgs.nextcloud-client
pkgs.libreoffice-qt6-fresh
];
# From our claude bundle
pkgs.custom-servers.arxiv-mcp-server
pkgs.custom-servers.basic-memory-server
pkgs.custom-servers.mcp-text-editor
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.stateVersion = "18.09";
home.homeDirectory = "/home/deepak";
home.username = "deepak";
home.sessionPath = [
"$HOME/.local/bin"
];
# required, was previously default
home.stateVersion = "18.09";
home.sessionVariables = {
# UV_PYTHON = "${default_python}";
};
home.sessionPath = [
"$HOME/.local/bin"
];
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
home.sessionVariables =
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 {
enable = true;
};
# UV_PYTHON = "${default_python}";
};
programs.git = {
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"; }
];
};
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
xdg.enable = true;
programs.neovim = {
enable = true;
package = pkgs-unstable.neovim-unwrapped;
defaultEditor = true;
vimAlias = true;
services.nextcloud-client = pkgs.lib.mkIf specialArgs.withGUI {
enable = true;
};
plugins = with pkgs.vimPlugins; [
{
plugin = vimtex;
config = "let g:nix_recommended_style = 0";
}
vim-nix
# plenary and stuff for telescope
plenary-nvim telescope-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
programs.git = {
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"; }
];
};
vim-vinegar
programs.neovim = {
enable = true;
package = pkgs-unstable.neovim-unwrapped;
defaultEditor = true;
vimAlias = true;
wiki-vim
vim-markdown
cmp-buffer
# vim-airline
vim-fugitive
flash-nvim
gitsigns-nvim
friendly-snippets
luasnip
which-key-nvim
plugins = with pkgs.vimPlugins; [
{
plugin = vimtex;
config = "let g:nix_recommended_style = 0";
}
vim-nix
# plenary and stuff for telescope
plenary-nvim
telescope-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
lualine-nvim
goyo-vim
limelight-vim
nui-nvim
zen-mode-nvim
twilight-nvim
wiki-vim
vim-markdown
cmp-buffer
# vim-airline
vim-fugitive
flash-nvim
gitsigns-nvim
friendly-snippets
luasnip
which-key-nvim
# color schemes
rose-pine
kanagawa-nvim
nightfox-nvim
overseer-nvim
# custom plugins from flakes
pkgs.customVimPlugins.cmp-vimtex
pkgs.customVimPlugins.spaceport-nvim
pkgs.customVimPlugins.nomodoro
pkgs.customVimPlugins.parrot-nvim
# prettiness
lualine-nvim
goyo-vim
limelight-vim
nui-nvim
zen-mode-nvim
twilight-nvim
# syntax highlighting
vim-just
];
extraConfig = import ./neovim/init-vim.nix { inherit config; };
};
# color schemes
rose-pine
kanagawa-nvim
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 = {
enable = true;
shellAliases = {
doo="./do.sh";
wttr="curl wttr.in";
gcd="_t=$(git rev-parse --show-toplevel) && cd \"$_t\" && pwd";
};
history = {
size = 10000;
path = "${lib.removePrefix "/home/deepak/" config.xdg.dataHome}/zsh/history";
};
oh-my-zsh = {
enable = true;
plugins = [
"poetry"
"themes"
"emoji-clock"
"screen"
"ssh-agent"
];
theme = "random";
};
plugins = [
{
name = "sd";
src = pkgs.fetchFromGitHub {
owner = "ianthehenry";
repo = "sd";
rev = "ecd1ab8d3fc3a829d8abfb8bf1e3722c9c99407b";
sha256 = "0fm1r8w73vaab5r9dj5jdxsfc7pbddxf4dvvasfq8rry2dxaf7sy";
};
}
{
name = "zsh-z";
src = pkgs.fetchFromGitHub {
owner = "agkozak";
repo = "zsh-z";
rev = "b5e61d03a42a84e9690de12915a006b6745c2a5f";
sha256 = "1gsgmsvl1sl9m3yfapx6bp0y15py8610kywh56bgsjf9wxkrc3nl";
};
}
pkgs.customZshPlugins.zsh-completions
];
initExtra = ''
eval "$(${pkgs.direnv}/bin/direnv hook zsh)"
'';
};
sops = {
age.keyFile = "/home/deepak/.config/sops/age/keys.txt"; # must have no password!
# It's also possible to use a ssh key, but only when it has no password:
#age.sshKeyPaths = [ "/home/user/path-to-ssh-key" ];
defaultSopsFile = ./secrets.yaml;
secrets = {
anthropic_api_key = {
path = "${config.sops.defaultSymlinkPath}/anthropic_api_key";
};
hello = {};
newkey = {};
};
};
# syntax highlighting
vim-just
];
extraConfig = import ./neovim/init-vim.nix { inherit config; };
};
programs.thefuck.enable = true;
programs.zsh = {
enable = true;
shellAliases = {
doo = "./do.sh";
wttr = "curl wttr.in";
gcd = "_t=$(git rev-parse --show-toplevel) && cd \"$_t\" && pwd";
};
history = {
size = 10000;
path = "${lib.removePrefix "/home/deepak/" config.xdg.dataHome}/zsh/history";
};
oh-my-zsh = {
enable = true;
plugins = [
"poetry"
"themes"
"emoji-clock"
"screen"
"ssh-agent"
];
theme = "random";
};
plugins = [
{
name = "sd";
src = pkgs.fetchFromGitHub {
owner = "ianthehenry";
repo = "sd";
rev = "ecd1ab8d3fc3a829d8abfb8bf1e3722c9c99407b";
sha256 = "0fm1r8w73vaab5r9dj5jdxsfc7pbddxf4dvvasfq8rry2dxaf7sy";
};
}
{
name = "zsh-z";
src = pkgs.fetchFromGitHub {
owner = "agkozak";
repo = "zsh-z";
rev = "b5e61d03a42a84e9690de12915a006b6745c2a5f";
sha256 = "1gsgmsvl1sl9m3yfapx6bp0y15py8610kywh56bgsjf9wxkrc3nl";
};
}
pkgs.customZshPlugins.zsh-completions
];
initExtra = ''
eval "$(${pkgs.direnv}/bin/direnv hook zsh)"
'';
};
sops = {
age.keyFile = "/home/deepak/.config/sops/age/keys.txt"; # must have no password!
# It's also possible to use a ssh key, but only when it has no password:
#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 }:
''
inoremap jj <Esc>
inoremap kk <Esc>
inoremap jj <Esc>
inoremap kk <Esc>
lua << EOF
lua << EOF
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = false
vim.opt.list = true
vim.opt.listchars = { eol = "¬", tab = "" , trail = '·', multispace = '·' }
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = false
vim.opt.list = true
vim.opt.listchars = { eol = "¬", tab = "" , trail = '·', multispace = '·' }
vim.opt.foldlevelstart = 99
vim.opt.foldlevelstart = 99
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.ignorecase = true
vim.opt.smartcase = true
-- scary hopefully secure in neovim
vim.opt.exrc = true
-- scary hopefully secure in neovim
vim.opt.exrc = true
vim.opt.spell = true
vim.opt.spelllang = 'en_gb'
vim.opt.spell = true
vim.opt.spelllang = 'en_gb'
vim.keymap.set("n", "<leader>N", "R<Enter><Esc>")
vim.g.python_recommended_style = 0
-- ctrlp setup
vim.g.ctrlp_custom_ignore = {
file = '\\v\\.(aux|bbl|blg|bcf|fdb_latexmk|fls|run.xml|tdo|toc|log|pdf)$'
}
vim.keymap.set("n", "<leader>N", "R<Enter><Esc>")
vim.g.python_recommended_style = 0
-- ctrlp setup
vim.g.ctrlp_custom_ignore = {
file = '\\v\\.(aux|bbl|blg|bcf|fdb_latexmk|fls|run.xml|tdo|toc|log|pdf)$'
}
${builtins.readFile ./spaceport.lua}
require('gitsigns').setup()
${builtins.readFile ./spaceport.lua}
require('gitsigns').setup()
-- color scheme
require("rose-pine").setup({})
require("kanagawa").setup({})
require("nightfox").setup({})
vim.cmd("colorscheme kanagawa-dragon")
-- color scheme
require("rose-pine").setup({})
require("kanagawa").setup({})
require("nightfox").setup({})
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()
vim.keymap.set('n', "<leader>ft", function() require("flash").toggle() end, {desc = "Toggle flash.nvim search", noremap = true})
require('flash').setup()
vim.keymap.set('n', "<leader>ft", function() require("flash").toggle() end, {desc = "Toggle flash.nvim search", noremap = true})
require('which-key').setup({})
${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_prev, { noremap = true, desc = "Previous diagnostic" })
vim.keymap.set('n', "<leader>d", vim.diagnostic.open_float, { noremap = true, desc = "Open diagnostic" })
vim.g.vim_markdown_folding_level = 2
${builtins.readFile ./wiki-vim.lua}
require('which-key').setup({})
${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_prev, { noremap = true, desc = "Previous diagnostic" })
vim.keymap.set('n', "<leader>d", vim.diagnostic.open_float, { noremap = true, desc = "Open diagnostic" })
vim.g.vim_markdown_folding_level = 2
${builtins.readFile ./wiki-vim.lua}
vim.g.vimtex_fold_enabled = true
vim.g.vimtex_fold_enabled = true
${builtins.readFile ./overseer.lua}
require("parrot").setup({
providers = {
anthropic = {
api_key = { "cat", "${ config.sops.secrets.anthropic_api_key.path }" },
},
},
hooks = {
Complete = function(prt, params)
local template = [[
I have the following code from {{filename}}:
${builtins.readFile ./overseer.lua}
require("parrot").setup({
providers = {
anthropic = {
api_key = { "cat", "${config.sops.secrets.anthropic_api_key.path}" },
},
},
hooks = {
Complete = function(prt, params)
local template = [[
I have the following code from {{filename}}:
```{{filetype}}
{{selection}}
```
```{{filetype}}
{{selection}}
```
Please finish the code above carefully and logically.
Respond just with the snippet of code that should be inserted."
]]
local model_obj = prt.get_model "command"
prt.Prompt(params, prt.ui.Target.append, model_obj, nil, template)
end,
CompleteFullContext = function(prt, params)
local template = [[
I have the following code from {{filename}}:
Please finish the code above carefully and logically.
Respond just with the snippet of code that should be inserted."
]]
local model_obj = prt.get_model "command"
prt.Prompt(params, prt.ui.Target.append, model_obj, nil, template)
end,
CompleteFullContext = function(prt, params)
local template = [[
I have the following code from {{filename}}:
```{{filetype}}
{{filecontent}}
```
```{{filetype}}
{{filecontent}}
```
Please look at the following section specifically:
```{{filetype}}
{{selection}}
```
Please look at the following section specifically:
```{{filetype}}
{{selection}}
```
Please finish the code above carefully and logically.
Respond just with the snippet of code that should be inserted.
]]
local model_obj = prt.get_model "command"
prt.Prompt(params, prt.ui.Target.append, model_obj, nil, template)
end,
CompleteMultiContext = function(prt, params)
local template = [[
I have the following code from {{filename}} and other realted files:
Please finish the code above carefully and logically.
Respond just with the snippet of code that should be inserted.
]]
local model_obj = prt.get_model "command"
prt.Prompt(params, prt.ui.Target.append, model_obj, nil, template)
end,
CompleteMultiContext = function(prt, params)
local template = [[
I have the following code from {{filename}} and other realted files:
```{{filetype}}
{{multifilecontent}}
```
```{{filetype}}
{{multifilecontent}}
```
Please look at the following section specifically:
```{{filetype}}
{{selection}}
```
Please look at the following section specifically:
```{{filetype}}
{{selection}}
```
Please finish the code above carefully and logically.
Respond just with the snippet of code that should be inserted.
]]
local model_obj = prt.get_model "command"
prt.Prompt(params, prt.ui.Target.append, model_obj, nil, template)
end,
Explain = function(prt, params)
local template = [[
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.
The goal is to help the reader understand what the code does and how it works.
Please finish the code above carefully and logically.
Respond just with the snippet of code that should be inserted.
]]
local model_obj = prt.get_model "command"
prt.Prompt(params, prt.ui.Target.append, model_obj, nil, template)
end,
Explain = function(prt, params)
local template = [[
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.
The goal is to help the reader understand what the code does and how it works.
```{{filetype}}
{{selection}}
```
```{{filetype}}
{{selection}}
```
Use the markdown format with codeblocks and inline code.
Explanation of the code above:
]]
local model = prt.get_model "command"
prt.logger.info("Explaining selection with model: " .. model.name)
prt.Prompt(params, prt.ui.Target.new, model, nil, template)
end,
ProofReader = function(prt, params)
local chat_prompt = [[
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
punctuation errors. Once you have finished reviewing the text,
provide me with any necessary corrections or suggestions to improve the
text. Highlight the corrected fragments (if any) using markdown backticks.
Use the markdown format with codeblocks and inline code.
Explanation of the code above:
]]
local model = prt.get_model "command"
prt.logger.info("Explaining selection with model: " .. model.name)
prt.Prompt(params, prt.ui.Target.new, model, nil, template)
end,
ProofReader = function(prt, params)
local chat_prompt = [[
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
punctuation errors. Once you have finished reviewing the text,
provide me with any necessary corrections or suggestions to improve the
text. Highlight the corrected fragments (if any) using markdown backticks.
When you have done that subsequently provide me with a slightly better
version of the text, but keep close to the original text.
When you have done that subsequently provide me with a slightly better
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}
## Corrected text:
{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, 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}
]]
prt.ChatNew(params, chat_prompt)
end,
ProofReader2 = function(prt, params)
local chat_prompt = [[
I want you to act as a professional proofreader and editor. When I provide you with text, please:
{ideal text}
]]
prt.ChatNew(params, chat_prompt)
end,
ProofReader2 = function(prt, params)
local chat_prompt = [[
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
- spelling
- grammar
- punctuation
- syntax errors.
- Technical accuracy (for domain-specific content especially)
Mark corrections using markdown backticks.
1. First, identify and correct errors in
- spelling
- grammar
- punctuation
- syntax errors.
- Technical accuracy (for domain-specific content especially)
Mark corrections using markdown backticks.
2. Second, analyze stylistic elements including
- clarity
- conciseness
- word choice
- sentence structure
- paragraph organization and transitions (as appropriate for text length)
2. Second, analyze stylistic elements including
- clarity
- conciseness
- word choice
- sentence structure
- 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:
Provide a concise overview of the text (1-2 sentences).
For longer texts (5+ paragraphs), include a brief outline of the content.
# Summary of the text:
Provide a concise overview of the text (1-2 sentences).
For longer texts (5+ paragraphs), include a brief outline of the content.
## Summary of suggestions:
- List specific errors found with brief context
- Group similar issues together
- Note patterns if they exist
- Highlight 3-5 most impactful improvements
- Summarize the types of improvements made in each version
## Summary of suggestions:
- List specific errors found with brief context
- Group similar issues together
- Note patterns if they exist
- Highlight 3-5 most impactful improvements
- Summarize the types of improvements made in each version
## Corrected text:
Present the text with technical errors fixed (or state "NO_CORRECTIONS_NEEDED" if appropriate)
## Corrected text:
Present the text with technical errors fixed (or state "NO_CORRECTIONS_NEEDED" if appropriate)
## 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.
## 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.
## 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.
## 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.
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.
]]
prt.ChatNew(params, chat_prompt)
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.
]]
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({
work_time = 10,
short_break_time = 2,
long_break_time = 5,
break_cycle=5,
})
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>ns", "<cmd>NomoStop<CR>", { noremap = true})
vim.api.nvim_set_keymap("n", "<leader>nm", "<cmd>NomoMenu<CR>", { noremap = true})
require("nomodoro").setup({
work_time = 10,
short_break_time = 2,
long_break_time = 5,
break_cycle=5,
})
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>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>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>to", "<cmd>Telescope find_files<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>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]
newkey: ENC[AES256_GCM,data:lEs2EM62Gesk9EQWKjh2WBz4TUXLrmnLd/ON,iv:65XxpeHwDJIcRPxrJuLPoXFmV/bIWmil5kwy46wgTmw=,tag:o50n4w9Ut/oij7F8hzi/YQ==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1tk3vdafrm93dyqpnjymns92z9gmcrnr23cd6fh7ten8092j4tfas84wyhe
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4UVNnQS9MZ0RkSmx6ZVFo
NHA0aUxqV0luQnRQdFcvZGR1b2hGczJvcnlvCm9KaXBNVHdFODU1TlRsWGQ2MGlo
Wmx1UzFOZkFmL2NqNElBb1pCZDl1QU0KLS0tIGIrZGpkRUR1NU1hMmlPRVRkUzcy
ZnRZVlNSd1FKVkQyZG9TdDhUNEJ3L1kKHyAb2DINmM/XHnwZGPxJZRf2tx4GoWxe
hk4u+HXgYM3CH5AWKOKhbfygbrejFVQiaVE9Pnzz1S5Ff/yKUpmlXA==
-----END AGE ENCRYPTED FILE-----
- recipient: age1dtgm8nwnkwpn7s0xvnzzuvk6rfhm5f5rzuw7nnwxu45p5ns56eusrfwe20
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIVTRrUHB3Y3k5d3hFVnJa
V0YrUXJONWN2MWxvVFJ2L1JGdHloZWtqYVFrCnR0UjZUYlJsSkZDMExqSnN5MDM4
c2UwNmtTQlNMdldCUDROWC9qYVBLc2cKLS0tIEV6aG91S0tDd3lZamxaOEx3NEly
bzNwN3VzMHNyd3EzQnBCM3FQQmVtQk0KO57oWaXN0rleFh9rtr31elwzyFelfYXs
A+UStplMMnmHpRVF8HV5ZDPVR83s7GcvQWHmXfTGhpJeg6PN8Hr7BA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2025-03-07T00:02:12Z"
mac: ENC[AES256_GCM,data:42fzZaJ9qWehoQVIx5yvdPUqenvuCAZOM+jHrynaM9IrOE/Uhn57UFkDEFdEyq67Lx0QrsfKtMsCgl/HXezWJsH46JYqBzO0TaBpMZ4ZfsbMbP3EmUUC0r4FNoPkyBmIXBn6mG9bSjevtgpdh4OteGu9OdxGPvOr3sC8UYmYsYc=,iv:jHp/7ckNWfNn8DNKaIbsGo6Cx2GXAQXeq8L+G/Pu8CQ=,tag:5mVDrZrDwipxAwY5wo3fgg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1tk3vdafrm93dyqpnjymns92z9gmcrnr23cd6fh7ten8092j4tfas84wyhe
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4UVNnQS9MZ0RkSmx6ZVFo
NHA0aUxqV0luQnRQdFcvZGR1b2hGczJvcnlvCm9KaXBNVHdFODU1TlRsWGQ2MGlo
Wmx1UzFOZkFmL2NqNElBb1pCZDl1QU0KLS0tIGIrZGpkRUR1NU1hMmlPRVRkUzcy
ZnRZVlNSd1FKVkQyZG9TdDhUNEJ3L1kKHyAb2DINmM/XHnwZGPxJZRf2tx4GoWxe
hk4u+HXgYM3CH5AWKOKhbfygbrejFVQiaVE9Pnzz1S5Ff/yKUpmlXA==
-----END AGE ENCRYPTED FILE-----
- recipient: age1dtgm8nwnkwpn7s0xvnzzuvk6rfhm5f5rzuw7nnwxu45p5ns56eusrfwe20
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIVTRrUHB3Y3k5d3hFVnJa
V0YrUXJONWN2MWxvVFJ2L1JGdHloZWtqYVFrCnR0UjZUYlJsSkZDMExqSnN5MDM4
c2UwNmtTQlNMdldCUDROWC9qYVBLc2cKLS0tIEV6aG91S0tDd3lZamxaOEx3NEly
bzNwN3VzMHNyd3EzQnBCM3FQQmVtQk0KO57oWaXN0rleFh9rtr31elwzyFelfYXs
A+UStplMMnmHpRVF8HV5ZDPVR83s7GcvQWHmXfTGhpJeg6PN8Hr7BA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2025-03-07T00:02:12Z"
mac: ENC[AES256_GCM,data:42fzZaJ9qWehoQVIx5yvdPUqenvuCAZOM+jHrynaM9IrOE/Uhn57UFkDEFdEyq67Lx0QrsfKtMsCgl/HXezWJsH46JYqBzO0TaBpMZ4ZfsbMbP3EmUUC0r4FNoPkyBmIXBn6mG9bSjevtgpdh4OteGu9OdxGPvOr3sC8UYmYsYc=,iv:jHp/7ckNWfNn8DNKaIbsGo6Cx2GXAQXeq8L+G/Pu8CQ=,tag:5mVDrZrDwipxAwY5wo3fgg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

@ -1,4 +1,11 @@
{ pkgs, customPackageOverlay, stateVersion, modulesPath, hostname, ... }:
{
pkgs,
customPackageOverlay,
stateVersion,
modulesPath,
hostname,
...
}:
let
custom-fonts = import ../fonts { inherit pkgs; };
@ -20,7 +27,7 @@ in
# Enable integration with Docker Desktop (needs to be installed)
# docker-desktop.enable = true;
# nativeSystemd = true;
# nativeSystemd = true;
wslConf.interop.appendWindowsPath = false;
@ -34,7 +41,6 @@ in
experimental-features = nix-command flakes
'';
nixpkgs.overlays = [
customPackageOverlay
];
@ -46,7 +52,10 @@ in
isNormalUser = true;
home = "/home/deepak";
description = "Deepak Mallubhotla";
extraGroups = [ "wheel" "networkmanager" ]; # Enable sudo for the user.
extraGroups = [
"wheel"
"networkmanager"
]; # Enable sudo for the user.
shell = pkgs.zsh;
};
@ -65,7 +74,7 @@ in
# try this out to fix WSL issue
# environment.noXlibs = false;
fonts.packages = with pkgs; [
fira-code
fira-code-symbols
@ -73,7 +82,6 @@ in
custom-fonts.custom-fonts
];
programs.gnupg.agent = {
enable = true;
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 {
system = linuxSystem;
specialArgs = {
inherit customPackageOverlay;
inherit nixpkgs-unstable;
};
modules = [
./maxos/configuration.nix
homeManager.nixosModules.home-manager {
home-manager.extraSpecialArgs = {
withGUI = true;
gitSigningKey = "976F3357369149AB";
rundirnum = "1000";
};
home-manager.useGlobalPkgs = true;
home-manager.users.deepak = {
imports = [ ../home/deepak/home.nix ];
};
}
];
};
"nixosWalrus" = inputs.nixpkgs-24-11.lib.nixosSystem {
system = "x86_64-linux";
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
];
}
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 {
system = linuxSystem;
specialArgs = {
inherit customPackageOverlay;
inherit nixpkgs-unstable;
};
modules = [
./maxos/configuration.nix
homeManager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = {
withGUI = true;
gitSigningKey = "976F3357369149AB";
rundirnum = "1000";
};
home-manager.useGlobalPkgs = true;
home-manager.users.deepak = {
imports = [ ../home/deepak/home.nix ];
};
}
];
};
"nixosWalrus" = inputs.nixpkgs-24-11.lib.nixosSystem {
system = "x86_64-linux";
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
];
};
"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
];
};
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
];
};
"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; };
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
];
nix = {
package = pkgs.nixFlakes;
@ -97,14 +97,19 @@ in
isNormalUser = true;
home = "/home/deepak";
description = "Deepak Mallubhotla";
extraGroups = [ "wheel" "networkmanager" "docker" ]; # Enable sudo for the user.
extraGroups = [
"wheel"
"networkmanager"
"docker"
]; # Enable sudo for the user.
shell = pkgs.zsh;
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
wget vim
wget
vim
firefox
git
pinentry
@ -135,7 +140,6 @@ in
# Optional (default: 41641):
services.tailscale.port = 62532;
# List services that you want to enable:
# Enable the OpenSSH daemon.

View File

@ -1,33 +1,48 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
(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.kernelModules = [ "kvm-intel" "wl" ];
boot.kernelModules = [
"kvm-intel"
"wl"
];
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/6d9433c6-2dab-4936-a924-d0a205381189";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/6d9433c6-2dab-4936-a924-d0a205381189";
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" =
{ device = "/dev/disk/by-uuid/67E3-17ED";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/67E3-17ED";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/1e0f60e9-cf43-451d-8466-81887f27c7cf"; }
];
swapDevices = [
{ device = "/dev/disk/by-uuid/1e0f60e9-cf43-451d-8466-81887f27c7cf"; }
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}

View File

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

View File

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

View File

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