swayidle, gammastep, backups, base16 wip, weechat, xdg

This commit is contained in:
kat witch 2021-03-24 01:06:16 +00:00
parent 11fe66c3db
commit 22cf8ab600
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
29 changed files with 296 additions and 79 deletions

View file

@ -5,6 +5,7 @@
boot.loader.systemd-boot.configurationLimit = 8;
nixpkgs.config = { allowUnfree = true; };
nix = {
nixPath = [
"nixpkgs=${sources.nixpkgs}"

View file

@ -7,7 +7,9 @@
./packages.nix
./email.nix
./gpg.nix
./weechat.nix
./gtk.nix
./music.nix
./mpv.nix
];
}

View file

@ -16,7 +16,7 @@
realName = "kat witch";
userName = "kat@kittywit.ch";
passwordCommand = ''
bitw -p gpg://${
${pkgs.arc.pkgs.rbw-bitw}/bin/bitw -p gpg://${
../../../private/files/bitw/master.gpg
} get "kittywitch email"'';
msmtp.enable = true;

View file

@ -65,8 +65,6 @@ in {
userChrome = import ./userChrome.css.nix { profile = "lewd"; };
};
};
package =
pkgs.wrapFirefox pkgs.firefox-unwrapped { forceWayland = true; };
};
home.file.".config/tridactyl/tridactylrc".source = ./tridactylrc;

View file

@ -7,19 +7,19 @@
font.name = witch.style.font.name;
settings = {
font_size = witch.style.font.size;
background = witch.style.base16.color0;
background_opacity = "0.9";
foreground = witch.style.base16.color7;
selection_background = witch.style.base16.color7;
selection_foreground = witch.style.base16.color0;
url_color = witch.style.base16.color3;
cursor = witch.style.base16.color7;
active_border_color = "#75715e";
active_tab_background = "#9900ff";
active_tab_foreground = witch.style.base16.color7;
inactive_tab_background = "#3a3a3a";
inactive_tab_foreground = "#665577";
} // witch.style.base16;
# background = witch.style.base16.color0;
background_opacity = "0.95";
# foreground = witch.style.base16.color7;
# selection_background = witch.style.base16.color7;
# selection_foreground = witch.style.base16.color0;
# url_color = witch.style.base16.color3;
# cursor = witch.style.base16.color7;
# active_border_color = "#75715e";
# active_tab_background = "#9900ff";
# active_tab_foreground = witch.style.base16.color7;
# inactive_tab_background = "#3a3a3a";
# inactive_tab_foreground = "#665577";
}; # // witch.style.base16;
};
};
}

View file

@ -0,0 +1,15 @@
{ config, lib, ... }:
{
config = lib.mkIf config.deploy.profile.gui {
programs.mpv = {
enable = true;
config = {
profile = "gpu-hq";
gpu-context = "wayland";
vo = "gpu";
hwdec = "auto";
};
};
};
}

View file

@ -39,6 +39,16 @@
media_library_primary_tag = "album_artist";
search_engine_display_mode = "columns";
};
bindings = [
{
key = "+";
command = "add";
}
{
key = "-";
command = "load";
}
];
};
programs.beets = {
enable = true;
@ -56,6 +66,7 @@
};
services.mpd = {
enable = true;
package = pkgs.mpd-youtube-dl;
network.startWhenNeeded = true;
musicDirectory = "/home/kat/media-share/music";
extraConfig = ''

View file

@ -1,11 +1,16 @@
{ config, lib, pkgs, ... }:
{
let
bitw = pkgs.writeShellScriptBin "bitw" ''
${pkgs.arc.pkgs.rbw-bitw}/bin/bitw -p gpg://${
../../../private/files/bitw/master.gpg
} "$@"'';
in {
config = lib.mkIf config.deploy.profile.gui {
home.packages = with pkgs; [
_1password
bitwarden
arc.pkgs.rbw-bitw
bitw
mpv
element-desktop
mumble
@ -13,6 +18,7 @@
niv
feh
duc
exiftool
audacity
avidemux
vlc

View file

@ -0,0 +1,93 @@
{ config, pkgs, lib, superConfig, ... }:
{
config = lib.mkIf config.deploy.profile.gui {
home.file = {
".local/share/weechat/sec.conf" = lib.mkIf config.deploy.profile.private {
source = "${../../../private/files/weechat/sec.conf}";
};
};
programs.weechat = {
enable = true;
init = lib.mkBefore ''
/server add freenode athame.kittywit.ch/5001 -ssl -autoconnect
/server add espernet athame.kittywit.ch/5001 -ssl -autoconnect
/matrix server add kat kittywit.ch
'';
packageUnwrapped = pkgs.unstable.weechat-unwrapped;
homeDirectory = "${config.xdg.dataHome}/weechat";
plugins.python = {
enable = true;
packages = [ "weechat-matrix" ];
};
scripts = with pkgs.weechatScripts; [
go
auto_away
autosort
colorize_nicks
unread_buffer
urlgrab
vimode-git
weechat-matrix
weechat-notify-send
];
config = {
weechat = {
look = { mouse = true; };
bar = {
buflist = { size_max = 24; };
nicklist = { size_max = 18; };
};
};
urlgrab.default.copycmd = "${pkgs.wl-clipboard}/bin/wl-copy";
plugins.var.python.vimode.copy_clipboard_cmd = "wl-copy";
plugins.var.python.vimode.paste_clipboard_cmd = "wl-paste --no-newline";
plugins.var.python.notify_send.icon = "";
sec = {
crypt = {
passphrase_command = ''
${pkgs.rbw-bitw}/bin/bitw -p gpg://${
../../../private/files/bitw/master.gpg
} get "weechat"'';
hash_algo = "sha512";
};
};
irc = {
look = { server_buffer = "independent"; };
server = {
freenode = {
address = "athame.kittywit.ch/5001";
password = "kat/freenode:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = true;
};
espernet = {
address = "athame.kittywit.ch/5001";
password = "kat/espernet:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = 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"; };
server.kat = {
address = "kittywit.ch";
device_name = "${superConfig.networking.hostName}/weechat";
username = "kat";
password = "\${sec.data.matrix}";
autoconnect = true;
};
};
};
};
};
}

View file

@ -0,0 +1,14 @@
{ config, ... }:
{
config = lib.mkIf config.deploy.profile.kat {
base16 = {
shell.enable = true;
schemes = [ "rebecca.rebecca" ];
};
# home.base16-shell = {
# enable = true;
# defaultTheme = "rebecca.rebecca";
# };
};
}

View file

@ -8,6 +8,7 @@
./kitty.nix
./tmux.nix
./secrets.nix
#./base16.nix
./xdg.nix
./ssh.nix
./packages.nix

View file

@ -5,7 +5,7 @@
home.packages = with pkgs; [
git-crypt
gitAndTools.gitRemoteGcrypt
gitAndTools.gitAnnex
unstable.gitAndTools.gitAnnex
git-revise
arc.pkgs.gitAndTools.git-annex-remote-b2
];
@ -19,7 +19,7 @@
protocol.gcrypt.allow = "always";
annex = {
autocommit = false;
backend = "SHA256";
backend = "BLAKE2B512";
synccontent = true;
};
};

View file

@ -1,5 +1,6 @@
{ config, pkgs, ... }:
{
home.sessionVariables.TERMINFO_DIRS = "${pkgs.kitty.terminfo.outPath}/share/terminfo";
home.sessionVariables.TERMINFO_DIRS =
"${pkgs.kitty.terminfo.outPath}/share/terminfo";
}

View file

@ -2,6 +2,6 @@
{
config = lib.mkIf config.deploy.profile.kat {
home.packages = with pkgs; [ kitty.terminfo weechat ];
home.packages = with pkgs; [ kitty.terminfo ];
};
}

View file

@ -18,6 +18,9 @@
set -g set-titles on
set -g set-titles-string "#T"
# 256 color
set -g default-terminal "screen-256color"
# modes
setw -g clock-mode-colour colour5
setw -g mode-style 'fg=colour1 bg=colour18 bold'

View file

@ -6,7 +6,8 @@
" colors
let base16colorspace=256
colorscheme base16-rebecca
"colorscheme base16-rebecca
colorscheme default
" notmuch!
let g:notmuch_config_file='${config.xdg.configHome}/notmuch/notmuchrc'

View file

@ -1,5 +1,20 @@
{ config, lib, ... }:
{
config = lib.mkIf config.deploy.profile.kat { xdg.enable = true; };
config = lib.mkIf config.deploy.profile.kat {
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";
};
};
};
}

View file

@ -10,6 +10,8 @@
];
shell = pkgs.zsh;
extraGroups = [ "wheel" "video" ];
hashedPassword =
"$6$i28yOXoo$/WokLdKds5ZHtJHcuyGrH2WaDQQk/2Pj0xRGLgS8UcmY2oMv3fw2j/85PRpsJJwCB2GBRYRK5LlvdTleHd3mB.";
};
};

View file

@ -1,5 +1,5 @@
{ config, pkgs, sources, ... }:
{
imports = [ ./waybar ./mako.nix ./sway.nix ];
imports = [ ./waybar ./mako.nix ./sway.nix ./swayidle.nix ./gammastep.nix ];
}

View file

@ -0,0 +1,11 @@
{ config, lib, ... }:
{
config = lib.mkIf config.deploy.profile.sway {
services.gammastep = {
enable = true;
latitude = "51.5074";
longitude = "0.1278";
};
};
}

View file

@ -13,7 +13,7 @@
## See `man 1 grimshot` or `grimshot usage` for further details.
getTargetDirectory() {
echo "/home/kat/scrots"
echo "/home/kat/media/scrots"
}
if [ "$1" = "--notify" ]; then

View file

@ -10,6 +10,22 @@
home.packages = with pkgs; [ grim slurp wl-clipboard jq ];
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 = {
enable = true;
config = let
@ -76,10 +92,6 @@
always = true;
}
{ command = "mkchromecast -t"; }
{
command =
"${pkgs.swayidle}/bin/swayidle -w before-sleep '${lockCommand}'";
}
];
window = {

View file

@ -0,0 +1,26 @@
{ config, pkgs, lib, ... }:
{
config = lib.mkIf config.deploy.profile.sway {
systemd.user.services.swayidle = {
Unit = {
Description = "swayidle";
Documentation = [ "man:swayidle(1)" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = ''
${pkgs.swayidle}/bin/swayidle -w \
timeout 300 '${pkgs.swaylock}/bin/swaylock' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep '${pkgs.swaylock}/bin/swaylock'
'';
RestartSec = 3;
Restart = "always";
};
Install = { WantedBy = [ "sway-session.target" ]; };
};
};
}

View file

@ -18,6 +18,7 @@
"temperature"
"backlight"
"battery"
"idle_inhibitor"
#"mpd"
"network"
"custom/weather"
@ -41,12 +42,20 @@
};
cpu = { format = " {usage}%"; };
#mpd = {
# format = " {album} - {artist} - {title}";
# format = " {albumArtist} - {title}";
# format-stopped = "ﱙ";
# format-paused = " Paused";
# title-len = 16;
#};
memory = { format = " {percentage}%"; };
temperature = { format = " {temperatureC}°C"; };
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
};
};
backlight = {
format = "{icon} {percent}%";
format-icons = [ "" "" ];

View file

@ -9,7 +9,7 @@
min-height: 14px
}
#clock, #memory, #cpu, #temperature, #pulseaudio, #network, #mpd, #backlight, #battery, #custom-weather {
#clock, #memory, #cpu, #temperature, #pulseaudio, #network, #mpd, #backlight, #battery, #custom-weather, #idle_inhibitor {
margin-left: 8px;
margin-right: 8px;
padding-left: 8px;
@ -54,7 +54,7 @@
border-bottom-color: ${style.base16.color2}
}
#mpd { border-color: #5af78e }
#mpd, #idle_inhibitor { border-color: #5af78e }
#mpd.disconnected, #mpd.stopped { border-color: #282a36 }
#network { border-color: ${style.base16.color3} }
#custom-weather { border-color: ${style.base16.color14} }

View file

@ -5,6 +5,8 @@
imports = [
./vim.nix
(sources.tf-nix + "/modules/home/secrets.nix")
(import (sources.arc-nixexprs + "/modules")).home-manager.base16
# (sources.arc-nixexprs + "/modules/home/base16-shell.nix")
(sources.arc-nixexprs + "/modules/home/weechat.nix")
];
}

View file

@ -15,8 +15,8 @@ let
+ (if file.source != null then ''
< ${toString file.source}
'' else ''
<<'EOF'
${file.text}
<<${if hasPrefix "__FUCKERY__" file.text then "EOF" else "'EOF'"}
${removePrefix "__FUCKERY__" file.text}
EOF
'')) (attrValues config.secrets.files);
in {

View file

@ -2,33 +2,26 @@
let
pkgs = import sources.nixpkgs { inherit config; };
overlay = self: super: rec {
dino = super.callPackage "${sources.qyliss-nixlib}/overlays/patches/dino" {
inherit (super) dino;
};
discord = unstable.discord.override { nss = self.nss_latest; };
lib = super.lib.extend
(self: super: { deployEmbedFuckery = txt: "__FUCKERY__" + txt; });
ncmpcpp = unstable.ncmpcpp.override {
visualizerSupport = true;
clockSupport = true;
};
weechat = arc.pkgs.wrapWeechat arc.pkgs.weechat-unwrapped {
configure = { availablePlugins, ... }: {
scripts = [ arc.pkgs.weechatScripts.weechat-matrix ];
plugins = [
availablePlugins.perl
(availablePlugins.python.withPackages
(ps: [ ps.potr ps.weechat-matrix ]))
];
};
};
waybar = super.waybar.override { pulseSupport = true; };
notmuch = super.callPackage ./notmuch { inherit (super) notmuch; };
arc = import sources.arc-nixexprs { pkgs = super; };
unstable = import sources.nixpkgs-unstable { inherit (self) config; };
nur = import sources.NUR {
nurpkgs = self;
@ -46,4 +39,5 @@ let
});
};
in pkgs.extend (overlay)
in (pkgs.extend (import (sources.arc-nixexprs + "/top-level.nix"))).extend
overlay