Things
- `wireguard` for `hs` - gnome keyring for VSCode to make Copilot work - uninstalled local `Hydra` on `pc` - VSCode -> VSCodeFHS - Emacs - typescript - solidity - envrc mode
This commit is contained in:
parent
3668e2d3d0
commit
816bd8fe6f
132 changed files with 1410 additions and 3682 deletions
12
hmModules/emacs/default.nix
Normal file
12
hmModules/emacs/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{pkgs, ...}: {
|
||||
programs.emacs.enable = true;
|
||||
programs.doom-emacs = {
|
||||
enable = true;
|
||||
package = pkgs.emacs28NativeComp;
|
||||
doomPrivateDir = ../../doom.d;
|
||||
};
|
||||
|
||||
services.emacs = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
18
hmModules/firefox/default.nix
Normal file
18
hmModules/firefox/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{pkgs, ...}: {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
profiles.ccr = {
|
||||
settings = {
|
||||
"browser.startup.homepage" = "https://google.it";
|
||||
"browser.search.region" = "IT";
|
||||
"browser.search.isUS" = false;
|
||||
"distribution.searchplugins.defaultLocale" = "it-IT";
|
||||
"general.useragent.locale" = "it-IT";
|
||||
"browser.bookmarks.showMobileBookmarks" = true;
|
||||
"browser.download.folderList" = 2;
|
||||
"browser.download.lastDir" = "/home/ccr/downloads/";
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
33
hmModules/git/default.nix
Normal file
33
hmModules/git/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{pkgs, ...}: let
|
||||
config = {
|
||||
name = "Andrea Ciceri";
|
||||
email = "andrea.ciceri@autistici.org";
|
||||
};
|
||||
in {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
|
||||
extraConfig = {
|
||||
ui.color = true;
|
||||
pull.rebase = false;
|
||||
rebase.autostash = true;
|
||||
};
|
||||
|
||||
userName = config.name;
|
||||
userEmail = config.email;
|
||||
signing = {
|
||||
signByDefault = true;
|
||||
key = config.email;
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
url =
|
||||
if pkgs.stdenv.hostPlatform.isDarwin
|
||||
then {}
|
||||
else {
|
||||
"ssh://git@github.com/" = {insteadOf = https://github.com/;};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
16
hmModules/gpg/default.nix
Normal file
16
hmModules/gpg/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{pkgs, ...}: {
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
sshKeys = ["CE2FD0D9BECBD8876811714925066CC257413416"];
|
||||
extraConfig = ''
|
||||
allow-emacs-pinentry
|
||||
allow-loopback-pinentry
|
||||
'';
|
||||
};
|
||||
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
settings = {};
|
||||
};
|
||||
}
|
3
hmModules/mpv/default.nix
Normal file
3
hmModules/mpv/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.mpv.enable = true;
|
||||
}
|
14
hmModules/password-store/default.nix
Normal file
14
hmModules/password-store/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PASSWORD_STORE_DIR = "/home/ccr/.password-store";
|
||||
};
|
||||
};
|
||||
services.password-store-sync.enable = true;
|
||||
}
|
46
hmModules/qutebrowser/default.nix
Normal file
46
hmModules/qutebrowser/default.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{pkgs, ...}: {
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
searchEngines = {
|
||||
DEFAULT = "https://searx.be/search?q={}&category_general=on&language=all";
|
||||
w = "https://en.wikipedia.org/wiki/Special:Search?search={}&go=Go&ns0=1";
|
||||
np = "https://search.nixos.org/packages?sort=relevance&type=packages&query={}";
|
||||
no = "https://search.nixos.org/options?sort=relevance&type=options&query={}";
|
||||
g = "https://google.com/search?q={}";
|
||||
git = "https://github.com/search?q={}";
|
||||
y = "https://www.youtube.com/results?search_query={}";
|
||||
};
|
||||
keyBindings = {
|
||||
normal = {
|
||||
"<Ctrl-V>" = "spawn mpv --force-window=immediate {url}";
|
||||
",l" = ''config-cycle spellcheck.languages [" it-IT "] [" en-US "]'';
|
||||
"<z><l>" = "spawn --userscript qute-pass --dmenu-invocation 'fuzzel -d'";
|
||||
"<z><u><l>" = "spawn --userscript qute-pass --dmenu-invocation 'fuzzel -d' --username-only";
|
||||
"<z><p><l>" = "spawn --userscript qute-pass --dmenu-invocation 'fuzzel -d' --password-only";
|
||||
"<z><o><l>" = "spawn --userscript qute-pass --dmenu-invocation 'fuzzel -d' --otp-only";
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
url.start_pages = ["https://searx.be"];
|
||||
editor.command = [
|
||||
"emacsclient"
|
||||
"+{line}:{column}"
|
||||
"{file}"
|
||||
"-c"
|
||||
];
|
||||
content.pdfjs = true;
|
||||
};
|
||||
};
|
||||
home.packages = [
|
||||
(
|
||||
pkgs.makeDesktopItem {
|
||||
name = "qutebrowser";
|
||||
exec = "qutebrowser %u";
|
||||
comment = "Qutebrowser";
|
||||
desktopName = "qutebrowser";
|
||||
type = "Application";
|
||||
mimeTypes = ["x-scheme-handler/https"];
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
92
hmModules/shell/default.nix
Normal file
92
hmModules/shell/default.nix
Normal file
|
@ -0,0 +1,92 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.bat.enable = true;
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
config = {
|
||||
warn_timeout = "60s"; # default was 5s
|
||||
};
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.exa = {
|
||||
enable = true;
|
||||
enableAliases = true;
|
||||
};
|
||||
|
||||
programs.fzf.enable = true;
|
||||
|
||||
programs.vim.enable = true;
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
autocd = true;
|
||||
plugins = [
|
||||
{
|
||||
name = "nix-zsh-completions";
|
||||
src = pkgs.nix-zsh-completions;
|
||||
file = "share/zsh/plugins/nix/nix-zsh-completions.plugin.zsh";
|
||||
}
|
||||
{
|
||||
name = "spaceship";
|
||||
file = "share/zsh/themes/spaceship.zsh-theme";
|
||||
src = pkgs.spaceship-prompt;
|
||||
}
|
||||
{
|
||||
name = "zsh-fzf-tab";
|
||||
file = "share/fzf-tab/fzf-tab.plugin.zsh";
|
||||
src = pkgs.zsh-fzf-tab;
|
||||
}
|
||||
{
|
||||
name = "fast-zsh-syntax-highlighting";
|
||||
file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh";
|
||||
src = pkgs.zsh-fast-syntax-highlighting;
|
||||
}
|
||||
];
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
"sudo"
|
||||
"command-not-found"
|
||||
"colored-man-pages"
|
||||
"colorize"
|
||||
];
|
||||
};
|
||||
shellAliases = {
|
||||
"pass-clone" = "[ -d .password-store ] && echo 'Password store archive already exists' || git clone git@git.sr.ht:~zrsk/pass ~/.password-store";
|
||||
"getpass" = "pass show $(find .password-store/ -name \"*.gpg\" | sed \"s/\\.password-store\\/\\(.*\\)\\.gpg$/\\1/g\" | fzf) | wl-copy; ((sleep 60 && wl-copy --clear) &)";
|
||||
"cat" = "bat";
|
||||
"man" = "batman";
|
||||
"em" = "[[ -z \$XDG_CURRENT_DESKTOP ]] && emacsclient -c -nw || emacsclient -c";
|
||||
"emw" = "emacsclient -c";
|
||||
"emnw" = "emacsclient -c -nw";
|
||||
};
|
||||
localVariables = {
|
||||
PASSWORD_STORE_DIR = "/home/ccr/.password-store";
|
||||
SPACESHIP_TIME_SHOW = "true";
|
||||
SPACESHIP_USER_SHOW = "always";
|
||||
SPACESHIP_HOST_SHOW = "always";
|
||||
EDITOR = "em";
|
||||
NIX_BUILD_SHELL = "${pkgs.zsh-nix-shell}/scripts/buildShellShim.zsh";
|
||||
PROMPT = "\\\${IN_NIX_SHELL:+[nix-shell] }$PROMPT";
|
||||
};
|
||||
loginExtra = "[[ -z $DISPLAY && $TTY = /dev/tty1 ]] && exec startx";
|
||||
initExtra =
|
||||
if pkgs.stdenv.hostPlatform.isDarwin
|
||||
then "if test -e /etc/static/bashrc; then source /etc/static/bashrc > /dev/null 2>&1; fi"
|
||||
else "";
|
||||
envExtra = ''
|
||||
[ $TERM = "dumb" ] && unsetopt zle && PS1='$ ' # for Emacs TRAMP mode
|
||||
'';
|
||||
};
|
||||
|
||||
programs.command-not-found.enable = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue