tree-wide change. seperated config from 'real' modles.

This commit is contained in:
Gabe Venberg 2024-05-31 12:01:32 -05:00
parent 3eee4e105d
commit a0c1ad0beb
59 changed files with 377 additions and 424 deletions

View file

@ -0,0 +1,38 @@
{
config,
pkgs,
lib,
...
}: {
programs.beets = {
enable = true;
settings = {
directory = "~/Music";
library = "~/Music/library.db";
import = {
move = true;
write = true;
};
plugins = [
"edit"
"fetchart"
"chroma"
"thumbnails"
"replaygain"
"mbsync"
"fuzzy"
"duplicates"
"badfiles"
"fromfilename"
];
replaygain = {
auto = false;
backend = "ffmpeg";
};
asciify_paths = true;
};
};
home.packages = with pkgs; [
ffmpeg
];
}

View file

@ -0,0 +1,13 @@
{
config,
pkgs,
lib,
...
}: {
programs.btop = {
enable = true;
settings = {
vim_keys = true;
};
};
}

View file

@ -0,0 +1,31 @@
{
config,
pkgs,
lib,
...
}: {
home.stateVersion = "23.11"; # Please read the comment before changing.
# Let Home Manager install and manage itself on non-nixos systems.
programs.home-manager.enable = config.targets.genericLinux.enable;
# enable flakes on non-nixos systems
nix =
lib.mkIf config.targets.genericLinux.enable
{
package = pkgs.nix;
settings = {
experimental-features = ["nix-command" "flakes"];
max-jobs = "auto";
};
gc = {
automatic = true;
frequency = "weekly";
options = "--delete-older-than 30d";
};
};
imports = [
../../modules/hostopts.nix
../../modules/home-manager
];
}

View file

@ -0,0 +1,11 @@
{
config,
pgks,
lib,
...
}: {
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
}

View file

@ -0,0 +1,54 @@
{
config,
pkgs,
lib,
...
}: {
services = {
dunst.enable = true;
dunst.settings = {
global = {
font = "Fira Code";
follow = "keyboard";
origin = "top-right";
transparency = 20;
padding = 6;
horizontal_padding = 6;
};
urgency_low = {
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
frame_color = "#3B7C87";
foreground = "#3B7C87";
highlight = "#3B7C87";
background = "#191311";
#background = "#2B313C"
timeout = 4;
# Icon for notifications with low urgency, uncomment to enable
#default_icon = /path/to/icon
};
urgency_normal = {
frame_color = "#5B8234";
foreground = "#5B8234";
highlight = "#5B8234";
background = "#191311";
#background = "#2B313C"
timeout = 6;
# Icon for notifications with normal urgency, uncomment to enable
#default_icon = /path/to/icon
};
urgency_critical = {
frame_color = "#B7472A";
foreground = "#B7472A";
highlight = "#B7472A";
background = "#191311";
#background = "#2B313C"
timeout = 8;
# Icon for notifications with critical urgency, uncomment to enable
#default_icon = /path/to/icon
};
};
};
}

View file

@ -0,0 +1,37 @@
{
config,
pkgs,
lib,
...
}: {
home.packages = with pkgs; [
w3m
];
programs.aerc = {
enable = true;
extraConfig = {
general.unsafe-accounts-conf = true;
viwer = {
pager = "less";
};
filters = {
"text/plain" = "colorize";
"text/html" = "html | colorize";
};
};
};
programs.himalaya.enable = true;
accounts.email.accounts.gmail = {
address = "gabevenberg@gmail.com";
primary = true;
flavor = "gmail.com";
passwordCommand = "cat ~/keys/plaintext/gmail";
realName = "Gabe Venberg";
himalaya.enable = true;
aerc.enable = true;
};
}

View file

@ -0,0 +1,16 @@
{
config,
pkgs,
lib,
...
}: {
programs.feh.enable = true;
programs.nushell.extraConfig = ''
# display a slideshow of all pics in a directory, recursively
def slideshow [delay: int = 10] {
feh --full-screen --randomize --auto-zoom --recursive --slideshow-delay $delay
}
'';
programs.zsh.shellAliases. slideshow = "feh --full-screen --randomize --auto-zoom --recursive --slideshow-delay";
}

View file

@ -0,0 +1,14 @@
{
config,
pkgs,
lib,
...
}: {
programs.gpg.enable = true;
services.gpg-agent = {
enable = true;
enableSshSupport = true;
pinentryPackage = lib.mkDefault pkgs.pinentry-tty;
};
}

View file

@ -0,0 +1,41 @@
{
config,
pkgs,
lib,
...
}: {
options.user.irssi.enable = lib.mkEnableOption "enable irssi";
config = lib.mkIf config.user.irssi.enable {
programs.irssi = {
enable = true;
networks = {
liberachat = {
nick = "toric";
server = {
address = "irc.libera.chat";
port = 6697;
autoConnect = true;
ssl = {
enable = true;
certificateFile = "${config.home.homeDirectory}/keys/certs/irc.pem";
verify = true;
};
};
channels = {
libera.autoJoin = true;
linux.autoJoin = true;
programming.autoJoin = true;
rust.autoJoin = true;
nixos.autoJoin = true;
git.autoJoin = true;
neovim.autoJoin = true;
kernel.autoJoin = true;
hardware.autoJoin = true;
lobsters.autoJoin = true;
gamingonlinux.autoJoin = true;
};
};
};
};
};
}

View file

@ -0,0 +1,18 @@
{
config,
pkgs,
lib,
...
}: {
programs.kitty = {
enable = true;
font = {
package = pkgs.fira-code-nerdfont;
name = "FiraCode Nerd Font";
};
theme = "Gruvbox Dark";
settings = {
background_opacity = "0.8";
};
};
}

View file

@ -0,0 +1,65 @@
{
config,
pkgs,
lib,
...
}: {
services.mpd = {
enable = true;
musicDirectory = "${config.home.homeDirectory}/Music";
network.startWhenNeeded = true;
playlistDirectory = "${config.services.mpd.musicDirectory}/.mpd/playlists";
extraConfig = ''
restore_paused "yes"
auto_update "yes"
replaygain "auto"
follow_outside_symlinks "yes"
#for ncmpcpp visualizer
audio_output {
type "fifo"
name "Visualizer feed"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
audio_output {
type "pipewire"
name "PipeWire Sound Server"
}
'';
};
services.mpd-mpris.enable = true;
programs.ncmpcpp = {
enable = true;
package = pkgs.ncmpcpp.override {visualizerSupport = true;};
settings = {
visualizer_data_source = "/tmp/mpd.fifo";
visualizer_output_name = "Visualizer feed";
visualizer_in_stereo = "yes";
visualizer_type = "spectrum";
visualizer_fps = 60;
visualizer_autoscale = "no";
visualizer_look = "";
visualizer_color = "blue, cyan, green, yellow, magenta, red";
##
## Note: The next few visualization options apply to the spectrum visualizer.
##
visualizer_spectrum_smooth_look = "yes";
## A value between 1 and 5 inclusive. Specifying a larger value makes the
## visualizer look at a larger slice of time, which results in less jumpy
## visualizer output.
visualizer_spectrum_dft_size = 2;
visualizer_spectrum_gain = 10;
visualizer_spectrum_hz_min = 20;
visualizer_spectrum_hz_max = 20000;
};
};
home.packages = with pkgs; [
mpc-cli
];
}

View file

@ -0,0 +1,9 @@
{
config,
pkgs,
lib,
...
}: {
services.nextcloud-client.enable = true;
services.gnome-keyring.enable = true;
}

View file

@ -0,0 +1,44 @@
def "nu-complete just recipes" [] {
^just --unsorted --dump --dump-format json
| from json
| get recipes
| transpose k v
| each {|x|
{
value: $x.k,
description: ( $x.v.parameters
| each {|y|
if ($y.default|is-empty) {
$y.name
} else {
$'($y.name)="($y.default)"'
}
}
| str join ' '
)
}
}
}
def "nu-complete just args" [context: string, offset: int] {
let r = ($context | split row ' ')
^just -u --dump --dump-format json
| from json
| get recipes
| get ($r.1)
| get body
| each {|x| {description: ($x | get 0) }}
| prepend ''
}
export def just [
recipes?: string@"nu-complete just recipes"
...args: any@"nu-complete just args"
] {
if ($recipes | is-empty) {
^just
} else {
^just $recipes ...$args
}
}

View file

@ -0,0 +1,65 @@
def "nu-complete make" [] {
ls
| find --ignore-case makefile
| open $in.0.name
| lines
| find ':'
| where ($it | str starts-with '.') == false
| split column ' '
| get column1
| find ':'
| str replace ':' ''
}
def "nu-complete make jobs" [] {
seq 1 (sys | get cpu | length)
}
def "nu-complete make files" [] {
ls **/* | where type == file | get name
}
def "nu-complete make dirs" [] {
ls **/* | where type == dir | get name
}
export extern "make" [
command?: string@"nu-complete make"
--always-make(-B) # Unconditionally make all targets.
--directory(-C): string@"nu-complete make dirs" # Change to DIRECTORY before doing anything.
--debug(-d) # Print various types of debugging information.
--environment-overrides(-e) # Environment variables override makefiles.
--eval(-E): string # Evaluate STRING as a makefile statement.
--file(-f) # Read FILE as a makefile.
--help(-h) # Print this message and exit.
--ignore-errors(-i) # Ignore errors from recipes.
--include-dir(-I): string@"nu-complete make dirs" # Search DIRECTORY for included makefiles.
--jobs(-j): int@"nu-complete make jobs" # Allow N jobs at once; infinite jobs with no arg.
--keep-going(-k) # Keep going when some targets can't be made.
--load-average(-l): int@"nu-complete make jobs" # Don't start multiple jobs unless load is below N.
--check-symlink-times(-L) # Use the latest mtime between symlinks and target.
--just-print(-n) # Don't actually run any recipe; just print them.
--dry-run
--recon
--assume-old: string@"nu-complete make files" # Consider FILE to be very old and don't remake it.
--old-file(-o): string@"nu-complete make files"
--output-sync(-O) # Synchronize output of parallel jobs by TYPE.
--print-data-base(-p) # Print make's internal database.
--question(-q) # Run no recipe; exit status says if up to date.
--no-builtin-rules(-r) # Disable the built-in implicit rules.
--no-builtin-variables(-R) # Disable the built-in variable settings.
--silent(-s) # Don't echo recipes.
--quiet
--no-silent # Echo recipes (disable --silent mode).
--stop(-S) # Turns off -k.
--no-keep-going
--touch(-t) # Touch targets instead of remaking them.
--trace # Print tracing information.
--version(-v) # Print the version number of make and exit.
--print-directory(-w) # Print the current directory.
--no-print-directory # Turn off -w, even if it was turned on implicitly.
--what-if(-W): string@"nu-complete make files" # Consider FILE to be infinitely new.
--new-file: string@"nu-complete make files"
--assume-new: string@"nu-complete make files"
--warn-undefined-variables # Warn when an undefined variable is referenced.
]

View file

@ -0,0 +1,2 @@
export use just-completions.nu *
export use make-completions.nu *

View file

@ -0,0 +1,65 @@
# Nushell Config File
#
# version = "0.91.0"
$env.config = {
history: {
file_format: "sqlite" # "sqlite" or "plaintext"
}
completions: {
algorithm: "fuzzy" # prefix or fuzzy
}
filesize: {
metric: true # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard)
format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, auto
}
cursor_shape: {
emacs: line # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (line is the default)
vi_insert: line # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (block is the default)
vi_normal: blink_block # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (underscore is the default)
}
edit_mode: vi # emacs, vi
shell_integration: true # enables terminal shell integration. Off by default, as some terminals have issues with this.
render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
# enables keyboard enhancement protocol implemented by kitty console, only if your terminal support this.
# Zellij does not modify the term var, so we have to special-case it.
use_kitty_protocol: ($env.TERM == 'xterm-kitty' and $env.ZELLIJ? == null)
highlight_resolved_externals: true # true enables highlighting of external commands in the repl resolved by which.
}
alias please = sudo (history | last | get command)
alias la = ls -a
alias ll = ls -l
alias lla = ls -la
alias pyactivate = overlay use ./.venv/bin/activate.nu
alias tmux = tmux -u
# converts all .doc and .docx files in the local directory to pdfs using libreoffice
alias doc2pdf = loffice --convert-to pdf --headless *.docx
#common options for sshfs
alias sshmnt = sshfs -o idmap=user,compression=no,reconnect,follow_symlinks,dir_cache=yes,ServerAliveInterval=15
#look up something on cheat.sh
def cheat [query: string] {
curl $"cheat.sh/($query)"
}
#look up the weather
def wttr [
location?: string
--format (-f): string
] {
http get $"https://wttr.in/($location)?format=($format)"
}
# parses git log into a nushell table.
def --wrapped git-log [...rest] {
git log --pretty=%h»¦«%H»¦«%s»¦«%aN»¦«%aE»¦«%aD ...$rest | lines | split column "»¦«" commit full-commit subject name email date | upsert date {|d| $d.date | into datetime}
}
# lists all the authors and how many commits they made in a histogram
def git-authors [] {
git-log --all | select name date | histogram name
}
use completions *

View file

@ -0,0 +1,40 @@
{
config,
lib,
pkgs,
...
}: {
home.file = {
".config/nushell/completions".source = ./completions;
};
programs = {
#sessionVariables, sessionPath and shellAliases are not applied to nushell.
nushell = {
enable = true;
configFile.source = ./config.nu;
envFile.source = ./env.nu;
};
yazi.enableNushellIntegration = true;
zoxide.enableNushellIntegration = true;
starship.enableNushellIntegration = true;
eza.enableNushellIntegration = true;
carapace = {
enable = true;
enableNushellIntegration = true;
};
direnv.enableNushellIntegration = true;
};
services = {
gpg-agent.enableNushellIntegration = true;
pueue = {
enable = true;
settings = {
daemon = {
default_parallel_tasks = 5;
};
};
};
};
}

View file

@ -0,0 +1,27 @@
# Nushell Environment Config File
#
# version = "0.91.0"
# The prompt indicators are environmental variables that represent
# the state of the prompt
$env.PROMPT_INDICATOR = {|| "> " }
$env.PROMPT_INDICATOR_VI_INSERT = {|| "> " }
$env.PROMPT_INDICATOR_VI_NORMAL = {|| ": " }
$env.PROMPT_MULTILINE_INDICATOR = {|| "::: " }
# home managers path, shell aliases, and env vars are not applied to nushell.
use std "path add"
# $env.PATH = ($env.PATH | split row (char esep))
path add ($env.HOME | path join ".cargo" "bin")
path add ($env.HOME | path join ".local" "bin")
path add ($env.HOME | path join ".nix-profile" "bin")
path add ('/opt')
$env.PATH = ($env.PATH | uniq)
$env.PIPENV_VENV_IN_PROJECT = 1
$env.POETRY_VIRTUALENVS_IN_PROJECT = 1
$env.XDG_DATA_HOME = ( $env.HOME | path join ".local" "share" )
$env.NU_LIB_DIRS = [
...
$nu.default-config-dir
]

View file

@ -0,0 +1,27 @@
# Function to extract archives with different extensions.
export def extract [name:string] {
let handlers = [
[extension command];
['tar\.bz2|tbz|tbz2' 'tar xvjf']
['tar\.gz|tgz' 'tar xvzf']
['tar\.xz|txz' 'tar xvf']
['tar\.Z' 'tar xvZf']
['bz2' 'bunzip2']
['deb' 'ar x']
['gz' 'gunzip']
['pkg' 'pkgutil --expand']
['rar' 'unrar x']
['tar' 'tar xvf']
['xz' 'xz --decompress']
['zip|war|jar|nupkg' 'unzip']
['Z' 'uncompress']
['7z' '7za x']
]
let maybe_handler = ($handlers | where $name =~ $'\.(($it.extension))$')
if ($maybe_handler | is-empty) {
error make { msg: "unsupported file extension" }
} else {
let handler = ($maybe_handler | first)
nu -c ($handler.command + ' ' + $"'($name)'")
}
}

View file

@ -0,0 +1,17 @@
{
config,
pkgs,
lib,
...
}: {
programs.password-store = {
enable = true;
settings = {
PASSWORD_STORE_DIR = "$HOME/keys/password-store";
};
};
programs.nushell.extraEnv = ''
$env.PASSWORD_STORE_DIR = ($env.HOME | path join "keys" "password-store")
'';
}

View file

@ -0,0 +1,18 @@
{
config,
pkgs,
lib,
...
}: {
services.picom = {
enable = true;
# backend = "glx";
};
xsession.windowManager.i3.config.startup = [
{
command = "systemctl --user restart picom";
always = true;
notification = false;
}
];
}

View file

@ -0,0 +1,13 @@
{
config,
pkgs,
lib,
...
}: {
programs.rofi = {
enable = true;
location = "top";
terminal = "kitty";
theme = "gruvbox-dark-soft";
};
}

View file

@ -0,0 +1,11 @@
{
config,
pkgs,
lib,
...
}: {
services.ssh-agent.enable = true;
programs.nushell.extraEnv = ''
$env.SSH_AUTH_SOCK = $"($env.XDG_RUNTIME_DIR)/ssh-agent"
'';
}

View file

@ -0,0 +1,109 @@
{
config,
pkgs,
lib,
...
}: {
programs.starship = {
enable = true;
settings = {
format = lib.concatStrings [
"[](color_orange)"
"$shell"
"$username"
"[@](bg:color_orange)"
"$hostname"
"[ ](bg:color_orange)"
"[](bg:color_yellow fg:color_orange)"
"$directory"
"[](fg:color_yellow bg:color_aqua)"
"$git_branch"
"$git_status"
"[](fg:color_aqua bg:color_blue)"
"$git_metrics"
"[](fg:color_blue bg:color_bg3)"
"$git_commit"
"[](fg:color_bg3 bg:color_bg1)"
"$time"
"[ ](fg:color_bg1)"
"$line_break"
"$character"
];
add_newline = false;
palette = "gruvbox_dark";
palettes.gruvbox_dark = {
color_fg0 = "#fbf1c7";
color_bg1 = "#3c3836";
color_bg3 = "#665c54";
color_blue = "#458588";
color_aqua = "#689d6a";
color_green = "#98971a";
color_orange = "#d65d0e";
color_purple = "#b16286";
color_red = "#cc241d";
color_yellow = "#d79921";
};
hostname = {
ssh_only = false;
ssh_symbol = "🌐";
format = "[$hostname $ssh_symbol]($style)";
style = "bg:color_orange";
};
shell = {
disabled = false;
bash_indicator = "$";
fish_indicator = "<><";
zsh_indicator = "%";
nu_indicator = ">";
format = "[$indicator ]($style)";
style = "bg:color_orange";
};
fill = {
symbol = " ";
style = "bg:color_bg3";
};
username = {
show_always = true;
style_user = "bg:color_orange fg:color_fg0";
style_root = "bg:color_orange fg:color_fg0";
format = "[$user]($style)";
};
directory = {
style = "fg:color_fg0 bg:color_yellow";
format = "[ $path ]($style)";
fish_style_pwd_dir_length = 3;
truncation_length = 4;
truncation_symbol = "/";
};
git_branch = {
symbol = "";
style = "bg:color_aqua";
format = "[[ $symbol $branch ](fg:color_fg0 bg:color_aqua)]($style)";
};
git_status = {
style = "bg:color_aqua";
format = "[[($all_status$ahead_behind )](fg:color_fg0 bg:color_aqua)]($style)";
};
git_metrics = {
disabled = false;
added_style = "bg:color_blue fg:bold green";
deleted_style = "bg:color_blue fg:bold red";
format = "([ +$added ]($added_style))([-$deleted ]($deleted_style))";
};
git_commit = {
only_detached = false;
tag_disabled = false;
format = "[($hash$tag)]($style)";
style = "bg:color_bg3";
};
time = {
disabled = false;
time_format = "%R";
style = "bg:color_bg1";
format = "[[ $time ](fg:color_fg0 bg:color_bg1)]($style)";
};
line_break.disabled = false;
character.disabled = false;
};
};
}

View file

@ -0,0 +1,8 @@
{
config,
pkgs,
lib,
...
}: {
services.syncthing.enable = true;
}

View file

@ -0,0 +1,47 @@
{
config,
pkgs,
lib,
...
}: {
programs.tiny = {
enable = true;
settings = {
servers = [
{
addr = "irc.libera.chat";
port = 6697;
tls = true;
realname = "Gabe Venberg";
nicks = ["toric"];
join = [
"#libera"
"#linux"
"#archlinux"
"#nixos"
"#neovim"
"##programming"
"##rust"
"#git"
"#kernel"
"#hardware"
"#lobsters"
"#gamingonlinux"
"##chat"
];
sasl = {
username = "toric";
pem = "${config.home.homeDirectory}/keys/certs/irc.pem";
};
}
];
defaults = {
# ignore join/leave messages
ignore = true;
nicks = ["toric"];
realname = "Gabe Venberg";
tls = true;
};
};
};
}

View file

@ -0,0 +1,362 @@
// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true"
keybinds clear-defaults=true{
normal {
// uncomment this and adjust key if using copy_on_select=false
// bind "Alt c" { Copy; }
}
locked {
bind "Alt g" { SwitchToMode "Normal"; }
}
resize {
bind "Alt r" { SwitchToMode "Normal"; }
bind "h" "Left" { Resize "Increase Left"; }
bind "j" "Down" { Resize "Increase Down"; }
bind "k" "Up" { Resize "Increase Up"; }
bind "l" "Right" { Resize "Increase Right"; }
bind "H" { Resize "Decrease Left"; }
bind "J" { Resize "Decrease Down"; }
bind "K" { Resize "Decrease Up"; }
bind "L" { Resize "Decrease Right"; }
bind "=" "+" { Resize "Increase"; }
bind "-" { Resize "Decrease"; }
}
pane {
bind "Alt p" { SwitchToMode "Normal"; }
bind "h" "Left" { MoveFocus "Left"; }
bind "l" "Right" { MoveFocus "Right"; }
bind "j" "Down" { MoveFocus "Down"; }
bind "k" "Up" { MoveFocus "Up"; }
bind "p" { SwitchFocus; }
bind "n" { NewPane; SwitchToMode "Normal"; }
bind "d" { NewPane "Down"; SwitchToMode "Normal"; }
bind "r" { NewPane "Right"; SwitchToMode "Normal"; }
bind "x" { CloseFocus; SwitchToMode "Normal"; }
bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
bind "z" { TogglePaneFrames; SwitchToMode "Normal"; }
bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; }
bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; }
bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;}
}
move {
bind "Alt m" { SwitchToMode "Normal"; }
bind "n" "Tab" { MovePane; }
bind "p" { MovePaneBackwards; }
bind "h" "Left" { MovePane "Left"; }
bind "j" "Down" { MovePane "Down"; }
bind "k" "Up" { MovePane "Up"; }
bind "l" "Right" { MovePane "Right"; }
}
tab {
bind "Alt t" { SwitchToMode "Normal"; }
bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
bind "h" "Left" "Up" "k" { GoToPreviousTab; }
bind "l" "Right" "Down" "j" { GoToNextTab; }
bind "n" { NewTab; SwitchToMode "Normal"; }
bind "x" { CloseTab; SwitchToMode "Normal"; }
bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; }
bind "b" { BreakPane; SwitchToMode "Normal"; }
bind "]" { BreakPaneRight; SwitchToMode "Normal"; }
bind "[" { BreakPaneLeft; SwitchToMode "Normal"; }
bind "1" { GoToTab 1; SwitchToMode "Normal"; }
bind "2" { GoToTab 2; SwitchToMode "Normal"; }
bind "3" { GoToTab 3; SwitchToMode "Normal"; }
bind "4" { GoToTab 4; SwitchToMode "Normal"; }
bind "5" { GoToTab 5; SwitchToMode "Normal"; }
bind "6" { GoToTab 6; SwitchToMode "Normal"; }
bind "7" { GoToTab 7; SwitchToMode "Normal"; }
bind "8" { GoToTab 8; SwitchToMode "Normal"; }
bind "9" { GoToTab 9; SwitchToMode "Normal"; }
bind "Tab" { ToggleTab; }
}
scroll {
bind "Alt s" { SwitchToMode "Normal"; }
bind "e" { EditScrollback; SwitchToMode "Normal"; }
bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; }
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
bind "j" "Down" { ScrollDown; }
bind "k" "Up" { ScrollUp; }
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
bind "d" { HalfPageScrollDown; }
bind "u" { HalfPageScrollUp; }
// uncomment this and adjust key if using copy_on_select=false
// bind "Alt c" { Copy; }
}
search {
bind "Alt s" { SwitchToMode "Normal"; }
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
bind "j" "Down" { ScrollDown; }
bind "k" "Up" { ScrollUp; }
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
bind "d" { HalfPageScrollDown; }
bind "u" { HalfPageScrollUp; }
bind "n" { Search "down"; }
bind "p" { Search "up"; }
bind "c" { SearchToggleOption "CaseSensitivity"; }
bind "w" { SearchToggleOption "Wrap"; }
bind "o" { SearchToggleOption "WholeWord"; }
}
entersearch {
bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; }
bind "Enter" { SwitchToMode "Search"; }
}
renametab {
bind "Ctrl c" { SwitchToMode "Normal"; }
bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; }
}
renamepane {
bind "Ctrl c" { SwitchToMode "Normal"; }
bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; }
}
session {
bind "Alt o" { SwitchToMode "Normal"; }
bind "Alt s" { SwitchToMode "Scroll"; }
bind "d" { Detach; }
bind "w" {
LaunchOrFocusPlugin "zellij:session-manager" {
floating true
move_to_focused_tab true
};
SwitchToMode "Normal"
}
}
tmux {
bind "[" { SwitchToMode "Scroll"; }
bind "Alt a" { Write 2; SwitchToMode "Normal"; }
bind "\"" { NewPane "Down"; SwitchToMode "Normal"; }
bind "%" { NewPane "Right"; SwitchToMode "Normal"; }
bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
bind "c" { NewTab; SwitchToMode "Normal"; }
bind "," { SwitchToMode "RenameTab"; }
bind "p" { GoToPreviousTab; SwitchToMode "Normal"; }
bind "n" { GoToNextTab; SwitchToMode "Normal"; }
bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; }
bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; }
bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; }
bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; }
bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; }
bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; }
bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; }
bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; }
bind "o" { FocusNextPane; }
bind "d" { Detach; }
bind "Space" { NextSwapLayout; }
bind "x" { CloseFocus; SwitchToMode "Normal"; }
}
shared_except "locked" {
bind "Alt g" { SwitchToMode "Locked"; }
bind "Alt q" { Quit; }
bind "Alt n" { NewPane; }
bind "Alt i" { MoveTab "Left"; }
bind "Alt o" { MoveTab "Right"; }
bind "Alt _" { NewPane "Down"; }
bind "Alt |" { NewPane "Right"; }
bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; }
bind "Alt j" "Alt Down" { MoveFocus "Down"; }
bind "Alt k" "Alt Up" { MoveFocus "Up"; }
bind "Alt =" "Alt +" { Resize "Increase"; }
bind "Alt -" { Resize "Decrease"; }
bind "Alt [" { PreviousSwapLayout; }
bind "Alt ]" { NextSwapLayout; }
}
shared_except "normal" "locked" {
bind "Enter" "Esc" { SwitchToMode "Normal"; }
}
shared_except "pane" "locked" {
bind "Alt p" { SwitchToMode "Pane"; }
}
shared_except "resize" "locked" {
bind "Alt r" { SwitchToMode "Resize"; }
}
shared_except "scroll" "locked" {
bind "Alt s" { SwitchToMode "Scroll"; }
}
shared_except "session" "locked" {
bind "Alt o" { SwitchToMode "Session"; }
}
shared_except "tab" "locked" {
bind "Alt t" { SwitchToMode "Tab"; }
}
shared_except "move" "locked" {
bind "Alt m" { SwitchToMode "Move"; }
}
shared_except "tmux" "locked" {
bind "Alt b" { SwitchToMode "Tmux"; }
}
}
plugins {
tab-bar location="zellij:tab-bar"
status-bar location="zellij:status-bar"
strider location="zellij:strider"
compact-bar location="zellij:compact-bar"
session-manager location="zellij:session-manager"
welcome-screen location="zellij:session-manager" {
welcome_screen true
}
filepicker location="zellij:strider" {
cwd "/"
}
}
// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
// eg. when terminal window with an active zellij session is closed
// Options:
// - detach (Default)
// - quit
//
// on_force_close "detach"
// Send a request for a simplified ui (without arrow fonts) to plugins
// Options:
// - true
// - false (Default)
//
// simplified_ui false
// Choose the path to the default shell that zellij will use for opening new panes
// Default: $SHELL
//
// default_shell "fish"
// Choose the path to override cwd that zellij will use for opening new panes
//
// default_cwd ""
// Toggle between having pane frames around the panes
// Options:
// - true (default)
// - false
//
// pane_frames true
// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible
// Options:
// - true (default)
// - false
//
// auto_layout true
// Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected
// Options:
// - true (default)
// - false
//
// session_serialization false
// Whether pane viewports are serialized along with the session, default is false
// Options:
// - true
// - false (default)
// serialize_pane_viewport true
// Scrollback lines to serialize along with the pane viewport when serializing sessions, 0
// defaults to the scrollback size. If this number is higher than the scrollback size, it will
// also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true.
//
// scrollback_lines_to_serialize 10000
// Define color themes for Zellij
// For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes
// Once these themes are defined, one of them should to be selected in the "theme" section of this file
//
themes {
// example of how to set a theme in HEX format
gruvbox-dark {
fg "#D5C4A1"
bg "#282828"
black "#3C3836"
red "#CC241D"
green "#98971A"
yellow "#D79921"
blue "#3C8588"
magenta "#B16286"
cyan "#689D6A"
white "#FBF1C7"
orange "#D65D0E"
}
}
// Choose the theme that is specified in the themes section.
// Default: default
//
theme "gruvbox-dark"
// The name of the default layout to load on startup
// Default: "default"
//
// default_layout "compact"
// Choose the mode that zellij uses when starting up.
// Default: normal
//
// default_mode "locked"
// Toggle enabling the mouse mode.
// On certain configurations, or terminals this could
// potentially interfere with copying text.
// Options:
// - true (default)
// - false
//
// mouse_mode false
// Configure the scroll back buffer size
// This is the number of lines zellij stores for each pane in the scroll back
// buffer. Excess number of lines are discarded in a FIFO fashion.
// Valid values: positive integers
// Default value: 10000
//
// scroll_buffer_size 10000
// Provide a command to execute when copying text. The text will be piped to
// the stdin of the program to perform the copy. This can be used with
// terminal emulators which do not support the OSC 52 ANSI control sequence
// that will be used by default if this option is not set.
// Examples:
//
// copy_command "xclip -selection clipboard" // x11
// copy_command "wl-copy" // wayland
// copy_command "pbcopy" // osx
// Choose the destination for copied text
// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard.
// Does not apply when using copy_command.
// Options:
// - system (default)
// - primary
//
// copy_clipboard "primary"
// Enable or disable automatic copy (and clear) of selection when releasing mouse
// Default: true
//
// copy_on_select false
// Path to the default editor to use to edit pane scrollbuffer
// Default: $EDITOR or $VISUAL
//
// scrollback_editor "/usr/bin/vim"
// When attaching to an existing session with other users,
// should the session be mirrored (true)
// or should each user have their own cursor (false)
// Default: false
//
// mirror_session true
// The folder in which Zellij will look for layouts
//
// layout_dir "/path/to/my/layout_dir"
// The folder in which Zellij will look for themes
//
// theme_dir "/path/to/my/theme_dir"
// Enable or disable the rendering of styled and colored underlines (undercurl).
// May need to be disabled for certain unsupported terminals
// Default: true
//
// styled_underlines false

View file

@ -0,0 +1,11 @@
{
config,
lib,
pkgs,
...
}: {
programs.zellij.enable = true;
home.file = {
".config/zellij/config.kdl".source = ./config.kdl;
};
}

View file

@ -0,0 +1,107 @@
{
config,
pkgs,
lib,
...
}: {
programs = {
starship.enableZshIntegration = true;
fzf.enableZshIntegration = true;
zoxide.enableZshIntegration = true;
yazi.enableZshIntegration = true;
eza.enableZshIntegration = true;
direnv.enableZshIntegration = true;
kitty.shellIntegration.enableZshIntegration = true;
carapace.enableZshIntegration = false;
zsh = {
enable = true;
enableCompletion = true;
initExtra = lib.mkMerge [
''
#have the menu highlight while we cycle through options
zstyle ':completion:*' menu select
#case insensitive completion
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
#allow completion from midword
setopt COMPLETE_IN_WORD
#move cursor to end of word after completing
setopt ALWAYS_TO_END
#complete aliases as well
setopt COMPLETE_ALIASES
#select first item when you press tab the first time.
setopt MENU_COMPLETE
#case insensitive globbing
setopt NO_CASE_GLOB
#sort globs that expand to numbers by number rather than alphabeticly
setopt NUMERIC_GLOB_SORT
#allows for some neat globbing.
setopt EXTENDED_GLOB
#allow backspacing beyond the point you entered insert mode:
bindkey -v '^?' backward-delete-char
bindkey "^W" backward-kill-word
#cheat.sh is a wonderful tool, the less typing needed the better.
cheat(){
for i in $*; do;
curl cheat.sh/$i
done
}
''
(lib.mkIf (!config.programs.starship.enable) ''
autoload -U promptinit
promptinit
autoload -U colors
colors
#stuff to show git things.
autoload -Uz vcs_info
setopt prompt_subst
precmd_vcs() {vcs_info}
#when not in a repo, show full path to current directory. when in one, show path from base direcory of the repo.
zstyle ':vcs_info:*' nvcsformats '%~'
zstyle ':vcs_info:*' formats '%r/%S %F{green}[%b]%f'
zstyle ':vcs_info:*' actionformats '%r/%S %F{green}[%b] %F{red}<%a>%f'
#the precmd function, called just before printing the prompt.
function precmd() {
precmd_vcs
}
#Make the right prompt blank, just to be sure.
RPROMPT=""
#on the top line, show a whole bunch of info. botton line should be as minimal as possilbe (just a single char to input next to...)
PROMPT=$'%F{cyan}[%n@%m]%f%F{red}%f$${vcs_info_msg_0_} %F{white}[%D %T]%f\n»'
'')
];
autocd = true;
autosuggestion.enable = true;
defaultKeymap = "viins";
history = {
ignoreAllDups = true;
extended = true;
};
shellAliases = {
ll = "ls -lh";
la = "ls -lha";
please = "sudo $(fc -ln -1)";
pyactivate = "source ./.venv/bin/activate";
};
syntaxHighlighting = {
enable = true;
highlighters = [
"main"
"brackets"
"pattern"
"regexp"
"root"
"line"
];
};
};
};
services.gpg-agent.enableZshIntegration = true;
home.packages = with pkgs; [
curl
];
}

39
configs/nixos/common.nix Normal file
View file

@ -0,0 +1,39 @@
{
config,
pkgs,
inputs,
outputs,
...
}: {
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
'';
optimise.automatic = true;
settings = {
auto-optimise-store = true;
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# packages that should be on every system.
environment.systemPackages = with pkgs; [
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
];
imports = [
../../modules/hostopts.nix
];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {inherit inputs outputs;};
}

View file

@ -0,0 +1,247 @@
{
config,
pkgs,
lib,
...
}: {
services.accounts-daemon.enable = true;
services.displayManager = {
defaultSession = "none+i3";
autoLogin = {
user = config.host.user;
enable = true;
};
};
services.xserver = {
enable = true;
windowManager.i3.enable = true;
displayManager.lightdm = {
enable = true;
greeters.gtk.enable = false;
greeter.enable = false;
};
};
home-manager.users.${config.host.user} = {config, ...}: {
home.packages = with pkgs; [
maim
brightnessctl
arandr
dex
];
services.playerctld.enable = true;
xsession.enable = true;
xsession.windowManager.i3 = let
mod = "Mod4";
ws1 = "1";
ws2 = "2";
ws3 = "3";
ws4 = "4";
ws5 = "5";
ws6 = "6";
ws7 = "7";
ws8 = "8";
ws9 = "9";
ws10 = "10";
in {
enable = true;
config = {
modifier = mod;
terminal = "kitty";
menu = "rofi -show drun";
defaultWorkspace = "workspace ${ws1}";
keybindings = {
"${mod}+Return" = "exec ${config.xsession.windowManager.i3.config.terminal}";
"${mod}+d" = "exec ${config.xsession.windowManager.i3.config.menu}";
"${mod}+Shift+q" = "kill";
"${mod}+h" = "focus left";
"${mod}+j" = "focus down";
"${mod}+k" = "focus up";
"${mod}+l" = "focus right";
"${mod}+Shift+h" = "move left";
"${mod}+Shift+j" = "move down";
"${mod}+Shift+k" = "move up";
"${mod}+Shift+l" = "move right";
"${mod}+Left" = "focus left";
"${mod}+Down" = "focus down";
"${mod}+Up" = "focus up";
"${mod}+Right" = "focus right";
"${mod}+Shift+Left" = "move left";
"${mod}+Shift+Down" = "move down";
"${mod}+Shift+Up" = "move up";
"${mod}+Shift+Right" = "move right";
"${mod}+Shift+semicolon" = "split v";
"${mod}+Shift+backslash" = "split h";
"${mod}+f" = "fullscreen toggle";
"${mod}+e" = "layout stacking";
"${mod}+r" = "layout tabbed";
"${mod}+t" = "layout toggle split";
"${mod}+Shift+space" = "floating toggle";
"${mod}+space" = "focus mode_toggle";
"${mod}+a" = "focus parent";
"${mod}+Shift+o" = "move scratchpad";
"${mod}+o" = "scratchpad show";
"${mod}+1" = "workspace ${ws1}";
"${mod}+2" = "workspace ${ws2}";
"${mod}+3" = "workspace ${ws3}";
"${mod}+4" = "workspace ${ws4}";
"${mod}+5" = "workspace ${ws5}";
"${mod}+6" = "workspace ${ws6}";
"${mod}+7" = "workspace ${ws7}";
"${mod}+8" = "workspace ${ws8}";
"${mod}+9" = "workspace ${ws9}";
"${mod}+0" = "workspace ${ws10}";
"${mod}+Shift+1" = "move container to workspace ${ws1}";
"${mod}+Shift+2" = "move container to workspace ${ws2}";
"${mod}+Shift+3" = "move container to workspace ${ws3}";
"${mod}+Shift+4" = "move container to workspace ${ws4}";
"${mod}+Shift+5" = "move container to workspace ${ws5}";
"${mod}+Shift+6" = "move container to workspace ${ws6}";
"${mod}+Shift+7" = "move container to workspace ${ws7}";
"${mod}+Shift+8" = "move container to workspace ${ws8}";
"${mod}+Shift+9" = "move container to workspace ${ws9}";
"${mod}+Shift+0" = "move container to workspace ${ws10}";
"${mod}+Shift+n" = "reload";
"${mod}+Shift+r" = "restart";
"${mod}+Shift+e" = "exec i3-nagbar -t warning -m 'Do you want to exit i3?' -b 'Yes' 'i3-msg exit'";
"${mod}+ctrl+r" = "mode resize";
# disable screen going to sleep with mod+b, enable screen going to sleep with mod+shift+b
"${mod}+b" = ''
exec --no-startup-id "xset s off -dpms; dunstify --timeout=500 'screen blanking off'"
'';
"${mod}+shift+b" = ''
exec --no-startup-id "xset +dpms; dunstify --timeout=500 'screen blanking on'"
'';
# change brightness
"${mod}+control+plus" = ''
exec --no-startup-id "brightnessctl s +1%; dunstify -h string:x-dunst-stack-tag:brightness --timeout=500 Brightness\ $(brightnessctl -m | cut --delimiter=, -f 4)"
'';
"${mod}+control+minus" = ''
exec --no-startup-id "brightnessctl s 1%-; dunstify -h string:x-dunst-stack-tag:brightness --timeout=500 Brightness\ $(brightnessctl -m | cut --delimiter=, -f 4)"
'';
#screenshot everything with mod+s, current window with mod+shift+s, selection with mod+ctrl+s
"${mod}+s" = ''
exec --no-startup-id "maim ~/Pictures/$(date +%s).png; dunstify --timeout=1000 'Whole-desktop screenshot taken'"
'';
"${mod}+shift+s" = ''
exec --no-startup-id "maim -i $(xdotool getactivewindow) ~/Pictures/$(date +%s).png; dunstify --timeout=1000 'Window screenshot taken'"
'';
"${mod}+ctrl+s" = ''
exec --no-startup-id "maim -s ~/Pictures/$(date +%s).png; dunstify --timeout=1000 'Selection screenshot taken'"
'';
#screenshot everything with mod+c, current window with mod+shift+c, selection with mod+ctrl+c (to clipboard)
"${mod}+c" = ''
exec --no-startup-id "maim | xclip -selection clipboard -t image/png; dunstify --timeout=1000 'Whole-desktop screenshot taken to clipboard'"
'';
"${mod}+shift+c" = ''
exec --no-startup-id "maim -i $(xdotool getactivewindow) | xclip -selection clipboard -t image/png; dunstify --timeout=1000 'Window screenshot taken to clipboard'"
'';
"${mod}+ctrl+c" = ''
exec --no-startup-id "maim -s | xclip -selection clipboard -t image/png; dunstify --timeout=1000 'Selection screenshot taken to clipboard'"
'';
"${mod}+mod1+p" = ''
exec --no-startup-id "playerctl play-pause; dunstify -h string:x-dunst-stack-tag:playerstatus --timeout=500 Player $(playerctl status)"
'';
"${mod}+mod1+plus" = ''
exec --no-startup-id "playerctl volume 0.01+; dunstify -h string:x-dunst-stack-tag:volume --timeout=500 -h int:value:$(playerctl volume | cut -d' ' -f2 | awk '{print $1*100}' ) Player"
'';
"${mod}+mod1+minus" = ''
exec --no-startup-id "playerctl volume 0.01-; dunstify -h string:x-dunst-stack-tag:volume --timeout=500 -h int:value:$(playerctl volume | cut -d' ' -f2 | awk '{print $1*100}' ) Player"
'';
#open volume control
"${mod}+shift+p" = ''exec pwvucontrol'';
#volume control
"${mod}+plus" = ''
exec --no-startup-id "wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+; dunstify --timeout=1000 -h string:x-dunst-stack-tag:volume -h int:value:$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | cut -d' ' -f2 | awk '{print $1*100}' ) Volume"
'';
"${mod}+minus" = ''
exec --no-startup-id "wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-; dunstify --timeout=1000 -h string:x-dunst-stack-tag:volume -h int:value:$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | cut -d' ' -f2 | awk '{print $1*100}' ) Volume"
'';
#open firefox
"${mod}+w" = ''exec firefox'';
};
modes = {
resize = {
"Left" = "resize shrink width 10 px or 10 ppt";
"Down" = "resize grow height 10 px or 10 ppt";
"Up" = "resize shrink height 10 px or 10 ppt";
"Right" = "resize grow width 10 px or 10 ppt";
"Escape" = "mode default";
"Return" = "mode default";
};
};
gaps = {
inner = 5;
smartBorders = "on";
smartGaps = true;
};
fonts = {
names = ["Fira Code"];
size = 8.0;
};
floating = {
modifier = mod;
# you can find window class names with xprop.
criteria = [
{class = "pwvucontrol";}
{class = "helvum";}
];
};
startup = [
{
command = "betterlockscreen --lock blur";
notification = false;
always = false;
}
{
command = "betterlockscreen --wall";
notification = false;
always = true;
}
{
command = "dex --autostart";
notification = false;
always = false;
}
# {
# command = "~/.fehbg";
# notification = false;
# always = true;
# }
];
};
};
imports = [
../../home-manager/kitty.nix
../../home-manager/rofi.nix
../../home-manager/dunst.nix
../../home-manager/feh.nix
../../home-manager/picom.nix
];
};
imports = [
../sound.nix
./i3status-rust.nix
./lockscreen.nix
];
}

View file

@ -0,0 +1,92 @@
{
config,
pkgs,
lib,
...
}: {
home-manager.users.${config.host.user} = {
config,
osConfig,
lib,
...
}: {
xsession.windowManager.i3.config.bars = [
{
fonts = {
names = ["FiraCode Nerd Font"];
style = "Mono";
size = 10.0;
};
position = "bottom";
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-default.toml";
}
];
programs.i3status-rust = {
enable = true;
bars = {
default = {
blocks = [
{
block = "music";
format = "{$icon $combo.str(max_w:25,rot_interval:0.5) $play $prev $next $player.str(max_w:5,rot_interval:0.5) [$cur/$avail]|}";
}
{
block = "memory";
format = "$icon $mem_used_percents";
format_alt = "$icon $swap_used_percents (swap)";
}
{
block = "cpu";
interval = 1;
}
{
block = "load";
format = "$icon $1m";
interval = 1;
}
(
lib.mkIf
(!osConfig.host.isVm)
{
block = "backlight";
missing_format = "";
}
)
(
lib.mkIf (osConfig.host.isLaptop)
{
block = "battery";
driver = "upower";
device = "DisplayDevice";
format = "$icon $percentage {$time|}";
}
)
{
block = "net";
format = "$icon {$signal_strength $ssid.str(max_w:5,rot_interval:0.5)|}";
format_alt = "$icon {$signal_strength $ssid.str(max_w:5,rot_interval:0.5) $frequency|} ipv4-$ip ipv6-$ipv6 via $device";
}
{
block = "sound";
format = "$icon {$volume.bar(v:true) $volume.eng(w:2)|}";
headphones_indicator = true;
click = [
{
button = "left";
cmd = "pwvucontrol";
}
];
}
{
block = "time";
format = "$timestamp.datetime(f:'%F %R')";
interval = 60;
}
];
theme = "gruvbox-dark";
icons = "material-nf";
};
};
};
};
}

View file

@ -0,0 +1,29 @@
{
config,
pkgs,
lib,
...
}: {
environment.systemPackages = with pkgs; [
betterlockscreen
];
home-manager.users.${config.host.user} = {
config,
osConfig,
lib,
...
}: {
xsession.windowManager.i3.config = {
keybindings = let
mod = config.xsession.windowManager.i3.config.modifier;
in {
"${mod}+x" = ''
exec --no-startup-id betterlockscreen --lock blur
'';
};
};
imports = [
../../home-manager/feh.nix
];
};
}

View file

@ -0,0 +1,9 @@
{
config,
pkgs,
...
}: {
# Enable networking
networking.networkmanager.enable = true;
users.users.${config.host.user}.extraGroups = ["networkmanager"];
}

23
configs/nixos/nfsv2.nix Normal file
View file

@ -0,0 +1,23 @@
{
config,
pkgs,
lib,
...
}: {
# will force you to compile kernel locally.
services.nfs = {
settings = {
nfsd.vers2 = true;
};
server.enable = true;
};
boot.kernelPatches = [
{
name = "nfsv2";
patch = null;
extraStructuredConfig = {
NFSD_V2 = lib.kernel.yes;
};
}
];
}

View file

@ -0,0 +1,8 @@
{
config,
pkgs,
...
}: {
# Enable CUPS to print documents.
services.printing.enable = true;
}

23
configs/nixos/sound.nix Normal file
View file

@ -0,0 +1,23 @@
{
config,
pkgs,
...
}: {
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
home-manager.users.${config.host.user} = {config, ...}: {
home.packages = with pkgs; [
pwvucontrol
helvum
];
};
}

View file

@ -0,0 +1,15 @@
{
config,
pkgs,
...
}: {
# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput = {
enable = true;
disableWhileTyping = true;
naturalScrolling = true;
additionalOptions = ''
Option "PalmDetection" "True"
'';
};
}

View file

@ -0,0 +1,7 @@
{
config,
pkgs,
...
}: {
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
}