hm: clean up

This commit is contained in:
Motiejus Jakštys 2024-02-04 22:23:56 +02:00
parent a186d68041
commit b0b87e67f8
4 changed files with 124 additions and 131 deletions

View File

@ -309,6 +309,7 @@
];
extraSpecialArgs = {
stateVersion = "23.05";
username = "motiejus";
email = "motiejusja@wix.com";
devTools = true;
hmOnly = true;

View File

@ -14,26 +14,15 @@
home-manager.useGlobalPkgs = true;
home-manager.users.nixos = {pkgs, ...}:
lib.mkMerge [
(import ../../shared/home/default.nix {
inherit lib;
inherit pkgs;
inherit (config.mj) stateVersion;
username = "nixos";
devTools = true;
hmOnly = false;
email = "motiejus@jakstys.lt";
})
{
programs.bash = {
enable = true;
shellAliases = {
"l" = "echo -n ł | xclip -selection clipboard";
"gp" = "${pkgs.git}/bin/git remote | ${pkgs.parallel}/bin/parallel --verbose git push";
};
};
}
];
import ../../shared/home/default.nix {
inherit lib;
inherit pkgs;
inherit (config.mj) stateVersion;
username = "nixos";
devTools = true;
hmOnly = false;
email = "motiejus@jakstys.lt";
};
mj = {
stateVersion = "23.11";

View File

@ -61,24 +61,13 @@ in {
home-manager.useGlobalPkgs = true;
home-manager.users.motiejus = {pkgs, ...}:
lib.mkMerge [
(import ../../../shared/home/default.nix {
inherit lib;
inherit pkgs;
inherit (config.mj) stateVersion;
inherit (config.mj.base.users) devTools;
hmOnly = false;
email = "motiejus@jakstys.lt";
})
{
programs.bash = {
enable = true;
shellAliases = {
"l" = "echo -n ł | xclip -selection clipboard";
"gp" = "${pkgs.git}/bin/git remote | ${pkgs.parallel}/bin/parallel --verbose git push";
};
};
}
];
import ../../../shared/home/default.nix {
inherit lib;
inherit pkgs;
inherit (config.mj) stateVersion;
inherit (cfg) devTools;
hmOnly = false;
email = "motiejus@jakstys.lt";
};
};
}

View File

@ -98,105 +98,119 @@ in {
])
];
programs = {
direnv.enable = true;
man = {
enable = true;
generateCaches = true;
};
programs = lib.mkMerge [
{
direnv.enable = true;
man = {
enable = true;
generateCaches = true;
};
firefox = lib.mkIf devTools {
enable = true;
# firefox doesn't need the wrapper on the personal laptop
package =
if hmOnly
then (glintel pkgs.firefox-bin "firefox")
else pkgs.firefox-bin;
policies.DisableAppUpdate = true;
profiles = {
xdefault = {
isDefault = true;
settings = {
"app.update.auto" = false;
"browser.aboutConfig.showWarning" = false;
"browser.contentblocking.category" = "strict";
"browser.urlbar.showSearchSuggestionsFirst" = false;
"layout.css.prefers-color-scheme.content-override" = 0;
"signon.management.page.breach-alerts.enabled" = false;
"signon.rememberSignons" = false;
firefox = lib.mkIf devTools {
enable = true;
# firefox doesn't need the wrapper on the personal laptop
package =
if hmOnly
then (glintel pkgs.firefox-bin "firefox")
else pkgs.firefox-bin;
policies.DisableAppUpdate = true;
profiles = {
xdefault = {
isDefault = true;
settings = {
"app.update.auto" = false;
"browser.aboutConfig.showWarning" = false;
"browser.contentblocking.category" = "strict";
"browser.urlbar.showSearchSuggestionsFirst" = false;
"layout.css.prefers-color-scheme.content-override" = 0;
"signon.management.page.breach-alerts.enabled" = false;
"signon.rememberSignons" = false;
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
bitwarden
ublock-origin
consent-o-matic
joplin-web-clipper
multi-account-containers
];
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
bitwarden
ublock-origin
consent-o-matic
joplin-web-clipper
multi-account-containers
];
};
};
};
neovim = lib.mkMerge [
{
enable = true;
vimAlias = true;
vimdiffAlias = true;
defaultEditor = true;
plugins = with pkgs.vimPlugins;
lib.mkMerge [
[fugitive]
(lib.mkIf devTools [
vim-go
zig-vim
])
];
extraConfig = builtins.readFile ./vimrc;
}
(lib.mkIf devTools {
extraLuaConfig =
builtins.readFile
(pkgs.substituteAll {
src = ./dev.lua;
inherit (pkgs) gotools ripgrep;
})
.outPath;
})
];
git = {
enable = true;
userEmail = email;
userName = "Motiejus Jakštys";
aliases.yolo = "commit --amend --no-edit -a";
extraConfig = {
rerere.enabled = true;
pull.ff = "only";
merge.conflictstyle = "diff3";
init.defaultBranch = "main";
};
};
gpg = {
enable = true;
mutableKeys = false;
mutableTrust = false;
publicKeys = [
neovim = lib.mkMerge [
{
source = ./motiejus-gpg.txt;
trust = "ultimate";
enable = true;
vimAlias = true;
vimdiffAlias = true;
defaultEditor = true;
plugins = with pkgs.vimPlugins;
lib.mkMerge [
[fugitive]
(lib.mkIf devTools [
vim-go
zig-vim
])
];
extraConfig = builtins.readFile ./vimrc;
}
(lib.mkIf devTools {
extraLuaConfig =
builtins.readFile
(pkgs.substituteAll {
src = ./dev.lua;
inherit (pkgs) gotools ripgrep;
})
.outPath;
})
];
};
tmux = {
enable = true;
keyMode = "vi";
historyLimit = 1000000;
extraConfig = ''
bind c new-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
'';
};
};
git = {
enable = true;
userEmail = email;
userName = "Motiejus Jakštys";
aliases.yolo = "commit --amend --no-edit -a";
extraConfig = {
rerere.enabled = true;
pull.ff = "only";
merge.conflictstyle = "diff3";
init.defaultBranch = "main";
};
};
gpg = {
enable = true;
mutableKeys = false;
mutableTrust = false;
publicKeys = [
{
source = ./motiejus-gpg.txt;
trust = "ultimate";
}
];
};
tmux = {
enable = true;
keyMode = "vi";
historyLimit = 1000000;
extraConfig = ''
bind c new-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
'';
};
}
(
lib.mkIf (!hmOnly)
{
bash = {
enable = true;
shellAliases = {
"l" = "echo -n ł | xclip -selection clipboard";
"gp" = "${pkgs.git}/bin/git remote | ${pkgs.parallel}/bin/parallel --verbose git push";
};
};
}
)
];
}