initial commit
This commit is contained in:
321
home.nix
Normal file
321
home.nix
Normal file
@@ -0,0 +1,321 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
./device-conf.nix
|
||||
private/private.nix
|
||||
];
|
||||
|
||||
home.username = "vi";
|
||||
home.homeDirectory = "/home/vi";
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
|
||||
home.packages = with pkgs; [
|
||||
sshfs
|
||||
hledger
|
||||
extremetuxracer
|
||||
superTux
|
||||
superTuxKart
|
||||
pinentry
|
||||
evolution
|
||||
w3m
|
||||
nmap
|
||||
nb
|
||||
asciidoctor-with-extensions
|
||||
simple-scan
|
||||
paperwork
|
||||
xsane
|
||||
dnsutils
|
||||
# inetutils
|
||||
shotwell
|
||||
lua54Packages.lua
|
||||
lua54Packages.fennel
|
||||
entr
|
||||
zathura
|
||||
swayimg
|
||||
texliveSmall
|
||||
vlc
|
||||
quodlibet
|
||||
ffmpeg
|
||||
mosh
|
||||
openscad
|
||||
openscad-lsp
|
||||
pandoc
|
||||
lynx
|
||||
neofetch
|
||||
telegram-desktop
|
||||
git-annex
|
||||
python3
|
||||
eza
|
||||
bat
|
||||
fzf
|
||||
ripgrep
|
||||
wl-clipboard
|
||||
foot
|
||||
git
|
||||
waybar
|
||||
wofi
|
||||
signal-desktop
|
||||
element-desktop
|
||||
# thunderbird
|
||||
keepassxc
|
||||
glib
|
||||
gsettings-desktop-schemas
|
||||
themechanger
|
||||
gnome.seahorse
|
||||
pavucontrol
|
||||
dunst
|
||||
libreoffice
|
||||
borgbackup
|
||||
gnupg
|
||||
];
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
env.TERM = "xterm";
|
||||
window.opacity = 0.9;
|
||||
font.normal = {
|
||||
family = "Hack Nerd Font Mono";
|
||||
style = "Regular";
|
||||
};
|
||||
colors.primary = {
|
||||
foreground = "#fc28c3";
|
||||
background = "#230038";
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
format = "$username$hostname $directory$all";
|
||||
directory.style = "bold bright-blue";
|
||||
username.show_always = true;
|
||||
username.format = "[$user]($style)";
|
||||
username.style_user = "bold bright-purple";
|
||||
hostname.ssh_only = false;
|
||||
hostname.format = "[@$hostname$ssh_symbol]($style)";
|
||||
hostname.style = "bold bright-purple";
|
||||
character = {
|
||||
success_symbol = "[>>](bold light-green)";
|
||||
error_symbol = "[>>](bold red)";
|
||||
};
|
||||
line_break.disabled = true;
|
||||
cmd_duration.disabled = true;
|
||||
};
|
||||
};
|
||||
home.file = {
|
||||
".config/sway/xenia.png".source = ./xenia.png;
|
||||
"waybar" = {
|
||||
source = ./waybar;
|
||||
target = ".config/waybar";
|
||||
recursive = true;
|
||||
onChange = "/run/current-system/sw/bin/swaymsg reload";
|
||||
};
|
||||
".config/gtk-3.0/settings.ini".text = ''
|
||||
[Settings]
|
||||
gtk-application-prefer-dark-theme=1
|
||||
'';
|
||||
".config/wofi/config".text = ''
|
||||
show=drun
|
||||
drun-print_command=true
|
||||
'';
|
||||
".borg" = {
|
||||
source = ./borg;
|
||||
recursive = true;
|
||||
};
|
||||
"scripts" = {
|
||||
source = ./scripts;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
LEDGER_FILE = "$HOME/hledger/hledger.journal";
|
||||
};
|
||||
|
||||
wayland.windowManager.sway.enable = true;
|
||||
wayland.windowManager.sway.package = pkgs.swayfx;
|
||||
wayland.windowManager.sway.config = {
|
||||
bars = [{
|
||||
command = "waybar";
|
||||
position = "top";
|
||||
}];
|
||||
colors.focused = {
|
||||
border = "#ef5ffc";
|
||||
background = "#ef5ffc";
|
||||
text = "#333333";
|
||||
indicator = "#2e9ef4";
|
||||
childBorder = "#ef5ffc";
|
||||
};
|
||||
defaultWorkspace = "1";
|
||||
floating = {
|
||||
criteria = [
|
||||
{
|
||||
app_id = "org.keepassxc.KeePassXC";
|
||||
}
|
||||
];
|
||||
};
|
||||
gaps = {
|
||||
inner = 8;
|
||||
smartBorders = "on";
|
||||
smartGaps = true;
|
||||
};
|
||||
input = {
|
||||
"type:keyboard" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
xkb_options = "caps:escape,compose:102,shift:both_capslock,eurosign:e";
|
||||
};
|
||||
};
|
||||
keybindings =
|
||||
let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
menu = config.wayland.windowManager.sway.config.menu;
|
||||
in lib.mkOptionDefault {
|
||||
"${modifier}+space" = "exec ${menu}";
|
||||
"${modifier}+Control+Space" = "focus mode_toggle";
|
||||
"XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
||||
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
"XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
"XF86Launch1" = "exec ~/scripts/sunset.sh";
|
||||
"${modifier}+Control+p" = "exec swaylock -f -c ef5ffc";
|
||||
};
|
||||
menu = "wofi -G | xargs swaymsg exec --";
|
||||
modifier = "Mod4";
|
||||
output = {
|
||||
"*" = {
|
||||
bg = "~/.config/sway/xenia.png fill";
|
||||
};
|
||||
};
|
||||
window.titlebar = false;
|
||||
terminal = "alacritty";
|
||||
window.border = 2;
|
||||
};
|
||||
wayland.windowManager.sway.extraConfig = ''
|
||||
blur enable
|
||||
blur_xray disable
|
||||
corner_radius 4
|
||||
shadows enable
|
||||
default_dim_inactive 0.1
|
||||
dim_inactive_colors.unfocused #fc28c3
|
||||
include ~/.config/sway/device-conf
|
||||
'';
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
programs.fish.enable = true;
|
||||
home.shellAliases = {
|
||||
ls = "exa --git";
|
||||
ll = "exa --git -l";
|
||||
la = "exa --git -al";
|
||||
tt = "exa --git -Tl";
|
||||
g = "git";
|
||||
cat = "bat";
|
||||
backup = "$HOME/.borg/backup.sh";
|
||||
grep = "rg";
|
||||
fox = "cat";
|
||||
};
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
extraConfig = ''
|
||||
set number
|
||||
|
||||
set listchars=tab:>-,trail:~,extends:>,precedes:<
|
||||
set list
|
||||
|
||||
set expandtab
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
|
||||
set autoindent
|
||||
|
||||
set colorcolumn=80
|
||||
|
||||
set cursorline
|
||||
set mouse=a
|
||||
|
||||
set clipboard=unnamedplus
|
||||
|
||||
set nocompatible
|
||||
filetype plugin on
|
||||
syntax on
|
||||
|
||||
call plug#begin('~/.vim/plugged')
|
||||
Plug 'mattn/calendar-vim'
|
||||
call plug#end()
|
||||
|
||||
nnoremap <C-n> :Neotree<CR>
|
||||
|
||||
nnoremap <tab> <C-w>
|
||||
|
||||
nnoremap <C-h> :tabprevious<CR>
|
||||
nnoremap <C-l> :tabnext<CR>
|
||||
nnoremap <C-CR> :tabnew<CR>
|
||||
let g:airline_theme='violet'
|
||||
set modeline
|
||||
autocmd FileType markdown set textwidth=80
|
||||
autocmd FileType asciidoc set textwidth=80
|
||||
set scrolloff=5
|
||||
|
||||
let g:org_agenda_files = ['~/org/*.org']
|
||||
|
||||
tnoremap <Esc> <C-\><C-n>
|
||||
'';
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-speeddating
|
||||
indentLine
|
||||
nightfox-nvim
|
||||
vim-airline
|
||||
vim-airline-themes
|
||||
neo-tree-nvim
|
||||
syntastic
|
||||
ale
|
||||
surround-nvim
|
||||
fennel-vim
|
||||
vim-orgmode
|
||||
];
|
||||
extraLuaConfig = ''
|
||||
require("nightfox").setup({
|
||||
palettes = {
|
||||
duskfox = {
|
||||
bg1 = "#230038",
|
||||
fg1 = "#fc28c3",
|
||||
}
|
||||
}
|
||||
})
|
||||
vim.cmd("colorscheme duskfox")
|
||||
'';
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
};
|
||||
|
||||
services.gpg-agent.enable = true;
|
||||
services.syncthing.enable = true;
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "/run/current-system/sw/bin/swaylock -f -c ef5ffc";
|
||||
}
|
||||
];
|
||||
timeouts = [
|
||||
{
|
||||
command = "/run/current-system/sw/bin/swaylock -f -c ef5ffc";
|
||||
timeout = 300;
|
||||
}
|
||||
{
|
||||
command = "swaymsg \"output * dpms off\"";
|
||||
resumeCommand = "swaymsg \"output * dpms on\"";
|
||||
timeout = 600;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user