user-config/home.nix

379 lines
8 KiB
Nix
Raw Normal View History

2023-07-25 14:38:50 +00:00
{ config, pkgs, lib, ... }:
with builtins;
with import ./modules/neovim-config.nix { inherit pkgs lib fromGitHub; };
2023-07-01 04:21:17 +00:00
{
2023-07-02 03:43:47 +00:00
home.username = "hive";
home.homeDirectory = "/home/hive";
2023-08-02 13:21:35 +00:00
home.stateVersion = import ./version.nix;
2023-07-01 04:21:17 +00:00
home.packages = with pkgs; [
2023-10-15 20:57:57 +00:00
appimage-run
steam-run
logseq
2023-07-01 04:21:17 +00:00
bat
diceware
evolution
2023-08-23 15:40:17 +00:00
prismlauncher
birdfont
ungoogled-chromium
darktable
nheko
mgba
blender
2023-07-23 22:34:50 +00:00
srain
onlyoffice-bin
2023-08-02 13:07:32 +00:00
dconf2nix
inkscape
minetest
2023-08-28 03:22:34 +00:00
vscodium
flare-signal
aria
pwgen
josm
2023-07-24 06:39:26 +00:00
xdg-ninja
godot_4
2023-07-01 04:21:17 +00:00
dino
jq
2023-08-28 02:53:26 +00:00
lapce
2023-07-01 04:21:17 +00:00
mangohud
2023-07-27 09:08:18 +00:00
nix-index
2023-07-23 22:34:50 +00:00
gimp
2023-07-01 04:21:17 +00:00
lollypop
skim
nix-output-monitor
2023-07-23 22:34:50 +00:00
picard
2023-07-01 04:21:17 +00:00
syncthing
armcord
ripgrep
tmate
2023-07-24 05:34:37 +00:00
comic-mono
2023-07-24 08:45:43 +00:00
comfortaa
2023-07-01 04:21:17 +00:00
btop
warp
2023-07-25 14:38:50 +00:00
virt-manager
2023-07-01 04:21:17 +00:00
mpv
wl-clipboard
adw-gtk3
2023-07-27 09:08:18 +00:00
(writeShellScriptBin "strings" ''${busybox}/bin/strings "$@"'')
2023-07-24 05:34:37 +00:00
] ++ ( with pkgs.gnome; [
2023-07-01 04:21:17 +00:00
gnome-tweaks
dconf-editor
gnome-boxes
2023-07-24 05:34:37 +00:00
] ++ ( with pkgs.gnomeExtensions; [
2023-07-01 04:21:17 +00:00
night-theme-switcher
unite
2023-07-01 04:21:17 +00:00
rounded-window-corners
appindicator
2023-07-25 14:38:50 +00:00
gsconnect
pano
unite
user-avatar-in-quick-settings
gamemode
2023-07-24 05:34:37 +00:00
]));
2023-07-01 04:21:17 +00:00
2023-08-02 13:21:35 +00:00
home.file = { # If managing individual files is needed
2023-07-02 03:43:47 +00:00
};
home.sessionVariables = {
# fish config
2023-07-25 14:48:50 +00:00
fish_greeting = " heya ${config.home.username}, welcome to $(hostnamectl --pretty) ~";
EDITOR = "nvim";
NIXPKGS_ALLOW_UNFREE = 1;
# GAMEMODERUNEXEC = "nvidia-offload";
2023-07-02 03:43:47 +00:00
};
2023-08-02 13:30:59 +00:00
# configure dconf
# use dconf watch / to monitor for changes
# use dconf dump /path/to/keys | dconf2nix to generate automatically
dconf.settings = with lib.hm.gvariant; {
2023-08-02 14:14:49 +00:00
"org/gnome/shell" = {
disable-user-extensions = false;
disable-extension-version-validation = true;
2023-08-02 14:14:49 +00:00
enabled-extensions = [
"rounded-window-corners@yilozt"
"gsconnect@andyholmes.github.io"
"unite@hardpixel.eu"
"pano@elhan.io"
"quick-settings-avatar@d-go"
"appindicatorsupport@rgcjonas.gmail.com"
"gamemode@christian.kellner.me"
2023-08-02 14:14:49 +00:00
];
disabled-extensions = [];
2023-08-02 14:14:49 +00:00
favorite-apps = [
"firefox.desktop"
"org.gnome.Nautilus.desktop"
"org.gnome.Software.desktop"
];
};
"org/gnome/shell/extensions/unite" = {
extend-left-box = true;
show-window-buttons = "never";
show-window-title = "always";
};
"org/gnome/shell/extensions/rounded-window-corners" = {
custom-rounded-corner-settings = [(mkDictionaryEntry [
"org.wezfurlong.wezterm" (mkVariant [
(mkDictionaryEntry [
"padding" (mkVariant [
(mkDictionaryEntry [
"left" (mkVariant (mkUint32 13))
])
(mkDictionaryEntry [
"right" (mkVariant (mkUint32 14))
])
(mkDictionaryEntry [
"top" (mkVariant (mkUint32 29))
])
(mkDictionaryEntry [
"bottom" (mkVariant (mkUint32 13))
])
])
])
(mkDictionaryEntry [
"keep_rounded_corners" (mkVariant [
(mkDictionaryEntry [
"maximized" (mkVariant false)
])
(mkDictionaryEntry [
"fullscreen" (mkVariant false)
])
])
])
(mkDictionaryEntry [
"border_radius" (mkVariant (mkUint32 13))
])
(mkDictionaryEntry [
"smoothing" (mkVariant (mkUint32 0))
])
(mkDictionaryEntry [
"enabled" (mkVariant true)
])
])
])];
};
2023-08-02 13:07:32 +00:00
"org/gnome/mutter".center-new-windows = true;
"org/gnome/desktop/sound".allow-volume-above-100-percent = true;
2023-08-02 20:04:27 +00:00
"org/gnome/settings-daemon/plugins/media-keys".custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
2023-08-02 13:07:32 +00:00
];
2023-08-02 20:04:27 +00:00
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
2023-08-02 13:07:32 +00:00
binding = "<Super>t";
command = "wezterm";
name = "Wezterm";
};
};
2023-07-02 03:43:47 +00:00
2023-07-01 04:21:17 +00:00
# configure programs
programs.direnv = {
enable = true;
};
2023-08-23 09:13:02 +00:00
programs.firefox = { # TODO add options later
enable = true;
2023-08-02 12:30:18 +00:00
};
2023-07-01 04:21:17 +00:00
programs.home-manager.enable = true;
programs.zoxide = {
enable = true;
enableFishIntegration = true;
2023-08-02 20:04:27 +00:00
options = [ "--cmd cd" ];
};
2023-07-24 06:57:47 +00:00
programs.git = {
enable = true;
2023-07-24 07:07:00 +00:00
lfs.enable = true;
2023-07-24 06:57:47 +00:00
delta = {
enable = true;
options = {
decorations = {
commit-decoration-style = "bold yellow box ul";
file-decoration-style = "none";
file-style = "bold yellow ul";
hunk-header-decoration-style = "cyan box ul";
};
features = "side-by-side line-numbers decorations";
};
};
2023-07-24 07:07:00 +00:00
signing = {
key = "DD901BA40FBBB127";
signByDefault = true;
};
userEmail = "theotheroracle@disroot.org";
userName = "Bit Borealis";
extraConfig = {
init.defaultBranch = "main";
2023-07-24 06:57:47 +00:00
};
};
2023-07-24 05:34:37 +00:00
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
2023-07-24 08:45:43 +00:00
plugins = with pkgs.vimPlugins; [
editorconfig-nvim
vim-airline
vim-airline-themes
lsp_signature-nvim
nvim-colorizer-lua
nnn-vim
nvim-surround
nvim-treesitter.withAllGrammars
(fromGitHub "HEAD" "hiphish/rainbow-delimiters.nvim")
nvim-lspconfig
];
extraConfig = mkConfig {
settings = {
number = true;
linebreak = true;
showbreak = "+>";
2023-07-27 08:30:37 +00:00
textwidth = 80;
2023-07-24 08:45:43 +00:00
showmatch = true;
hlsearch = true;
smartcase = true;
ignorecase = true;
autoindent = true;
2023-07-27 08:30:37 +00:00
expandtab = false;
2023-07-24 08:45:43 +00:00
smartindent = true;
smarttab = true;
tabstop = 3;
shiftwidth = 3;
display = "lastline";
formatoptions = "jt";
ruler = true;
2023-07-27 08:30:37 +00:00
colorcolumn = 80;
2023-07-24 08:45:43 +00:00
termguicolors = true;
};
};
2023-07-24 05:34:37 +00:00
coc = {
enable = true;
};
};
2023-07-01 04:21:17 +00:00
programs.fish = {
enable = true;
shellAbbrs = {
e = "edit";
2023-08-31 23:03:00 +00:00
nvim = "edit";
2023-07-01 04:21:17 +00:00
nxs = "nix search nixpkgs";
nxr = "nix run nixpkgs#";
nxh = "nix shell nixpkgs#";
2023-07-01 04:21:17 +00:00
nxc = "sudo nix-collect-garbage -d";
};
2023-07-24 05:34:37 +00:00
shellAliases = {
2023-08-28 02:53:26 +00:00
edit = "$EDITOR";
2023-08-21 05:34:34 +00:00
csk = "cd (sk -e)";
nxu = ''sudo sh -c "nixos-rebuild boot --upgrade --log-format internal-json -v |& nom --json"'';
nxw = ''sudo sh -c "nixos-rebuild switch --log-format internal-json -v |& nom --json"'';
2023-07-24 05:34:37 +00:00
aria = "aria2c -c -k1M -x10";
dw = "diceware -n 6 -d -";
pw = "pwgen -By";
2023-07-24 06:35:42 +00:00
p = "ping -s 128 -O -c 100 -A -D 1.1.1.1";
pf = "sudo ping -f -c 100 -A 1.1.1.1";
2023-07-24 05:34:37 +00:00
};
functions = {
2023-08-19 07:16:17 +00:00
hme = ''
2023-08-22 12:24:59 +00:00
set -l hm_before_commit $PWD
cd ~/.config/home-manager/
2023-08-19 07:16:17 +00:00
git pull
2023-08-22 12:24:59 +00:00
cd $hm_before_commit
2023-08-20 19:17:47 +00:00
edit ~/.config/home-manager/home.nix
2023-08-19 07:16:17 +00:00
'';
2023-08-02 13:07:32 +00:00
hmu = ''
set -l hm_before_commit $PWD
cd ~/.config/home-manager/
2023-08-21 10:11:49 +00:00
gacp
cd $hm_before_commit
'';
gacp = ''
2023-08-02 13:07:32 +00:00
git diff
2023-08-31 23:13:03 +00:00
set gacp_read $(read -P 'continue ? [Y/n] ')
2023-08-31 23:03:00 +00:00
set gacp_n n
2023-08-31 23:13:03 +00:00
if [ "$gacp_read" != $gacp_n ]
2023-08-31 23:03:00 +00:00
git add .
git commit
git push
else
echo "cancelled ."
end
2023-08-02 13:07:32 +00:00
'';
2023-08-21 10:11:49 +00:00
ng = ''
set NG ~/.ssh/ng/
if test \( -e $NG/0 \) -a \( -e $NG/1 \)
echo (shuf -n 1 $NG/0) (shuf -n 1 $NG/1)
else
echo missing NG files
end
2023-07-24 05:34:37 +00:00
'';
fish_prompt = ''
set -l last_status $status
prompt_login
echo -n ' : '
set_color $fish_color_cwd
echo -n (prompt_pwd)
set_color normal
fish_vcs_prompt '|%s'
echo " "
if not test $last_status -eq 0
set_color $fish_color_error
end
echo -n "» "
2023-07-24 05:34:37 +00:00
set_color normal
'';
};
2023-07-01 04:21:17 +00:00
interactiveShellInit = ''
fish_add_path ~/.local/bin
fish_add_path ~/.local/bin/scripts
fish_add_path ~/.local/share/cargo/bin
2023-08-29 00:50:30 +00:00
fish_add_path ~/.local/share/flatpak/exports/bin
2023-07-01 04:21:17 +00:00
fish_add_path /var/lib/flatpak/exports/bin
fish_vi_key_bindings
'';
};
programs.password-store = {
enable = true;
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]);
settings = {
PASSWORD_STORE_DIR = "${config.xdg.dataHome}/pass";
PASSWORD_STORE_CLIP_TIME = "60";
};
};
programs.wezterm = {
enable = true;
2023-08-02 13:30:59 +00:00
extraConfig = ''
return {
2023-08-02 14:45:52 +00:00
font = wezterm.font("Comic Mono"),
font_size = 12.0,
2023-08-02 19:18:16 +00:00
color_scheme = "Catppuccin Mocha",
2023-08-02 14:45:52 +00:00
hide_mouse_cursor_when_typing = false,
window_decorations = "INTEGRATED_BUTTONS | RESIZE",
integrated_title_button_style = "Gnome",
integrated_title_buttons = { 'Close' },
initial_cols = 84,
initial_rows = 28,
2023-08-02 19:18:16 +00:00
window_frame = {
inactive_titlebar_bg = '#1e1e2e',
active_titlebar_bg = '#1e1e2e',
font = wezterm.font {
family = "Comic Mono",
weight = "Regular",
},
},
2023-08-02 13:30:59 +00:00
}
'';
};
2023-07-01 04:21:17 +00:00
programs.browserpass.enable = true;
programs.gpg.enable = true;
2023-07-24 05:34:37 +00:00
2023-07-24 06:39:26 +00:00
2023-07-24 05:34:37 +00:00
# themeing
qt = {
enable = true;
platformTheme = "gnome";
style.name = "adwaita";
};
2023-07-01 04:21:17 +00:00
}