refactor: get rid of config folder

This commit is contained in:
Kat Inskip 2022-07-08 17:53:16 -07:00
parent 2606e1d874
commit cb3ae5f434
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
254 changed files with 79 additions and 101 deletions

17
users/arc/default.nix Normal file
View file

@ -0,0 +1,17 @@
{ ... }: {
imports = [
({ config, pkgs, ... }:
{
users.users.arc = {
uid = 1001;
isNormalUser = true;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ8Z6briIboxIdedPGObEWB6QEQkvxKvnMW/UVU9t/ac mew-pgp"
];
shell = pkgs.zsh;
};
})
];
}

42
users/hexchen/default.nix Normal file
View file

@ -0,0 +1,42 @@
{ ... }: {
imports = [
({ config, lib, pkgs, ... }:
{
users.users.hexchen = {
uid = 1002;
isNormalUser = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDNVUDKx9sukRkb6INny432+2HZBWx/qIEAOvngF1qcj hexchen@montasch"
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDI3T1eFS77URHZ/HVWkMOqx7W1U54zJtn9C7QWsHOtyH72i/4EVj8SxYqLllElh1kuKUXSUipPeEzVsipFVvfH0wEuTDgFffiSQ3a8lfUgdEBuoySwceEoPgc5deapkOmiDIDeeWlrRe3nqspLRrSWU1DirMxoFPbwqJXRvpl6qJPxRg+2IolDcXlZ6yxB4Vv48vzRfVzZNUz7Pjmy2ebU8PbDoFWL/S3m7yOzQpv3L7KYBz7+rkjuF3AU2vy6CAfIySkVpspZZLtkTGCIJF228ev0e8NvhuN6ZnjzXxVTQOy32HCdPdbBbicu0uHfZ5O7JX9DjGd8kk1r2dnZwwy/ hexchen@yubi5"
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4CLJ+mFfq5XiBXROKewmN9WYmj+79bj/AoaR6Iud2pirulot3tkrrLe2cMjiNWFX8CGVqrsAELKUA8EyUTJfStlcTE0/QNESTRmdDaC+lZL41pWUO9KOiD6/0axAhHXrSJ0ScvbqtD0CtpnCKKxtuOflVPoUGZsH9cLKJNRKfEka0H0GgeKb5Tp618R/WNAQOwaCcXzg/nG4Bgv3gJW4Nm9IKy/MwRZqtILi8Mtd+2diTqpMwyNRmbenmRHCQ1vRw46joYkledVqrmSlfSMFgIHI1zRSBXb/JkG2IvIyB5TGbTkC4N2fqJNpH8wnCKuOvs46xmgdiRA26P48C2em3 hexchen@yubi5c"
];
};
home-manager.users.hexchen = {
programs.vim = {
enable = true;
extraConfig = ''
set viminfo='20,<1000
set mouse=a
'';
};
programs.git = {
enable = true;
userName = "hexchen";
userEmail = "hexchen@lilwit.ch";
signing = {
key = "B1DF5EAD";
};
extraConfig = {
pull.rebase = true;
};
};
programs.bat.enable = true;
programs.jq.enable = true;
};
})
];
}

10
users/kat/base/base16.nix Normal file
View file

@ -0,0 +1,10 @@
{ config, lib, ... }:
{
base16 = {
shell.enable = true;
schemes = [ "atelier.atelier-cave" "atelier.atelier-cave-light" ];
alias.light = "atelier.atelier-cave-light";
alias.dark = "atelier.atelier-cave";
};
}

3
users/kat/base/dconf.nix Normal file
View file

@ -0,0 +1,3 @@
{ config, lib, ... }: {
dconf.enable = lib.mkDefault false; # TODO: is this just broken? # yes, yes it fucking is
}

22
users/kat/base/git.nix Normal file
View file

@ -0,0 +1,22 @@
{ config, pkgs, lib, ... }:
{
programs.git = {
enable = true;
userName = "Kat Inskip";
userEmail = "kat@inskip.me";
extraConfig = {
init = { defaultBranch = "main"; };
protocol.gcrypt.allow = "always";
annex = {
autocommit = false;
backend = "BLAKE2B512";
synccontent = true;
};
};
signing = {
key = "0xE8DDE3ED1C90F3A0";
signByDefault = true;
};
};
}

View file

@ -0,0 +1,21 @@
{ config, ... }:
{
xdg.configFile."inputrc".text = ''
set editing-mode vi
set keyseq-timeout 1
set mark-symlinked-directories on
set completion-prefix-display-length 8
set show-all-if-ambiguous on
set show-all-if-unmodified on
set visible-stats on
set colored-stats on
set bell-style audible
set meta-flag on
set input-meta on
set convert-meta off
set output-meta on
'';
home.sessionVariables.INPUTRC = "${config.xdg.configHome}/inputrc";
}

View file

@ -0,0 +1,24 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [
tmate
htop
fd
sd
duc-cli
bat
exa
socat
rsync
wget
ripgrep
nixpkgs-fmt
pv
progress
zstd
file
whois
neofetch
];
}

View file

@ -0,0 +1,9 @@
{ config, lib, ... }:
{
secrets = {
persistentRoot = lib.mkDefault "${config.xdg.cacheHome}/kat/secrets";
external = true;
};
}

141
users/kat/base/shell.nix Normal file
View file

@ -0,0 +1,141 @@
{ config, lib, pkgs, ... }:
with lib;
let
shellFunAlias = command: replacement: ''
if [[ ! -t 0 ]]; then
command ${command} $@
else
echo 'use ${replacement}!'
fi
'';
shellFunAliases = mapAttrs shellFunAlias;
in
{
home.shell.functions = {
genmac = ''
nix run nixpkgs.openssl -c openssl rand -hex 6 | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1:\2:\3:\4:\5:\6/'
'';
getAlias = ''
printf '%s\n' $aliases[$1]
'';
} // shellFunAliases {
sed = "sd";
find = "fd";
grep = "rg";
yes = "me instead";
};
xdg.dataFile = { "z/.keep".text = ""; };
home.packages = with pkgs; [ fzf fd zsh-completions ];
programs.zsh = {
enable = true;
enableSyntaxHighlighting = true;
enableAutosuggestions = true;
initExtra =
let
zshOpts = [
"auto_pushd"
"pushd_ignore_dups"
"pushdminus"
"rmstarsilent"
"nonomatch"
"long_list_jobs"
"interactivecomments"
"append_history"
"hist_ignore_space"
"hist_verify"
"inc_append_history"
"nosharehistory"
"nomenu_complete"
"auto_menu"
"no_auto_remove_slash"
"complete_in_word"
"always_to_end"
"nolistbeep"
"autolist"
"listrowsfirst"
]; in
''
${if pkgs.stdenv.system != "aarch64-darwin" then ''
eval $(dircolors)
'' else ''
''}
PROMPT_EOL_MARK='''
ZSH_TAB_TITLE_ADDITIONAL_TERMS='foot'
ZSH_TAB_TITLE_ENABLE_FULL_COMMAND=true
zmodload -i zsh/complist
h=()
if [[ -r ~/.ssh/config ]]; then
h=($h ''${''${''${(@M)''${(f)"$(cat ~/.ssh/config)"}:#Host *}#Host }:#*[*?]*})
fi
if [[ $#h -gt 0 ]]; then
zstyle ':completion:*:ssh:*' hosts $h
zstyle ':completion:*:slogin:*' hosts $h
fi
unset h
u=(root ${config.home.username})
zstyle ':completion:*:ssh:*' users $u
unset u
zstyle ':completion:*:*:*:*:*' menu select
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w"
zstyle ':completion:*:complete:pass:*:*' matcher 'r:|[./_-]=** r:|=*' 'l:|=* r:|=*'
zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS}
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'exa -1lb --color=always $realpath'
${lib.concatStringsSep "\n" (map (opt: "setopt ${opt}") zshOpts)}
bindkey '^ ' autosuggest-accept
'';
shellAliases = {
nixdirfmt = "nixpkgs-fmt $(fd -e nix)";
exa = "exa --time-style long-iso";
ls = "exa -G";
la = "exa -Ga";
ll = "exa -l";
lla = "exa -lga";
sys = "systemctl";
sysu = "systemctl --user";
walls = "journalctl _SYSTEMD_INVOCATION_ID=$(systemctl show -p InvocationID --value konawall.service --user) -o json | jq -r '.MESSAGE'";
logu = "journalctl --user";
log = "journalctl";
dmesg = "dmesg -HP";
lg = "log --no-pager | rg";
hg = "history 0 | rg";
};
localVariables = {
_Z_DATA = "${config.xdg.dataHome}/z/data";
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=3,bold";
ZSH_AUTOSUGGEST_USE_ASYNC = 1;
};
plugins = with pkgs.zsh-plugins; (map (plugin: plugin.zshPlugin) [
tab-title
vim-mode
evil-registers
]) ++ (map
(plugin: (with pkgs.${plugin}; {
name = pname;
inherit src;
})) [
"zsh-z"
]) ++ lib.optional (pkgs.hostPlatform == pkgs.buildPlatform) ({
name = "fzf-tab";
src = "${pkgs.zsh-fzf-tab}/share/fzf-tab";
});
};
home.sessionVariables = {
XDG_DATA_HOME = "${config.xdg.dataHome}";
};
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
programs.starship = {
enable = true;
enableZshIntegration = true;
};
programs.direnv = {
enable = true;
enableZshIntegration = true;
};
}

26
users/kat/base/ssh.nix Normal file
View file

@ -0,0 +1,26 @@
{ meta, config, pkgs, lib, ... }:
{
programs.ssh = {
enable = true;
controlMaster = "auto";
controlPersist = "10m";
hashKnownHosts = true;
compression = true;
matchBlocks =
let
common = {
forwardAgent = true;
extraOptions = {
RemoteForward =
"/run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra";
};
port = 62954;
};
in
(lib.foldAttrList (map
(network:
lib.mapAttrs (_: v: { hostname = v.domain; } // common) (lib.filterAttrs (_: v: v.enable) (lib.mapAttrs (_: v: v.network.addresses.${network}) meta.network.nodes.nixos))
) [ "private" "public" ]));
};
}

3
users/kat/base/state.nix Normal file
View file

@ -0,0 +1,3 @@
{ config, ... }: {
home.stateVersion = "20.09";
}

52
users/kat/base/tmux.nix Normal file
View file

@ -0,0 +1,52 @@
{ config, lib, pkgs, ... }:
with lib;
{
programs.zsh.shellAliases = {
tt = "tmux new -AD -s";
};
programs.tmux = {
enable = true;
terminal = "tmux-256color";
keyMode = "vi";
baseIndex = 1;
extraConfig = with mapAttrs (_: v: "colour${toString v}") pkgs.base16.shell.shell256; ''
# proper title handling
set -g set-titles on
set -g set-titles-string "#T"
set -ga terminal-overrides ",xterm-256color:Tc"
# modes
setw -g clock-mode-colour colour8
setw -g mode-style 'fg=${base07} bg=${base02} bold'
# panes
set -g pane-border-style 'fg=${base06} bg=${base02}'
set -g pane-active-border-style 'bg=${base0D} fg=${base07}'
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'bg=${base00} fg=${base06}'
set -g status-left '#[fg=${base06} bg=${base01}] #S@#h '
set -g status-right '#[fg=${base07},bg=${base01}] %F #[fg=${base07},bg=${base02}] %H:%M:%S %Z '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-style 'fg=${base07} bg=${base0D} bold'
setw -g window-status-current-format ' #I#[fg=${base07}]:#[fg=${base07}]#W#[fg=${base07}]#F '
setw -g window-status-style 'fg=${base06} bg=${base03}'
setw -g window-status-format ' #I#[fg=${base07}]:#[fg=${base06}]#W#[${base06}]#F '
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
# messages
set -g message-style 'fg=colour232 bg=colour16 bold'
# mouse
set -g mouse on
'';
};
}

View file

@ -0,0 +1,35 @@
{ config, lib, pkgs, nixos, ... }: with lib;
{
home.sessionVariables = mkIf config.programs.neovim.enable { EDITOR = "nvim"; };
programs.neovim = {
enable = true;
vimAlias = true;
viAlias = true;
plugins = with pkgs.vimPlugins; [
# Disables and re-enables highlighting when searching
vim-cool
# Colour highlighting
vim-hexokinase
# fzf
fzf-vim
# Git porcelain
vim-fugitive
# Start screen
vim-startify
# Re-open with cursor at the same place
vim-lastplace
# Status Bar
lualine-nvim
# EasyMotion Equivalent
hop-nvim
# Languages
vim-nix
vim-terraform
];
extraConfig = ''
luafile ${./init.lua}
'';
};
}

114
users/kat/base/vim/init.lua Normal file
View file

@ -0,0 +1,114 @@
local g = vim.g -- Global variables
local opt = vim.opt -- Set options (global/buffer/windows-scoped)
local api = vim.api -- Lua API
-----------------------------------------------------------
-- General
-----------------------------------------------------------
opt.mouse = 'a' -- Enable mouse support
opt.clipboard = 'unnamedplus' -- Copy/paste to system clipboard
opt.completeopt = 'longest,menuone' -- Autocomplete options
opt.backup = false -- Disable backup
opt.writebackup = false -- Disable backup
opt.ttimeoutlen = 100 -- Mapping timeout
-----------------------------------------------------------
-- Neovim UI
-----------------------------------------------------------
vim.cmd("colorscheme base16-default-dark") -- Color scheme
opt.number = true -- Show line number
opt.relativenumber = true -- Relative line numbers
opt.showmatch = true -- Highlight matching parenthesis
opt.foldmethod = 'marker' -- Enable folding (default 'foldmarker')
opt.colorcolumn = '80' -- Line length marker at 80 columns
opt.splitright = true -- Vertical split to the right
opt.splitbelow = true -- Horizontal split to the bottom
opt.ignorecase = true -- Ignore case letters when search
opt.smartcase = true -- Ignore lowercase for the whole pattern
opt.linebreak = true -- Wrap on word boundary
opt.showbreak = "" -- Character to use to display word boundary
opt.termguicolors = true -- Enable 24-bit RGB colors
opt.laststatus = 3 -- Set global statusline
opt.listchars = 'tab:» ,extends:,precedes:,nbsp:·,trail:✖' -- Set listmode options
opt.cursorline = true -- Highlight cursor screenline
opt.cmdheight = 1 -- Command entry line height
opt.hlsearch = true -- Highlight matches with last search pattern
-----------------------------------------------------------
-- Tabs, indent
-----------------------------------------------------------
opt.expandtab = false -- Use spaces instead of tabs
opt.shiftwidth = 4 -- Shift 4 spaces when tab
opt.tabstop = 4 -- 1 tab == 4 spaces
opt.smartindent = true -- Autoindent new lines
-----------------------------------------------------------
-- Memory, CPU
-----------------------------------------------------------
opt.hidden = true -- Enable background buffers
opt.history = 100 -- Remember N lines in history
opt.lazyredraw = true -- Faster scrolling
opt.synmaxcol = 240 -- Max column for syntax highlight
opt.updatetime = 700 -- ms to wait for trigger an event
-----------------------------------------------------------
-- Base16
-----------------------------------------------------------
vim.base16colorspace=256
api.nvim_create_autocmd("vimenter", {
command = "highlight Normal guibg=NONE ctermbg=NONE"
})
api.nvim_create_autocmd("SourcePost", {
command = "highlight Normal ctermbg=NONE guibg=NONE | " ..
"highlight LineNr ctermbg=NONE guibg=NONE | " ..
"highlight SignColumn ctermbg=NONE guibg=NONE"
})
-----------------------------------------------------------
-- Plugins
-----------------------------------------------------------
-- Hexokinaise
g.Hexokinase_highlighters = {'virtual'}
g.Hexokinase_optInPatterns = {
'full_hex',
'rgb',
'rgba',
'hsl',
'hsla',
'colour_names'
}
-- Lastplace
g.lastplace_ignore = 'gitcommit,gitrebase,svn,hgcommit'
-----------------------------------------------------------
-- Startup
-----------------------------------------------------------
-- Disable builtins plugins
local disabled_built_ins = {
"netrw",
"netrwPlugin",
"netrwSettings",
"netrwFileHandlers",
"gzip",
"zip",
"zipPlugin",
"tar",
"tarPlugin",
"getscript",
"getscriptPlugin",
"vimball",
"vimballPlugin",
"2html_plugin",
"logipat",
"rrhelper",
"spellfile_plugin",
"matchit"
}
for _, plugin in pairs(disabled_built_ins) do
g["loaded_" .. plugin] = 1
end

190
users/kat/base/weechat.nix Normal file
View file

@ -0,0 +1,190 @@
{ config, pkgs, lib, ... }:
with lib;
{
programs.weechat = {
init = lib.mkMerge [
(lib.mkBefore ''
/server add espernet znc.kittywit.ch/5001 -ssl -autoconnect
/server add softnet znc.kittywit.ch/5001 -ssl -autoconnect
/server add liberachat znc.kittywit.ch/5001 -ssl -autoconnect
/matrix server add kittywitch kittywit.ch
/key bind meta-g /go
/key bind meta-v /input jump_last_buffer_displayed
/key bind meta-c /buffer close
/key bind meta-n /bar toggle nicklist
/key bind meta-b /bar toggle buflist
/relay add weechat 9000
'')
(lib.mkAfter ''
/matrix connect kittywitch
/window splith +10
/window 2
/buffer highmon
/window 1
'')
];
homeDirectory = "${config.xdg.dataHome}/weechat";
plugins.python = {
enable = true;
packages = [ "weechat-matrix" ];
};
plugins.perl = {
enable = true;
};
scripts = with pkgs.weechatScripts; [
weechat-go
auto_away
weechat-autosort
parse_relayed_msg
colorize_nicks
unread_buffer
urlgrab
vimode-develop
weechat-matrix
title
highmon
zncplayback
];
config = with mapAttrs (_: toString) pkgs.base16.shell.shell256; {
logger.level.irc = 0;
logger.level.python.matrix = 0;
logger.level.core.weechat = 0;
buflist = {
format = {
indent = "\${if:\${merged}?\${if:\${buffer.prev_buffer.number}!=\${buffer.number}?:\${if:\${buffer.next_buffer.number}==\${buffer.number}?:\${if:\${buffer.next_buffer.name}=~^server||\${buffer.next_buffer.number}<0?:}}}:\${if:\${buffer.active}>0?\${if:\${buffer.next_buffer.name}=~^server?:\${if:\${buffer.next_buffer.number}>0?:}}:\${if:\${buffer.next_buffer.name}=~^server? :}}}";
buffer_current = "\${color:,${base0D}}\${format_buffer}";
hotlist = " \${color:${base0B}}(\${hotlist}\${color:${base0B}})";
hotlist_highlight = "\${color:${base08}}";
hotlist_low = "\${color:${base06}}";
hotlist_message = "\${color:${base0C}}";
hotlist_none = "\${color:${base06}}";
hotlist_private = "\${color:${base09}}";
hotlist_separator = "\${color:${base04}},";
number = "\${color:${base07}}\${number}\${if:\${number_displayed}?.: }";
};
};
weechat = {
look = {
mouse = true;
separator_horizontal = "";
read_marker_string = "";
prefix_same_nick = "";
};
color = {
chat_nick_self = base0E;
separator = base06;
chat_read_marker = base0B;
chat_read_marker_bg = base03;
};
bar = {
buflist = {
size_max = 24;
color_delim = base0E;
};
input = {
items = "[input_prompt]+(away),[input_search],[input_paste],input_text,[vi_buffer]";
color_delim = base0E;
conditions = "\${window.buffer.full_name} != perl.highmon";
};
nicklist = {
size_max = 18;
color_delim = base0E;
};
status = {
color_bg = base02;
color_fg = base06;
color_delim = base0E;
items = "[time],mode_indicator,[buffer_last_number],[buffer_plugin],buffer_number+:+buffer_name+(buffer_modes)+{buffer_nicklist_count}+matrix_typing_notice+buffer_zoom+buffer_filter,scroll,[lag],[hotlist],completion,cmd_completion";
conditions = "\${window.buffer.full_name} != perl.highmon";
};
title = {
color_bg = base02;
color_fg = base06;
color_delim = base0E;
conditions = "\${window.buffer.full_name} != perl.highmon";
};
};
};
urlgrab.default.copycmd = "${pkgs.wl-clipboard}/bin/wl-copy";
plugins.var = {
python = {
title = {
title_prefix = "weechat - ";
show_hotlist = true;
current_buffer_suffix = " [";
title_suffix = " ]";
};
vimode = {
copy_clipboard_cmd = "wl-copy";
paste_clipboard_cmd = "wl-paste --no-newline";
imap_esc_timeout = "100";
search_vim = true;
user_mappings = builtins.toJSON {
"," = "/buffer #{1}<CR>";
"``" = "/input jump_last_buffer_displayed<CR>";
"`n" = "/input jump_smart<CR>";
"k" = "/input history_previous<CR>";
"j" = "/input history_next<CR>";
"p" = "a/input clipboard_paste<ICMD><ESC>";
"P" = "/input clipboard_paste<CR>";
#"u" = "/input undo<CR>";
#"\\x01R" = "/input redo<CR>";
"\\x01K" = "/buffer move -1<CR>";
"\\x01J" = "/buffer move +1<CR>";
};
user_mappings_noremap = builtins.toJSON {
"\\x01P" = "p";
"/" = "i/";
};
user_search_mapping = "?";
mode_indicator_cmd_color_bg = base01;
mode_indicator_cmd_color = base04;
mode_indicator_insert_color_bg = base01;
mode_indicator_insert_color = base04;
mode_indicator_normal_color_bg = base01;
mode_indicator_normal_color = base04;
mode_indicator_replace_color_bg = base01;
mode_indicator_replace_color = base0E;
mode_indicator_search_color_bg = base0E;
mode_indicator_search_color = base04;
no_warn = true;
};
notify_send.icon = "";
go.short_name = true;
};
perl = {
highmon = {
short_names = "on";
output = "buffer";
merge_private = "on";
alignment = "nchannel,nick";
};
parse_relayed_msg = {
servername = "espernet";
supported_bot_names = "cord";
};
};
};
irc = {
look = {
server_buffer = "independent";
color_nicks_in_nicklist = true;
};
};
matrix = {
network = {
max_backlog_sync_events = 30;
lazy_load_room_users = true;
autoreconnect_delay_max = 5;
lag_min-show = 1000;
};
look = {
server_buffer = "independent";
redactions = "notice";
};
};
};
};
}

14
users/kat/darwin.nix Normal file
View file

@ -0,0 +1,14 @@
{ config, pkgs, ... }: {
users.users.kat = {
name = "kat";
home = "/Users/kat";
shell = pkgs.zsh;
uid = 501;
};
users.knownUsers = [
"kat"
];
home-manager.users.kat.programs.zsh.initExtraFirst = ''
source /etc/static/zshrc
'';
}

62
users/kat/default.nix Normal file
View file

@ -0,0 +1,62 @@
{ lib, tree, ... }: with lib; let
wrapImports = imports: mapAttrs
(_: paths: { config, ... }: {
config.home-manager.users.kat = {
imports = singleton paths;
};
})
imports;
dirImports = wrapImports tree.prev;
serviceImports = wrapImports tree.prev.services;
in
dirImports // {
darwin = {
imports = [
dirImports.base
tree.prev.darwin
];
};
base = {
imports = [
dirImports.base
dirImports.linux
tree.prev.nixos
];
};
server = { };
guiX11Full = {
imports = with dirImports; [
gui
i3
dev
media
personal
];
};
guiBase = {
imports = with dirImports; [
gui
dev
media
personal
];
};
guiFlavour = flavour: {
imports = (with dirImports; [
gui
dev
media
personal
]) ++ [ dirImports.${flavour} ];
};
guiFull = {
imports = with dirImports; [
gui
sway
dev
media
personal
];
};
services = serviceImports;
}

View file

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [ cookiecutter ];
home.shell.functions.katenv = ''
cookiecutter cookiecutters --directory $1
'';
}

View file

@ -0,0 +1,58 @@
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets.
(setq user-full-name "kat"
user-mail-address "kat@kittywit.ch")
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
;; are the three important ones:
;;
;; + `doom-font'
;; + `doom-variable-pitch-font'
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;;
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
;; font string. You generally only need these two:
(setq doom-font (font-spec :family "Cozette" :size 13))
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
;;(setq doom-theme '${lib.elemAt (lib.splitString "." base16.alias.default) 1})
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/.org/")
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type t)
(use-package! protobuf-mode
:mode "\\.proto\\'")
;; Here are some additional functions/macros that could help you configure Doom:
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;; this file. Emacs searches the `load-path' when you load packages with
;; `require' or `use-package'.
;; - `map!' for binding new keys
;;
;; To get information about any of these functions/macros, move the cursor over
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
;; This will open documentation for it, including demos of how they are used.
;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.

View file

@ -0,0 +1,186 @@
;;; init.el -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a "Module Index" link where you'll find
;; a comprehensive list of Doom's modules and what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;chinese
;;japanese
:completion
company ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
ivy ; a search engine for love and life
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
doom-quit ; DOOM quit-message prompts when you quit Emacs
;;fill-column ; a `fill-column' indicator
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
indent-guides ; highlighted indent columns
;;(ligatures +iosevka)
minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;pretty-code ; ligatures or substitute text with pretty symbols
;;tabs ; a tab bar for Emacs
treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
;;(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent
:emacs
dired ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
;;ibuffer ; interactive buffer management
(undo +tree) ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
;;spell ; tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make
:tools
;;ansible
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv
docker
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
(lsp +peek)
;;macos ; MacOS-specific commands
magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
pass ; password manager for nerds
pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
;;upload ; map local to remote projects via ssh/ftp
:lang
;;agda ; types of types of types of types...
;;cc ; C/C++/Obj-C madness
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
(elixir +lsp) ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;faust ; dsp, but you get to keep your soul
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
;;(haskell +dante) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ;
json ; At least it ain't XML
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun
;;lean
;;factor
;;ledger ; an accounting system in Emacs
;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
(org
+present
+pretty) ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
python ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;scheme ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
;;web ; the tubes
yaml ; JSON, but readable
:email
;;(mu4e +gmail)
notmuch
;;(wanderlust +gmail)
:app
;;calendar
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
:os
(tty +osc)
:config
;;literate
(default +bindings +smartparens))

View file

@ -0,0 +1,53 @@
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;; To install a package with Doom you must declare them here and run 'doom sync'
;; on the command line, then restart Emacs for the changes to take effect -- or
;; use 'M-x doom/reload'.
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;(package! some-package)
;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
;; https://github.com/raxod502/straight.el#the-recipe-format
;(package! another-package
; :recipe (:host github :repo "username/repo"))
;; If the package you are trying to install does not contain a PACKAGENAME.el
;; file, or is located in a subdirectory of the repo, you'll need to specify
;; `:files' in the `:recipe':
;(package! this-package
; :recipe (:host github :repo "username/repo"
; :files ("some-file.el" "src/lisp/*.el")))
;; If you'd like to disable a package included with Doom, you can do so here
;; with the `:disable' property:
;(package! builtin-package :disable t)
;; You can override the recipe of a built in package without having to specify
;; all the properties for `:recipe'. These will inherit the rest of its recipe
;; from Doom or MELPA/ELPA/Emacsmirror:
;(package! builtin-package :recipe (:nonrecursive t))
;(package! builtin-package-2 :recipe (:repo "myfork/package"))
;; Specify a `:branch' to install a package from a particular branch or tag.
;; This is required for some packages whose default branch isn't 'master' (which
;; our package manager can't deal with; see raxod502/straight.el#279)
;(package! builtin-package :recipe (:branch "develop"))
;; Use `:pin' to specify a particular commit to install.
;(package! builtin-package :pin "1a2b3c4d5e")
;; Doom's packages are pinned to a specific commit and updated from release to
;; release. The `unpin!' macro allows you to unpin single packages...
;(unpin! pinned-package)
;; ...or multiple packages
;(unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t)
(package! base16-theme)
(package! evil-easymotion)
(package! protobuf-mode :recipe (:host github :repo "emacsmirror/protobuf-mode" :files (:defaults "*")))

View file

@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
jq
hyperfine
hexyl
tokei
nixpkgs-fmt
pandoc
hugo
];
}

39
users/kat/dev/rink.nix Normal file
View file

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [
#rink-readline TODO: wait for fix
rink
];
xdg.configFile."rink/config.toml".text = lib.toTOML {
colors = {
enabled = true;
theme = "my_theme";
};
currency = {
cache_duration = "1h";
enabled = true;
endpoint = "https://rinkcalc.app/data/currency.json";
timeout = "2s";
};
rink = {
long_output = true;
prompt = "> ";
};
themes = {
my_theme = {
date_time = "default";
doc_string = "italic";
error = "red";
number = "default";
plain = "default";
pow = "default";
prop_name = "cyan";
quantity = "dimmed cyan";
unit = "cyan";
user_input = "bold";
};
};
};
}

11
users/kat/dev/rustfmt.nix Normal file
View file

@ -0,0 +1,11 @@
{ config, pkgs, ... }:
{
programs.rustfmt = {
enable = true;
config = {
hard_tabs = true;
imports_granularity = "One";
};
};
}

7
users/kat/dev/shell.nix Normal file
View file

@ -0,0 +1,7 @@
{ config, ... }:
{
programs.zsh.shellAliases = {
readmefmt = "pandoc -f markdown -t gfm --reference-links ./readme.md --output readme.md --wrap=preserve";
};
}

135
users/kat/dev/vim/coc.vim Normal file
View file

@ -0,0 +1,135 @@
let g:coc_node_path='@nodejs@/bin/node'
let g:coc_config_home=$XDG_CONFIG_HOME . '/vim/coc'
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" Use <c-space> to trigger completion.
if has('nvim')
inoremap <silent><expr> <c-space> coc#refresh()
else
inoremap <silent><expr> <c-@> coc#refresh()
endif
" Make <CR> auto-select the first completion item and notify coc.nvim to
" format on enter, <cr> could be remapped by other vim plugin
noremap <silent><expr> <C-cr> pumvisible() ? coc#_select_confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
" Use `[g` and `]g` to navigate diagnostics
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)
" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" Use K to show documentation in preview window.
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction
" Highlight the symbol and its references when holding the cursor.
autocmd CursorHold * silent call CocActionAsync('highlight')
" Symbol renaming.
nmap <leader>rn <Plug>(coc-rename)
" Formatting selected code.
xmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
augroup mygroup
autocmd!
" Setup formatexpr specified filetype(s).
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
" Update signature help on jump placeholder.
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end
" Applying codeAction to the selected region.
" Example: `<leader>aap` for current paragraph
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)
" Remap keys for applying codeAction to the current buffer.
nmap <leader>ac <Plug>(coc-codeaction)
" Apply AutoFix to problem on the current line.
nmap <leader>qf <Plug>(coc-fix-current)
" Map function and class text objects
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
xmap if <Plug>(coc-funcobj-i)
omap if <Plug>(coc-funcobj-i)
xmap af <Plug>(coc-funcobj-a)
omap af <Plug>(coc-funcobj-a)
xmap ic <Plug>(coc-classobj-i)
omap ic <Plug>(coc-classobj-i)
xmap ac <Plug>(coc-classobj-a)
omap ac <Plug>(coc-classobj-a)
" Remap <C-f> and <C-b> for scroll float windows/popups.
if has('nvim-0.4.0') || has('patch-8.2.0750')
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
endif
" Use CTRL-S for selections ranges.
" Requires 'textDocument/selectionRange' support of language server.
nmap <silent> <C-s> <Plug>(coc-range-select)
xmap <silent> <C-s> <Plug>(coc-range-select)
" Add `:Format` command to format current buffer.
command! -nargs=0 Format :call CocAction('format')
" Add `:Fold` command to fold current buffer.
command! -nargs=? Fold :call CocAction('fold', <f-args>)
" Add `:OR` command for organize imports of the current buffer.
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
" Add (Neo)Vim's native statusline support.
" NOTE: Please see `:h coc-status` for integrations with external plugins that
" provide custom statusline: lightline.vim, vim-airline.
set statusline^=%{coc#status()}%{get(b:,'coc_current_function',''')}
" Mappings for CoCList
" Show all diagnostics.
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr>
" Manage extensions.
nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr>
" Show commands.
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr>
" Find symbol of current document.
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr>
" Search workspace symbols.
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr>
" Do default action for next item.
nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR>
" Do default action for previous item.
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
" Resume latest coc list.
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>

View file

@ -0,0 +1,20 @@
{ config, pkgs, ... }:
{
programs.neovim = {
extraConfig = ''
luafile ${./init.lua}
'';
extraPackages = with pkgs; [
terraform-ls
];
plugins = with pkgs.vimPlugins; [
neorg
nvim-cmp
plenary-nvim
nvim-base16
telescope-nvim
nvim-lspconfig
];
};
}

View file

@ -0,0 +1,57 @@
local api = vim.api
local cmp = require'cmp'
-----------------------------------------------------------
-- Plugins
-----------------------------------------------------------
-- nvim-cmp
cmp.setup({
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
end,
},
mapping = {
['<C-y>'] = cmp.mapping.confirm({ select = true }),
},
sources = {
{ name = 'neorg' },
}
})
-- lspconfig
require'lspconfig'.terraformls.setup{}
api.nvim_create_autocmd('BufWritePre', {
pattern = '*.tf',
command = 'lua vim.lsp.buf.formatting_sync()'
})
-- neorg
require('neorg').setup {
-- Tell Neorg what modules to load
load = {
['core.defaults'] = {}, -- Load all the default modules
['core.norg.concealer'] = {}, -- Allows for use of icons
['core.norg.dirman'] = { -- Manage your directories with Neorg
config = {
engine = 'nvim-cmp',
workspaces = {
home = '~/neorg'
}
}
}
},
}
-- telescope
api.nvim_set_keymap('n', '<leader>ff', '<cmd>Telescope find_files<cr>', { noremap = true, silent = true })
api.nvim_set_keymap('n', '<leader>fg', '<cmd>Telescope live_grep<cr>', { noremap = true, silent = true })
api.nvim_set_keymap('n', '<leader>fb', '<cmd>Telescope buffers<cr>', { noremap = true, silent = true })
api.nvim_set_keymap('n', '<leader>fh', '<cmd>Telescope help_tags<cr>', { noremap = true, silent = true })
-- hop
vim.api.nvim_set_keymap('', 'f', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true })<cr>", {})
vim.api.nvim_set_keymap('', 'F', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true })<cr>", {})
vim.api.nvim_set_keymap('', 't', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true, hint_offset = -1 })<cr>", {})
vim.api.nvim_set_keymap('', 'T', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true, hint_offset = 1 })<cr>", {})

View file

@ -0,0 +1,6 @@
{ config, lib, pkgs, ... }: {
home.packages = [ pkgs.pinentry-gnome pkgs.adapta-gtk-theme pkgs.papirus-icon-theme ];
services.gpg-agent = {
pinentryFlavor = lib.mkForce "gnome3";
};
}

3
users/kat/gui/base16.nix Normal file
View file

@ -0,0 +1,3 @@
{ config, ... }: {
kw.theme.enable = true;
}

View file

@ -0,0 +1,383 @@
{ config, lib, pkgs, nixos, kw, ... }: with lib;
let
commonSettings = {
"app.update.auto" = false;
"identity.fxaccounts.account.device.name" = nixos.networking.hostName;
"browser.download.lastDir" = "/home/kat/downloads";
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"svg.context-properties.content.enabled" = true;
"services.sync.engine.prefs" = false;
"services.sync.engine.prefs.modified" = false;
"services.sync.engine.passwords" = false;
"services.sync.declinedEngines" = "passwords,adblockplus,prefs";
"media.eme.enabled" = true; # whee drm
"gfx.webrender.all.qualified" = true;
"gfx.webrender.all" = true;
"layers.acceleration.force-enabled" = true;
"gfx.canvas.azure.accelerated" = true;
"browser.ctrlTab.recentlyUsedOrder" = false;
"privacy.resistFingerprinting.block_mozAddonManager" = true;
"extensions.webextensions.restrictedDomains" = "";
"tridactyl.unfixedamo" = true;
"tridactyl.unfixedamo_removed" = true;
"browser.shell.checkDefaultBrowser" = false;
"spellchecker.dictionary" = "en-CA";
"ui.context_menus.after_mouseup" = true;
"browser.warnOnQuit" = false;
"browser.quitShortcut.disabled" = true;
"browser.startup.homepage" = "about:blank";
"browser.contentblocking.category" = "strict";
"browser.discovery.enabled" = false;
"browser.tabs.multiselect" = true;
"browser.tabs.unloadOnLowMemory" = true;
"browser.newtab.privateAllowed" = true;
"browser.newtabpage.enabled" = false;
"browser.urlbar.placeholderName" = "";
"extensions.privatebrowsing.notification" = false;
"browser.startup.page" = 3;
"devtools.chrome.enabled" = true;
"devtools.inspector.showUserAgentStyles" = true;
"services.sync.prefs.sync.privacy.donottrackheader.value" = false;
"services.sync.prefs.sync.browser.safebrowsing.malware.enabled" = false;
"services.sync.prefs.sync.browser.safebrowsing.phishing.enabled" = false;
"app.shield.optoutstudies.enabled" = true;
"datareporting.healthreport.uploadEnabled" = false;
"datareporting.policy.dataSubmissionEnabled" = false;
"datareporting.sessions.current.clean" = true;
"devtools.onboarding.telemetry.logged" = false;
"toolkit.telemetry.updatePing.enabled" = false;
"browser.ping-centre.telemetry" = false;
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false;
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false;
"toolkit.telemetry.bhrPing.enabled" = false;
"toolkit.telemetry.enabled" = false;
"toolkit.telemetry.firstShutdownPing.enabled" = false;
"toolkit.telemetry.hybridContent.enabled" = false;
"toolkit.telemetry.newProfilePing.enabled" = false;
"toolkit.telemetry.reportingpolicy.firstRun" = false;
"toolkit.telemetry.shutdownPingSender.enabled" = false;
"toolkit.telemetry.unified" = false;
"toolkit.telemetry.server" = "";
"toolkit.telemetry.archive.enabled" = false;
"browser.onboarding.enabled" = false;
"experiments.enabled" = false;
"network.allow-experiments" = false;
"social.directories" = "";
"social.remote-install.enabled" = false;
"social.toast-notifications.enabled" = false;
"social.whitelist" = "";
"browser.safebrowsing.malware.enabled" = false;
"browser.safebrowsing.blockedURIs.enabled" = false;
"browser.safebrowsing.downloads.enabled" = false;
"browser.safebrowsing.downloads.remote.enabled" = false;
"browser.safebrowsing.phishing.enabled" = false;
"dom.ipc.plugins.reportCrashURL" = false;
"breakpad.reportURL" = "";
"beacon.enabled" = false;
"browser.search.geoip.url" = "";
"browser.search.region" = "UK";
"browser.search.suggest.enabled" = true;
"browser.search.update" = false;
"browser.selfsupport.url" = "";
"extensions.getAddons.cache.enabled" = false;
"extensions.pocket.enabled" = true;
"geo.enabled" = false;
"geo.wifi.uri" = false;
"media.getusermedia.screensharing.enabled" = false;
"media.video_stats.enabled" = false;
"device.sensors.enabled" = false;
"dom.battery.enabled" = false;
"dom.enable_performance" = false;
"network.dns.disablePrefetch" = false;
"network.http.speculative-parallel-limit" = 8;
"network.predictor.cleaned-up" = true;
"network.predictor.enabled" = true;
"network.prefetch-next" = true;
"security.dialog_enable_delay" = 300;
"dom.event.contextmenu.enabled" = false;
"privacy.trackingprotection.enabled" = true;
"privacy.trackingprotection.fingerprinting.enabled" = true;
"privacy.trackingprotection.cryptomining.enabled" = true;
"privacy.trackingprotection.introCount" = 20;
"signon.rememberSignons" = false;
"xpinstall.whitelist.required" = false;
"xpinstall.signatures.required" = false;
"general.warnOnAboutConfig" = false;
};
in
{
home.file.".mozilla/tst.css" = { inherit (kw.sassTemplate { name = "tst"; src = ./tst.sass; }) source; };
programs.zsh.shellAliases = {
ff-pm = "firefox --ProfileManager";
ff-main = "firefox -P main";
};
home.sessionVariables = {
XDG_CURRENT_DESKTOP = "sway";
};
programs.firefox = {
enable = true;
packageUnwrapped = pkgs.firefox-unwrapped;
wrapperConfig = {
extraPolicies = {
DisableAppUpdate = true;
};
extraNativeMessagingHosts = with pkgs; [
tridactyl-native
] ++ optional config.programs.buku.enable bukubrow;
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
sponsorblock
link-cleaner
a11ycss
canvasblocker
view-image
wappalyzer
auto-tab-discard
bitwarden
darkreader
decentraleyes
foxyproxy-standard
clearurls
df-youtube
tridactyl
old-reddit-redirect
privacy-badger
reddit-enhancement-suite
refined-github
stylus
temporary-containers
browserpass
tree-style-tab
multi-account-containers
ublock-origin
violentmonkey
];
profiles = {
main = {
id = 0;
isDefault = true;
settings = commonSettings;
userChrome = (kw.sassTemplate { name = "userChrome"; src = ./userChrome.sass; }).text;
containers.identities = [
{ id = 7; name = "Professional"; icon = "briefcase"; color = "red"; }
{ id = 8; name = "Shopping"; icon = "cart"; color = "pink"; }
{ id = 9; name = "Sensitive"; icon = "gift"; color = "orange"; }
{ id = 10; name = "Private"; icon = "fence"; color = "blue"; }
];
};
};
};
programs.firefox.tridactyl = let
xsel = if config.deploy.profile.sway then "${pkgs.wl-clipboard}/bin/wl-copy" else "${pkgs.xsel}/bin/xsel";
urxvt = "${pkgs.kitty}/bin/kitty";
mpv = "${config.programs.mpv.finalPackage}/bin/mpv";
vim = "${config.programs.neovim.package}/bin/nvim";
firefox = "${config.programs.firefox.package}/bin/firefox";
in {
enable = true;
sanitise = {
local = true;
sync = true;
};
themes = {
custom = ''
:root.TridactylThemeCustom {
--tridactyl-hintspan-font-family: monospace, courier, sans-serif;
--tridactyl-hintspan-font-size: 12px;
--tridactyl-hintspan-fg: #fff;
--tridactyl-hintspan-bg: #000088;
--tridactyl-hintspan-border-color: #000;
--tridactyl-hintspan-border-width: 1px;
--tridactyl-hintspan-border-style: dashed;
--tridactyl-hint-bg: #ffff99;
--tridactyl-hint-outline: 1px dotted #000;
--tridactyl-hint-active-bg: #00ff00;
--tridactyl-hint-active-outline: 1px dotted #000;
}
:root.TridactylThemeCustom .TridactylHintElem {
opacity: 0.3;
}
:root.TridactylThemeCustom span.TridactylHint {
padding: 1px;
margin-top: 8px;
margin-left: -8px;
opacity: 0.9;
text-shadow: black -1px -1px 0px, black -1px 0px 0px, black -1px 1px 0px, black 1px -1px 0px, black 1px 0px 0px, black 1px 1px 0px, black 0px 1px 0px, black 0px -1px 0px !important;
}
'';
};
extraConfig = mkMerge [
"colors default"
"colors custom"
(mkBefore ''jsb Promise.all(Object.keys(tri.config.get("searchurls")).forEach(u => tri.config.set("searchurls", u, "")))'')
"jsb localStorage.fixedamo = true"
];
autocmd = {
docStart = [
{ urlPattern = ''^https:\/\/www\.reddit\.com''; cmd = ''js tri.excmds.urlmodify("-t", "www", "old")''; }
];
tabEnter = [
{ urlPattern = ".*"; cmd = "unfocus"; } # alternative to `allowautofocus=false`
];
};
exalias = {
wq = "qall";
# whee clipboard stuff
fn_getsel = ''jsb tri.native.run("${xsel} -op").then(r => r.content)'';
fn_getclip = ''jsb tri.native.run("${xsel} -ob").then(r => r.content)'';
fn_setsel = ''jsb -p tri.native.run("${xsel} -ip", JS_ARG)'';
fn_setclip = ''jsb -p tri.native.run("${xsel} -ib", JS_ARG)'';
fn_noempty = "jsb -p return JS_ARG";
};
bindings = [
{ key = ";y"; cmd = ''composite hint -pipe a[href]:not([display="none"]):not([href=""]) href | fn_setsel''; }
{ key = ";Y"; cmd = ''composite hint -pipe a[href]:not([display="none"]):not([href=""]) href | fn_setclip''; }
{ key = ";m"; cmd = ''composite hint -pipe a[href]:not([display="none"]):not([href=""]) href | shellescape | exclaim_quiet ${mpv}''; }
{ key = "F"; cmd = ''composite hint -t -c a[href]:not([display="none"]) href''; }
# mpv --ontop --keepaspect-window --profile=protocol.http
{ mode = "hint"; key = "j"; mods = ["alt"]; cmd = "hint.focusBottomHint"; }
{ mode = "hint"; key = "k"; mods = ["alt"]; cmd = "hint.focusTopHint"; }
{ mode = "hint"; key = "h"; mods = ["alt"]; cmd = "hint.focusLeftHint"; }
{ mode = "hint"; key = "l"; mods = ["alt"]; cmd = "hint.focusRightHint"; }
# Fix hints on google search results
{ urlPattern = ''www\.google\.com''; key = "f"; cmd = "hint -Jc .rc>.r>a"; }
{ urlPattern = ''www\.google\.com''; key = "F"; cmd = "hint -Jtc .rc>.r>a"; }
# Comment toggler for Reddit and Hacker News
{ urlPattern = ''reddit\.com''; key = ";c"; cmd = ''hint -c [class*="expand"],[class="togg"]''; }
# GitHub pull request checkout command to clipboard
{ key = "ygp"; cmd = ''composite js /^https?:\/\/github\.com\/([.0-9a-zA-Z_-]*\/[.0-9a-zA-Z_-]*)\/pull\/([0-9]*)/.exec(document.location.href) | js -p `git fetch https://github.com/''${JS_ARG[1]}.git pull/''${JS_ARG[2]}/head:pull-''${JS_ARG[2]} && git checkout pull-''${JS_ARG[2]}` | fn_setsel''; }
# Git{Hub,Lab} git clone via SSH yank (NOTE: for https just... copy the url!)
{ key = "ygc"; cmd = ''composite js "git clone " + document.location.href.replace(/https?:\/\//,"git@").replace("/",":").replace(/$/,".git") | fn_setsel''; }
# Git add remote (what if you want name to be upstream or something different? can I prompt via fillcmdline..?)
{ key = "ygr"; cmd = ''composite js /^https?:\/\/(github\.com|gitlab\.com)\/([.0-9a-zA-Z_-]*)\/([.0-9a-zA-Z_-]*)/.exec(document.location.href) | js -p `git remote add ''${JS_ARG[3]} https://''${JS_ARG[1]/''${JS_ARG[2]}/''${JS_ARG[3]}.git && git fetch ''${JS_ARG[3]}` | fn_setsel''; }
# I like wikiwand but I don't like the way it changes URLs
{ urlPattern = ''wikiwand\.com''; key = "yy"; cmd = ''composite js document.location.href.replace("wikiwand.com/en","wikipedia.org/wiki") | fn_setsel''; }
# attempt to maintain one tab per window:
# bind F hint -w
# bind T current_url winopen
# bind t fillcmdline winopen
{ key = "r"; cmd = "reload"; }
{ key = "R"; cmd = "reloadhard"; }
{ key = "d"; cmd = "tabclose"; }
{ key = "``"; cmd = "tab #"; }
{ key = "j"; cmd = "scrollline 6"; }
{ key = "k"; cmd = "scrollline -6"; }
{ mode = ["normal" "input" "insert"]; key = "h"; mods = ["ctrl"]; cmd = "tabprev"; }
{ mode = ["normal" "input" "insert"]; key = "l"; mods = ["ctrl"]; cmd = "tabnext"; }
{ mode = ["normal" "input" "insert"]; key = "J"; mods = ["ctrl"]; cmd = "tabnext"; }
{ mode = ["normal" "input" "insert"]; key = "K"; mods = ["ctrl"]; cmd = "tabprev"; }
# TODO: consider C-jk instead of C-hl?
{ mode = ["normal" "input" "insert"]; key = "k"; mods = ["ctrl"]; cmd = "tabmove -1"; }
{ mode = ["normal" "input" "insert"]; key = "j"; mods = ["ctrl"]; cmd = "tabmove +1"; }
{ key = "<Space>"; cmd = "scrollpage 0.75"; }
{ key = "f"; mods = ["ctrl"]; cmd = null; }
{ key = "b"; mods = ["ctrl"]; cmd = null; }
{ mode = "ex"; key = "a"; mods = ["ctrl"]; cmd = null; }
# Make gu take you back to subreddit from comments
{ urlPattern = ''reddit\.com''; key = "gu"; cmd = "urlparent 3"; }
# inpage find (not recommended for actual use)
{ key = "/"; mods = ["ctrl"]; cmd = "fillcmdline find"; }
{ key = "?"; cmd = "fillcmdline find -?"; }
{ key = "n"; cmd = "findnext 1"; }
{ key = "N"; cmd = "findnext -1"; }
{ key = ",<Space>"; cmd = "nohlsearch"; }
{ key = "gi"; cmd = "focusinput -l"; } # this should be 0 but it never seems to focus anything visible or useful?
{ key = "i"; cmd = "focusinput -l"; }
{ key = "I"; cmd = "mode ignore"; }
{ mode = "ignore"; key = "<Escape>"; mods = ["shift"]; cmd = "composite mode normal ; hidecmdline"; }
{ key = "<Insert>"; mods = ["shift"]; cmd = "composite fn_getsel | fillcmdline_notrail open"; }
{ key = "<Insert>"; mods = ["shift" "alt"]; cmd = "composite fn_getclip | fillcmdline_notrail open"; }
{ key = "C"; mods = ["shift" "alt"]; cmd = "composite fn_getsel | fn_setclip"; }
{ mode = ["ex" "input" "insert"]; key = "<Insert>"; mods = ["shift"]; cmd = "composite fn_getsel | text.insert_text"; }
{ mode = ["ex" "input" "insert"]; key = "<Insert>"; mods = ["shift" "alt"]; cmd = "composite fn_getclip | text.insert_text"; }
{ mode = ["ex" "input" "insert"]; key = "V"; mods = ["shift" "alt"]; cmd = "composite fn_getclip | text.insert_text"; }
{ mode = ["ex" "input" "insert"]; key = "C"; mods = ["shift" "alt"]; cmd = "composite fn_getsel | fn_setclip"; }
{ mode = ["insert" "input"]; key = "e"; mods = ["ctrl"]; cmd = "editor"; }
{ key = "<F1>"; cmd = null; }
];
settings = {
#allowautofocus = false;
browser = firefox;
editorcmd = ''${urxvt} -e ${vim} %f -c "normal %lG%cl"'';
nag = false;
leavegithubalone = false;
newtabfocus = "page";
# until empty newtab focus works...
tabopencontaineraware = false;
#storageloc = "local";
#storageloc = "sync";
hintuppercase = false;
hintchars = "fdsqjklmrezauiopwxcvghtybn";
#hintfiltermode = "vimperator-reflow";
#hintnames = "numeric";
modeindicator = true;
modeindicatorshowkeys = true;
autocontainmode = "relaxed";
searchengine = "g";
"searchurls.g" = "https://encrypted.google.com/search?q=%s";
"searchurls.gh" = "https://github.com/search?q=%s";
"searchurls.ghc" = "https://github.com/%s1/search?q=%s2";
"searchurls.ghf" = "https://github.com/%s1/search?q=filename%3a%s2";
"searchurls.ghp" = "https://github.com/%s1/pulls?q=%s2";
"searchurls.ghi" = "https://github.com/%s1/issues?q=is%3aissue+%s2";
"searchurls.gha" = "https://github.com/%s1/issues?q=%s2";
"searchurls.w" = "https://en.wikipedia.org/wiki/Special:Search?search=%s";
"searchurls.ddg" = "https://duckduckgo.com/?q=%s";
"searchurls.r" = "https://reddit.com/r/%s";
"searchurls.rs" = "https://doc.rust-lang.org/std/index.html?search=%s";
"searchurls.crates" = "https://lib.rs/search?q=%s";
"searchurls.docs" = "https://docs.rs/%s1/*/?search=%s2";
"searchurls.nixos" = "https://search.nixos.org/options?channel=unstable&from=0&size=1000&sort=alpha_asc&query=%s";
"searchurls.aur" = "https://aur.archlinux.org/packages/?K=%s";
"searchurls.yt" = "https://www.youtube.com/results?search_query=%s";
"searchurls.az" = "https://www.amazon.ca/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=%s";
"searchurls.gw2" = "https://wiki.guildwars2.com/index.php?title=Special%3ASearch&search=%s&go=Go&ns0=1";
"searchurls.gw2i" = "https://gw2efficiency.com/account/overview?filter.name=%s";
"searchurls.gw2c" = "https://gw2efficiency.com/crafting/recipe-search?filter.orderBy=name&filter.search=%s";
putfrom = "selection";
# set yankto selection
yankto = "both";
externalclipboardcmd = xsel;
};
urlSettings = {
allowautofocus = {
"play\\.rust-lang\\.org" = { value = true; };
"typescriptlang\\.org/play" = { value = true; };
};
};
};
}

View file

@ -0,0 +1,91 @@
*
font-family: $font !important
font-size: $font_size !important
#tabbar
margin-top: calc(var(--pinned-tabs-area-size) - .15em)
position: absolute
border: none !important
overflow-y: scroll !important
margin-left: -.5em
background-color: $base00 !important
border-right: 1px solid $base01
box-shadow: none !important
#tabbar-container
background-color: $base00 !important
border-right: 1px solid $base01
box-shadow: none !important
.tab
background-color: $base01
color: $base05 !important
box-shadow: none !important
margin: 0.125em
border-radius: 0.125em
.twisty
margin-left: -16px
.highlighter::before
display: none
&.pinned
background-color: $base0E
color: $base07 !important
.twisty
margin-left: -16px
.label
margin-left: 7px
.label
margin-left: 7px
margin: 0.25em
.closebox
visibility: collapse
.favicon
margin-left: 0.25em
&:hover
background-color: $base0C !important
color: $base07 !important
&.discarded
background-color: $base00
color: $base02 !important
&:hover
background-color: $base01 !important
color: $base03 !important
&.active
background-color: $base0D
color: $base07 !important
&:hover
background-color: $base0D !important
&.muted
opacity: 0.5
&.sound-playing .label
background: linear-gradient(to right, #6666ff, #0099ff , #00ff00, #ff3399, #6666ff)
background-clip: text
color: transparent
animation: rainbow_animation 3s linear infinite
animation-direction: alternate-reverse
background-size: 400% 100%
.sound-button::before
display: none !important
.newtab-button
display: none
@keyframes rainbow_animation
0%
background-position: 0 0
100%
background-position: 100% 0

View file

@ -0,0 +1,79 @@
$animations: "toolbarbutton", ".toolbarbutton-icon", ".subviewbutton", "#urlbar-background", ".urlbar-icon", "#userContext-indicator", "#userContext-label", ".urlbar-input-box", "#identity-box", "#tracking-protection-icon-container", "[anonid=urlbar-go-button]", ".urlbar-icon-wrapper", "#tracking-protection-icon", "#identity-box image", "stack", "vbox", "tab:not(:active) .tab-background", "tab:not([beforeselected-visible])::after", "tab[visuallyselected] .tab-background::before", "tab[visuallyselected] .tab-background::before", ".tab-close-button"
$base00_backgrounds: "#nav-bar", "toolbar-menubar", "#menubar-items", "#main-menubar"
$extendables: ".urlbar-icon", "#userContext-indicator", "#userContext-label"
%extend_1
fill: transparent !important
background: transparent !important
color: transparent !important
@each $selector in $extendables
#{$selector}
@extend %extend_1
\:root
--animationSpeed: 0.15s
*
font-family: $font !important
font-size: $font_size !important
#TabsToolbar
visibility: collapse
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]
#sidebar-header
visibility: collapse
+ #sidebar-splitter
display: none !important
#back-button
display: none !important
#forward-button
display: none !important
#urlbar-search-mode-indicator
display: none !important
#urlbar
text-align: center
*|input::placeholder
opacity: 0 !important
&:not(:hover):not([breakout][breakout-extend]) > #urlbar-background
box-shadow: none !important
background: $base01 !important
&:hover .urlbar-icon
fill: var(--toolbar-color) !important
&:active .urlbar-icon
fill: var(--toolbar-color) !important
@each $selector in $base00_backgrounds
#{$selector}
background: $base00 !important
#urlbar-background
background: $base01 !important
#star-button
display: none
#navigator-toolbox
border: none !important
.titlebar-spacer
display: none !important
@each $selector in $animations
#{$selector}
transition: var(--animationSpeed) !important
#nav-bar-customization-target > toolbarspring
max-width: none !important
#urlbar[focused] .urlbar-icon
fill: var(--toolbar-color) !important

5
users/kat/gui/fonts.nix Normal file
View file

@ -0,0 +1,5 @@
{ config, ... }:
{
fonts.fontconfig.enable = true;
}

33
users/kat/gui/foot.nix Normal file
View file

@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }:
with lib;
{
programs.foot = {
enable = true;
settings = {
main = {
term = "foot";
locked-title = false;
font = "${config.kw.theme.font.termName}:size=${toString config.kw.theme.font.size}, Twitter Color Emoji:size=8";
font-bold = "${config.kw.theme.font.termName}:size=${toString config.kw.theme.font.size}:style=Bold";
font-italic = "${config.kw.theme.font.termName}:size=${toString config.kw.theme.font.size}:style=Italic";
font-bold-italic = "${config.kw.theme.font.termName}:size=${toString config.kw.theme.font.size}:style=Bold Italic";
dpi-aware = "no";
};
cursor = {
style = "beam";
};
bell = {
urgent = true;
notify = true;
};
colors = {
alpha = "0.9";
};
key-bindings = {
show-urls-copy = "Control+Shift+i";
};
};
};
}

15
users/kat/gui/gtk.nix Normal file
View file

@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }:
{
gtk = {
enable = false;
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
theme = {
name = "Adapta";
package = pkgs.adapta-gtk-theme;
};
};
}

View file

@ -0,0 +1,10 @@
{ config, lib, pkgs, tf, ... }: {
home.sessionVariables = {
HEDGEDOC_SERVER = "https://md.kittywit.ch";
HEDGEDOC_CONFIG_DIR = "${config.home.homeDirectory}/.config/hedgedoc";
};
home.packages = with pkgs; [
hedgedoc-cli
];
}

19
users/kat/gui/kitty.nix Normal file
View file

@ -0,0 +1,19 @@
{ config, ... }:
{
wayland.windowManager.sway.extraSessionCommands = ''
export KITTY_CACHE_DIRECTORY="/tmp/kitty";
'';
programs.kitty = {
enable = true;
font.name = config.kw.theme.font.termName;
settings = {
font_size = toString config.kw.theme.font.size;
bold_font = "auto";
italic_font = "auto";
bold_italic_font = "auto";
background_opacity = "0.9";
disable_ligatures = "cursor";
};
};
}

View file

@ -0,0 +1,16 @@
{ config, pkgs, nixos, lib, ... }:
with lib;
{
services.konawall = {
enable = true;
interval = "30m";
mode = "shuffle";
commonTags = [ "width:>=1600" ];
tagList = map (toList) [
(["score:>=50"
"touhou" "rating:s"]) #++ optional (nixos.networking.hostName == "koishi") "rating:s")
];
};
}

7
users/kat/gui/layout.xkb Normal file
View file

@ -0,0 +1,7 @@
default partial alphanumeric_keys
xkb_symbols "basic" {
include "us(altgr-intl)"
name[Group1] = "English (US, international with pound sign)";
key <AD03> { [ e, E, EuroSign, cent ] };
key <AE03> { [ 3, numbersign, sterling] };
};

View file

@ -0,0 +1,13 @@
{ config, pkgs, ... }: {
services = {
nextcloud-client = {
enable = true;
};
gnome-keyring = {
enable = true;
};
};
home.packages = [
pkgs.gnome3.seahorse
];
}

View file

@ -0,0 +1,28 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [
_1password
btop
bitwarden
discord
exiftool
thunderbird
mumble-develop
dino
tdesktop
headsetcontrol
transmission-remote-gtk
scrcpy
lm_sensors
p7zip
zip
unzip
nyxt
baresip
yubikey-manager
jmtpfs
element-desktop
cryptsetup
];
}

12
users/kat/gui/qt.nix Normal file
View file

@ -0,0 +1,12 @@
{ config, pkgs, ... }:
{
qt = {
enable = true;
platformTheme = "gtk";
style = {
name = "adwaita-dark";
package = pkgs.adwaita-qt;
};
};
}

12
users/kat/gui/ranger.nix Normal file
View file

@ -0,0 +1,12 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
ranger
];
xdg.configFile."ranger/rc.conf".text = ''
set preview_images true
set preview_images_method kitty
'';
}

7
users/kat/gui/xdg.nix Normal file
View file

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
xdg-utils
];
}

9
users/kat/gui/xkb.nix Normal file
View file

@ -0,0 +1,9 @@
{ config, ... }:
{
home.file = {
".xkb/symbols/us_gbp_map".source = ./layout.xkb;
};
home.keyboard = null;
}

49
users/kat/i3/dunst.nix Normal file
View file

@ -0,0 +1,49 @@
{ config, base16, pkgs, lib, ... }: with lib; {
services.dunst = {
enable = true;
iconTheme = {
inherit (config.gtk.iconTheme) package name;
size = mkDefault "32x32";
};
settings = with base16.map.hash.rgba; {
global = {
transparency = 10;
follow = "mouse";
font = "${config.kw.theme.font.name} 9";
width = "(0, 720)"; # min, max
idle_threshold = 60 * 3;
show_age_threshold = 60;
icon_position = "right";
mouse_right_click = "do_action";
mouse_middle_click = "context";
mouse_left_click = "close_current";
show_indicators = false;
fullscreen = "pushback"; # default is to "show"
#dmenu = "${config.programs.dmenu.package}/bin/dmenu";
dmenu = "${config.programs.rofi.package}/bin/rofi";
browser = "${pkgs.xdg-utils}/bin/xdg-open";
};
urgency_low = {
frame_color = background_light;
background = background_selection;
foreground = foreground_alt;
highlight = keyword;
timeout = 10;
};
urgency_normal = {
frame_color = background_light;
background = background;
foreground = foreground;
highlight = keyword;
timeout = 30;
};
urgency_critical = {
frame_color = link; # or url
background = background_light;
foreground = foreground;
highlight = keyword;
timeout = 60;
};
};
};
}

309
users/kat/i3/i3.nix Normal file
View file

@ -0,0 +1,309 @@
{ config, base16, pkgs, lib, ... }: with lib;
let
lockCmd = "${pkgs.i3lock}/bin/i3lock -nc 000000";
in {
programs.zsh.loginExtra = ''
if [[ -z "''${TMUX-}" && -z "''${DISPLAY-}" && "''${XDG_VTNR-}" = 1 && $(${pkgs.coreutils}/bin/id -u) != 0 ]]; then
${pkgs.xorg.xinit}/bin/startx
fi
'';
services = {
i3gopher.enable = true;
screen-locker = {
enable = true;
inherit lockCmd;
xautolock.enable = true;
};
};
home.file.".xinitrc".text = ''
exec ~/.xsession
'';
xsession = {
enable = true;
windowManager.i3 =
let
cfg = config.xsession.windowManager.i3.config;
bindsym = k: v: "bindsym ${k} ${v}";
bindWorkspace = key: workspace: {
"${cfg.modifier}+${key}" = "workspace number ${workspace}";
"${cfg.modifier}+shift+${key}" = "move container to workspace number ${workspace}";
};
workspaceBindings = map (v: bindWorkspace v "${v}:${v}") [
"1"
"2"
"3"
"4"
"5"
"6"
"7"
"8"
"9"
]
++ [ (bindWorkspace "0" "10:10") ]
++ lib.imap1 (i: v: bindWorkspace v "${toString (10 + i)}:${v}") [
"F1"
"F2"
"F3"
"F4"
"F5"
"F6"
"F7"
"F8"
"F9"
"F10"
"F11"
"F12"
];
workspaceBindings' = map (lib.mapAttrsToList bindsym) workspaceBindings;
workspaceBindingsStr = lib.concatStringsSep "\n" (lib.flatten workspaceBindings');
in
{
enable = true;
package = pkgs.i3-gaps;
config =
let
pactl = "${config.home.nixos.hardware.pulseaudio.package or pkgs.pulseaudio}/bin/pactl";
#dmenu = "${pkgs.wofi}/bin/wofi -idbt ${pkgs.kitty}/bin/kitty -s ~/.config/wofi/wofi.css -p '' -W 25%";
dmenu = pkgs.writeShellScriptBin "rofi-wrap" ''${pkgs.rofi}/bin/rofi -combi-modi window,drun,ssh -show combi'';
in
{
modes = {
"System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown" =
{
"l" = "exec ${lockCmd}, mode default";
"e" = "exit, mode default";
"s" = "exec systemctl suspend, mode default";
"h" = "exec systemctl hibernate, mode default";
"r" = "exec systemctl reboot, mode default";
"Shift+s" = "exec systemctl shutdown, mode default";
"Return" = "mode default";
"Escape" = "mode default";
};
};
# bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
bars = [];
fonts = {
names = [ config.kw.theme.font.name ];
style = "Regular";
size = config.kw.theme.font.size;
};
terminal = "${pkgs.kitty}/bin/kitty";
#menu = "${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --no-generic --dmenu=\"${dmenu}\" --term='${pkgs.kitty}/bin/kitty'";
modifier = "Mod4";
assigns = { "12:F2" = [{ class = "screenstub"; }]; };
startup = [
{
command = "gsettings set org.gnome.desktop.interface cursor-theme 'Quintom_Snow'";
}
{
command = "systemctl --user restart dunst";
always = true;
}
{
command = "systemctl --user restart konawall.service";
always = true;
}
];
modes.resize = {
"a" = "resize shrink width 4 px or 4 ppt";
"s" = "resize shrink height 4 px or 4 ppt";
"w" = "resize grow height 4 px or 4 ppt";
"d" = "resize grow width 4 px or 4 ppt";
"Left" = "resize shrink width 4 px or 4 ppt";
"Down" = "resize shrink height 4 px or 4 ppt";
"Up" = "resize grow height 4 px or 4 ppt";
"Right" = "resize grow width 4 px or 4 ppt";
Return = ''mode "default"'';
Escape = ''mode "default"'';
"${cfg.modifier}+z" = ''mode "default"'';
};
window = {
border = 1;
titlebar = false;
hideEdgeBorders = "smart";
};
floating = {
border = 1;
titlebar = false;
};
focus = {
forceWrapping = true;
};
workspaceAutoBackAndForth = true;
keybindings = {
"${cfg.modifier}+Return" = "exec ${cfg.terminal}";
"${cfg.modifier}+x" = "exec ${lockCmd}";
# focus windows - regular
"${cfg.modifier}+Left" = "focus left";
"${cfg.modifier}+Down" = "focus down";
"${cfg.modifier}+Up" = "focus up";
"${cfg.modifier}+Right" = "focus right";
# move window / container - regular
"${cfg.modifier}+shift+Left" = "move left";
"${cfg.modifier}+shift+Down" = "move down";
"${cfg.modifier}+shift+Up" = "move up";
"${cfg.modifier}+shift+Right" = "move right";
# focus output - regular
"${cfg.modifier}+control+Left" = "focus output left";
"${cfg.modifier}+control+Down" = "focus output down";
"${cfg.modifier}+control+Up" = "focus output up";
"${cfg.modifier}+control+Right" = "focus output right";
# move container to output - regular
"${cfg.modifier}+control+shift+Left" = "move container to output left";
"${cfg.modifier}+control+shift+Down" = "move container to output down";
"${cfg.modifier}+control+shift+Up" = "move container to output up";
"${cfg.modifier}+control+shift+Right" = "move container to output right";
# move workspace to output - regular
"${cfg.modifier}+control+shift+Mod1+Left" = "move workspace to output left";
"${cfg.modifier}+control+shift+Mod1+Down" = "move workspace to output down";
"${cfg.modifier}+control+shift+Mod1+Up" = "move workspace to output up";
"${cfg.modifier}+control+shift+Mod1+Right" = "move workspace to output right";
# focus parent/child
"${cfg.modifier}+q" = "focus parent";
"${cfg.modifier}+e" = "focus child";
# floating
"${cfg.modifier}+Shift+space" = "floating toggle";
"${cfg.modifier}+space" = "focus mode_toggle";
# workspace history switching
"${cfg.modifier}+Tab" = "workspace back_and_forth";
"${cfg.modifier}+Shift+Tab" = "exec ${config.services.i3gopher.focus-last}";
# multimedia / laptop
"XF86AudioLowerVolume" = "exec --no-startup-id ${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioMute" = "exec --no-startup-id ${pactl} set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMute+Shift" = "exec --no-startup-id ${pactl} set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86AudioMicMute" = "exec --no-startup-id ${pactl} set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 5";
"XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 5";
# dmenu
"${cfg.modifier}+r" = "exec ${dmenu.exec}";
# screenshots - upload
"${cfg.modifier}+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify upload screen";
"${cfg.modifier}+Shift+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify upload area";
"${cfg.modifier}+Mod1+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify upload active";
"${cfg.modifier}+Mod1+Control+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify upload window";
"${cfg.modifier}+Control+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify upload output";
# screenshots - clipboard
"Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify copys screen";
"Shift+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify copys area";
"Mod1+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify copys active";
"Mod1+Control+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify copys window";
"Control+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify copys output";
# layout handling
"${cfg.modifier}+b" = "splith";
"${cfg.modifier}+v" = "splitv";
"${cfg.modifier}+o" = "layout stacking";
"${cfg.modifier}+i" = "layout tabbed";
"${cfg.modifier}+h" = "layout toggle split";
"${cfg.modifier}+f" = "fullscreen";
# sway specific
"${cfg.modifier}+Shift+q" = "kill";
"${cfg.modifier}+Shift+c" = "reload";
"${cfg.modifier}+Mod1+Shift+c" = "restart";
# mode triggers
"${cfg.modifier}+Shift+r" = "mode resize";
"${cfg.modifier}+Delete" = ''mode "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown"'';
};
colors = let inherit (config.kw.theme) base16; in
{
focused = {
border = base16.base01;
background = base16.base0D;
text = base16.base07;
indicator = base16.base0D;
childBorder = base16.base0D;
};
focusedInactive = {
border = base16.base02;
background = base16.base04;
text = base16.base00;
indicator = base16.base04;
childBorder = base16.base04;
};
unfocused = {
border = base16.base01;
background = base16.base02;
text = base16.base06;
indicator = base16.base02;
childBorder = base16.base02;
};
urgent = {
border = base16.base03;
background = base16.base08;
text = base16.base00;
indicator = base16.base08;
childBorder = base16.base08;
};
};
};
extraConfig = ''
title_align center
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym ${cfg.modifier}+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym equal gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym equal gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
${workspaceBindingsStr}
'';
};
};
}

View file

@ -0,0 +1,2 @@
{ config, ... }: {
}

19
users/kat/i3/picom.nix Normal file
View file

@ -0,0 +1,19 @@
{ config, pkgs, lib, ... }: with lib; {
services.picom = {
enable = true;
experimentalBackends = mkDefault true;
package = mkDefault pkgs.picom-next;
opacityRule = [
# https://wiki.archlinux.org/index.php/Picom#Tabbed_windows_(shadows_and_transparency)
"100:class_g = 'URxvt' && !_NET_WM_STATE@:32a"
"0:_NET_WM_STATE@[0]:32a *= '_NET_WM_STATE_HIDDEN'"
"0:_NET_WM_STATE@[1]:32a *= '_NET_WM_STATE_HIDDEN'"
"0:_NET_WM_STATE@[2]:32a *= '_NET_WM_STATE_HIDDEN'"
"0:_NET_WM_STATE@[3]:32a *= '_NET_WM_STATE_HIDDEN'"
"0:_NET_WM_STATE@[4]:32a *= '_NET_WM_STATE_HIDDEN'"
];
shadowExclude = [
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];
};
}

464
users/kat/i3/polybar.nix Normal file
View file

@ -0,0 +1,464 @@
{ config, base16, pkgs, lib, ... }: with lib; {
systemd.user.services.polybar.Service.Environment = mkForce [
"PATH=/nix/store/bmh5zjsihnyim0pmhgnnmn4adribvns6-polybar-3.5.7/bin:/run/wrappers/bin"
"NOTMUCH_CONFIG=${config.home.sessionVariables.NOTMUCH_CONFIG}"
];
services.polybar = {
enable = true;
script = let
xrandr = filter: "${pkgs.xorg.xrandr}/bin/xrandr -q | ${pkgs.gnugrep}/bin/grep -F ' ${filter}' | ${pkgs.coreutils}/bin/cut -d' ' -f1";
in mkIf config.xsession.enable ''
primary=$(${xrandr "connected primary"})
for display in $(${xrandr "connected"}); do
export POLYBAR_MONITOR=$display
export POLYBAR_MONITOR_PRIMARY=$([[ $primary = $display ]] && echo true || echo false)
export POLYBAR_TRAY_POSITION=$([[ $primary = $display ]] && echo right || echo none)
polybar kat &
done
'';
package = pkgs.polybarFull;
config = {
"bar/base" = {
modules-left = mkMerge [
(mkIf config.xsession.windowManager.i3.enable (mkBefore [ "i3" ]))
[ "title" ]
];
modules-center = mkMerge [
(mkAfter [ "arc" "hex" "miku" "date" ])
];
modules-right = mkMerge [
(mkOrder 1240 [ "pulseaudio" "headset" "mail" ])
(mkOrder 1250 [ "cpu" "temp" "ram" "net-enp34s0" ])
(mkOrder 1490 [ "gpg" ])
];
};
};
settings = let
colours = base16.map.hash.argb;
warn-colour = colours.constant; # or deleted
in with colours; {
"bar/kat" = {
"inherit" = "bar/base";
monitor = {
text = mkIf config.xsession.enable "\${env:POLYBAR_MONITOR:}";
};
height = 20;
enable-ipc = true;
tray = {
maxsize = 12;
position = "\${env:POLYBAR_TRAY_POSITION:right}";
};
offset = {
x = 0;
y = 0;
};
dpi = {
x = 0;
y = 0;
};
spacing = 0;
scroll = {
up = "#i3.prev";
down = "#i3.next";
};
font = [
"${config.kw.theme.font.name}:size=9;2"
"Font Awesome 5 Free Solid:size=9;2"
"Font Awesome 5 Free Brands:size=9;2"
];
padding = {
left = 1;
right = 1;
};
separator = {
text = " ";
foreground = foreground_status;
};
background = "#b219171c";
foreground = foreground_alt;
border = {
bottom = {
size = 1;
color = background_light;
};
};
module-margin = 0;
#click-right = ""; menu of some sort?
};
"module/i3" = mkIf config.xsession.windowManager.i3.enable {
type = "internal/i3";
pin-workspaces = true;
strip-wsnumbers = true;
wrapping-scroll = false;
enable-scroll = false; # handled by bar instead
label = {
mode = {
padding = 2;
foreground = constant;
background = background_selection;
};
focused = {
text = "%name%";
padding = 2;
foreground = background_alt;
background = regex;
};
unfocused = {
text = "%name%";
padding = 2;
foreground = foreground_alt;
background = background_light;
};
visible = {
text = "%name%";
padding = 2;
foreground = foreground;
#background = background;
};
urgent = {
text = "%name%";
padding = 2;
foreground = foreground_status;
background = link;
};
};
};
"module/title" = {
type = "internal/xwindow";
label = {
text = "%title:0:50:%";
padding = 1;
};
format = {
text = "<label>";
background = background_light;
};
format-prefix = {
text = "";
padding = 1;
background = regex;
};
};
"module/sep" = {
type = "custom/text";
content = {
text = "|";
foreground = comment;
};
};
"module/ram" = {
type = "internal/memory";
interval = 4;
format-prefix = {
padding = 1;
text = "";
background = constant;
};
label = {
text = "%percentage_used%%";
padding = 1;
background = background_light;
};
warn-percentage = 90;
format.warn.foreground = warn-colour;
};
"module/cpu" = {
type = "internal/cpu";
format-prefix = {
background = variable;
padding = 1;
text = "";
};
label = {
text = "%percentage%%";
padding = 1;
background = background_light;
};
interval = 2;
warn-percentage = 90;
format.warn.foreground = warn-colour;
};
"module/mpd" = let
ncmpcpp = config.programs.ncmpcpp;
in mkIf ncmpcpp.enable {
type = "internal/mpd";
host = mkIf (ncmpcpp.mpdHost != null) ncmpcpp.mpdHost;
password = mkIf (ncmpcpp.mpdPassword != null) ncmpcpp.mpdPassword;
port = mkIf (ncmpcpp.mpdPort != null) ncmpcpp.mpdPort;
interval = 1;
label-song = " %artist% - %title%";
format = {
online = "<label-time> <label-song>";
playing = "\${self.format-online}";
};
};
"module/net-enp34s0" = {
type = "internal/network";
interface = "enp34s0";
format = {
connected = "<label-connected>";
disconnected = "<label-disconnected>";
};
label = {
connected = {
text = "";
padding = 1;
background = regex;
};
disconnected = {
text = "";
padding = 1;
background = regex;
};
};
};
"module/pulseaudio" = {
type = "internal/pulseaudio";
use-ui-max = false;
interval = 5;
format-muted-prefix = {
padding = 1;
background = warn-colour;
text = "";
};
format = {
background = background_light;
};
format.volume = {
text = "<ramp-volume><label-volume>";
background = background_light;
};
ramp.volume = [
""
""
""
];
ramp-volume-background = keyword;
ramp-volume-padding = 1;
label = {
volume = {
background = background_light;
padding = 1;
};
muted = {
padding = 1;
text = "muted";
background = background_light;
foreground = warn-colour;
};
};
click-right = "${pkgs.kitty}/bin/kitty pulsemixer";
};
"module/date" = {
type = "internal/date";
label = "%date% %time%";
format = {
text = "<label>";
padding = 1;
background = background_light;
};
interval = 1;
date = "%a, %F";
time = "%T";
};
"module/headset" = {
type = "custom/script";
interval = 60;
exec-if = "${pkgs.headsetcontrol}/bin/headsetcontrol -c";
exec = "${pkgs.headsetcontrol}/bin/headsetcontrol -b | ${pkgs.gnugrep}/bin/grep Battery | ${pkgs.coreutils}/bin/cut -d ' ' -f2";
format-prefix = {
text = "";
padding = 1;
background = string;
};
label.padding = 1;
format = {
background = background_light;
text = "<label>";
};
};
"module/gpg" = {
type = "custom/script";
interval = 60;
exec = let
gpgScript = pkgs.writeShellScriptBin "kat-gpg-status" ''
set -eu
set -o pipefail
if gpg --card-status &> /dev/null; then
#user="$(gpg --card-status | grep 'Login data' | awk '{print $NF}')";
status='%{B${string}} %{B-}'
else
status='%{B${variable}} %{B-}'
fi
echo $status
'';
gpgScriptWrapped = pkgs.wrapShellScriptBin "kat-gpg-status" "${gpgScript}/bin/kat-gpg-status" { depsRuntimePath = with pkgs; [ coreutils gnugrep gawk gnupg ]; };
in "${gpgScriptWrapped}/bin/kat-gpg-status";
};
"module/arc" = {
type = "custom/script";
exec = "TZ=America/Vancouver ${pkgs.coreutils}/bin/date +-%H";
format-prefix = {
text = "";
padding = 1;
background = string;
};
label.padding = 1;
format = {
background = background_light;
text = "<label>";
};
interval = 60;
};
"module/hex" = {
type = "custom/script";
exec = "TZ=Europe/Berlin ${pkgs.coreutils}/bin/date ++%H";
format-prefix = {
text = "";
padding = 1;
background = support;
};
label.padding = 1;
format = {
background = background_light;
text = "<label>";
};
interval = 60;
};
"module/miku" = {
type = "custom/script";
exec = "TZ=Pacific/Auckland ${pkgs.coreutils}/bin/date ++%H";
format-prefix = {
text = "";
padding = 1;
background = keyword;
};
label.padding = 1;
format = {
background = background_light;
text = "<label>";
};
interval = 60;
};
"module/mail" = {
type = "custom/script";
exec = "${pkgs.notmuch-arc}/bin/notmuch count tag:flagged OR tag:inbox AND NOT tag:killed";
interval = 60;
label = {
padding = 1;
background = background_light;
};
format-prefix = {
text = "";
background = deprecated;
padding = 1;
};
};
"module/temp" = {
type = "internal/temperature";
ramp = ["" "" ""];
ramp-background = string;
ramp-padding = 1;
ramp-2-background = warn-colour;
interval = mkDefault 5;
base-temperature = mkDefault 30;
format = {
text = "<ramp><label>";
};
label = {
padding = 1;
background = background_light;
text = "%temperature-c%";
warn.foreground = warn-colour;
};
# $ for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done
#thermal-zone = 0;
# Full path of temperature sysfs path
# Use `sensors` to find preferred temperature source, then run
# $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done
# Default reverts to thermal zone setting
#hwmon-path = ?
};
"module/net-wlan" = {
type = "internal/network";
interface = mkIf (! config.home.nixos.networking.wireless.iwd.enable or false) (mkDefault "wlan");
label = {
connected = {
text = "📶 %essid% %downspeed:9%";
foreground = inserted;
};
disconnected = {
text = "Disconnected.";
foreground = warn-colour;
};
};
format-packetloss = "<animation-packetloss> <label-connected>";
animation-packetloss = [
{
text = "!"; # ⚠
foreground = warn-colour;
}
{
text = "📶";
foreground = warn-colour;
}
];
};
"module/net-wired" = {
type = "internal/network";
label = {
connected = {
text = "%ifname% %local_ip%";
foreground = inserted;
};
disconnected = {
text = "Unconnected.";
foreground = warn-colour; # or deleted
};
};
# TODO: formatting
};
"module/fs-prefix" = {
type = "custom/text";
content = {
text = "💽";
};
};
"module/fs-root" = {
type = "internal/fs";
mount = mkBefore [ "/" ];
label-mounted = "%mountpoint% %free% %percentage_used%%";
label-warn = "%mountpoint% %{F${warn-colour}}%free% %percentage_used%%%{F-}";
label-unmounted = "";
warn-percentage = 90;
spacing = 1;
};
"module/mic" = {
type = "custom/ipc";
format = "🎤 <output>";
initial = 1;
click.left = "${config.home.nixos.hardware.pulseaudio.package or pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle && ${config.services.polybar.package}/bin/polybar-msg hook mic 1";
# check if pa default-source is muted, if so, show warning!
# also we trigger an immediate refresh when hitting the keybind
hook = let
pamixer = "${pkgs.pamixer}/bin/pamixer --default-source";
script = pkgs.writeShellScript "checkmute" ''
set -eu
MUTE=$(${pamixer} --get-mute || true)
if [[ $MUTE = true ]]; then
echo muted
else
echo "$(${pamixer} --get-volume)%"
fi
'';
in singleton "${script}";
};
};
};
}

160
users/kat/i3/rofi.nix Normal file
View file

@ -0,0 +1,160 @@
{ config, base16, lib, pkgs, ... }: with lib; {
programs.rofi = {
enable = true;
terminal = "${pkgs.kitty}/bin/kitty";
font = "${config.kw.theme.font.name} 9";
theme = let
# Use `mkLiteral` for string-like values that should show without
# quotes, e.g.:
# {
# foo = "abc"; => foo: "abc";
# bar = mkLiteral "abc"; => bar: abc;
# };
inherit (config.lib.formats.rasi) mkLiteral;
base = base16.map (c: "rgba (${toString c.red.byte}, ${toString c.green.byte}, ${toString c.blue.byte}, ${toString (c.alpha.dec * 100)} % )");
baset = base16.map (c: "rgba (${toString c.red.byte}, ${toString c.green.byte}, ${toString c.blue.byte}, 70% )");
in {
"*" = {
red = mkLiteral base.variable;
blue = mkLiteral base.function;
lightfg = mkLiteral base.foreground_alt;
lightbg = mkLiteral base.background_light;
foreground = mkLiteral base.foreground;
background = mkLiteral base.background;
background-color = mkLiteral baset.background;
separatorcolor = mkLiteral "@foreground";
border-color = mkLiteral "@foreground";
selected-normal-foreground = mkLiteral "@lightbg";
selected-normal-background = mkLiteral "@lightfg";
selected-active-foreground = mkLiteral "@background";
selected-active-background = mkLiteral "@blue";
selected-urgent-foreground = mkLiteral "@background";
selected-urgent-background = mkLiteral "@red";
normal-foreground = mkLiteral "@foreground";
normal-background = mkLiteral "@background";
active-foreground = mkLiteral "@blue";
active-background = mkLiteral "@background";
urgent-foreground = mkLiteral "@red";
urgent-background = mkLiteral "@background";
alternate-normal-foreground = mkLiteral "@foreground";
alternate-normal-background = mkLiteral "@lightbg";
alternate-active-foreground = mkLiteral "@blue";
alternate-active-background = mkLiteral "@lightbg";
alternate-urgent-foreground = mkLiteral "@red";
alternate-urgent-background = mkLiteral "@lightbg";
};
window = {
background-color = mkLiteral "@background";
border = mkLiteral "1";
padding = mkLiteral "5";
};
mainbox = {
border = mkLiteral "0";
padding = mkLiteral "0";
};
message = {
border = mkLiteral "1px dash 0px 0px";
border-color = mkLiteral "@separatorcolor";
padding = mkLiteral "1px";
};
textbox = {
text-color = mkLiteral "@foreground";
};
listview = {
fixed-height = mkLiteral "0";
border = mkLiteral "2px dash 0px 0px";
border-color = mkLiteral "@separatorcolor";
spacing = mkLiteral "2px";
scrollbar = mkLiteral "true";
padding = mkLiteral "2px 0px 0px";
};
"element-text, element-icon" = {
background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit";
};
element = {
border = mkLiteral "0";
padding = mkLiteral "1px";
};
"element normal.normal"= {
background-color = mkLiteral "@normal-background";
text-color = mkLiteral "@normal-foreground";
};
"element normal.urgent" = {
background-color = mkLiteral "@urgent-background";
text-color = mkLiteral "@urgent-foreground";
};
"element normal.active" = {
background-color = mkLiteral "@active-background";
text-color = mkLiteral "@active-foreground";
};
"element selected.normal" = {
background-color = mkLiteral "@selected-normal-background";
text-color = mkLiteral "@selected-normal-foreground";
};
"element selected.urgent" = {
background-color = mkLiteral "@selected-urgent-background";
text-color = mkLiteral "@selected-urgent-foreground";
};
"element selected.active" = {
background-color = mkLiteral "@selected-active-background";
text-color = mkLiteral "@selected-active-foreground";
};
"element alternate.normal" = {
background-color = mkLiteral "@alternate-normal-background";
text-color = mkLiteral "@alternate-normal-foreground";
};
"element alternate.urgent" = {
background-color = mkLiteral "@alternate-urgent-background";
text-color = mkLiteral "@alternate-urgent-foreground";
};
"element alternate.active" = {
background-color = mkLiteral "@alternate-active-background";
text-color = mkLiteral "@alternate-active-foreground";
};
scrollbar = {
width = mkLiteral "4px";
border = mkLiteral "0";
handle-color = mkLiteral "@normal-foreground";
handle-width = mkLiteral "8px";
padding = mkLiteral "0";
};
sidebar = {
border = mkLiteral "2px dash 0px 0px";
border-color = mkLiteral "@separatorcolor";
};
button = {
spacing = mkLiteral "0";
text-color = mkLiteral "@normal-foreground";
};
"button selected" = {
background-color = mkLiteral "@selected-normal-background";
text-color = mkLiteral "@selected-normal-foreground";
};
inputbar = {
spacing = mkLiteral "0px";
text-color = mkLiteral "@normal-foreground";
padding = mkLiteral "1px";
children = map mkLiteral [ "prompt" "textbox-prompt-colon" "entry" "case-indicator" ];
};
case-indicator = {
spacing = mkLiteral "0";
text-color = mkLiteral "@normal-foreground";
};
entry = {
spacing = mkLiteral "0";
text-color = mkLiteral "@normal-foreground";
};
prompt = {
spacing = mkLiteral "0";
text-color = mkLiteral "@normal-foreground";
};
textbox-prompt-colon = {
expand = mkLiteral "false";
str = mkLiteral ''":"'';
margin = mkLiteral "0px 0.3000em 0.0000em 0.0000em";
text-color = mkLiteral "inherit";
};
};
};
}

18
users/kat/linux/xdg.nix Normal file
View file

@ -0,0 +1,18 @@
{ config, lib, ... }:
{
xdg = {
enable = true;
userDirs = {
enable = true;
pictures = "$HOME/media";
videos = "$HOME/media/videos";
documents = "$HOME/docs";
download = "$HOME/downloads";
desktop = "$HOME/tmp";
templates = "$HOME/tmp";
publicShare = "$HOME/shared";
music = "$HOME/media-share/music";
};
};
}

117
users/kat/media/mpv.nix Normal file
View file

@ -0,0 +1,117 @@
{ config, lib, pkgs, ... }: with lib;
{
programs.mpv = {
enable = true;
scripts = [ pkgs.mpvScripts.sponsorblock pkgs.mpvScripts.paused ];
bindings =
let
vim = {
"l" = "seek 5";
"h" = "seek -5";
"k" = "seek 60";
"j" = "seek -60";
"Ctrl+l" = "seek 1 exact";
"Ctrl+h" = "seek -1 exact";
"Ctrl+L" = "sub-seek 1";
"Ctrl+H" = "sub-seek -1";
"Ctrl+k" = "add chapter 1";
"Ctrl+j" = "add chapter -1";
"Ctrl+K" = "playlist-next";
"Ctrl+J" = "playlist-prev";
"Alt+h" = "frame-back-step";
"Alt+l" = "frame-step";
"`" = "cycle mute";
"MBTN_RIGHT" = "cycle pause";
"w" = "screenshot";
"W" = "screenshot video";
"Ctrl+w" = "screenshot window";
"Ctrl+W" = "screenshot each-frame";
"o" = "show-progress";
"O" = "script-message show_osc_dur 5";
"F1" = "cycle sub";
"F2" = "cycle audio";
"Ctrl+p" = "cycle video";
"L" = "add volume 2";
"H" = "add volume -2";
"Alt+H" = "add audio-delay -0.100";
"Alt+L" = "add audio-delay 0.100";
"1" = "set volume 10";
"2" = "set volume 20";
"3" = "set volume 30";
"4" = "set volume 40";
"5" = "set volume 50";
"6" = "set volume 60";
"7" = "set volume 70";
"8" = "set volume 80";
"9" = "set volume 90";
")" = "set volume 150";
"0" = "set volume 100";
"m" = "cycle mute";
"Ctrl+r" = "loadfile \${path}";
"Ctrl+R" = "video-reload";
"d" = "drop-buffers";
"Ctrl+d" = "quit";
};
other = {
"RIGHT" = vim."l";
"LEFT" = vim."h";
"UP" = vim."k";
"DOWN" = vim."j";
"Ctrl+0" = "set speed 1.0";
"Ctrl+=" = "multiply speed 1.1";
"Ctrl+-" = "multiply speed 1/1.1";
"Shift+LEFT" = vim."H";
"Shift+RIGHT" = vim."L";
"Ctrl+RIGHT" = vim."Ctrl+l";
"Ctrl+LEFT" = vim."Ctrl+h";
"Ctrl+Shift+LEFT" = vim."Ctrl+H";
"Ctrl+Shift+RIGHT" = vim."Ctrl+L";
"Ctrl+UP" = vim."Ctrl+k";
"Ctrl+DOWN" = vim."Ctrl+j";
"Ctrl+Shift+UP" = vim."Ctrl+K";
"Ctrl+Shift+DOWN" = vim."Ctrl+J";
"Alt+LEFT" = vim."Alt+h";
"Alt+RIGHT" = vim."Alt+l";
"SPACE" = vim."MBTN_RIGHT";
"m" = vim."`";
"WHEEL_UP" = vim."L";
"WHEEL_DOWN" = vim."H";
};
in
vim // other;
config = mkMerge [
(mkIf config.wayland.windowManager.sway.enable {
gpu-context = "wayland";
})
{
no-input-default-bindings = "";
profile = "gpu-hq";
hwdec = "auto";
vo = "gpu";
volume-max = 200;
keep-open = true;
opengl-waitvsync = true;
demuxer-max-bytes = "2000MiB";
demuxer-max-back-bytes = "250MiB";
osd-scale-by-window = false;
osd-bar-h = 2.5; # 3.125 default
osd-border-size = 2; # font border pixels, default 3
term-osd-bar = true;
script-opts = lib.concatStringsSep ","
(lib.mapAttrsToList (k: v: "${k}=${toString v}") {
ytdl_hook-ytdl_path = "${pkgs.yt-dlp}/bin/yt-dlp";
osc-layout = "slimbox";
osc-vidscale = "no";
osc-deadzonesize = 0.75;
osc-minmousemove = 4;
osc-hidetimeout = 2000;
osc-valign = 0.9;
osc-timems = "yes";
osc-seekbarstyle = "knob";
osc-seekbarkeyframes = "no";
osc-seekrangestyle = "slider";
});
}];
};
}

9
users/kat/media/obs.nix Normal file
View file

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
programs.obs-studio = {
enable = true;
package = pkgs.obs-studio;
plugins = [ pkgs.obs-studio-plugins.wlrobs ];
};
}

View file

@ -0,0 +1,19 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
gst_all_1.gstreamer
gst_all_1.gstreamer.out
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
imv
ffmpeg-full
yt-dlp
mkchromecast
v4l-utils
gimp-with-plugins
wf-recorder
];
}

View file

@ -0,0 +1,50 @@
{ config, lib, tf, ... }:
with lib;
{
kw.secrets.variables = {
syncplay-pass = {
path = "services/media/syncplay";
field = "password";
};
};
programs.syncplay = {
enable = true;
username = "kat";
defaultRoom = "lounge";
server = {
host = "sync.kittywit.ch";
password = tf.variables.syncplay-pass.ref;
};
playerArgs = [
"--ytdl-format=bestvideo[height<=1080]+bestaudio/best[height<=1080]/bestvideo+bestaudio/best"
];
# gui = false;
config = {
client_settings = {
onlyswitchtotrusteddomains = false;
autoplayrequiresamefiles = false;
readyatstart = true;
pauseonleave = false;
rewindondesync = false;
rewindthreshold = 6.0;
fastforwardthreshold = 6.0;
unpauseaction = "Always";
};
gui = {
#autosavejoinstolist = false;
showdurationnotification = false;
};
};
};
secrets.files.syncplay-config = {
text = config.programs.syncplay.configIni;
};
xdg.configFile."syncplay.ini" = mkForce {
source = config.lib.file.mkOutOfStoreSymlink config.secrets.files.syncplay-config.path;
};
}

20
users/kat/nixos.nix Normal file
View file

@ -0,0 +1,20 @@
{ config, pkgs, lib, ... }: with lib;
{
users.users.kat = {
uid = 1000;
isNormalUser = true;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCocjQqiDIvzq+Qu3jkf7FXw5piwtvZ1Mihw9cVjdVcsra3U2c9WYtYrA3rS50N3p00oUqQm9z1KUrvHzdE+03ZCrvaGdrtYVsaeoCuuvw7qxTQRbItTAEsfRcZLQ5c1v/57HNYNEsjVrt8VukMPRXWgl+lmzh37dd9w45cCY1QPi+JXQQ/4i9Vc3aWSe4X6PHOEMSBHxepnxm5VNHm4PObGcVbjBf0OkunMeztd1YYA9sEPyEK3b8IHxDl34e5t6NDLCIDz0N/UgzCxSxoz+YJ0feQuZtud/YLkuQcMxW2dSGvnJ0nYy7SA5DkW1oqcy6CGDndHl5StOlJ1IF9aGh0gGkx5SRrV7HOGvapR60RphKrR5zQbFFka99kvSQgOZqSB3CGDEQGHv8dXKXIFlzX78jjWDOBT67vA/M9BK9FS2iNnBF5x6shJ9SU5IK4ySxq8qvN7Us8emkN3pyO8yqgsSOzzJT1JmWUAx0tZWG/BwKcFBHfceAPQl6pwxx28TM3BTBRYdzPJLTkAy48y6iXW6UYdfAPlShy79IYjQtEThTuIiEzdzgYdros0x3PDniuAP0KOKMgbikr0gRa6zahPjf0qqBnHeLB6nHAfaVzI0aNbhOg2bdOueE1FX0x48sjKqjOpjlIfq4WeZp9REr2YHEsoLFOBfgId5P3BPtpBQ== yubikey5"
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDPsu3vNsvBb/G+wALpstD/DnoRZ3fipAs00jtl8rzDuv96RlS7AJr4aNvG6Pt2D9SYn2wVLaiw+76mz2gOycH9/N+VCvL4/0MN9uqj+7XIcxNRo0gHVOblmi2bOXcmGKh3eRwHj1xyDwRxo9WIuBEP2bPpDPz75OXRtEdlTgvky7siSguQxJu03cb0p9hNAYhUoohNXyWW2CjDCLUQVE1+QRVUzsKq3KkPy0cHYgmZC1gRSMQyKpMt72L5tayLz3Tp/zrshucc+QO5IJeZdqMxsNAcvALsysT1J5EqxZoYH9VpWLRhSgVD6Nvn853pycJAlXQxgOCpSD3/v/JbgUe5NE+ci0o7NMy5IiHUv2gQMRIEhwBHlRGwokUPL9upx0lsjaEiPya5xQqqDKRom87xytM778ANS5CuMdQMWg9qVbpHZUHMjA0QmNkjPgq71pUDXHk5L4mZuS8wVjyjnvlw68yIJuHEc8P7QiLcjvRHFS2L9Ck8NRmPDTQXlQi9kk6LmMyu6fdevR/kZL21b+xO1e2DMyxBbNDTot8luppiiL8adgUDMwptpIne7JCWB1o9NFCbXUVgwuCCYBif6pOGSc6bGo1JTAKMflRlcy6Mi3t5H0mR2lj/sCSTWwTlP5FM4aPIq08NvW6PeuK1bFJY9fIgTwVsUnbAKOhmsMt62w== cardno:12 078 454"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII74JrgGsDQ6r7tD7+k3ykxXV7DpeeFRscPMxrBsDPhz kat@goliath"
];
shell = pkgs.zsh;
extraGroups = [ "wheel" "video" "systemd-journal" "plugdev" "bird2" "vfio" "input" "uinput" ];
hashedPassword = mkIf (config.deploy.profile.trusted) (removeSuffix "\n" config.kw.secrets.repo.kat-user.text);
};
systemd.tmpfiles.rules = [
"f /var/lib/systemd/linger/kat"
];
}

View file

@ -0,0 +1,12 @@
{ config, pkgs, lib, ... }: with lib; {
programs.rbw = {
enable = true;
package = mkIf config.deploy.profile.trusted (pkgs.writeShellScriptBin "bitw" ''${pkgs.rbw-bitw}/bin/bitw -p gpg://${config.kw.secrets.repo.bitw.source} "$@"'');
settings = {
email = "kat@kittywit.ch";
base_url = "https://vault.kittywit.ch";
identity_url = null;
lock_timeout = 3600;
};
};
}

View file

@ -0,0 +1,47 @@
{ config, lib, pkgs, ... }:
{
config = {
programs = {
notmuch = {
enable = true;
hooks = { preNew = "mbsync --all"; };
};
mbsync.enable = true;
msmtp.enable = true;
vim.plugins = [ pkgs.vimPlugins.notmuch-vim ];
neovim.plugins = [ pkgs.vimPlugins.notmuch-vim ];
};
services.imapnotify.enable = false;
accounts.email = {
maildirBasePath = "${config.home.homeDirectory}/mail";
accounts.kat = {
address = "kat@kittywit.ch";
primary = true;
realName = "kat witch";
userName = "kat@kittywit.ch";
msmtp.enable = true;
mbsync = {
enable = true;
create = "maildir";
};
notmuch.enable = true;
imapnotify = {
enable = true;
boxes = [ "Inbox" ];
onNotifyPost = "${pkgs.notmuch}/bin/notmuch new && ${pkgs.libnotify}/bin/notify-send 'New mail arrived'";
};
imap.host = "daiyousei.kittywit.ch";
smtp.host = "daiyousei.kittywit.ch";
passwordCommand = "bitw get services/kittywitch -f password";
gpg = {
signByDefault = true;
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
};
};
};
};
}

View file

@ -0,0 +1,12 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
git-crypt
gitAndTools.gitRemoteGcrypt
git-revise
];
programs.git = {
package = pkgs.gitAndTools.gitFull;
};
}

View file

@ -0,0 +1,18 @@
{ config, lib, pkgs, ... }:
{
home.packages = lib.mkIf (config.services.gpg-agent.pinentryFlavor == "gtk2") (with pkgs; [ pinentry.gtk2 ]);
services.gpg-agent = {
enable = true;
enableExtraSocket = true;
enableSshSupport = false;
pinentryFlavor = "gtk2";
extraConfig = lib.mkMerge [
"auto-expand-secmem 0x30000" # otherwise "gpg: public key decryption failed: Cannot allocate memory"
"pinentry-timeout 30"
"allow-loopback-pinentry"
"enable-ssh-support"
"no-allow-external-cache"
];
};
}

BIN
users/kat/personal/nano.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

View file

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
borgbackup
homebank
];
}

View file

@ -0,0 +1,10 @@
{ config, lib, pkgs, ... }: with lib;
{
home.shell.functions = {
nano = ''
${pkgs.kitty}/bin/kitty +kitten icat ${./nano.png}
'';
};
home.packages = map (attr: pkgs.writeShellScriptBin "abby${attr}" "mpv $(bitw get secrets/abby -f ${attr})") [ "radio" "tv" ];
}

View file

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
programs.neovim = {
extraConfig = ''
source ${./init.vim}
'';
};
}

View file

@ -0,0 +1,8 @@
" notmuch!
let g:notmuch_config_file=$XDG_CONFIG_HOME . '/notmuch/notmuchrc'
let g:notmuch_folders_count_threads=0
let g:notmuch_date_format='%y-%m-%d %H:%M'
let g:notmuch_datetime_format='%y-%m-%d %H:%M'
let g:notmuch_show_date_format='%Y/%m/%d %H:%M'
let g:notmuch_search_date_format='%Y/%m/%d %H:%M'
let g:notmuch_html_converter='@elinks@/bin/elinks --dump'

View file

@ -0,0 +1,72 @@
{ config, nixos, pkgs, lib, ... }:
{
home.file = lib.mkIf config.deploy.profile.trusted (
let
bitw = pkgs.writeShellScriptBin "bitw" ''${pkgs.rbw-bitw}/bin/bitw -p gpg://${config.kw.secrets.repo.bitw.source} "$@"'';
in
{
".local/share/weechat/sec.conf".text = ''
#
# weechat -- sec.conf
#
# WARNING: It is NOT recommended to edit this file by hand,
# especially if WeeChat is running.
#
# Use /set or similar command to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart
#
[crypt]
cipher = aes256
hash_algo = sha512
passphrase_command = "bitw get social/irc/weechat -f password"
salt = on
[data]
__passphrase__ = on
znc = "552E98A5111B986C1003CF86C67DF2AF4B3FDE88E5762FC01EB4A00E31B8363ABFCBBE7A702CB72C298F61D4005D1C5AABB30602BBFCE9E4013CBE88D3D3DB66B18C551743D7816C4F0C9DA44B83DB5807BBB02A48B66D"
matrix = "CC989DF79CDAECC1CE32F10FA9B42B6AE9FA63B41C0B3FCCCD4A309AB798CDEE695E0B4A2E0C975C6364927C76D4FEB25BC84C7AF8989DC418A205A5D62E9330E142E4F11AB59E0720867915DEEFCA70E80102C639D35B"
'';
}
);
programs.weechat = {
enable = true;
config = {
irc = {
server = {
softnet = {
addresses = "znc.kittywit.ch/5001";
password = "kat@${nixos.networking.hostName}/softnet:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = true;
};
liberachat = {
addresses = "znc.kittywit.ch/5001";
password = "kat@${nixos.networking.hostName}/liberachat:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = true;
};
espernet = {
addresses = "znc.kittywit.ch/5001";
password = "kat@${nixos.networking.hostName}/espernet:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = true;
};
};
};
matrix = {
server.kittywitch = {
address = "kittywit.ch";
device_name = "${nixos.networking.hostName}/weechat";
username = "kat";
password = "\${sec.data.matrix}";
};
};
};
};
}

View file

@ -0,0 +1,18 @@
{ config, pkgs, lib, ... }:
{
programs.beets = {
enable = true;
package = pkgs.beets;
settings = {
directory = "~/media-share/music";
library = "~/.local/share/beets.db";
plugins = lib.concatStringsSep " " [
"mpdstats"
"mpdupdate"
"duplicates"
"chroma"
];
};
};
}

View file

@ -0,0 +1,9 @@
{ ... }:
{
imports = [
./mpd.nix
./beets.nix
./ncmpcpp.nix
];
}

View file

@ -0,0 +1,46 @@
{ config, pkgs, ... }:
{
network.firewall = {
public.tcp.ports = [ 6600 32101 ];
private.tcp.ports = [ 6600 32101 ];
};
services.mpd = {
enable = true;
package = pkgs.mpd-youtube-dl;
network = {
startWhenNeeded = true;
listenAddress = "[::]";
};
musicDirectory = "/home/kat/media-share/music";
extraConfig = ''
max_output_buffer_size "32768"
audio_output {
type "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
audio_output {
type "pulse"
name "speaker"
}
audio_output {
bind_to_address "[::]"
type "httpd"
name "httpd-high"
encoder "opus"
bitrate "96000"
port "32101"
max_clients "4"
format "48000:16:2"
always_on "yes"
tags "yes"
}
'';
};
}

View file

@ -0,0 +1,53 @@
{ config, pkgs, ... }:
{
programs.ncmpcpp = {
enable = true;
mpdMusicDir = "/home/kat/media-share/music";
package = pkgs.ncmpcpp-kat;
settings = {
visualizer_data_source = "/tmp/mpd.fifo";
visualizer_output_name = "my_fifo";
visualizer_in_stereo = "yes";
visualizer_type = "spectrum";
visualizer_look = "+|";
user_interface = "alternative";
colors_enabled = "yes";
discard_colors_if_item_is_selected = "no";
header_window_color = "250";
volume_color = "250";
state_line_color = "cyan";
state_flags_color = "cyan";
alternative_ui_separator_color = "yellow";
statusbar_color = "yellow";
progressbar_color = "black";
progressbar_elapsed_color = "blue";
window_border_color = "yellow";
playlist_display_mode = "classic";
song_columns_list_format =
"(3f)[cyan]{n} (40)[default]{t|f} (25)[red]{a} (30)[blue]{b} (4f)[cyan]{l}";
now_playing_prefix = "$b";
song_list_format =
" $7%n$9 $8-$9 $6%a$9 $8-$9 $5%b$9 $R $8%t$9 ($4%l$9) ";
song_library_format = "{%n > }{%t}|{%f}";
song_status_format = "{%a - }{%t - }{%b}";
titles_visibility = "no";
header_visibility = "no";
statusbar_visibility = "no";
now_playing_suffix = "$/b";
progressbar_look = " ";
media_library_primary_tag = "album_artist";
search_engine_display_mode = "columns";
};
bindings = [
{
key = "+";
command = "add";
}
{
key = "-";
command = "load";
}
];
};
}

View file

@ -0,0 +1,89 @@
{ config, lib, nixos, pkgs, tf, ... }:
{
kw.secrets.variables = {
matrix-pass = {
path = "social/matrix";
field = "password";
};
znc-pass = {
path = "social/irc/znc";
field = "password";
};
};
secrets.files.weechat-sec = {
text = ''
#
# weechat -- sec.conf
#
# WARNING: It is NOT recommended to edit this file by hand,
# especially if WeeChat is running.
#
# Use /set or similar command to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart
#
[crypt]
cipher = aes256
hash_algo = sha512
salt = off
[data]
__passphrase__ = off
znc = "${tf.variables.znc-pass.ref}"
matrix = "${tf.variables.matrix-pass.ref}"
'';
owner = "kat";
group = "users";
};
home.file = {
".local/share/weechat/sec.conf".source = config.lib.file.mkOutOfStoreSymlink config.secrets.files.weechat-sec.path;
};
services.weechat.enable = true;
programs.weechat = {
enable = true;
scripts = with pkgs.weechatScripts; [
weechat-notify-send
];
config = {
irc = {
server = {
softnet = {
addresses = "znc.kittywit.ch/5001";
password = "kat@${nixos.networking.hostName}/softnet:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = true;
};
liberachat = {
addresses = "znc.kittywit.ch/5001";
password = "kat@${nixos.networking.hostName}/liberachat:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = true;
};
espernet = {
addresses = "znc.kittywit.ch/5001";
password = "kat@${nixos.networking.hostName}/espernet:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = true;
};
};
};
matrix = {
server.kittywitch = {
address = "kittywit.ch";
device_name = "${nixos.networking.hostName}/weechat";
username = "kat";
password = "\${sec.data.matrix}";
};
};
};
};
}

View file

@ -0,0 +1,10 @@
{ config, lib, ... }:
{
services.gammastep = {
enable = true;
tray = true;
latitude = "43.6532";
longitude = "79.3832";
};
}

30
users/kat/sway/mako.nix Normal file
View file

@ -0,0 +1,30 @@
{ config, pkgs, lib, witch, ... }:
let
inherit (config.kw.theme) base16;
in
{
systemd.user.services = {
mako = {
Unit = {
Description = "mako";
X-Restart-Triggers =
[ (toString config.xdg.configFile."mako/config".source) ];
};
Service = {
ExecStart = "${pkgs.mako}/bin/mako";
Restart = "always";
};
Install = { WantedBy = [ "graphical-session.target" ]; };
};
};
programs.mako = {
enable = true;
font = "${config.kw.theme.font.name} ${toString config.kw.theme.font.size}";
defaultTimeout = 3000;
borderColor = base16.base08;
backgroundColor = "${base16.base00}BF";
textColor = base16.base05;
};
}

View file

@ -0,0 +1,5 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [ sway-scrot ];
}

347
users/kat/sway/sway.nix Normal file
View file

@ -0,0 +1,347 @@
{ config, pkgs, lib, ... }:
let lockCommand = config.programs.swaylock.script; in
{
home.sessionVariables = {
XDG_CURRENT_DESKTOP = "sway";
XDG_SESSION_TYPE = "wayland";
WLR_DRM_DEVICES = "/dev/dri/card0";
};
home.packages = with pkgs; [ grim slurp swaylock-fancy wl-clipboard jq quintom-cursor-theme gsettings-desktop-schemas glib wofi wmctrl ];
services.i3gopher = { enable = true; };
kw.theme.swaylock = true;
programs.zsh.profileExtra = ''
# If running from tty1 start sway
if [ "$(tty)" = "/dev/tty1" ]; then
systemctl --user unset-environment \
SWAYSOCK \
I3SOCK \
WAYLAND_DISPLAY \
DISPLAY \
IN_NIX_SHELL \
__HM_SESS_VARS_SOURCED \
GPG_TTY \
NIX_PATH \
SHLVL
exec env --unset=SHLVL systemd-cat -t sway -- sway
fi
'';
wayland.windowManager.sway =
let
cfg = config.wayland.windowManager.sway.config;
bindsym = k: v: "bindsym ${k} ${v}";
bindWorkspace = key: workspace: {
"${cfg.modifier}+${key}" = "workspace number ${workspace}";
"${cfg.modifier}+shift+${key}" = "move container to workspace number ${workspace}";
};
workspaceBindings = map (v: bindWorkspace v "${v}:${v}") [
"1"
"2"
"3"
"4"
"5"
"6"
"7"
"8"
"9"
]
++ [ (bindWorkspace "0" "10:10") ]
++ lib.imap1 (i: v: bindWorkspace v "${toString (10 + i)}:${v}") [
"F1"
"F2"
"F3"
"F4"
"F5"
"F6"
"F7"
"F8"
"F9"
"F10"
"F11"
"F12"
];
workspaceBindings' = map (lib.mapAttrsToList bindsym) workspaceBindings;
workspaceBindingsStr = lib.concatStringsSep "\n" (lib.flatten workspaceBindings');
in
{
enable = true;
config =
let
pactl = "${config.home.nixosConfig.hardware.pulseaudio.package or pkgs.pulseaudio}/bin/pactl";
dmenu = "${pkgs.wofi}/bin/wofi -idbt ${pkgs.kitty}/bin/kitty -s ~/.config/wofi/wofi.css -p '' -W 25%";
in
{
modes = {
"System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown" =
{
"l" = "exec ${lockCommand}, mode default";
"e" = "exec swaymsg exit, mode default";
"s" = "exec systemctl suspend, mode default";
"h" = "exec systemctl hibernate, mode default";
"r" = "exec systemctl reboot, mode default";
"Shift+s" = "exec systemctl shutdown, mode default";
"Return" = "mode default";
"Escape" = "mode default";
};
};
# bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
bars = [];
input = {
"*" = {
xkb_layout = "us_gbp_map";
xkb_options = "compose:rctrl,ctrl:nocaps";
};
};
fonts = {
names = [ config.kw.theme.font.name ];
style = "Regular";
size = config.kw.theme.font.size;
};
terminal = "${pkgs.kitty}/bin/kitty";
menu = "${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --no-generic --dmenu=\"${dmenu}\" --term='${pkgs.kitty}/bin/kitty'";
modifier = "Mod4";
assigns = { "12:F2" = [{ class = "screenstub"; }]; };
startup = [
{
command = "gsettings set org.gnome.desktop.interface cursor-theme 'Quintom_Snow'";
}
{
command = "systemctl --user restart mako";
always = true;
}
{
command = "systemctl --user restart konawall.service";
always = true;
}
];
modes.resize = {
"a" = "resize shrink width 4 px or 4 ppt";
"s" = "resize shrink height 4 px or 4 ppt";
"w" = "resize grow height 4 px or 4 ppt";
"d" = "resize grow width 4 px or 4 ppt";
"Left" = "resize shrink width 4 px or 4 ppt";
"Down" = "resize shrink height 4 px or 4 ppt";
"Up" = "resize grow height 4 px or 4 ppt";
"Right" = "resize grow width 4 px or 4 ppt";
Return = ''mode "default"'';
Escape = ''mode "default"'';
"${cfg.modifier}+z" = ''mode "default"'';
};
window = {
border = 1;
titlebar = false;
};
floating = {
border = 1;
titlebar = false;
};
keybindings = {
"${cfg.modifier}+Return" = "exec ${cfg.terminal}";
"${cfg.modifier}+x" = "exec ${lockCommand}";
# focus windows - regular
"${cfg.modifier}+Left" = "focus left";
"${cfg.modifier}+Down" = "focus down";
"${cfg.modifier}+Up" = "focus up";
"${cfg.modifier}+Right" = "focus right";
# focus windows - wsad
"${cfg.modifier}+a" = "focus left";
"${cfg.modifier}+s" = "focus down";
"${cfg.modifier}+w" = "focus up";
"${cfg.modifier}+d" = "focus right";
# move window / container - regular
"${cfg.modifier}+Shift+Left" = "move left";
"${cfg.modifier}+Shift+Down" = "move down";
"${cfg.modifier}+Shift+Up" = "move up";
"${cfg.modifier}+Shift+Right" = "move right";
# move window / container - wsad
"${cfg.modifier}+Shift+a" = "move left";
"${cfg.modifier}+Shift+s" = "move down";
"${cfg.modifier}+Shift+w" = "move up";
"${cfg.modifier}+Shift+d" = "move right";
# focus output - regular
"${cfg.modifier}+control+Left" = "focus output left";
"${cfg.modifier}+control+Down" = "focus output down";
"${cfg.modifier}+control+Up" = "focus output up";
"${cfg.modifier}+control+Right" = "focus output right";
# focus output - wsad
"${cfg.modifier}+control+a" = "focus output left";
"${cfg.modifier}+control+s" = "focus output down";
"${cfg.modifier}+control+w" = "focus output up";
"${cfg.modifier}+control+d" = "foVcus output right";
# move container to output - regular
"${cfg.modifier}+control+Shift+Left" = "move container to output left";
"${cfg.modifier}+control+Shift+Down" = "move container to output down";
"${cfg.modifier}+control+Shift+Up" = "move container to output up";
"${cfg.modifier}+control+Shift+Right" = "move container to output right";
# move container to output - wsad
"${cfg.modifier}+control+Shift+a" = "move container to output left";
"${cfg.modifier}+control+Shift+s" = "move container to output down";
"${cfg.modifier}+control+Shift+w" = "move container to output up";
"${cfg.modifier}+control+Shift+d" = "move container to output right";
# move workspace to output - regular
"${cfg.modifier}+control+Shift+Mod1+Left" = "move workspace to output left";
"${cfg.modifier}+control+Shift+Mod1+Down" = "move workspace to output down";
"${cfg.modifier}+control+Shift+Mod1+Up" = "move workspace to output up";
"${cfg.modifier}+control+Shift+Mod1+Right" = "move workspace to output right";
# move workspace to output - wsad
"${cfg.modifier}+control+Shift+Mod1+a" = "move workspace to output left";
"${cfg.modifier}+control+Shift+Mod1+s" = "move workspace to output down";
"${cfg.modifier}+control+Shift+Mod1+w" = "move workspace to output up";
"${cfg.modifier}+control+Shift+Mod1+d" = "move workspace to output right";
# focus parent/child
"${cfg.modifier}+q" = "focus parent";
"${cfg.modifier}+e" = "focus child";
# floating
"${cfg.modifier}+Shift+space" = "floating toggle";
"${cfg.modifier}+space" = "focus mode_toggle";
# workspace history switching
"${cfg.modifier}+Tab" = "workspace back_and_forth";
"${cfg.modifier}+Shift+Tab" = "exec ${config.services.i3gopher.focus-last}";
# multimedia / laptop
"XF86AudioLowerVolume" = "exec --no-startup-id ${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioMute" = "exec --no-startup-id ${pactl} set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMute+Shift" = "exec --no-startup-id ${pactl} set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86AudioMicMute" = "exec --no-startup-id ${pactl} set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 5";
"XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 5";
# dmenu
"${cfg.modifier}+r" = "exec ${cfg.menu}";
# screenshots - upload
"${cfg.modifier}+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify upload screen";
"${cfg.modifier}+Shift+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify upload area";
"${cfg.modifier}+Mod1+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify upload active";
"${cfg.modifier}+Mod1+Control+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify upload window";
"${cfg.modifier}+Control+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify upload output";
# screenshots - clipboard
"Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify copys screen";
"Shift+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify copys area";
"Mod1+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify copys active";
"Mod1+Control+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify copys window";
"Control+Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify copys output";
# layout handling
"${cfg.modifier}+b" = "splith";
"${cfg.modifier}+v" = "splitv";
"${cfg.modifier}+o" = "layout stacking";
"${cfg.modifier}+i" = "layout tabbed";
"${cfg.modifier}+h" = "layout toggle split";
"${cfg.modifier}+f" = "fullscreen";
# sway specific
"${cfg.modifier}+Shift+q" = "kill";
"${cfg.modifier}+Shift+c" = "reload";
# mode triggers
"${cfg.modifier}+Shift+r" = "mode resize";
"${cfg.modifier}+Delete" = ''mode "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown"'';
};
colors = let inherit (config.kw.theme) base16; in
{
focused = {
border = base16.base01;
background = base16.base0D;
text = base16.base07;
indicator = base16.base0D;
childBorder = base16.base0D;
};
focusedInactive = {
border = base16.base02;
background = base16.base04;
text = base16.base00;
indicator = base16.base04;
childBorder = base16.base04;
};
unfocused = {
border = base16.base01;
background = base16.base02;
text = base16.base06;
indicator = base16.base02;
childBorder = base16.base02;
};
urgent = {
border = base16.base03;
background = base16.base08;
text = base16.base00;
indicator = base16.base08;
childBorder = base16.base08;
};
};
};
wrapperFeatures.gtk = true;
extraConfig = ''
hide_edge_borders smart_no_gaps
smart_borders no_gaps
title_align center
seat seat0 xcursor_theme Quintom_Snow 20
workspace_auto_back_and_forth yes
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym ${cfg.modifier}+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym equal gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym equal gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
${workspaceBindingsStr}
'';
};
}

View file

@ -0,0 +1,201 @@
{ config, lib, pkgs, kw, ... }: with lib;
{
xdg.configFile."waybar/style.css" = { inherit (kw.sassTemplate { name = "waybar-style"; src = ./waybar.sass; }) source; };
systemd.user.services.waybar.Service.Environment = singleton "NOTMUCH_CONFIG=${config.home.sessionVariables.NOTMUCH_CONFIG}";
programs.waybar = {
enable = true;
systemd.enable = true;
settings = [{
modules-left = [
"sway/workspaces"
"sway/mode"
"sway/window#icon"
"sway/window"
];
modules-center = [
"custom/arc-h"
"clock#arc"
"custom/hex-h"
"clock#hex"
"custom/miku-h"
"clock#miku"
"clock#original"
];
modules-right = [
"pulseaudio#icon"
"pulseaudio"
"custom/headset-icon"
"custom/headset"
"custom/mail-icon"
"custom/mail"
"custom/cpu-icon"
"cpu"
"custom/memory-icon"
"memory"
"temperature#icon"
"temperature"
"battery#icon"
"battery"
"backlight#icon"
"backlight"
"network"
"idle_inhibitor"
"custom/konawall"
"custom/gpg-status"
"tray"
];
modules = {
"sway/workspaces".format = "{name}";
"sway/window#icon".format = "";
"sway/window".format = "{}";
tray = {
icon-size = 12;
spacing = 2;
};
backlight = {
format = "{icon} {percent}%";
format-icons = ["" ""];
};
"custom/gpg-status" = {
format = "{}";
interval = 300;
return-type = "json";
exec = "${pkgs.waybar-gpg}/bin/kat-gpg-status";
};
"custom/headset-icon" = {
format = "";
interval = 60;
exec-if = "${pkgs.headsetcontrol}/bin/headsetcontrol -c";
exec = "echo 'mew'";
};
"custom/headset" = {
format = "{}";
interval = 60;
exec-if = "${pkgs.headsetcontrol}/bin/headsetcontrol -c";
exec = "${pkgs.headsetcontrol}/bin/headsetcontrol -b | ${pkgs.gnugrep}/bin/grep Battery | ${pkgs.coreutils}/bin/cut -d ' ' -f2";
};
"custom/konawall" = {
format = "{}";
interval = "once";
return-type = "json";
exec = "${pkgs.waybar-konawall}/bin/konawall-status";
on-click = "${pkgs.waybar-konawall}/bin/konawall-toggle";
on-click-right = "systemctl --user restart konawall";
signal = 8;
};
"custom/mail-icon".format = "";
"custom/mail" = {
format = "{}";
interval = 30;
exec = "${pkgs.notmuch-arc}/bin/notmuch count tag:flagged OR tag:inbox AND NOT tag:killed";
};
"custom/cpu-icon".format = "";
cpu.format = "{usage}%";
"custom/memory-icon".format = "";
memory.format = "{percentage}%";
"temperature#icon" = {
format = "{icon}";
format-icons = ["" "" ""];
critical-threshold = 80;
};
temperature = {
format = "{temperatureC}°C";
critical-threshold = 80;
};
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
};
};
"battery#icon" = {
states = {
good = 90;
warning = 30;
critical = 15;
};
format = "{icon}";
format-charging = "";
format-plugged = "";
format-icons = [ "" "" "" "" "" ];
};
battery = {
states = {
good = 90;
warning = 30;
critical = 15;
};
format = "{capacity}%";
format-charging = "{capacity}%";
format-plugged = "{capacity}%";
format-alt = "{time}";
};
"pulseaudio#icon" = {
format = "{icon}";
format-muted = "";
on-click = "foot pulsemixer";
format-icons = {
default = [
""
""
""
];
};
};
pulseaudio = {
format = "{volume}%";
on-click = "foot pulsemixer";
};
network = {
format-wifi = "";
format-ethernet = "";
format-linked = " {ifname} (NO IP)";
format-disconnected = " DC";
format-alt = "{ifname}: {ipaddr}/{cidr}";
tooltip-format-wifi = "{essid} ({signalStrength}%)";
};
"clock#original" = {
format = "{:%a, %F %T}";
tooltip = true;
tooltip-format = "{:%A, %F %T %z (%Z)}";
timezones = [
"Europe/London"
];
interval = 1;
};
"custom/arc-h" = {
format = "";
};
"custom/hex-h" = {
format = "";
};
"custom/miku-h" = {
format = "";
};
"clock#arc" = {
format = "-{:%H}";
tooltip = true;
timezone = "America/Vancouver";
tooltip-format = "{:%A, %F %R %z (%Z)}";
};
"clock#miku" = {
format = "+{:%H}";
tooltip = true;
timezone = "Pacific/Auckland";
tooltip-format = "{:%A, %F %R %z (%Z)}";
};
"clock#hex" = {
format = "+{:%H}";
tooltip = true;
timezone = "Europe/Berlin";
tooltip-format = "{:%A, %F %R %z (%Z)}";
};
};
}];
};
}

View file

@ -0,0 +1,177 @@
%extend_1
padding: 0 6px
transition: none
color: $base00
*
border: none
border-radius: 0
background: none
font-family: $font, "Font Awesome 5 Free Solid", "Font Awesome 5 Brands"
font-size: $font_size
min-height: 12px
text-shadow: none
box-shadow: none
window#waybar
background: $base00t
tooltip
background: $base00t
label
color: $base07
#mode
background: $base01
color: $base06
padding: 0 4px
#clock
@extend %extend_1
background: $base01
color: $base07
#custom-arc-h
@extend %extend_1
background: $base0B
#custom-miku-h
@extend %extend_1
background: $base0C
#custom-hex-h
@extend %extend_1
background: $base0E
#cpu, #memory, #temperature, #pulseaudio, #backlight, #battery, #custom-mail, #custom-headset, #clock.arc, #clock.hex, #clock.miku
background: $base01
color: $base07
padding: 0 6px
margin-right: 4px
#network, #custom-gpg-status, #custom-konawall, #idle_inhibitor
margin: 0 4px
#temperature.icon, #pulseaudio.icon, #battery.icon, #backlight.icon, #custom-cpu-icon, #custom-memory-icon, #custom-mail-icon, #custom-headset-icon, #custom-arc-h, #custom-hex-h, #custom-miku-h, #clock.original, #tray
margin-left: 4px
margin-right: 0px
#custom-headset-icon
@extend %extend_1
background: $base06
#custom-memory-icon
@extend %extend_1
background: $base09
#custom-cpu-icon
@extend %extend_1
background: $base08
#temperature.icon
@extend %extend_1
background: $base0B
#pulseaudio.icon
@extend %extend_1
background: $base06
&.muted
background: $base03
#network
@extend %extend_1
background: $base0C
#mpd
@extend %extend_1
#backlight.icon
@extend %extend_1
background: $base0D
#battery.icon
@extend %extend_1
background: $base0C
#custom-mail-icon
@extend %extend_1
background: $base0F
#custom-konawall
@extend %extend_1
&.enabled
background: $base0E
&.disabled
background: $base0D
#custom-gpg-status
@extend %extend_1
&.enabled
background: $base0B
&.disabled
background: $base08
#idle_inhibitor
@extend %extend_1
&.activated
background: $base0E
&.deactivated
background: $base0D
#tray
@extend %extend_1
background: $base01
padding: 0 10px 0 8px
menu
background: $base00t
color: $base07
.modules-left
margin: 0 4px
#window
margin-right: 0px
widget
label
margin: 0
&:first-child
margin-left: 0
&:last-child
margin-right: 0
.modules-center
margin: 0 4px
.modules-right
margin: 0 4px
#workspaces
background: $base01
padding: 0
margin-right: 8px
button
color: $base06
&.focused
color: $base07
background: $base0D
&:hover
transition: none
box-shadow: inherit
text-shadow: inherit
background: $base06
color: $base0C
#window
background: $base01
padding: 0 4px
color: $base06
border-bottom: 2px solid transparent
window#waybar.empty #window
opacity: 0

View file

@ -0,0 +1,5 @@
{ config, kw, ... }:
{
xdg.configFile."wofi/wofi.css" = { inherit (kw.sassTemplate { name = "wofi-style"; src = ./wofi.sass; }) source; };
}

View file

@ -0,0 +1,26 @@
#scroll
background: $base01
border: 1px solid $base03
#input
background: $base01
border: 1px solid $base0C
margin: 1em
background: $base02
color: $base04
window
font-family: $font
background: $base00t
border-radius: 1em
font-size: $font_size
color: $base07
#outer-box
margin: 1em
#entry
border-bottom: 1px dashed $base04
padding: .75em
&:selected
background-color: $base0D