Final commit before merge

This commit is contained in:
Thai Noodles 2024-03-01 19:20:02 -08:00
parent 8164b74643
commit 4ee5d31fcf
28 changed files with 549 additions and 497 deletions

View File

@ -1,6 +1,9 @@
# Base configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
{
boot = {
tmp.cleanOnBoot = true;
};
nix = {
settings.auto-optimise-store = true;
settings.allowed-users = [ "@wheel" ];
@ -18,86 +21,8 @@
keep-derivations = true
'';
};
boot = {
tmp.cleanOnBoot = true;
};
nixpkgs.config.allowUnfree = true;
networking.networkmanager.enable = true;
time.timeZone = "America/Los_Angeles";
i18n.defaultLocale = "${user.locale}";
i18n.extraLocaleSettings = {
LC_ADDRESS = "${user.locale}";
LC_IDENTIFICATION = "${user.locale}";
LC_MEASUREMENT = "${user.locale}";
LC_MONETARY = "${user.locale}";
LC_NAME = "${user.locale}";
LC_NUMERIC = "${user.locale}";
LC_PAPER = "${user.locale}";
LC_TELEPHONE = "${user.locale}";
LC_TIME = "${user.locale}";
};
services = {
cron = {
enable = true;
systemCronJobs = [
# Clean logs older than 2d
"0 20 * * * root journalctl --vacuum-time=2d"
];
};
openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
};
allowSFTP = false; # Don't set this if you need sftp
extraConfig = ''
AllowTcpForwarding yes
X11Forwarding no
AllowAgentForwarding no
AllowStreamLocalForwarding no
AuthenticationMethods publickey
'';
};
};
# Define a user account. Don't forget to set a password with passwd
users.users.${user.name} = {
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" ];
initialPassword = "hunter2";
packages = with pkgs; [
bottom
eva
links2
nix-du
nmap
ranger
];
};
programs = {
mtr.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
git = {
enable = true;
};
neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
};
tmux = {
enable = true;
};
};
environment = {
defaultPackages = with pkgs; [
perl
@ -105,11 +30,79 @@
strace
];
systemPackages = with pkgs; [
bottom
curl
eva
ranger
wget
];
};
system = {
stateVersion = "23.11";
programs.git = {
enable = true;
};
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.mtr = {
enable = true;
};
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
};
programs.tmux = {
enable = true;
clock24 = true;
escapeTime = 250;
historyLimit = 8000;
keyMode = "vi";
newSession = false;
terminal = "screen-256color";
};
services.cron = {
enable = true;
systemCronJobs = [
# Clean logs older than 2d
"0 20 * * * root journalctl --vacuum-time=2d"
];
};
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
};
allowSFTP = false; # Don't set this if you need sftp
extraConfig = ''
AllowTcpForwarding yes
X11Forwarding no
AllowAgentForwarding no
AllowStreamLocalForwarding no
AuthenticationMethods publickey
'';
};
users.users.${user.name} = {
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" ];
initialPassword = "hunter2";
};
time.timeZone = "${user.timezone}";
i18n = {
defaultLocale = "${user.locale}";
extraLocaleSettings = {
LC_ADDRESS = "${user.locale}";
LC_IDENTIFICATION = "${user.locale}";
LC_MEASUREMENT = "${user.locale}";
LC_MONETARY = "${user.locale}";
LC_NAME = "${user.locale}";
LC_NUMERIC = "${user.locale}";
LC_PAPER = "${user.locale}";
LC_TELEPHONE = "${user.locale}";
LC_TIME = "${user.locale}";
};
};
}

View File

@ -14,10 +14,6 @@
dataHome = "${config.home.homeDirectory}/.local/share";
stateHome = "${config.home.homeDirectory}/.local/state";
};
programs.fzf = {
enable = true;
tmux.enableShellIntegration = true;
};
programs.git = {
enable = true;
userName = "${user.long}";
@ -32,12 +28,6 @@
};
};
};
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
};
programs.password-store = {
enable = true;
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp exts.pass-import ]);
@ -46,17 +36,4 @@
PASSWORD_STORE_CLIP_TIME = "60";
};
};
programs.tmux = {
enable = true;
baseIndex = 1;
clock24 = true;
escapeTime = 250;
historyLimit = 8000;
keyMode = "vi";
mouse = false;
newSession = false;
prefix = "C-b";
terminal = "screen-256color";
};
home.stateVersion = "23.11";
}

View File

@ -7,9 +7,8 @@
environment = {
localBinInPath = true;
variables = {
#MAILRC="$XDG_CONFIG_HOME/mail/mailrc"
#allowing environmental variable is needed for a mosh connection
LC_CTYPE = "en_US.UTF-8";
# Environmental variable needed for mosh connections
LC_CTYPE = "${user.locale}";
};
};
services = {
@ -17,51 +16,6 @@
enable = true;
mountOnMedia = true;
};
samba = {
enable = true;
# You will still need to set up the user accounts to begin with:
# $ sudo smbpasswd -a yourusername
# This adds to the [global] section:
extraConfig = ''
browseable = yes
smb encrypt = required
'';
shares = {
homes = {
browseable = "no"; # note: each home will be browseable; the "homes" share will not.
"read only" = "no";
"guest ok" = "no";
};
};
};
# mDNS
# This part may be optional for your needs, but I find it makes browsing in Dolphin easier,
# and it makes connecting from a local Mac possible.
avahi = {
enable = true;
nssmdns4 = true;
publish = {
enable = true;
addresses = true;
domain = true;
hinfo = true;
userServices = true;
workstation = true;
};
extraServiceFiles = {
smb = ''
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_smb._tcp</type>
<port>445</port>
</service>
</service-group>
'';
};
};
};
sound.enable = true;
hardware.pulseaudio.enable = false;
@ -80,14 +34,16 @@
exiftool
gpg-tui
killall
links2
mediainfo
nb
nix-du
nmap
oed
pdfgrep
pinentry
ripgrep
tmux-xpanes
ueberzugpp
#Emacs
emacs-nox
];
}

View File

@ -27,49 +27,23 @@
videos = "${config.home.homeDirectory}/Videos";
};
};
programs = {
go = {
goPath = "${config.xdg.dataHome}/go";
};
neovim = {
extraConfig = ''
syntax enable
set wrap
set nospell
set linebreak
set number
set relativenumber
set splitbelow
set splitright
set tabstop=4
set shiftwidth=4
if filereadable(expand(".vim-project"))
source .vim-project
endif
let g:limelight_conceal_ctermfg = 'block'
'';
plugins = with pkgs.vimPlugins; [
goyo-vim
limelight-vim
neorg
neorg-telescope
telescope-nvim
vim-numbertoggle
vim-nix
vimwiki
];
};
yt-dlp = {
extraConfig = ''
--update
'';
settings = {
embed-thumbnail = true;
embed-subs = true;
sub-langs = "all";
downloader = "aria2c";
downloader-args = "aria2c:'-c -x8 -s8 -k1M'";
};
programs.fzf = {
enable = true;
tmux.enableShellIntegration = true;
};
programs.go = {
goPath = "${config.xdg.dataHome}/go";
};
programs.yt-dlp = {
extraConfig = ''
--update
'';
settings = {
embed-thumbnail = true;
embed-subs = true;
sub-langs = "all";
downloader = "aria2c";
downloader-args = "aria2c:'-c -x8 -s8 -k1M'";
};
};
}

View File

@ -4,79 +4,22 @@
imports = [
../cli
];
environment = {
variables = {
BROWSER = "${user.browser}";
TERMINAL = "${user.term}";
VISUAL = "$EDITOR";
};
};
xdg.mime = {
enable = true;
defaultApplications = {
"image/*" = [
"imv.desktop"
];
"text/*" = [
"${user.browser}.desktop"
];
"video/*" = [
"mpv.desktop"
];
};
};
services = {
# To add the Flathub repo, run:
# $ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak.enable = true;
dbus.enable = true;
seatd.enable = true;
};
fonts.packages = with pkgs; [
comic-mono
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
fira-code
fira-code-symbols
dina-font
];
programs = {
dconf.enable = true;
river = {
enable = true;
extraPackages = with pkgs; [
];
};
};
users.users.${user.name}.packages = with pkgs; [
glib
];
environment.systemPackages = with pkgs; [
bemenu
bemoji
cliphist
foot
grim
kanshi
libnotify
mako
networkmanagerapplet
slurp
swappy
swaylock
swww
tessen
waybar
wev
wf-recorder
wl-clipboard
wtype
xdg-utils
xdragon
];
xdg = {
autostart.enable = true;
mime = {
enable = true;
defaultApplications = {
"image/*" = [
"imv.desktop"
];
"text/*" = [
"${user.browser}.desktop"
];
"video/*" = [
"mpv.desktop"
];
};
};
portal = {
enable = true;
xdgOpenUsePortal = true;
@ -86,6 +29,75 @@
configPackages = [
pkgs.xdg-desktop-portal-wlr
];
wlr = {
enable = true;
};
};
};
environment = {
systemPackages = with pkgs; [
libnotify
networkmanagerapplet
xdragon
xdg-utils
];
variables = {
BROWSER = "${user.browser}";
TERMINAL = "${user.term}";
VISUAL = "$EDITOR";
};
};
fonts.packages = with pkgs; [
comic-mono
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
fira-code
fira-code-symbols
fira-code-nerdfont
dina-font
];
programs.dconf = {
enable = true;
};
programs.gnupg.agent = {
pinentryFlavor = "qt";
};
programs.river = {
enable = true;
extraPackages = with pkgs; [
bemenu
bemoji
cliphist
foot
grim
kanshi
mako
pinentry-bemenu
river-tag-overlay
slurp
swappy
swaylock
swww
tessen
waybar
wev
wf-recorder
wl-clipboard
wtype
];
};
# Run the following to add the Flathub repo: `flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo`
services.flatpak = {
enable = true;
};
services.dbus = {
enable = true;
};
services.seatd = {
enable = true;
};
users.users.${user.name}.packages = with pkgs; [
glib
];
}

View File

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1707683400,
"narHash": "sha256-Zc+J3UO1Xpx+NL8UB6woPHyttEy9cXXtm+0uWwzuYDc=",
"lastModified": 1708806879,
"narHash": "sha256-MSbxtF3RThI8ANs/G4o1zIqF5/XlShHvwjl9Ws0QAbI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "21b078306a2ab68748abf72650db313d646cf2ca",
"rev": "4ee704cb13a5a7645436f400b9acc89a67b9c08a",
"type": "github"
},
"original": {
@ -22,11 +22,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1707689078,
"narHash": "sha256-UUGmRa84ZJHpGZ1WZEBEUOzaPOWG8LZ0yPg1pdDF/yM=",
"lastModified": 1708984720,
"narHash": "sha256-gJctErLbXx4QZBBbGp78PxtOOzsDaQ+yw1ylNQBuSUY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f9d39fb9aff0efee4a3d5f4a6d7c17701d38a1d8",
"rev": "13aff9b34cc32e59d35c62ac9356e4a41198a538",
"type": "github"
},
"original": {

View File

@ -20,6 +20,7 @@
browser = "mullvad-browser";
term = "foot";
locale = "en_US.UTF-8";
timezone = "America/Los_Angeles";
};
lib = nixpkgs.lib;
in {

View File

@ -17,9 +17,6 @@ in
wireless.enable = false;
};
services = {
transmission = {
enable = true;
};
davfs2 = {
enable = true;
};
@ -52,14 +49,16 @@ in
};
};
users.users.${user.name} = {
extraGroups = [ "davfs2" "transmission" ];
extraGroups = [ "davfs2" ];
packages = with pkgs; [
bitwarden
btfs
cava
lavat
nushell
python311Packages.eyeD3
tagutil
];
};
system.stateVersion = "23.11";
}

View File

@ -6,6 +6,7 @@
../../modules/home-manager/cava.nix
../../modules/home-manager/foot.nix
../../modules/home-manager/mako.nix
../../modules/home-manager/neovim.nix
../../modules/home-manager/river.nix
../../modules/home-manager/senpai.nix
../../modules/home-manager/swappy.nix
@ -47,4 +48,5 @@
# };
#};
};
home.stateVersion = "23.11";
}

View File

@ -1,92 +1,124 @@
{ pkgs, config, user, ... }:
{
home = {
file = {
".bash_login" = {
enable = true;
text = ''
[[ -f ~/.bashrc ]] && . ~/.bashrc
if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
exec river
home.file = {
".bash_login" = {
enable = true;
text = ''
[[ -f ~/.bashrc ]] && . ~/.bashrc
if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
exec river
fi
'';
};
".bash_logout" = {
enable = true; text = ''
if [ "$SHLVL" = 1 ]; then
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi
'';
};
".bashrc" = {
enable = true;
text = ''
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
set -o vi
unset HISTFILE
# Aliases
alias mkfoo='. $HOME/.local/bin/mkfoo.sh'
alias ed='ed -p "> "'
alias info='info --vi-keys'
# Functions
function ranstr() {
COUNT=$1
head -c $COUNT /dev/random | base64 | head -c $COUNT
}
function get-ssh() {
if [ ! -f $HOME/.ssh/id_ed25519.pub ]; then
ssh-keygen -t ed25519 -C "${user.email}"
fi
'';
};
".bash_logout" = {
enable = true;
text = ''
if [ "$SHLVL" = 1 ]; then
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi
'';
};
".bashrc" = {
enable = true;
text = ''
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
set -o vi
unset HISTFILE
# Aliases
alias mkfoo='. $HOME/.local/bin/mkfoo.sh'
alias ed='ed -p "> "'
# Functions
function get-ssh() {
if [ ! -f $HOME/.ssh/id_ed25519.pub ]; then
ssh-keygen -t ed25519 -C "${user.email}"
fi
cat $HOME/.ssh/id_ed25519.pub
}
function home() {
cd
clear
}
function search() {
surfraw $(surfraw -elvi | fzf | awk '{print $1;}')
}
function mkcd {
mkdir -p $1
cd $1
}
# fe [FUZZY PATTERN] - Open the selected file with the default editor
# - Bypass fuzzy finder if there's only one match (--select-1)
# - Exit if there's no match (--exit-0)
function fe() {
IFS='
'
files=$(fzf --query="$1" --multi --select-1 --exit-0)
[ -n "$files" ] && "$EDITOR" "$files"
}
# Environmental Variables
# Uncomment the following line if you don't like systemctl's auto-paging feature:
export SYSTEMD_PAGER=
export PS1="\n\u@\h:\w (\j)\n$? \$ "
export LIBSEAT_BACKEND=logind
export BEMENU_OPTS="--fn 'Comic Mono 12'\
--tb '#6272a4'\
--tf '#f8f8f2'\
--fb '#282a36'\
--ff '#f8f8f2'\
--nb '#282a36'\
--nf '#6272a4'\
--hb '#44475a'\
--hf '#50fa7b'\
--sb '#44475a'\
--sf '#50fa7b'\
--scb '#282a36'\
--scf '#ff79c6'\
--hp '10'\
--binding 'vim'\
--vim-esc-exits\
--ignorecase\
--no-overlap"
cat $HOME/.ssh/id_ed25519.pub
}
function home() {
cd
clear
}
function search() {
surfraw $(surfraw -elvi | fzf | awk '{print $1;}')
}
function mkcd {
mkdir -p $1
cd $1
}
# fe [FUZZY PATTERN] - Open the selected file with the default editor
# - Bypass fuzzy finder if there's only one match (--select-1)
# - Exit if there's no match (--exit-0)
function fe() {
IFS='
'
files=$(fzf --query="$1" --multi --select-1 --exit-0)
[ -n "$files" ] && "$EDITOR" "$files"
}
# Environmental Variables
# Uncomment the following line if you don't like systemctl's auto-paging feature:
export SYSTEMD_PAGER=
export PS1="\n\u@\h:\w (\j)\n$? \$ "
export INPUTRC="$XDG_CONFIG_HOME/inputrc"
export LIBSEAT_BACKEND=logind
export BEMENU_OPTS="--fn 'Comic Mono 12'\
--tb '#6272a4'\
--tf '#f8f8f2'\
--fb '#282a36'\
--ff '#f8f8f2'\
--nb '#282a36'\
--nf '#6272a4'\
--hb '#44475a'\
--hf '#50fa7b'\
--sb '#44475a'\
--sf '#50fa7b'\
--scb '#282a36'\
--scf '#ff79c6'\
--hp '10'\
--binding 'vim'\
--vim-esc-exits\
--ignorecase\
--no-overlap"
eval "$(zoxide init bash)"
'';
};
eval "$(zoxide init bash)"
'';
};
};
xdg.configFile = {
"inputrc" = {
enable = true;
executable = true;
text = ''
$include /etc/inputrc
set completion-ignore-case on
set completion-map-case on
set show-all-if-ambiguous on
set show-all-if-unmodified on
set completion-query-items 0
set bell-style none
set blink-matching-paren on
set colored-completion-prefix on
set colored-stats on
set completion-prefix-display-length 5
set menu-complete-display-prefix on
set horizontal-scroll-mode on
set mark-directories on
set skip-completed-text on
set visibile-stats on
$if Bash
set completion-map-case on
$end
"\t": menu-complete
"\e[Z": menu-complete-backward
'';
};
};
}

View File

@ -30,6 +30,13 @@
selection-background = "44475a";
urls = "8be9fd";
};
url = {
launch = "xdg-open $\{url\}";
protocols = "http, https, ftp, ftps, file, gemini, gopher";
};
key-bindings = {
show-urls-copy = "Control+Shift+y";
};
};
};
}

View File

@ -0,0 +1,7 @@
{ pkgs, config, ... }:
{
programs.gpg = {
enable = true;
homedir = "${config.xdg.dataHome}/gnupg";
};
}

View File

@ -0,0 +1,30 @@
{ pkgs, config, user, ... }:
{
home = {
file = {
".nbrc" = {
enable = true;
text = ''
#!/usr/bin/env bash
###############################################################################
# .nbrc
#
# Configuration file for `nb`, a command line note-taking, bookmarking,
# and knowledge base application with encryption, search, Git-backed syncing,
# and more in a single portable script.
#
# Edit this file manually or manage settings using the `nb settings`
# subcommand. Configuration options are set as environment variables, eg:
# export NB_ENCRYPTION_TOOL=gpg
#
# https://github.com/xwmx/nb
###############################################################################
export NB_DIR="${NB_DIR:-/home/ii/Documents/notes}" # Set by `nb` • Fri Nov 3 10:12:09 PM PDT 2023
export NB_COLOR_THEME="${NB_COLOR_THEME:-unicorn}" # Set by `nb` • Sun Nov 5 04:21:55 PM PST 2023
'';
};
};
};
}

View File

@ -0,0 +1,37 @@
# CLI home.nix
{ config, lib, pkgs, inputs, user, ... }:
{
programs.neovim = {
enable = true;
extraConfig = ''
syntax enable
set wrap
set nospell
set linebreak
set number
set relativenumber
set splitbelow
set splitright
set tabstop=4
set shiftwidth=4
let mapleader = " "
if filereadable(expand(".vim-project"))
source .vim-project
endif
let g:limelight_conceal_ctermfg = 'block'
nnoremap <leader>ff <cmd>Telescope find_files<cr>
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
nnoremap <leader>fb <cmd>Telescope buffers<cr>
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
'';
plugins = with pkgs.vimPlugins; [
goyo-vim
limelight-vim
plenary-nvim
telescope-nvim
vim-numbertoggle
vim-nix
vimwiki
];
};
}

View File

@ -14,8 +14,11 @@
LOCKSCREEN="swaylock"
# Autostart
riverctl spawn "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
riverctl spawn "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
riverctl spawn "kanshi"
riverctl spawn "waybar"
riverctl spawn "river-tag-overlay --border-width 0 --square-inactive-background-colour "0x282A36" --square-inactive-border-colour "0x282A36" --square-padding 0 --square-inner-padding 4 --square-size 18 --anchors 1:0:0:1 --timeout 2000"
riverctl spawn "mako"
riverctl spawn "wl-paste --type text --watch cliphist store"
riverctl spawn "wl-paste --type image --watch cliphist store"
@ -41,9 +44,11 @@
riverctl map normal Super L focus-view next
riverctl map normal Alt Tab focus-view next
riverctl map normal Alt+Shift Tab focus-view previous
riverctl map normal Super Tab spawn "riverctl focus-previous-tags; notify-send '$tags tag focused';"
riverctl map normal Super Bracketleft focus-output previous
riverctl map normal Super Bracketright focus-output next
riverctl map normal Super P focus-previous-tags
riverctl map normal Super Tab focus-output next
riverctl map normal Super U focus-output next
riverctl map normal Super+Shift U send-to-output next
# Move Controls
riverctl map normal Super+Shift H swap previous
@ -51,9 +56,8 @@
riverctl map normal Super+Shift K swap previous
riverctl map normal Super+Shift L swap next
riverctl map normal Super+Shift Space zoom
riverctl map normal Super+Shift Tab spawn "riverctl send-to-previous-tags; notify-send '$tags tag applied';"
riverctl map normal Super+Shift Bracketleft send-to-output previous
riverctl map normal Super+Shift Bracketright send-to-output next
riverctl map normal Super+Shift P send-to-previous-tags
riverctl map normal Super+Shift Tab send-to-output next
# Layout Controls
riverctl map normal Super+Alt H send-layout-cmd rivertile "main-ratio -0.05"
@ -66,7 +70,7 @@
riverctl map normal Super Left send-layout-cmd rivertile "main-location left"
# Floating Controls
riverctl map normal Super F toggle-float
riverctl map normal Super+Shift F toggle-float
riverctl map normal Super+Control H move left 100
riverctl map normal Super+Control J move down 100
riverctl map normal Super+Control K move up 100
@ -93,38 +97,54 @@
tags=$((1 << ($i - 1)))
# Super+[1-9] to focus tag [0-8]
riverctl map normal Super $i spawn "riverctl set-focused-tags $tags; notify-send '$tags tag focused';"
riverctl map normal Super $i spawn "riverctl set-focused-tags $tags"
# Super+Shift+[1-9] to tag focused view with tag [0-8]
riverctl map normal Super+Shift $i spawn "riverctl set-view-tags $tags; notify-send '$tags tag applied';"
riverctl map normal Super+Shift $i spawn "riverctl set-view-tags $tags"
# Super+Control+[1-9] to toggle focus of tag [0-8]
riverctl map normal Super+Control $i spawn "riverctl toggle-focused-tags $tags; notify-send 'Tag $tags toggled';"
riverctl map normal Super+Control $i spawn "riverctl toggle-focused-tags $tags"
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
riverctl map normal Super+Shift+Control $i spawn "riverctl toggle-view-tags $tags; notiy-send 'Tag $tags assignment toggle';"
riverctl map normal Super+Shift+Control $i spawn "riverctl toggle-view-tags $tags"
done
MINIMIZED=$((1 << 20 ))
riverctl map normal Super M toggle-focused-tags ''${MINIMIZED}
riverctl map normal Super+Shift M set-view-tags ''${MINIMIZED}
ALL_BUT_MINIMIZED=$(( ((1 << 32) - 1 ) ^ $MINIMIZED ))
riverctl spawn-tagmask ''${ALL_BUT_MINIMIZED}
# Super+0 to focus all tags
# Super+Shift+0 to tag focused view with all tags
all_tags=$(((1 << 32) - 1))
riverctl map normal Super 0 spawn "riverctl set-focused-tags $all_tags; notify-send 'All tags focus toggle';"
riverctl map normal Super+Shift 0 spawn "riverctl set-view-tags $all_tags; notify-send 'All tags assignment toggle';"
riverctl map normal Super 0 spawn "riverctl set-focused-tags $all_tags"
riverctl map normal Super+Shift 0 spawn "riverctl set-view-tags $all_tags"
# Toggle fullscreen
riverctl map normal None F11 toggle-fullscreen
riverctl map normal Super Z toggle-fullscreen
riverctl map normal Super F toggle-fullscreen
# Declare a passthrough mode. This mode has only a single mapping to return to
# normal mode. This makes it useful for testing a nested wayland compositor
# Passthrough Mode
riverctl declare-mode passthrough
# Super+F11 to enter passthrough mode
riverctl map normal Super F11 enter-mode passthrough
# Super+F11 to return to normal mode
riverctl map passthrough Super F11 enter-mode normal
# Command Mode
riverctl declare-mode command
riverctl map normal Super B enter-mode command
riverctl map command None+Shift Comma spawn 'playerctl previous'
riverctl map command None Space spawn 'playerctl play-pause'
riverctl map command None+Shift Period spawn 'playerctl next'
riverctl map command None 1 spawn 'mullvad-browser'
riverctl map command None 2 spawn 'librewolf'
riverctl map command None 3 spawn 'libreoffice'
riverctl map command None 4 spawn 'thunderbird'
riverctl map command None 5 spawn 'discord'
riverctl map command None 6 spawn 'signal-desktop'
riverctl map command None 9 spawn 'steam'
riverctl map command None Z spawn 'riverctl toggle-fullscreen; riverctl enter-mode normal'
riverctl map command None Escape enter-mode normal
# Various media key mapping examples for both normal and locked mode which do
# not have a modifier
for mode in normal locked
@ -146,11 +166,6 @@
riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5'
riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5'
done
MINIMIZED=$((1 << 20 ))
riverctl map normal Super M toggle-focused-tags ''${MINIMIZED}
riverctl map normal Super+Shift M set-view-tags ''${MINIMIZED}
ALL_BUT_MINIMIZED=$(( ((1 << 32) - 1 ) ^ $MINIMIZED ))
riverctl spawn-tagmask ''${ALL_BUT_MINIMIZED}
# Set keyboard repeat rate
riverctl set-repeat 50 300

View File

@ -1,6 +1,10 @@
{ pkgs, config, ... }:
{
programs.tmux = {
enable = true;
baseIndex = 1;
prefix = "C-b";
mouse = false;
extraConfig = ''
# Do not rename windows automatically
set-option -g allow-rename off

View File

@ -10,10 +10,8 @@
"position": "top",
"height": 20,
"fixed-center": false,
"modules-left": [
"river/mode"
],
"modules-right": [
"tray",
"clock"
],
"clock": {
@ -21,7 +19,13 @@
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}",
"interval": 1
}
},
"tray": {
"icon-size": 16,
"spacing": 4,
"show-passive-items": true,
"reverse-direction": true
}
},
{
"exclusive": false,
@ -29,21 +33,8 @@
"height": 20,
"fixed-center": false,
"modules-left": [
"user"
],
"modules-right": [
"tray"
],
"user": {
"format": "{work_d}:{work_H}:{work_M}",
"interval": 1
},
"tray": {
"icon-size": 16,
"spacing": 4,
"show-passive-items": true,
"reverse-direction": true
}
"river/mode"
]
}]
'';
};

View File

@ -1,77 +0,0 @@
{ pkgs, config, ... }:
{
programs.waybar = {
enable = true;
settings = [{
topBar = {
exclusive = false;
position = "top";
height = 22;
spacing = 16;
modules-left = [ "user" ];
modules-right = [ "clock" ];
"user" = {
format = "{work_d}:{work_H}:{work_M}:{work_S}";
interval = 1;
};
"clock" = {
format = "{:%H:%M:%S}";
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
format-alt = "{:%Y-%m-%d}";
interval = 1;
};
};
bottomBar = {
exclusive = false;
position = "bottom";
height = 22;
spacing = 16;
fixed-center = false;
modules-left = [ "river/mode" ];
modules-right = [ "tray" ];
"tray" = {
icon-size = 18;
spacing = 4;
};
};
}];
style = ''
* {
background: transparent;
color: #F2F2F8;
}
#user {
background: #282A36;
border-style: solid;
border-bottom-right-radius: 5px;
border-width: 0 2 2 0;
border-color: #BD93F9;
padding: 0 8 0 8;
}
#clock {
background: #282A36;
border-style: solid;
border-bottom-left-radius: 5px;
border-width: 0 0 2 2;
border-color: #BD93F9;
padding: 0 8 0 8;
}
#mode {
background: #282A36;
border-style: solid;
border-top-right-radius: 5px;
border-width: 2 2 0 0;
border-color: #BD93F9;
padding: 0 8 0 8;
}
#tray {
background: #282A36;
border-style: solid;
border-top-left-radius: 5px;
border-width: 2 0 0 2;
border-color: #BD93F9;
padding: 0 4 0 8;
}
'';
};
}

View File

@ -4,10 +4,12 @@
users.users.${user.name}.packages = with pkgs; [
lagrange
librewolf
luakit
mullvad-browser
offpunk
#onionshare-gui
surfraw
tor-browser-bundle-bin
xurls
];
}

View File

@ -0,0 +1,9 @@
# ClamAV Nixos Configuration
{ config, lib, pkgs, ... }:
{
services.clamav = {
daemon.enable = true;
daemon.settings = {
};
};
}

View File

@ -1,5 +1,5 @@
# All configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
# Enlessh Nixos Configuration
{ config, lib, pkgs, ... }:
{
services = {
openssh = {

View File

@ -0,0 +1,7 @@
# Defense Packages Configuration
{ config, lib, pkgs, ... }:
{
users.users.${user.name}.packages = with pkgs; [
lynis
];
}

View File

@ -9,7 +9,16 @@
imv
mangal
mpv
playerctl
yt-dlp
ytfzf
];
nixpkgs.overlays = [
(self: super: {
mpv = super.mpv.override {
scripts = [ self.mpvScripts.mpris ];
#scripts = [ self.mpvScripts.visualizer ];
};
})
];
}

View File

@ -1,6 +1,9 @@
# Office packages configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
{
imports = [
./samba.nix
];
users.users.${user.name}.packages = with pkgs; [
ledger
libreoffice

View File

@ -0,0 +1,51 @@
# SMB configuration
{ config, lib, pkgs, inputs, user, ... }:
{
services = {
samba = {
enable = true;
# You will still need to set up the user accounts to begin with:
# $ sudo smbpasswd -a yourusername
# This adds to the [global] section:
extraConfig = ''
browseable = yes
smb encrypt = required
'';
shares = {
homes = {
browseable = "no"; # note: each home will be browseable; the "homes" share will not.
"read only" = "no";
"guest ok" = "no";
};
};
};
# mDNS
# This part may be optional for your needs, but I find it makes browsing in Dolphin easier,
# and it makes connecting from a local Mac possible.
avahi = {
enable = true;
nssmdns4 = true;
publish = {
enable = true;
addresses = true;
domain = true;
hinfo = true;
userServices = true;
workstation = true;
};
extraServiceFiles = {
smb = ''
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_smb._tcp</type>
<port>445</port>
</service>
</service-group>
'';
};
};
};
}

View File

@ -9,7 +9,6 @@
systemPackages = with pkgs; [
nixos-shell
quickemu
quickgui
virtiofsd
];
};

View File

@ -1 +0,0 @@
/nix/store/gyd032m3q6hlsvpy6ax5kyim0ps1hal3-river-bsp-layout-1.1.1

View File

@ -1,12 +1,25 @@
# [ ] Web Services
# [ ] Web Services Wishlist
soju/senpai
jellyfin
bitwarden
searx
miniflux
ssh
http
gemini
gopher
## Services
- https://
- Git
- Blog
- Wiki
- Files
- Icecast
- Miniflux
- Bitwarden
- Jellyfin
- Searx
- Fediverse
- gemini://
- gopher://
- ircs://
- soju/senpai
- ssh://
- rtmp://
- Borg backups
- SMB shares
- Tor relay
- Firewall