refactor: switch from modules to import arrays
This commit is contained in:
parent
d893750c09
commit
41eaa38d31
75 changed files with 1870 additions and 2541 deletions
|
|
@ -1,67 +1,53 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "aerc";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
accounts.email.accounts.personal.aerc.enable = true;
|
||||
programs.aerc = {
|
||||
enable = true;
|
||||
extraAccounts.personal = {
|
||||
default = "INBOX";
|
||||
folders-sort = "INBOX, Starred, Drafts, Sent, Trash, Archive, Spam";
|
||||
accounts.email.accounts.personal.aerc.enable = true;
|
||||
programs.aerc = {
|
||||
enable = true;
|
||||
extraAccounts.personal = {
|
||||
default = "INBOX";
|
||||
folders-sort = "INBOX, Starred, Drafts, Sent, Trash, Archive, Spam";
|
||||
};
|
||||
extraConfig = {
|
||||
general.unsafe-accounts-conf = true;
|
||||
filters = {
|
||||
"text/plain" = "colorize";
|
||||
"text/calendar" = "calendar | colorize";
|
||||
"text/html" = "html | colorize";
|
||||
};
|
||||
extraConfig = {
|
||||
general.unsafe-accounts-conf = true;
|
||||
filters = {
|
||||
"text/plain" = "colorize";
|
||||
"text/calendar" = "calendar | colorize";
|
||||
"text/html" = "html | colorize";
|
||||
};
|
||||
ui = {
|
||||
styleset-name = "catppuccin-mocha";
|
||||
sort = "-r date";
|
||||
};
|
||||
ui = {
|
||||
styleset-name = "catppuccin-mocha";
|
||||
sort = "-r date";
|
||||
};
|
||||
stylesets = {
|
||||
catppuccin-mocha = {
|
||||
"*.default" = true;
|
||||
"*.normal" = true;
|
||||
"default.fg" = "#cdd6f4";
|
||||
"error.fg" = "#f38ba8";
|
||||
"warning.fg" = "#fab387";
|
||||
"success.fg" = "#a6e3a1";
|
||||
"tab.fg" = "#6c7086";
|
||||
"tab.bg" = "#181825";
|
||||
"tab.selected.fg" = "#cdd6f4";
|
||||
"tab.selected.bg" = "#1e1e2e";
|
||||
"tab.selected.bold" = true;
|
||||
"border.fg" = "#11111b";
|
||||
"border.bold" = true;
|
||||
"msglist_unread.bold" = true;
|
||||
"msglist_flagged.fg" = "#f9e2af";
|
||||
"msglist_flagged.bold" = true;
|
||||
"msglist_result.fg" = "#89b4fa";
|
||||
"msglist_result.bold" = true;
|
||||
"msglist_*.selected.bold" = true;
|
||||
"msglist_*.selected.bg" = "#313244";
|
||||
"dirlist_*.selected.bold" = true;
|
||||
"dirlist_*.selected.bg" = "#313244";
|
||||
"statusline_default.fg" = "#9399b2";
|
||||
"statusline_default.bg" = "#313244";
|
||||
"statusline_error.bold" = true;
|
||||
"statusline_success.bold" = true;
|
||||
"completion_default.selected.bg" = "#313244";
|
||||
};
|
||||
};
|
||||
stylesets = {
|
||||
catppuccin-mocha = {
|
||||
"*.default" = true;
|
||||
"*.normal" = true;
|
||||
"default.fg" = "#cdd6f4";
|
||||
"error.fg" = "#f38ba8";
|
||||
"warning.fg" = "#fab387";
|
||||
"success.fg" = "#a6e3a1";
|
||||
"tab.fg" = "#6c7086";
|
||||
"tab.bg" = "#181825";
|
||||
"tab.selected.fg" = "#cdd6f4";
|
||||
"tab.selected.bg" = "#1e1e2e";
|
||||
"tab.selected.bold" = true;
|
||||
"border.fg" = "#11111b";
|
||||
"border.bold" = true;
|
||||
"msglist_unread.bold" = true;
|
||||
"msglist_flagged.fg" = "#f9e2af";
|
||||
"msglist_flagged.bold" = true;
|
||||
"msglist_result.fg" = "#89b4fa";
|
||||
"msglist_result.bold" = true;
|
||||
"msglist_*.selected.bold" = true;
|
||||
"msglist_*.selected.bg" = "#313244";
|
||||
"dirlist_*.selected.bold" = true;
|
||||
"dirlist_*.selected.bg" = "#313244";
|
||||
"statusline_default.fg" = "#9399b2";
|
||||
"statusline_default.bg" = "#313244";
|
||||
"statusline_error.bold" = true;
|
||||
"statusline_success.bold" = true;
|
||||
"completion_default.selected.bg" = "#313244";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ ];
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,8 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
userName,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "agenix";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
age.identityPaths = [ "/home/${userName}/.ssh/id_ed25519" ];
|
||||
};
|
||||
age.identityPaths = [ "/home/${userName}/.ssh/id_ed25519" ];
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,8 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "bat";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
theme = "Dracula";
|
||||
};
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
theme = "Dracula";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ ];
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,3 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "direnv";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable { programs.direnv.enable = true; };
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
programs.direnv.enable = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,6 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "espanso";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
services.espanso = {
|
||||
enable = true;
|
||||
configs = { };
|
||||
};
|
||||
services.espanso = {
|
||||
enable = true;
|
||||
configs = { };
|
||||
};
|
||||
|
||||
imports = [ ];
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,297 +1,283 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "eza";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
extraOptions = [
|
||||
"--long"
|
||||
"--header"
|
||||
"--group-directories-first"
|
||||
];
|
||||
git = true;
|
||||
icons = "always";
|
||||
theme = {
|
||||
colourful = true;
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
extraOptions = [
|
||||
"--long"
|
||||
"--header"
|
||||
"--group-directories-first"
|
||||
];
|
||||
git = true;
|
||||
icons = "always";
|
||||
theme = {
|
||||
colourful = true;
|
||||
|
||||
filekinds = {
|
||||
normal = {
|
||||
foreground = "#BAC2DE";
|
||||
};
|
||||
directory = {
|
||||
foreground = "#89B4FA";
|
||||
};
|
||||
symlink = {
|
||||
foreground = "#89DCEB";
|
||||
};
|
||||
pipe = {
|
||||
foreground = "#7F849C";
|
||||
};
|
||||
block_device = {
|
||||
foreground = "#EBA0AC";
|
||||
};
|
||||
char_device = {
|
||||
foreground = "#EBA0AC";
|
||||
};
|
||||
socket = {
|
||||
foreground = "#585B70";
|
||||
};
|
||||
special = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
executable = {
|
||||
foreground = "#A6E3A1";
|
||||
};
|
||||
mount_point = {
|
||||
foreground = "#74C7EC";
|
||||
};
|
||||
filekinds = {
|
||||
normal = {
|
||||
foreground = "#BAC2DE";
|
||||
};
|
||||
|
||||
perms = {
|
||||
user_read = {
|
||||
foreground = "#CDD6F4";
|
||||
};
|
||||
user_write = {
|
||||
foreground = "#F9E2AF";
|
||||
};
|
||||
user_execute_file = {
|
||||
foreground = "#A6E3A1";
|
||||
};
|
||||
user_execute_other = {
|
||||
foreground = "#A6E3A1";
|
||||
};
|
||||
group_read = {
|
||||
foreground = "#BAC2DE";
|
||||
};
|
||||
group_write = {
|
||||
foreground = "#F9E2AF";
|
||||
};
|
||||
group_execute = {
|
||||
foreground = "#A6E3A1";
|
||||
};
|
||||
other_read = {
|
||||
foreground = "#A6ADC8";
|
||||
};
|
||||
other_write = {
|
||||
foreground = "#F9E2AF";
|
||||
};
|
||||
other_execute = {
|
||||
foreground = "#A6E3A1";
|
||||
};
|
||||
special_user_file = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
special_other = {
|
||||
foreground = "#585B70";
|
||||
};
|
||||
attribute = {
|
||||
foreground = "#A6ADC8";
|
||||
};
|
||||
directory = {
|
||||
foreground = "#89B4FA";
|
||||
};
|
||||
|
||||
size = {
|
||||
major = {
|
||||
foreground = "#A6ADC8";
|
||||
};
|
||||
minor = {
|
||||
foreground = "#89DCEB";
|
||||
};
|
||||
number_byte = {
|
||||
foreground = "#CDD6F4";
|
||||
};
|
||||
number_kilo = {
|
||||
foreground = "#BAC2DE";
|
||||
};
|
||||
number_mega = {
|
||||
foreground = "#89B4FA";
|
||||
};
|
||||
number_giga = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
number_huge = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
unit_byte = {
|
||||
foreground = "#A6ADC8";
|
||||
};
|
||||
unit_kilo = {
|
||||
foreground = "#89B4FA";
|
||||
};
|
||||
unit_mega = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
unit_giga = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
unit_huge = {
|
||||
foreground = "#74C7EC";
|
||||
};
|
||||
};
|
||||
|
||||
users = {
|
||||
user_you = {
|
||||
foreground = "#CDD6F4";
|
||||
};
|
||||
user_root = {
|
||||
foreground = "#F38BA8";
|
||||
};
|
||||
user_other = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
group_yours = {
|
||||
foreground = "#BAC2DE";
|
||||
};
|
||||
group_other = {
|
||||
foreground = "#7F849C";
|
||||
};
|
||||
group_root = {
|
||||
foreground = "#F38BA8";
|
||||
};
|
||||
|
||||
};
|
||||
links = {
|
||||
normal = {
|
||||
foreground = "#89DCEB";
|
||||
};
|
||||
multi_link_file = {
|
||||
foreground = "#74C7EC";
|
||||
};
|
||||
};
|
||||
|
||||
git = {
|
||||
new = {
|
||||
foreground = "#A6E3A1";
|
||||
};
|
||||
modified = {
|
||||
foreground = "#F9E2AF";
|
||||
};
|
||||
deleted = {
|
||||
foreground = "#F38BA8";
|
||||
};
|
||||
renamed = {
|
||||
foreground = "#94E2D5";
|
||||
};
|
||||
typechange = {
|
||||
foreground = "#F5C2E7";
|
||||
};
|
||||
ignored = {
|
||||
foreground = "#7F849C";
|
||||
};
|
||||
conflicted = {
|
||||
foreground = "#EBA0AC";
|
||||
};
|
||||
};
|
||||
git_repo = {
|
||||
branch_main = {
|
||||
foreground = "#CDD6F4";
|
||||
};
|
||||
branch_other = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
git_clean = {
|
||||
foreground = "#A6E3A1";
|
||||
};
|
||||
git_dirty = {
|
||||
foreground = "#F38BA8";
|
||||
};
|
||||
};
|
||||
security_context = {
|
||||
colon = {
|
||||
foreground = "#7F849C";
|
||||
};
|
||||
user = {
|
||||
foreground = "#BAC2DE";
|
||||
};
|
||||
role = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
typ = {
|
||||
foreground = "#585B70";
|
||||
};
|
||||
range = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
};
|
||||
file_type = {
|
||||
image = {
|
||||
foreground = "#F9E2AF";
|
||||
};
|
||||
video = {
|
||||
foreground = "#F38BA8";
|
||||
};
|
||||
music = {
|
||||
foreground = "#A6E3A1";
|
||||
};
|
||||
lossless = {
|
||||
foreground = "#94E2D5";
|
||||
};
|
||||
crypto = {
|
||||
foreground = "#585B70";
|
||||
};
|
||||
document = {
|
||||
foreground = "#CDD6F4";
|
||||
};
|
||||
compressed = {
|
||||
foreground = "#F5C2E7";
|
||||
};
|
||||
temp = {
|
||||
foreground = "#EBA0AC";
|
||||
};
|
||||
compiled = {
|
||||
foreground = "#74C7EC";
|
||||
};
|
||||
build = {
|
||||
foreground = "#585B70";
|
||||
};
|
||||
source = {
|
||||
foreground = "#89B4FA";
|
||||
};
|
||||
};
|
||||
punctuation = {
|
||||
foreground = "#7F849C";
|
||||
};
|
||||
date = {
|
||||
foreground = "#F9E2AF";
|
||||
};
|
||||
inode = {
|
||||
foreground = "#A6ADC8";
|
||||
};
|
||||
blocks = {
|
||||
foreground = "#9399B2";
|
||||
};
|
||||
header = {
|
||||
foreground = "#CDD6F4";
|
||||
};
|
||||
octal = {
|
||||
foreground = "#94E2D5";
|
||||
};
|
||||
flags = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
|
||||
symlink_path = {
|
||||
symlink = {
|
||||
foreground = "#89DCEB";
|
||||
};
|
||||
control_char = {
|
||||
foreground = "#74C7EC";
|
||||
pipe = {
|
||||
foreground = "#7F849C";
|
||||
};
|
||||
broken_symlink = {
|
||||
foreground = "#F38BA8";
|
||||
block_device = {
|
||||
foreground = "#EBA0AC";
|
||||
};
|
||||
broken_path_overlay = {
|
||||
char_device = {
|
||||
foreground = "#EBA0AC";
|
||||
};
|
||||
socket = {
|
||||
foreground = "#585B70";
|
||||
};
|
||||
special = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
executable = {
|
||||
foreground = "#A6E3A1";
|
||||
};
|
||||
mount_point = {
|
||||
foreground = "#74C7EC";
|
||||
};
|
||||
};
|
||||
|
||||
perms = {
|
||||
user_read = {
|
||||
foreground = "#CDD6F4";
|
||||
};
|
||||
user_write = {
|
||||
foreground = "#F9E2AF";
|
||||
};
|
||||
user_execute_file = {
|
||||
foreground = "#A6E3A1";
|
||||
};
|
||||
user_execute_other = {
|
||||
foreground = "#A6E3A1";
|
||||
};
|
||||
group_read = {
|
||||
foreground = "#BAC2DE";
|
||||
};
|
||||
group_write = {
|
||||
foreground = "#F9E2AF";
|
||||
};
|
||||
group_execute = {
|
||||
foreground = "#A6E3A1";
|
||||
};
|
||||
other_read = {
|
||||
foreground = "#A6ADC8";
|
||||
};
|
||||
other_write = {
|
||||
foreground = "#F9E2AF";
|
||||
};
|
||||
other_execute = {
|
||||
foreground = "#A6E3A1";
|
||||
};
|
||||
special_user_file = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
special_other = {
|
||||
foreground = "#585B70";
|
||||
};
|
||||
attribute = {
|
||||
foreground = "#A6ADC8";
|
||||
};
|
||||
};
|
||||
|
||||
size = {
|
||||
major = {
|
||||
foreground = "#A6ADC8";
|
||||
};
|
||||
minor = {
|
||||
foreground = "#89DCEB";
|
||||
};
|
||||
number_byte = {
|
||||
foreground = "#CDD6F4";
|
||||
};
|
||||
number_kilo = {
|
||||
foreground = "#BAC2DE";
|
||||
};
|
||||
number_mega = {
|
||||
foreground = "#89B4FA";
|
||||
};
|
||||
number_giga = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
number_huge = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
unit_byte = {
|
||||
foreground = "#A6ADC8";
|
||||
};
|
||||
unit_kilo = {
|
||||
foreground = "#89B4FA";
|
||||
};
|
||||
unit_mega = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
unit_giga = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
unit_huge = {
|
||||
foreground = "#74C7EC";
|
||||
};
|
||||
};
|
||||
|
||||
users = {
|
||||
user_you = {
|
||||
foreground = "#CDD6F4";
|
||||
};
|
||||
user_root = {
|
||||
foreground = "#F38BA8";
|
||||
};
|
||||
user_other = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
group_yours = {
|
||||
foreground = "#BAC2DE";
|
||||
};
|
||||
group_other = {
|
||||
foreground = "#7F849C";
|
||||
};
|
||||
group_root = {
|
||||
foreground = "#F38BA8";
|
||||
};
|
||||
|
||||
};
|
||||
links = {
|
||||
normal = {
|
||||
foreground = "#89DCEB";
|
||||
};
|
||||
multi_link_file = {
|
||||
foreground = "#74C7EC";
|
||||
};
|
||||
};
|
||||
|
||||
git = {
|
||||
new = {
|
||||
foreground = "#A6E3A1";
|
||||
};
|
||||
modified = {
|
||||
foreground = "#F9E2AF";
|
||||
};
|
||||
deleted = {
|
||||
foreground = "#F38BA8";
|
||||
};
|
||||
renamed = {
|
||||
foreground = "#94E2D5";
|
||||
};
|
||||
typechange = {
|
||||
foreground = "#F5C2E7";
|
||||
};
|
||||
ignored = {
|
||||
foreground = "#7F849C";
|
||||
};
|
||||
conflicted = {
|
||||
foreground = "#EBA0AC";
|
||||
};
|
||||
};
|
||||
git_repo = {
|
||||
branch_main = {
|
||||
foreground = "#CDD6F4";
|
||||
};
|
||||
branch_other = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
git_clean = {
|
||||
foreground = "#A6E3A1";
|
||||
};
|
||||
git_dirty = {
|
||||
foreground = "#F38BA8";
|
||||
};
|
||||
};
|
||||
security_context = {
|
||||
colon = {
|
||||
foreground = "#7F849C";
|
||||
};
|
||||
user = {
|
||||
foreground = "#BAC2DE";
|
||||
};
|
||||
role = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
typ = {
|
||||
foreground = "#585B70";
|
||||
};
|
||||
range = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
};
|
||||
file_type = {
|
||||
image = {
|
||||
foreground = "#F9E2AF";
|
||||
};
|
||||
video = {
|
||||
foreground = "#F38BA8";
|
||||
};
|
||||
music = {
|
||||
foreground = "#A6E3A1";
|
||||
};
|
||||
lossless = {
|
||||
foreground = "#94E2D5";
|
||||
};
|
||||
crypto = {
|
||||
foreground = "#585B70";
|
||||
};
|
||||
document = {
|
||||
foreground = "#CDD6F4";
|
||||
};
|
||||
compressed = {
|
||||
foreground = "#F5C2E7";
|
||||
};
|
||||
temp = {
|
||||
foreground = "#EBA0AC";
|
||||
};
|
||||
compiled = {
|
||||
foreground = "#74C7EC";
|
||||
};
|
||||
build = {
|
||||
foreground = "#585B70";
|
||||
};
|
||||
source = {
|
||||
foreground = "#89B4FA";
|
||||
};
|
||||
};
|
||||
punctuation = {
|
||||
foreground = "#7F849C";
|
||||
};
|
||||
date = {
|
||||
foreground = "#F9E2AF";
|
||||
};
|
||||
inode = {
|
||||
foreground = "#A6ADC8";
|
||||
};
|
||||
blocks = {
|
||||
foreground = "#9399B2";
|
||||
};
|
||||
header = {
|
||||
foreground = "#CDD6F4";
|
||||
};
|
||||
octal = {
|
||||
foreground = "#94E2D5";
|
||||
};
|
||||
flags = {
|
||||
foreground = "#CBA6F7";
|
||||
};
|
||||
|
||||
symlink_path = {
|
||||
foreground = "#89DCEB";
|
||||
};
|
||||
control_char = {
|
||||
foreground = "#74C7EC";
|
||||
};
|
||||
broken_symlink = {
|
||||
foreground = "#F38BA8";
|
||||
};
|
||||
broken_path_overlay = {
|
||||
foreground = "#585B70";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ ];
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,74 +1,63 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "fish";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
home.shell.enableFishIntegration = true;
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
set fish_greeting
|
||||
'';
|
||||
shellAliases = {
|
||||
# keep-sorted start
|
||||
cat = "bat";
|
||||
# cd = "j";
|
||||
cut = "choose";
|
||||
df = "duf";
|
||||
du = "dua";
|
||||
# find = "fd";
|
||||
g = "lazygit";
|
||||
l = "eza";
|
||||
la = "eza -a";
|
||||
ls = "eza";
|
||||
ns = "nh os switch";
|
||||
# curl = "xh";
|
||||
ping = "gping";
|
||||
ps = "procs";
|
||||
# sed = "sd";
|
||||
# grep = "rga";
|
||||
top = "btm";
|
||||
unzip = "ripunzip";
|
||||
vi = "nvim";
|
||||
vim = "nvim";
|
||||
# keep-sorted end
|
||||
};
|
||||
plugins = [
|
||||
# INFO: Using this to get shell completion for programs added to the path through nix+direnv.
|
||||
# Issue to upstream into direnv:Add commentMore actions
|
||||
# https://github.com/direnv/direnv/issues/443
|
||||
{
|
||||
name = "completion-sync";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "iynaix";
|
||||
repo = "fish-completion-sync";
|
||||
rev = "4f058ad2986727a5f510e757bc82cbbfca4596f0";
|
||||
sha256 = "sha256-kHpdCQdYcpvi9EFM/uZXv93mZqlk1zCi2DRhWaDyK5g=";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# https://nixos.wiki/wiki/Fish#Setting_fish_as_your_shell
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
initExtra = ''
|
||||
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
||||
then
|
||||
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
||||
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
||||
fi
|
||||
'';
|
||||
home.shell.enableFishIntegration = true;
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
set fish_greeting
|
||||
'';
|
||||
shellAliases = {
|
||||
# keep-sorted start
|
||||
cat = "bat";
|
||||
# cd = "j";
|
||||
cut = "choose";
|
||||
df = "duf";
|
||||
du = "dua";
|
||||
# find = "fd";
|
||||
g = "lazygit";
|
||||
l = "eza";
|
||||
la = "eza -a";
|
||||
ls = "eza";
|
||||
ns = "nh os switch";
|
||||
# curl = "xh";
|
||||
ping = "gping";
|
||||
ps = "procs";
|
||||
# sed = "sd";
|
||||
# grep = "rga";
|
||||
top = "btm";
|
||||
unzip = "ripunzip";
|
||||
vi = "nvim";
|
||||
vim = "nvim";
|
||||
# keep-sorted end
|
||||
};
|
||||
plugins = [
|
||||
# INFO: Using this to get shell completion for programs added to the path through nix+direnv.
|
||||
# Issue to upstream into direnv:Add commentMore actions
|
||||
# https://github.com/direnv/direnv/issues/443
|
||||
{
|
||||
name = "completion-sync";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "iynaix";
|
||||
repo = "fish-completion-sync";
|
||||
rev = "4f058ad2986727a5f510e757bc82cbbfca4596f0";
|
||||
sha256 = "sha256-kHpdCQdYcpvi9EFM/uZXv93mZqlk1zCi2DRhWaDyK5g=";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
imports = [ ];
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
# https://nixos.wiki/wiki/Fish#Setting_fish_as_your_shell
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
initExtra = ''
|
||||
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
||||
then
|
||||
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
||||
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,9 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "gh";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
git_protocol = "ssh";
|
||||
editor = "nvim";
|
||||
};
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
git_protocol = "ssh";
|
||||
editor = "nvim";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ ];
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,56 +1,44 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "git";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
programs.${feature} = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
delta = {
|
||||
enable = true;
|
||||
options.theme = "Dracula";
|
||||
};
|
||||
|
||||
delta = {
|
||||
enable = true;
|
||||
options.theme = "Dracula";
|
||||
};
|
||||
userName = "wi11-holdsworth";
|
||||
userEmail = "83637728+wi11-holdsworth@users.noreply.github.com";
|
||||
|
||||
userName = "wi11-holdsworth";
|
||||
userEmail = "83637728+wi11-holdsworth@users.noreply.github.com";
|
||||
aliases = {
|
||||
# keep-sorted start
|
||||
a = "add";
|
||||
aa = "add .";
|
||||
ap = "add -p";
|
||||
c = "commit --verbose";
|
||||
ca = "commit -a --verbose";
|
||||
cam = "commit -a -m";
|
||||
cm = "commit -m";
|
||||
co = "checkout";
|
||||
cob = "checkout -b";
|
||||
d = "diff";
|
||||
dc = "diff --cached";
|
||||
ds = "diff --stat";
|
||||
m = "commit --amend --verbose";
|
||||
pl = "pull";
|
||||
ps = "push";
|
||||
s = "status -s";
|
||||
# keep-sorted end
|
||||
};
|
||||
|
||||
aliases = {
|
||||
# keep-sorted start
|
||||
a = "add";
|
||||
aa = "add .";
|
||||
ap = "add -p";
|
||||
c = "commit --verbose";
|
||||
ca = "commit -a --verbose";
|
||||
cam = "commit -a -m";
|
||||
cm = "commit -m";
|
||||
co = "checkout";
|
||||
cob = "checkout -b";
|
||||
d = "diff";
|
||||
dc = "diff --cached";
|
||||
ds = "diff --stat";
|
||||
m = "commit --amend --verbose";
|
||||
pl = "pull";
|
||||
ps = "push";
|
||||
s = "status -s";
|
||||
# keep-sorted end
|
||||
};
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
core.editor = "nvim";
|
||||
|
||||
core.editor = "nvim";
|
||||
push.autoSetupRemote = true;
|
||||
|
||||
push.autoSetupRemote = true;
|
||||
|
||||
pull.rebase = false;
|
||||
};
|
||||
pull.rebase = false;
|
||||
};
|
||||
};
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,21 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "kitty";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
enableGitIntegration = true;
|
||||
font = {
|
||||
package = pkgs.nerd-fonts.jetbrains-mono;
|
||||
name = "JetBrainsMono Nerd Font";
|
||||
size = 13;
|
||||
};
|
||||
themeFile = "Catppuccin-Mocha";
|
||||
settings = {
|
||||
shell = "zellij -l welcome";
|
||||
remember_window_size = true;
|
||||
confirm_os_window_close = 0;
|
||||
};
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
enableGitIntegration = true;
|
||||
font = {
|
||||
package = pkgs.nerd-fonts.jetbrains-mono;
|
||||
name = "JetBrainsMono Nerd Font";
|
||||
size = 13;
|
||||
};
|
||||
themeFile = "Catppuccin-Mocha";
|
||||
settings = {
|
||||
shell = "zellij -l welcome";
|
||||
remember_window_size = true;
|
||||
confirm_os_window_close = 0;
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ ];
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,62 +1,54 @@
|
|||
{
|
||||
# keep-sorted start
|
||||
config,
|
||||
lib,
|
||||
hostName,
|
||||
# keep-sorted end
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "mail";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
accounts.email =
|
||||
let
|
||||
certificatesFile = config.age.secrets.protonmail-cert.path;
|
||||
in
|
||||
{
|
||||
inherit certificatesFile;
|
||||
accounts =
|
||||
let
|
||||
# keep-sorted start block=yes
|
||||
address = "willholdsworth@pm.me";
|
||||
authentication = "login";
|
||||
host = "127.0.0.1";
|
||||
tls = {
|
||||
enable = false;
|
||||
useStartTls = true;
|
||||
inherit certificatesFile;
|
||||
};
|
||||
# keep-sorted end
|
||||
in
|
||||
{
|
||||
personal = {
|
||||
enable = true;
|
||||
# keep-sorted start block=yes
|
||||
imap = {
|
||||
port = 1143;
|
||||
inherit tls;
|
||||
inherit authentication;
|
||||
inherit host;
|
||||
};
|
||||
inherit address;
|
||||
passwordCommand = "cat ${config.age.secrets."protonmail-${hostName}-password".path}";
|
||||
primary = true;
|
||||
realName = "Will Holdsworth";
|
||||
smtp = {
|
||||
port = 1025;
|
||||
inherit tls;
|
||||
inherit authentication;
|
||||
inherit host;
|
||||
};
|
||||
userName = address;
|
||||
# keep-sorted end
|
||||
};
|
||||
accounts.email =
|
||||
let
|
||||
certificatesFile = config.age.secrets.protonmail-cert.path;
|
||||
in
|
||||
{
|
||||
inherit certificatesFile;
|
||||
accounts =
|
||||
let
|
||||
# keep-sorted start block=yes
|
||||
address = "willholdsworth@pm.me";
|
||||
authentication = "login";
|
||||
host = "127.0.0.1";
|
||||
tls = {
|
||||
enable = false;
|
||||
useStartTls = true;
|
||||
inherit certificatesFile;
|
||||
};
|
||||
};
|
||||
age.secrets."protonmail-cert".file = ../../../secrets/protonmail-cert.age;
|
||||
};
|
||||
|
||||
imports = [ ];
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
# keep-sorted end
|
||||
in
|
||||
{
|
||||
personal = {
|
||||
enable = true;
|
||||
# keep-sorted start block=yes
|
||||
imap = {
|
||||
port = 1143;
|
||||
inherit tls;
|
||||
inherit authentication;
|
||||
inherit host;
|
||||
};
|
||||
inherit address;
|
||||
passwordCommand = "cat ${config.age.secrets."protonmail-${hostName}-password".path}";
|
||||
primary = true;
|
||||
realName = "Will Holdsworth";
|
||||
smtp = {
|
||||
port = 1025;
|
||||
inherit tls;
|
||||
inherit authentication;
|
||||
inherit host;
|
||||
};
|
||||
userName = address;
|
||||
# keep-sorted end
|
||||
};
|
||||
};
|
||||
};
|
||||
age.secrets."protonmail-cert".file = ../../../secrets/protonmail-cert.age;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,126 +1,116 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
feature = "obsidian";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
programs.obsidian = {
|
||||
enable = true;
|
||||
defaultSettings = {
|
||||
app = {
|
||||
tabSize = 2;
|
||||
trashOption = "local";
|
||||
alwaysUpdateLinks = true;
|
||||
attachmentFolderPath = "/";
|
||||
defaultViewMode = "preview";
|
||||
vimMode = true;
|
||||
showLineNumber = true;
|
||||
};
|
||||
appearance = {
|
||||
monospaceFontFamily = "JetBrainsMono Nerd Font";
|
||||
interfaceFontFamily = "JetBrainsMono Nerd Font";
|
||||
textFontFamily = "JetBrainsMono Nerd Font";
|
||||
nativeMenus = false;
|
||||
cssTheme = "Catppuccin";
|
||||
showRibbon = false;
|
||||
};
|
||||
communityPlugins = [
|
||||
# keep-sorted start
|
||||
"obsidian-editor-shortcuts"
|
||||
"obsidian-excalidraw-plugin"
|
||||
"obsidian-livesync"
|
||||
"obsidian-relative-line-numbers"
|
||||
"oz-clear-unused-images"
|
||||
"pdf-plus"
|
||||
"tag-wrangler"
|
||||
"virtual-linker"
|
||||
# keep-sorted end
|
||||
programs.obsidian = {
|
||||
enable = true;
|
||||
defaultSettings = {
|
||||
app = {
|
||||
tabSize = 2;
|
||||
trashOption = "local";
|
||||
alwaysUpdateLinks = true;
|
||||
attachmentFolderPath = "/";
|
||||
defaultViewMode = "preview";
|
||||
vimMode = true;
|
||||
showLineNumber = true;
|
||||
};
|
||||
appearance = {
|
||||
monospaceFontFamily = "JetBrainsMono Nerd Font";
|
||||
interfaceFontFamily = "JetBrainsMono Nerd Font";
|
||||
textFontFamily = "JetBrainsMono Nerd Font";
|
||||
nativeMenus = false;
|
||||
cssTheme = "Catppuccin";
|
||||
showRibbon = false;
|
||||
};
|
||||
communityPlugins = [
|
||||
# keep-sorted start
|
||||
"obsidian-editor-shortcuts"
|
||||
"obsidian-excalidraw-plugin"
|
||||
"obsidian-livesync"
|
||||
"obsidian-relative-line-numbers"
|
||||
"oz-clear-unused-images"
|
||||
"pdf-plus"
|
||||
"tag-wrangler"
|
||||
"virtual-linker"
|
||||
# keep-sorted end
|
||||
];
|
||||
corePlugins = [
|
||||
# keep-sorted start
|
||||
"backlink"
|
||||
"bases"
|
||||
"bookmarks"
|
||||
"canvas"
|
||||
"command-palette"
|
||||
"daily-notes"
|
||||
"editor-status"
|
||||
"file-explorer"
|
||||
"file-recovery"
|
||||
"global-search"
|
||||
"graph"
|
||||
"markdown-importer"
|
||||
"note-composer"
|
||||
"outgoing-link"
|
||||
"outline"
|
||||
"page-preview"
|
||||
"properties"
|
||||
"random-note"
|
||||
"slash-command"
|
||||
"slides"
|
||||
"switcher"
|
||||
"tag-pane"
|
||||
"templates"
|
||||
"word-count"
|
||||
"workspaces"
|
||||
"zk-prefixer"
|
||||
# keep-sorted end
|
||||
];
|
||||
hotkeys = {
|
||||
"editor:swap-line-down" = [
|
||||
{
|
||||
"modifiers" = [ "Alt" ];
|
||||
"key" = "ArrowDown";
|
||||
}
|
||||
];
|
||||
corePlugins = [
|
||||
# keep-sorted start
|
||||
"backlink"
|
||||
"bases"
|
||||
"bookmarks"
|
||||
"canvas"
|
||||
"command-palette"
|
||||
"daily-notes"
|
||||
"editor-status"
|
||||
"file-explorer"
|
||||
"file-recovery"
|
||||
"global-search"
|
||||
"graph"
|
||||
"markdown-importer"
|
||||
"note-composer"
|
||||
"outgoing-link"
|
||||
"outline"
|
||||
"page-preview"
|
||||
"properties"
|
||||
"random-note"
|
||||
"slash-command"
|
||||
"slides"
|
||||
"switcher"
|
||||
"tag-pane"
|
||||
"templates"
|
||||
"word-count"
|
||||
"workspaces"
|
||||
"zk-prefixer"
|
||||
# keep-sorted end
|
||||
"editor:swap-line-up" = [
|
||||
{
|
||||
"modifiers" = [ "Alt" ];
|
||||
"key" = "ArrowUp";
|
||||
}
|
||||
];
|
||||
"app:toggle-left-sidebar" = [
|
||||
{
|
||||
"modifiers" = [
|
||||
"Mod"
|
||||
"Shift"
|
||||
];
|
||||
"key" = "/";
|
||||
}
|
||||
];
|
||||
"app:toggle-right-sidebar" = [
|
||||
{
|
||||
"modifiers" = [
|
||||
"Mod"
|
||||
"Shift"
|
||||
];
|
||||
"key" = "\\";
|
||||
}
|
||||
];
|
||||
"window:reset-zoom" = [
|
||||
{
|
||||
"modifiers" = [ "Mod" ];
|
||||
"key" = "0";
|
||||
}
|
||||
];
|
||||
"app:go-back" = [
|
||||
{
|
||||
"modifiers" = [ "Alt" ];
|
||||
"key" = "ArrowLeft";
|
||||
}
|
||||
];
|
||||
"app:go-forward" = [
|
||||
{
|
||||
"modifiers" = [ "Alt" ];
|
||||
"key" = "ArrowRight";
|
||||
}
|
||||
];
|
||||
hotkeys = {
|
||||
"editor:swap-line-down" = [
|
||||
{
|
||||
"modifiers" = [ "Alt" ];
|
||||
"key" = "ArrowDown";
|
||||
}
|
||||
];
|
||||
"editor:swap-line-up" = [
|
||||
{
|
||||
"modifiers" = [ "Alt" ];
|
||||
"key" = "ArrowUp";
|
||||
}
|
||||
];
|
||||
"app:toggle-left-sidebar" = [
|
||||
{
|
||||
"modifiers" = [
|
||||
"Mod"
|
||||
"Shift"
|
||||
];
|
||||
"key" = "/";
|
||||
}
|
||||
];
|
||||
"app:toggle-right-sidebar" = [
|
||||
{
|
||||
"modifiers" = [
|
||||
"Mod"
|
||||
"Shift"
|
||||
];
|
||||
"key" = "\\";
|
||||
}
|
||||
];
|
||||
"window:reset-zoom" = [
|
||||
{
|
||||
"modifiers" = [ "Mod" ];
|
||||
"key" = "0";
|
||||
}
|
||||
];
|
||||
"app:go-back" = [
|
||||
{
|
||||
"modifiers" = [ "Alt" ];
|
||||
"key" = "ArrowLeft";
|
||||
}
|
||||
];
|
||||
"app:go-forward" = [
|
||||
{
|
||||
"modifiers" = [ "Alt" ];
|
||||
"key" = "ArrowRight";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ ];
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,21 +1,9 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "starship";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings.character = {
|
||||
success_symbol = "[%](bold green) ";
|
||||
error_symbol = "[%](bold red) ";
|
||||
};
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings.character = {
|
||||
success_symbol = "[%](bold green) ";
|
||||
error_symbol = "[%](bold red) ";
|
||||
};
|
||||
};
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,35 +1,24 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "yazi";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
plugins = {
|
||||
# keep-sorted start
|
||||
diff = pkgs.yaziPlugins.diff;
|
||||
git = pkgs.yaziPlugins.git;
|
||||
mediainfo = pkgs.yaziPlugins.mediainfo;
|
||||
mount = pkgs.yaziPlugins.mount;
|
||||
ouch = pkgs.yaziPlugins.ouch;
|
||||
relative-motions = pkgs.yaziPlugins.relative-motions;
|
||||
restore = pkgs.yaziPlugins.restore;
|
||||
rich-preview = pkgs.yaziPlugins.rich-preview;
|
||||
starship = pkgs.yaziPlugins.starship;
|
||||
vcs-files = pkgs.yaziPlugins.vcs-files;
|
||||
yatline-githead = pkgs.yaziPlugins.yatline-githead;
|
||||
# keep-sorted end
|
||||
};
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
plugins = {
|
||||
# keep-sorted start
|
||||
diff = pkgs.yaziPlugins.diff;
|
||||
git = pkgs.yaziPlugins.git;
|
||||
mediainfo = pkgs.yaziPlugins.mediainfo;
|
||||
mount = pkgs.yaziPlugins.mount;
|
||||
ouch = pkgs.yaziPlugins.ouch;
|
||||
relative-motions = pkgs.yaziPlugins.relative-motions;
|
||||
restore = pkgs.yaziPlugins.restore;
|
||||
rich-preview = pkgs.yaziPlugins.rich-preview;
|
||||
starship = pkgs.yaziPlugins.starship;
|
||||
vcs-files = pkgs.yaziPlugins.vcs-files;
|
||||
yatline-githead = pkgs.yaziPlugins.yatline-githead;
|
||||
# keep-sorted end
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ ];
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,97 +1,89 @@
|
|||
{
|
||||
config,
|
||||
# keep-sorted start
|
||||
lib,
|
||||
pkgs,
|
||||
# keep-sorted end
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "zed-editor";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
programs.zed-editor = {
|
||||
enable = true;
|
||||
package = pkgs.zed-editor-fhs;
|
||||
extensions = [
|
||||
# keep-sorted start
|
||||
"catppuccin"
|
||||
"catppuccin-icons"
|
||||
"codebook"
|
||||
"emmet"
|
||||
"git-firefly"
|
||||
"haskell"
|
||||
"html"
|
||||
"nix"
|
||||
# keep-sorted end
|
||||
];
|
||||
extraPackages = with pkgs; [
|
||||
# keep-sorted start
|
||||
haskell-language-server
|
||||
nil
|
||||
nixd
|
||||
package-version-server
|
||||
rust-analyzer
|
||||
# keep-sorted end
|
||||
];
|
||||
installRemoteServer = true;
|
||||
userSettings = {
|
||||
# keep-sorted start block=yes
|
||||
base_keymap = "VSCode";
|
||||
buffer_font_family = "JetBrainsMono Nerd Font";
|
||||
buffer_font_size = 15;
|
||||
disable_ai = true;
|
||||
icon_theme = "Catppuccin Mocha";
|
||||
inlay_hints = {
|
||||
enabled = true;
|
||||
show_value_hints = true;
|
||||
show_type_hints = true;
|
||||
show_parameter_hints = true;
|
||||
show_other_hints = true;
|
||||
show_background = false;
|
||||
edit_debounce_ms = 700;
|
||||
scroll_debounce_ms = 50;
|
||||
toggle_on_modifiers_press = {
|
||||
control = false;
|
||||
alt = false;
|
||||
shift = false;
|
||||
platform = false;
|
||||
function = false;
|
||||
};
|
||||
programs.zed-editor = {
|
||||
enable = true;
|
||||
package = pkgs.zed-editor-fhs;
|
||||
extensions = [
|
||||
# keep-sorted start
|
||||
"catppuccin"
|
||||
"catppuccin-icons"
|
||||
"codebook"
|
||||
"emmet"
|
||||
"git-firefly"
|
||||
"haskell"
|
||||
"html"
|
||||
"nix"
|
||||
# keep-sorted end
|
||||
];
|
||||
extraPackages = with pkgs; [
|
||||
# keep-sorted start
|
||||
haskell-language-server
|
||||
nil
|
||||
nixd
|
||||
package-version-server
|
||||
rust-analyzer
|
||||
# keep-sorted end
|
||||
];
|
||||
installRemoteServer = true;
|
||||
userSettings = {
|
||||
# keep-sorted start block=yes
|
||||
base_keymap = "VSCode";
|
||||
buffer_font_family = "JetBrainsMono Nerd Font";
|
||||
buffer_font_size = 15;
|
||||
disable_ai = true;
|
||||
icon_theme = "Catppuccin Mocha";
|
||||
inlay_hints = {
|
||||
enabled = true;
|
||||
show_value_hints = true;
|
||||
show_type_hints = true;
|
||||
show_parameter_hints = true;
|
||||
show_other_hints = true;
|
||||
show_background = false;
|
||||
edit_debounce_ms = 700;
|
||||
scroll_debounce_ms = 50;
|
||||
toggle_on_modifiers_press = {
|
||||
control = false;
|
||||
alt = false;
|
||||
shift = false;
|
||||
platform = false;
|
||||
function = false;
|
||||
};
|
||||
# https://wiki.nixos.org/wiki/Zed#rust-analyzer
|
||||
lsp.rust-analyzer.binary.path = lib.getExe pkgs.rust-analyzer;
|
||||
minimap = {
|
||||
show = "auto";
|
||||
};
|
||||
preferred_line_length = 80;
|
||||
relative_line_numbers = true;
|
||||
soft_wrap = "preferred_line_length";
|
||||
tab_bar = {
|
||||
show_nav_history_buttons = false;
|
||||
};
|
||||
tab_size = 2;
|
||||
tabs = {
|
||||
file_icons = true;
|
||||
git_status = true;
|
||||
};
|
||||
telemetry = {
|
||||
diagnostics = false;
|
||||
metrics = false;
|
||||
};
|
||||
theme = {
|
||||
mode = "system";
|
||||
light = "One Light";
|
||||
dark = "Catppuccin Mocha";
|
||||
};
|
||||
ui_font_family = "JetBrainsMono Nerd Font";
|
||||
ui_font_size = 16;
|
||||
vim_mode = true;
|
||||
# keep-sorted end
|
||||
};
|
||||
# https://wiki.nixos.org/wiki/Zed#rust-analyzer
|
||||
lsp.rust-analyzer.binary.path = lib.getExe pkgs.rust-analyzer;
|
||||
minimap = {
|
||||
show = "auto";
|
||||
};
|
||||
preferred_line_length = 80;
|
||||
relative_line_numbers = true;
|
||||
soft_wrap = "preferred_line_length";
|
||||
tab_bar = {
|
||||
show_nav_history_buttons = false;
|
||||
};
|
||||
tab_size = 2;
|
||||
tabs = {
|
||||
file_icons = true;
|
||||
git_status = true;
|
||||
};
|
||||
telemetry = {
|
||||
diagnostics = false;
|
||||
metrics = false;
|
||||
};
|
||||
theme = {
|
||||
mode = "system";
|
||||
light = "One Light";
|
||||
dark = "Catppuccin Mocha";
|
||||
};
|
||||
ui_font_family = "JetBrainsMono Nerd Font";
|
||||
ui_font_size = 16;
|
||||
vim_mode = true;
|
||||
# keep-sorted end
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ ];
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,10 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "zellij";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "catppuccin-mocha";
|
||||
show_startup_tips = false;
|
||||
default_shell = "fish";
|
||||
};
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "catppuccin-mocha";
|
||||
show_startup_tips = false;
|
||||
default_shell = "fish";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ ];
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,79 +1,67 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "zen-browser";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
programs.zen-browser =
|
||||
let
|
||||
profileName = "fmnikwnj.Default Profile";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
profiles.${profileName}.settings = {
|
||||
zen.tabs.vertical.right-side = true;
|
||||
};
|
||||
policies =
|
||||
let
|
||||
mkLockedAttrs = builtins.mapAttrs (
|
||||
_: value: {
|
||||
Value = value;
|
||||
Status = "locked";
|
||||
}
|
||||
);
|
||||
mkExtensionSettings = builtins.mapAttrs (
|
||||
_: pluginId: {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${pluginId}/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
# keep-sorted start block=yes
|
||||
AutofillCreditCardEnabled = false;
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Category = "strict";
|
||||
};
|
||||
ExtensionSettings = mkExtensionSettings {
|
||||
"uBlock0@raymondhill.net" = "ublock-origin";
|
||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = "bitwarden-password-manager";
|
||||
"sponsorBlocker@ajay.app" = "sponsor-block";
|
||||
"{762f9885-5a13-4abd-9c77-433dcd38b8fd}" = "return-youtube-dislikes";
|
||||
"deArrow@ajay.app" = "dearrow";
|
||||
};
|
||||
HttpsOnlyMode = "enabled";
|
||||
NoDefaultBookmarks = true;
|
||||
OfferToSaveLogins = false;
|
||||
Preferences = mkLockedAttrs {
|
||||
"intl.accept_languages" = "en-AU,en-GB,en-US,en";
|
||||
"general.autoScroll" = true;
|
||||
# disable google safebrowsing
|
||||
"browser.safebrowsing.malware.enabled" = false;
|
||||
"browser.safebrowsing.phishing.enabled" = false;
|
||||
"browser.warnOnQuit" = false;
|
||||
"browser.tabs.warnOnClose" = false;
|
||||
# continue where you left off
|
||||
"browser.startup.page" = 3;
|
||||
};
|
||||
RequestedLocales = [
|
||||
"en-AU"
|
||||
"en-GB"
|
||||
"en-US"
|
||||
];
|
||||
SearchEngines = {
|
||||
Default = "duckduckgo";
|
||||
DefaultPrivate = "duckduckgo";
|
||||
};
|
||||
SearchSuggestEnabled = true;
|
||||
# keep-sorted end
|
||||
};
|
||||
programs.zen-browser =
|
||||
let
|
||||
profileName = "fmnikwnj.Default Profile";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
profiles.${profileName}.settings = {
|
||||
zen.tabs.vertical.right-side = true;
|
||||
};
|
||||
};
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
policies =
|
||||
let
|
||||
mkLockedAttrs = builtins.mapAttrs (
|
||||
_: value: {
|
||||
Value = value;
|
||||
Status = "locked";
|
||||
}
|
||||
);
|
||||
mkExtensionSettings = builtins.mapAttrs (
|
||||
_: pluginId: {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${pluginId}/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
# keep-sorted start block=yes
|
||||
AutofillCreditCardEnabled = false;
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Category = "strict";
|
||||
};
|
||||
ExtensionSettings = mkExtensionSettings {
|
||||
"uBlock0@raymondhill.net" = "ublock-origin";
|
||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = "bitwarden-password-manager";
|
||||
"sponsorBlocker@ajay.app" = "sponsor-block";
|
||||
"{762f9885-5a13-4abd-9c77-433dcd38b8fd}" = "return-youtube-dislikes";
|
||||
"deArrow@ajay.app" = "dearrow";
|
||||
};
|
||||
HttpsOnlyMode = "enabled";
|
||||
NoDefaultBookmarks = true;
|
||||
OfferToSaveLogins = false;
|
||||
Preferences = mkLockedAttrs {
|
||||
"intl.accept_languages" = "en-AU,en-GB,en-US,en";
|
||||
"general.autoScroll" = true;
|
||||
# disable google safebrowsing
|
||||
"browser.safebrowsing.malware.enabled" = false;
|
||||
"browser.safebrowsing.phishing.enabled" = false;
|
||||
"browser.warnOnQuit" = false;
|
||||
"browser.tabs.warnOnClose" = false;
|
||||
# continue where you left off
|
||||
"browser.startup.page" = 3;
|
||||
};
|
||||
RequestedLocales = [
|
||||
"en-AU"
|
||||
"en-GB"
|
||||
"en-US"
|
||||
];
|
||||
SearchEngines = {
|
||||
Default = "duckduckgo";
|
||||
DefaultPrivate = "duckduckgo";
|
||||
};
|
||||
SearchSuggestEnabled = true;
|
||||
# keep-sorted end
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,9 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "zoxide";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
options = [
|
||||
"--cmd j"
|
||||
];
|
||||
};
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
options = [
|
||||
"--cmd j"
|
||||
];
|
||||
};
|
||||
|
||||
imports = [ ];
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue