Skip to content

Commit

Permalink
Merge pull request #45 from tsandrini/update-polonium
Browse files Browse the repository at this point in the history
  • Loading branch information
tsandrini authored Jun 29, 2024
2 parents 4c78444 + 289db72 commit 9cd138e
Show file tree
Hide file tree
Showing 21 changed files with 5,394 additions and 248 deletions.
569 changes: 401 additions & 168 deletions flake.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
nix-topology.url = "github:oddlama/nix-topology";

nix-gaming.url = "github:fufexan/nix-gaming";
# Fingreprint sensor
Expand Down
4 changes: 2 additions & 2 deletions parts/homes/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ in
args:
mkHome args "tsandrini@jetbundle" {
extraOverlays = with inputs; [
neovim-nightly-overlay.overlay
emacs-overlay.overlay
neovim-nightly-overlay.overlays.default
emacs-overlay.overlays.default
(final: _prev: { nur = import inputs.nur { pkgs = final; }; })
];
}
Expand Down
12 changes: 8 additions & 4 deletions parts/hosts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,25 @@ in
mkHost args "spinorbundle" {
withHomeManager = true;
extraOverlays = with inputs; [
emacs-overlay.overlay
neovim-nightly-overlay.overlay
nix-topology.overlays.default
neovim-nightly-overlay.overlays.default
emacs-overlay.overlays.default
(final: _prev: { nur = import inputs.nur { pkgs = final; }; })
];
extraModules = with inputs; [ nix-topology.nixosModules.default ];
}
);
jetbundle = withSystem "x86_64-linux" (
args:
mkHost args "jetbundle" {
withHomeManager = true;
extraOverlays = with inputs; [
emacs-overlay.overlay
neovim-nightly-overlay.overlay
nix-topology.overlays.default
neovim-nightly-overlay.overlays.default
emacs-overlay.overlays.default
(final: _prev: { nur = import inputs.nur { pkgs = final; }; })
];
extraModules = with inputs; [ nix-topology.nixosModules.default ];
}
);
};
Expand Down
13 changes: 7 additions & 6 deletions parts/hosts/jetbundle/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
};
};

programs.steam.enable = true; # just trying it out
# programs.steam.enable = true; # just trying it out

networking.networkmanager.enable = true;
networking.networkmanager.enableStrongSwan = true;
Expand Down Expand Up @@ -138,8 +138,9 @@

programs.pywal.enable = true;
programs.spicetify.enable = true;
services.pywalfox-native.enable = true;
# services.pywalfox-native.enable = true;
services.keepassxc.enable = true;
services.activitywatch.enable = true;
};

# TODO remove
Expand Down Expand Up @@ -175,14 +176,14 @@
slack # Desktop client for Slack
signal-desktop # Private, simple, and secure messenger

todoist # Todoist CLI Client
todoist-electron # The official Todoist electron app
# todoist # Todoist CLI Client
# todoist-electron # The official Todoist electron app

mpv # General-purpose media player, fork of MPlayer and mplayer2
zathura # A highly customizable and functional PDF viewer

inputs.nix-gaming.packages.${system}.osu-lazer-bin
inputs.self.packages.${system}.pywalfox-native
# inputs.nix-gaming.packages.${system}.osu-lazer-bin
# inputs.self.packages.${system}.pywalfox-native
];
};
}
2 changes: 1 addition & 1 deletion parts/hosts/spinorbundle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ mount /dev/disk/by-label/boot /mnt/boot
```

_Notenote_: At this stage you should either start an ssh-agent
(`` eval `ssh-agent` ``) and add the
(``eval `ssh-agent` ``) and add the
appropriate keys (`ssh-add /root/.ssh/id_ed25519`) or in case you don't want
to use agenix you should patch the config with your desired way of handling
secrets and default passwords.
Expand Down
9 changes: 5 additions & 4 deletions parts/hosts/spinorbundle/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@

programs.pywal.enable = true;
programs.spicetify.enable = true;
services.pywalfox-native.enable = true;
# services.pywalfox-native.enable = true;
services.keepassxc.enable = true;
services.activitywatch.enable = true;
};

services.syncthing = {
Expand Down Expand Up @@ -165,15 +166,15 @@
slack # Desktop client for Slack
signal-desktop # Private, simple, and secure messenger

todoist # Todoist CLI Client
todoist-electron # The official Todoist electron app
# todoist # Todoist CLI Client
# todoist-electron # The official Todoist electron app

mpv # General-purpose media player, fork of MPlayer and mplayer2
zathura # A highly customizable and functional PDF viewer

# inputs.nix-gaming.packages.${system}.osu-stable
inputs.nix-gaming.packages.${system}.osu-lazer-bin
inputs.self.packages.${system}.pywalfox-native
# inputs.self.packages.${system}.pywalfox-native
];
};
}
1 change: 1 addition & 0 deletions parts/modules/home-manager/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ in
# -- security --

# -- services --
services_activitywatch = importApply ./services/activitywatch.nix { inherit localFlake; };
services_dunst = importApply ./services/dunst.nix { inherit localFlake; };
services_keepassxc = importApply ./services/keepassxc.nix { inherit localFlake; };
services_pywalfox-native = importApply ./services/pywalfox-native.nix {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ in
# ~ Utils
keepassxc-browser # Official browser plugin for the KeePassXC password manager
tridactyl # Vim, but in your browser. Replace Firefox’s control mechanism with one modelled on Vim.
behave # A monitoring browser extension for pages acting as bad boys
header-editor # Manage browser’s requests, include modify the request headers and response headers, redirect requests, cancel requests
# header-editor # Manage browser’s requests, include modify the request headers and response headers, redirect requests, cancel requests
pywalfox # Dynamic theming of Firefox using your Pywal colors
enhancer-for-youtube # Take control of YouTube and boost your user experience!
# sidebery # Vertical tabs tree and bookmarks in sidebar with advanced containers configuration, grouping and many other features.
sponsorblock # Easily skip YouTube video sponsors
user-agent-string-switcher # Spoof websites trying to gather information about your web navigation—like your browser type and operating system—to deliver distinct content you may not want.
aw-watcher-web # This extension logs the current tab and your browser activity to ActivityWatch.
darkreader # Dark mode for every website. Take care of your eyes, use dark theme for night and daily browsing.

# DEV related
vue-js-devtools # DevTools extension for debugging Vue.js applications.
Expand Down
2 changes: 1 addition & 1 deletion parts/modules/home-manager/programs/editors/emacs-doom.nix
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ in
]
))
inputs.self.packages.${system}.my_cookies
nodePackages.pyright
pyright

## :lang zig
zig # General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software
Expand Down
118 changes: 60 additions & 58 deletions parts/modules/home-manager/programs/editors/neovim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,13 @@ in
}
'';
}
{
plugin = quick-scope;
type = "lua";
config = '''';
}
# NOTE slows things down too much and I am also mostly using
# only hop.nvim
# {
# plugin = quick-scope;
# type = "lua";
# config = '''';
# }
{
plugin = hop-nvim;
type = "lua";
Expand Down Expand Up @@ -248,65 +250,65 @@ in
# };
# '';
# }
# {
# plugin = fern-vim;
# type = "lua";
# config = ''
# vim.g.loaded_netrw = false
# vim.g.loaded_netrwPlugin = false
# vim.g.loaded_netrwSettings = false
# vim.g.loaded_netrwFileHandlers = false
{
plugin = vim-fern;
type = "lua";
config = ''
vim.g.loaded_netrw = false
vim.g.loaded_netrwPlugin = false
vim.g.loaded_netrwSettings = false
vim.g.loaded_netrwFileHandlers = false
# -- vim.g["fern#renderer"] = "nerdfont" TODO
# vim.g["fern#disable_default_mappings"] = true
-- vim.g["fern#renderer"] = "nerdfont" TODO
vim.g["fern#disable_default_mappings"] = true
# vim.api.nvim_set_keymap(
# "n",
# "m",
# ":Fern . -drawer -reveal=% -width=35 <CR><C-w>=",
# {noremap=true, silent=true}
# )
vim.api.nvim_set_keymap(
"n",
"m",
":Fern . -drawer -reveal=% -width=35 <CR><C-w>=",
{noremap=true, silent=true}
)
# vim.api.nvim_set_keymap(
# "n",
# "<Plug>(fern-close-drawer)",
# ":<C-u>FernDo close -drawer -stay<CR>",
# {noremap=true, silent=true}
# )
vim.api.nvim_set_keymap(
"n",
"<Plug>(fern-close-drawer)",
":<C-u>FernDo close -drawer -stay<CR>",
{noremap=true, silent=true}
)
# local function fern_init()
# local opts = {silent=true}
# vim.api.nvim_set_keymap("n", "<Plug>(fern-action-open)",
# "<Plug>(fern-action-open:select)", opts)
local function fern_init()
local opts = {silent=true}
vim.api.nvim_set_keymap("n", "<Plug>(fern-action-open)",
"<Plug>(fern-action-open:select)", opts)
# vim.api.nvim_buf_set_keymap(
# 0,
# "n",
# "<Plug>(fern-action-custom-open-expand-collapse)",
# "fern#smart#leaf('<plug>(fern-action-open)<plug>(fern-close-drawer)', '<plug>(fern-action-expand)', '<plug>(fern-action-collapse)')",
# {silent=true, expr=true}
# )
# vim.api.nvim_buf_set_keymap(0, "n", "q", ":<C-u>quit<CR>", opts)
# vim.api.nvim_buf_set_keymap(0, "n", "n", "<Plug>(fern-action-new-path)", opts)
# vim.api.nvim_buf_set_keymap(0, "n", "d", "<Plug>(fern-action-remove)", opts)
# vim.api.nvim_buf_set_keymap(0, "n", "m", "<Plug>(fern-action-move)", opts)
# vim.api.nvim_buf_set_keymap(0, "n", "r", "<Plug>(fern-action-rename)", opts)
# vim.api.nvim_buf_set_keymap(0, "n", "R", "<Plug>(fern-action-reload)", opts)
# vim.api.nvim_buf_set_keymap(0, "n", "<C-h>", "<Plug>(fern-action-hidden-toggle)", opts)
# vim.api.nvim_buf_set_keymap(0, "n", "l", "<Plug>(fern-action-custom-open-expand-collapse)", opts)
# vim.api.nvim_buf_set_keymap(0, "n", "h", "<Plug>(fern-action-collapse)", opts)
# vim.api.nvim_buf_set_keymap(0, "n", "<2-LeftMouse>", "<Plug>(fern-action-custom-open-expand-collapse)", opts)
# vim.api.nvim_buf_set_keymap(0, "n", "<CR>", "<Plug>(fern-action-custom-open-expand-collapse)", opts)
# end
vim.api.nvim_buf_set_keymap(
0,
"n",
"<Plug>(fern-action-custom-open-expand-collapse)",
"fern#smart#leaf('<plug>(fern-action-open)<plug>(fern-close-drawer)', '<plug>(fern-action-expand)', '<plug>(fern-action-collapse)')",
{silent=true, expr=true}
)
vim.api.nvim_buf_set_keymap(0, "n", "q", ":<C-u>quit<CR>", opts)
vim.api.nvim_buf_set_keymap(0, "n", "n", "<Plug>(fern-action-new-path)", opts)
vim.api.nvim_buf_set_keymap(0, "n", "d", "<Plug>(fern-action-remove)", opts)
vim.api.nvim_buf_set_keymap(0, "n", "m", "<Plug>(fern-action-move)", opts)
vim.api.nvim_buf_set_keymap(0, "n", "r", "<Plug>(fern-action-rename)", opts)
vim.api.nvim_buf_set_keymap(0, "n", "R", "<Plug>(fern-action-reload)", opts)
vim.api.nvim_buf_set_keymap(0, "n", "<C-h>", "<Plug>(fern-action-hidden-toggle)", opts)
vim.api.nvim_buf_set_keymap(0, "n", "l", "<Plug>(fern-action-custom-open-expand-collapse)", opts)
vim.api.nvim_buf_set_keymap(0, "n", "h", "<Plug>(fern-action-collapse)", opts)
vim.api.nvim_buf_set_keymap(0, "n", "<2-LeftMouse>", "<Plug>(fern-action-custom-open-expand-collapse)", opts)
vim.api.nvim_buf_set_keymap(0, "n", "<CR>", "<Plug>(fern-action-custom-open-expand-collapse)", opts)
end
# local group = vim.api.nvim_create_augroup("fern_group", {clear=true})
# vim.api.nvim_create_autocmd("FileType", {
# pattern="fern",
# callback=fern_init,
# group=group
# })
# '';
# }
local group = vim.api.nvim_create_augroup("fern_group", {clear=true})
vim.api.nvim_create_autocmd("FileType", {
pattern="fern",
callback=fern_init,
group=group
})
'';
}
{
plugin = which-key-nvim;
type = "lua";
Expand Down
6 changes: 6 additions & 0 deletions parts/modules/home-manager/programs/git.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ in
};
aliases = {
b = _ "branch";
bb = _ "!for k in `git branch -a | grep -v \"HEAD -> \" | sed s/^..//`;do echo -e `git log -1 --pretty=format:\"%Cgreen%ci %Cblue%cr%Creset\" \"$k\" --`\\\\t\"$k\";done | sort";
bl = _ "branch";
bd = _ "branch -d";
bdf = _ "branch -D";
Expand Down Expand Up @@ -89,6 +90,11 @@ in
i = _ "init";
d = _ "diff";
l = _ "log";
commit-stats = _ "!git log --pretty=format:'%s' | cut -d \" \" -f 1 | sort | uniq -c | sort -nr";
ext-stats = _ "!git ls-files | xargs wc -l | awk -F ' +|\\\\.|/' '{ sumlines[$NF] += $2 } END { for (ext in sumlines) print ext, sumlines[ext] }' | sort -k2nr";
authors = _ "!git log --format='%aN <%aE>' | awk '{arr[$0]++} END{for (i in arr){print arr[i], i;}}' | sort -rn | cut -d\\ -f2-";
authors-by-loc = _ "!git ls-files | xargs -n1 git blame --line-porcelain | sed -n 's/^author //p' | sort -f | uniq -ic | sort -nr";
authors-by-commits = _ "shortlog -s -n --all --no-merges";
lg1 = _ "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)'";
lg2 = _ "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'";
lg3 = _ "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'";
Expand Down
5 changes: 4 additions & 1 deletion parts/modules/home-manager/programs/shells/zsh/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,10 @@ in
find = _ "${pkgs.fd}/bin/fd";
fd = _ "${pkgs.fd}/bin/fd";
})
(mkIf cfg.shellAliases.grepToRipgrep { grep = _ "${pkgs.ripgrep}/bin/rg"; })
(mkIf cfg.shellAliases.grepToRipgrep {
grep = _ "${pkgs.ripgrep}/bin/rg";
list-todos = _ "${pkgs.ripgrep}/bin/rg -g '!{.git,node_modules,result,build,dist,.idea,out,.DS_Store}' --no-follow 'TODO|FIXME' ";
})
{ fetch = _ "${pkgs.nitch}/bin/nitch"; }
];
}
Expand Down
Loading

0 comments on commit 9cd138e

Please sign in to comment.