project-wide: nixdirfmt

This commit is contained in:
kat witch 2021-03-28 21:03:48 +01:00
parent 219efa52ba
commit f92e21126e
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
46 changed files with 997 additions and 987 deletions

View file

@ -2,7 +2,10 @@ rec {
sources = import ./nix/sources.nix;
pkgs = import ./pkgs { inherit sources; };
witch = import ./lib/witch.nix { lib = pkgs.lib; };
profiles = witch.modList { modulesDir = ./profiles; defaultFile = "nixos.nix"; };
profiles = witch.modList {
modulesDir = ./profiles;
defaultFile = "nixos.nix";
};
hosts = import ./lib/hosts.nix { inherit pkgs sources witch profiles; };

View file

@ -1,5 +1 @@
{ ... }: {
imports = [
./sway.nix
];
}
{ ... }: { imports = [ ./sway.nix ]; }

View file

@ -1 +1 @@
{ ... }: {}
{ ... }: { }

View file

@ -1,5 +1 @@
{ ... }: {
imports = [
./sway.nix
];
}
{ ... }: { imports = [ ./sway.nix ]; }

View file

@ -1 +1 @@
{ ... }: {}
{ ... }: { }

View file

@ -1,5 +1,5 @@
{ pkgs, hostsDir ? ../hosts, profiles, pkgsPath ? ../pkgs
, sources ? { }, witch ? { } }:
{ pkgs, hostsDir ? ../hosts, profiles, pkgsPath ? ../pkgs, sources ? { }
, witch ? { } }:
with pkgs.lib;
@ -10,11 +10,7 @@ rec {
hostConfig = hostName:
{ config, ... }: {
_module.args = { inherit hosts groups; };
imports = [
../nixos.nix
../modules/nixos
../modules/nixos/deploy
];
imports = [ ../nixos.nix ../modules/nixos ../modules/nixos/deploy ];
networking = { inherit hostName; };
nixpkgs.pkgs = import pkgsPath {
inherit (config.nixpkgs) config;

View file

@ -1,4 +1,5 @@
{ fetchFromGitHub, makeWrapper, lib, stdenv, jp2a, imagemagick, curl, neofetch }:
{ fetchFromGitHub, makeWrapper, lib, stdenv, jp2a, imagemagick, curl, neofetch
}:
stdenv.mkDerivation rec {
pname = "nekofetch";
@ -11,10 +12,9 @@ stdenv.mkDerivation rec {
sha256 = "03p1br1pn9j9nsdjg29rdznm5qh34p8dx0834rgmlc3pxlr910ng";
};
nativeBuildInputs = [ makeWrapper ];
buildPhase = ''true'';
buildPhase = "true";
installPhase = ''
mkdir -p $out/bin

View file

@ -3,5 +3,9 @@
{
imports = [ ./home ];
options = { deploy.profile.gui = lib.mkEnableOption "graphical system" // { default = true; }; };
options = {
deploy.profile.gui = lib.mkEnableOption "graphical system" // {
default = true;
};
};
}

View file

@ -1,34 +1,34 @@
{ config, lib, pkgs, ... }:
{
programs.notmuch = {
enable = true;
hooks = { preNew = "mbsync --all"; };
};
programs.mbsync.enable = true;
programs.msmtp.enable = true;
accounts.email = {
maildirBasePath = "${config.home.homeDirectory}/mail";
accounts.kat = {
address = "kat@kittywit.ch";
primary = true;
realName = "kat witch";
userName = "kat@kittywit.ch";
passwordCommand = ''
${pkgs.arc.pkgs.rbw-bitw}/bin/bitw -p gpg://${
../../../private/files/bitw/master.gpg
} get "email/kittywitch"'';
msmtp.enable = true;
mbsync.enable = true;
mbsync.create = "maildir";
notmuch.enable = true;
imap.host = "athame.kittywit.ch";
smtp.host = "athame.kittywit.ch";
gpg = {
signByDefault = true;
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
};
programs.notmuch = {
enable = true;
hooks = { preNew = "mbsync --all"; };
};
programs.mbsync.enable = true;
programs.msmtp.enable = true;
accounts.email = {
maildirBasePath = "${config.home.homeDirectory}/mail";
accounts.kat = {
address = "kat@kittywit.ch";
primary = true;
realName = "kat witch";
userName = "kat@kittywit.ch";
passwordCommand = ''
${pkgs.arc.pkgs.rbw-bitw}/bin/bitw -p gpg://${
../../../private/files/bitw/master.gpg
} get "email/kittywitch"'';
msmtp.enable = true;
mbsync.enable = true;
mbsync.create = "maildir";
notmuch.enable = true;
imap.host = "athame.kittywit.ch";
smtp.host = "athame.kittywit.ch";
gpg = {
signByDefault = true;
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
};
};
programs.vim.plugins = [ pkgs.arc.pkgs.vimPlugins.notmuch-vim ];
};
programs.vim.plugins = [ pkgs.arc.pkgs.vimPlugins.notmuch-vim ];
}

View file

@ -12,59 +12,59 @@ let
"https://sync.kittywit.ch/token/1.0/sync/1.5";
};
in {
programs.zsh.shellAliases = {
ff-pm = "firefox --ProfileManager";
ff-main = "firefox -P main";
ff-work = "firefox -P work";
ff-lewd = "firefox -P lewd";
};
programs.zsh.shellAliases = {
ff-pm = "firefox --ProfileManager";
ff-main = "firefox -P main";
ff-work = "firefox -P work";
ff-lewd = "firefox -P lewd";
};
programs.firefox = {
enable = true;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
auto-tab-discard
bitwarden
darkreader
decentraleyes
foxyproxy-standard
google-search-link-fix
https-everywhere
#old-reddit-redirect # made unnecessary due to tridactylrc
privacy-badger
reddit-enhancement-suite
refined-github
stylus
terms-of-service-didnt-read
tabcenter-reborn
tridactyl
ublock-origin
violentmonkey
];
profiles = {
main = {
id = 0;
isDefault = true;
settings = commonSettings // {
programs.firefox = {
enable = true;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
auto-tab-discard
bitwarden
darkreader
decentraleyes
foxyproxy-standard
google-search-link-fix
https-everywhere
#old-reddit-redirect # made unnecessary due to tridactylrc
privacy-badger
reddit-enhancement-suite
refined-github
stylus
terms-of-service-didnt-read
tabcenter-reborn
tridactyl
ublock-origin
violentmonkey
];
profiles = {
main = {
id = 0;
isDefault = true;
settings = commonSettings // {
};
userChrome = import ./userChrome.css.nix { profile = "main"; };
};
work = {
id = 1;
settings = commonSettings // {
userChrome = import ./userChrome.css.nix { profile = "main"; };
};
work = {
id = 1;
settings = commonSettings // {
};
userChrome = import ./userChrome.css.nix { profile = "work"; };
};
lewd = {
id = 2;
settings = commonSettings // {
userChrome = import ./userChrome.css.nix { profile = "work"; };
};
lewd = {
id = 2;
settings = commonSettings // {
};
userChrome = import ./userChrome.css.nix { profile = "lewd"; };
};
userChrome = import ./userChrome.css.nix { profile = "lewd"; };
};
};
};
home.file.".config/tridactyl/tridactylrc".source = ./tridactylrc;
home.file.".config/tridactyl/tridactylrc".source = ./tridactylrc;
}

View file

@ -1,21 +1,21 @@
{ config, lib, pkgs, sources, ... }:
{
home.sessionVariables = {
SSH_AUTH_SOCK =
"\${SSH_AUTH_SOCK:-$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket)}";
};
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"
];
};
home.sessionVariables = {
SSH_AUTH_SOCK =
"\${SSH_AUTH_SOCK:-$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket)}";
};
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"
];
};
}

View file

@ -1,15 +1,15 @@
{ config, lib, pkgs, ... }:
{
gtk = {
enable = true;
iconTheme = {
name = "Numix-Square";
package = pkgs.numix-icon-theme-square;
};
theme = {
name = "Arc-Dark";
package = pkgs.arc-theme;
};
gtk = {
enable = true;
iconTheme = {
name = "Numix-Square";
package = pkgs.numix-icon-theme-square;
};
theme = {
name = "Arc-Dark";
package = pkgs.arc-theme;
};
};
}

View file

@ -1,23 +1,23 @@
{ config, lib, pkgs, witch, ... }:
{
programs.kitty = {
enable = true;
font.name = witch.style.font.name;
settings = {
font_size = witch.style.font.size;
# 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;
};
programs.kitty = {
enable = true;
font.name = witch.style.font.name;
settings = {
font_size = witch.style.font.size;
# 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

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

View file

@ -1,100 +1,100 @@
{ config, lib, pkgs, witch, ... }:
{
programs.ncmpcpp = {
enable = true;
mpdMusicDir = "/home/kat/media-share/music";
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";
}
programs.ncmpcpp = {
enable = true;
mpdMusicDir = "/home/kat/media-share/music";
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";
}
];
};
programs.beets = {
enable = true;
package = pkgs.unstable.beets;
settings = {
directory = "~/media-share/music";
library = "~/.local/share/beets.db";
plugins = lib.concatStringsSep " " [
"mpdstats"
"mpdupdate"
"duplicates"
"chroma"
];
};
programs.beets = {
enable = true;
package = pkgs.unstable.beets;
settings = {
directory = "~/media-share/music";
library = "~/.local/share/beets.db";
plugins = lib.concatStringsSep " " [
"mpdstats"
"mpdupdate"
"duplicates"
"chroma"
];
};
};
services.mpd = {
enable = true;
package = pkgs.mpd-youtube-dl;
network.startWhenNeeded = true;
musicDirectory = "/home/kat/media-share/music";
extraConfig = ''
max_output_buffer_size "32768"
};
services.mpd = {
enable = true;
package = pkgs.mpd-youtube-dl;
network.startWhenNeeded = true;
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 "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
audio_output {
type "pulse"
name "speaker"
}
type "pulse"
name "speaker"
}
audio_output {
type "httpd"
name "httpd-high"
encoder "opus"
bitrate "96000"
port "32101"
max_clients "4"
format "48000:16:2"
always_on "yes"
tags "yes"
}
'';
};
audio_output {
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

@ -6,59 +6,59 @@ let
../../../private/files/bitw/master.gpg
} "$@"'';
in {
home.packages = with pkgs; [
_1password
bitwarden
bitw
mpv
element-desktop
mumble
obs-studio
niv
feh
kat-scrot
duc
exiftool
nekofetch
audacity
avidemux
gst_all_1.gstreamer.dev
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
vlc
ffmpeg-full
thunderbird
unstable.syncplay
unstable.youtube-dl
unstable.mkchromecast
unstable.google-chrome
v4l-utils
transmission-gtk
lm_sensors
p7zip
baresip
psmisc
discord
tdesktop
yubikey-manager
pinentry.gtk2
dino
libnotify
nextcloud-client
vegur
nitrogen
terminator
pavucontrol
gparted
scrot
gimp-with-plugins
vscode
cryptsetup
vifm
neofetch
htop
];
home.packages = with pkgs; [
_1password
bitwarden
bitw
mpv
element-desktop
mumble
obs-studio
niv
feh
kat-scrot
duc
exiftool
nekofetch
audacity
avidemux
gst_all_1.gstreamer.dev
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
vlc
ffmpeg-full
thunderbird
unstable.syncplay
unstable.youtube-dl
unstable.mkchromecast
unstable.google-chrome
v4l-utils
transmission-gtk
lm_sensors
p7zip
baresip
psmisc
discord
tdesktop
yubikey-manager
pinentry.gtk2
dino
libnotify
nextcloud-client
vegur
nitrogen
terminator
pavucontrol
gparted
scrot
gimp-with-plugins
vscode
cryptsetup
vifm
neofetch
htop
];
}

View file

@ -1,106 +1,106 @@
{ config, pkgs, lib, superConfig, ... }:
{
home.file = {
".local/share/weechat/sec.conf" = lib.mkIf config.deploy.profile.private {
source = "${../../../private/files/weechat/sec.conf}";
};
home.file = {
".local/share/weechat/sec.conf" = lib.mkIf config.deploy.profile.private {
source = "${../../../private/files/weechat/sec.conf}";
};
programs.weechat = {
};
programs.weechat = {
enable = true;
init = lib.mkMerge [
(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
/key bind meta-g /go
/key bind meta-c /buffer close
/key bind meta-n /bar toggle nicklist
/key bind meta-b /bar toggle buflist
'')
(lib.mkAfter "/matrix connect kat")
];
packageUnwrapped = pkgs.unstable.weechat-unwrapped;
homeDirectory = "${config.xdg.dataHome}/weechat";
plugins.python = {
enable = true;
init = lib.mkMerge [
(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
/key bind meta-g /go
/key bind meta-c /buffer close
/key bind meta-n /bar toggle nicklist
/key bind meta-b /bar toggle buflist
'')
(lib.mkAfter "/matrix connect kat")
];
packageUnwrapped = pkgs.unstable.weechat-unwrapped;
homeDirectory = "${config.xdg.dataHome}/weechat";
plugins.python = {
enable = true;
packages = [ "weechat-matrix" ];
packages = [ "weechat-matrix" ];
};
scripts = with pkgs.weechatScripts; [
go
auto_away
autosort
colorize_nicks
unread_buffer
urlgrab
vimode-git
weechat-matrix
weechat-notify-send
weechat-title
];
config = {
weechat = {
look = { mouse = true; };
bar = {
buflist = { size_max = 24; };
nicklist = { size_max = 18; };
};
};
scripts = with pkgs.weechatScripts; [
go
auto_away
autosort
colorize_nicks
unread_buffer
urlgrab
vimode-git
weechat-matrix
weechat-notify-send
weechat-title
];
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.title.title_prefix = "weechat - ";
plugins.var.python.title.show_hotlist = true;
plugins.var.python.title.current_buffer_suffix = " [";
plugins.var.python.title.title_suffix = " ]";
plugins.var.python.notify_send.icon = "";
sec = {
crypt = {
passphrase_command = ''
${pkgs.rbw-bitw}/bin/bitw -p gpg://${
../../../private/files/bitw/master.gpg
} get "comms/weechat"'';
hash_algo = "sha512";
};
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.title.title_prefix = "weechat - ";
plugins.var.python.title.show_hotlist = true;
plugins.var.python.title.current_buffer_suffix = " [";
plugins.var.python.title.title_suffix = " ]";
plugins.var.python.notify_send.icon = "";
sec = {
crypt = {
passphrase_command = ''
${pkgs.rbw-bitw}/bin/bitw -p gpg://${
../../../private/files/bitw/master.gpg
} get "comms/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;
};
};
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";
redactions = "notice";
};
server.kat = {
address = "kittywit.ch";
device_name = "${superConfig.networking.hostName}/weechat";
username = "kat";
password = "\${sec.data.matrix}";
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";
redactions = "notice";
};
server.kat = {
address = "kittywit.ch";
device_name = "${superConfig.networking.hostName}/weechat";
username = "kat";
password = "\${sec.data.matrix}";
autoconnect = true;
};
};
};
};
}

View file

@ -3,7 +3,11 @@
{
imports = [ ./nixos ];
options = { deploy.profile.gui = lib.mkEnableOption "graphical system" // { default = true; }; };
options = {
deploy.profile.gui = lib.mkEnableOption "graphical system" // {
default = true;
};
};
config = { home-manager.users.kat = { imports = [ ./home.nix ]; }; };
}

View file

@ -1,41 +1,41 @@
{ config, lib, pkgs, ... }: {
networking = {
# networkmanager.enable = true;
resolvconf.useLocalResolver = true;
networkmanager.dns = "none";
};
networking = {
# networkmanager.enable = true;
resolvconf.useLocalResolver = true;
networkmanager.dns = "none";
};
services.dnscrypt-proxy2 = {
enable = true;
settings = {
ipv6_servers = true;
require_dnssec = true;
services.dnscrypt-proxy2 = {
enable = true;
settings = {
ipv6_servers = true;
require_dnssec = true;
sources.public-resolvers = {
urls = [
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v2/public-resolvers.md"
"https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md"
];
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
minisign_key =
"RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
};
# You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v2/public-resolvers.md
server_names = [
"acsacsar-ams-ipv4"
"acsacsar-ams-ipv6"
"dnscrypt.eu-dk"
"dnscrypt.eu-dk-ipv6"
"dnscrypt.eu-nl"
"dnscrypt.eu-nl-ipv6"
"meganerd"
"meganerd-ipv6"
sources.public-resolvers = {
urls = [
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v2/public-resolvers.md"
"https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md"
];
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
minisign_key =
"RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
};
};
systemd.services.dnscrypt-proxy2.serviceConfig = {
StateDirectory = "dnscrypt-proxy2";
# You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v2/public-resolvers.md
server_names = [
"acsacsar-ams-ipv4"
"acsacsar-ams-ipv6"
"dnscrypt.eu-dk"
"dnscrypt.eu-dk-ipv6"
"dnscrypt.eu-nl"
"dnscrypt.eu-nl-ipv6"
"meganerd"
"meganerd-ipv6"
];
};
};
systemd.services.dnscrypt-proxy2.serviceConfig = {
StateDirectory = "dnscrypt-proxy2";
};
}

View file

@ -1,14 +1,14 @@
{ config, pkgs, lib, witch, ... }:
{
xdg = {
portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
gtkUsePortal = true;
};
xdg = {
portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
gtkUsePortal = true;
};
};
}

View file

@ -1,11 +1,11 @@
{ config, pkgs, lib, ... }:
{
fonts.fontconfig.enable = true;
fonts.fonts = with pkgs; [
font-awesome
nerdfonts
iosevka
emacs-all-the-icons-fonts
];
fonts.fontconfig.enable = true;
fonts.fonts = with pkgs; [
font-awesome
nerdfonts
iosevka
emacs-all-the-icons-fonts
];
}

View file

@ -1,12 +1,12 @@
{ config, pkgs, lib, ... }:
{
services.pcscd.enable = true;
services.udev.packages = [ pkgs.yubikey-personalization ];
services.pcscd.enable = true;
services.udev.packages = [ pkgs.yubikey-personalization ];
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "gtk2";
};
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "gtk2";
};
}

View file

@ -25,11 +25,11 @@ let
" ${c1} .:::: :::: ${c2}'::::. "
];
in {
services.mingetty = {
greetingLine = ''
\e[H\e[2J
\e[9;10]'' + lib.concatStringsSep "\n" nixos_logo + "\n\n"
+ "\\e[1;32m>>> NixOS ${config.system.nixos.label} (Linux \\r) - \\l\\e[0m";
helpLine = lib.mkForce "";
};
services.mingetty = {
greetingLine = ''
\e[H\e[2J
\e[9;10]'' + lib.concatStringsSep "\n" nixos_logo + "\n\n"
+ "\\e[1;32m>>> NixOS ${config.system.nixos.label} (Linux \\r) - \\l\\e[0m";
helpLine = lib.mkForce "";
};
}

View file

@ -1,23 +1,23 @@
{ config, lib, pkgs, ... }:
{
sound = {
enable = true;
extraConfig = ''
defaults.pcm.rate_converter "speexrate_best"
'';
};
hardware.pulseaudio = {
enable = true;
daemon.config = {
exit-idle-time = 5;
resample-method = "speex-float-5";
avoid-resampling = "true";
flat-volumes = "no";
default-sample-format = "s32le";
default-sample-rate = 48000;
alternate-sample-rate = 44100;
default-sample-channels = 2;
};
sound = {
enable = true;
extraConfig = ''
defaults.pcm.rate_converter "speexrate_best"
'';
};
hardware.pulseaudio = {
enable = true;
daemon.config = {
exit-idle-time = 5;
resample-method = "speex-float-5";
avoid-resampling = "true";
flat-volumes = "no";
default-sample-format = "s32le";
default-sample-rate = 48000;
alternate-sample-rate = 44100;
default-sample-channels = 2;
};
};
}

View file

@ -8,5 +8,7 @@
# imports = [ ../../../modules/home ];
#};
options = { deploy.profile.kat = lib.mkEnableOption "uhh meow" // { default = true; };};
options = {
deploy.profile.kat = lib.mkEnableOption "uhh meow" // { default = true; };
};
}

View file

@ -1,12 +1,12 @@
{ config, ... }:
{
base16 = {
shell.enable = true;
schemes = [ "rebecca.rebecca" ];
};
# home.base16-shell = {
# enable = true;
# defaultTheme = "rebecca.rebecca";
# };
base16 = {
shell.enable = true;
schemes = [ "rebecca.rebecca" ];
};
# home.base16-shell = {
# enable = true;
# defaultTheme = "rebecca.rebecca";
# };
}

View file

@ -1,30 +1,30 @@
{ config, pkgs, lib, ... }:
{
home.packages = with pkgs; [
git-crypt
gitAndTools.gitRemoteGcrypt
unstable.gitAndTools.gitAnnex
git-revise
arc.pkgs.gitAndTools.git-annex-remote-b2
];
home.packages = with pkgs; [
git-crypt
gitAndTools.gitRemoteGcrypt
unstable.gitAndTools.gitAnnex
git-revise
arc.pkgs.gitAndTools.git-annex-remote-b2
];
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
userName = "kat witch";
userEmail = "kat@kittywit.ch";
extraConfig = {
protocol.gcrypt.allow = "always";
annex = {
autocommit = false;
backend = "BLAKE2B512";
synccontent = true;
};
};
signing = {
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
signByDefault = true;
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
userName = "kat witch";
userEmail = "kat@kittywit.ch";
extraConfig = {
protocol.gcrypt.allow = "always";
annex = {
autocommit = false;
backend = "BLAKE2B512";
synccontent = true;
};
};
signing = {
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
signByDefault = true;
};
};
}

View file

@ -1,5 +1,5 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [ kitty.terminfo hyperfine hexyl tokei ];
home.packages = with pkgs; [ kitty.terminfo hyperfine hexyl tokei ];
}

View file

@ -1,25 +1,25 @@
{ config, pkgs, lib, ... }:
{
programs.ssh = {
enable = true;
controlMaster = "auto";
controlPersist = "10m";
hashKnownHosts = 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;
programs.ssh = {
enable = true;
controlMaster = "auto";
controlPersist = "10m";
hashKnownHosts = true;
matchBlocks = let
common = {
forwardAgent = true;
extraOptions = {
RemoteForward =
"/run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra";
};
in {
"athame" = { hostname = "athame.kittywit.ch"; } // common;
"samhain" = { hostname = "192.168.1.135"; } // common;
"yule" = { hostname = "192.168.1.92"; } // common;
"boline" = { hostname = "boline.kittywit.ch"; } // common;
port = 62954;
};
in {
"athame" = { hostname = "athame.kittywit.ch"; } // common;
"samhain" = { hostname = "192.168.1.135"; } // common;
"yule" = { hostname = "192.168.1.92"; } // common;
"boline" = { hostname = "boline.kittywit.ch"; } // common;
};
};
}

View file

@ -1,55 +1,55 @@
{ config, lib, pkgs, ... }:
{
programs.zsh.shellAliases = {
tne = "tmux new -s";
tat = "tmux attach -t";
tren = "tmux new -AD -s";
};
programs.tmux = {
enable = true;
extraConfig = ''
# start from 1
set -g base-index 1
setw -g pane-base-index 1
programs.zsh.shellAliases = {
tne = "tmux new -s";
tat = "tmux attach -t";
tren = "tmux new -AD -s";
};
programs.tmux = {
enable = true;
extraConfig = ''
# start from 1
set -g base-index 1
setw -g pane-base-index 1
# proper title handling
set -g set-titles on
set -g set-titles-string "#T"
# proper title handling
set -g set-titles on
set -g set-titles-string "#T"
# 256 color
set -g default-terminal "screen-256color"
# 256 color
set -g default-terminal "screen-256color"
# modes
setw -g clock-mode-colour colour5
setw -g mode-style 'fg=colour1 bg=colour18 bold'
# modes
setw -g clock-mode-colour colour5
setw -g mode-style 'fg=colour1 bg=colour18 bold'
# panes
set -g pane-border-style 'fg=colour19 bg=colour0'
set -g pane-active-border-style 'bg=colour0 fg=colour9'
# panes
set -g pane-border-style 'fg=colour19 bg=colour0'
set -g pane-active-border-style 'bg=colour0 fg=colour9'
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'bg=colour18 fg=colour137 dim'
set -g status-left '''
set -g status-right '#[fg=colour233,bg=colour19] %F #[fg=colour233,bg=colour8] %H:%M:%S %Z'
set -g status-right-length 50
set -g status-left-length 20
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'bg=colour18 fg=colour137 dim'
set -g status-left '''
set -g status-right '#[fg=colour233,bg=colour19] %F #[fg=colour233,bg=colour8] %H:%M:%S %Z'
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-style 'fg=colour1 bg=colour19 bold'
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
setw -g window-status-current-style 'fg=colour1 bg=colour19 bold'
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
setw -g window-status-style 'fg=colour9 bg=colour18'
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-style 'fg=colour9 bg=colour18'
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
# messages
set -g message-style 'fg=colour232 bg=colour16 bold'
# messages
set -g message-style 'fg=colour232 bg=colour16 bold'
# mouse
set -g mouse on
'';
};
# mouse
set -g mouse on
'';
};
}

View file

@ -1,37 +1,37 @@
{ config, lib, pkgs, witch, ... }:
{
home.sessionVariables.EDITOR = "vim";
programs.vim = {
enable = true;
package = pkgs.arc.pkgs.vim_configurable-pynvim;
#withPython3 = true;
plugins = with pkgs.vimPlugins; [
nerdtree
vim-nix
coc-nvim
coc-yank
coc-python
coc-json
coc-yaml
coc-git
vim-fugitive
vim-startify
vim-airline
vim-airline-themes
base16-vim
];
#extraPackages = with pkgs;
# [ (python3.withPackages (ps: with ps; [ black flake8 ])) ];
#extraPython3Packages = (ps: with ps; [ jedi pylint ]);
extraConfig = import ./vimrc.nix { inherit pkgs config; };
};
xdg.dataFile = {
"vim/undo/.keep".text = "";
"vim/swap/.keep".text = "";
"vim/backup/.keep".text = "";
};
xdg.configFile = {
"vim/coc-settings.json".text = builtins.readFile ./coc-settings.json;
};
home.sessionVariables.EDITOR = "vim";
programs.vim = {
enable = true;
package = pkgs.arc.pkgs.vim_configurable-pynvim;
#withPython3 = true;
plugins = with pkgs.vimPlugins; [
nerdtree
vim-nix
coc-nvim
coc-yank
coc-python
coc-json
coc-yaml
coc-git
vim-fugitive
vim-startify
vim-airline
vim-airline-themes
base16-vim
];
#extraPackages = with pkgs;
# [ (python3.withPackages (ps: with ps; [ black flake8 ])) ];
#extraPython3Packages = (ps: with ps; [ jedi pylint ]);
extraConfig = import ./vimrc.nix { inherit pkgs config; };
};
xdg.dataFile = {
"vim/undo/.keep".text = "";
"vim/swap/.keep".text = "";
"vim/backup/.keep".text = "";
};
xdg.configFile = {
"vim/coc-settings.json".text = builtins.readFile ./coc-settings.json;
};
}

View file

@ -1,18 +1,18 @@
{ config, lib, ... }:
{
xdg = {
xdg = {
enable = true;
userDirs = {
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";
};
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

@ -1,61 +1,61 @@
{ config, lib, pkgs, ... }:
{
xdg.dataFile = { "z/.keep".text = ""; };
home.packages = with pkgs; [ fzf fd ];
programs.zsh = {
enable = true;
enableAutosuggestions = true;
shellAliases = {
nixdirfmt = "fd --color=never .nix | xargs nixfmt";
exa = "exa --time-style long-iso";
ls = "exa -G";
la = "exa -Ga";
ll = "exa -l";
lla = "exa -lga";
};
localVariables = {
_Z_DATA = "${config.xdg.dataHome}/z/data";
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=3,bold";
ZSH_AUTOSUGGEST_USE_ASYNC = 1;
};
plugins = [
(with pkgs.zsh-syntax-highlighting; {
name = "zsh-syntax-highlighting";
inherit src;
})
{
name = "z";
file = "z.sh";
src = pkgs.fetchFromGitHub {
owner = "rupa";
repo = "z";
rev = "9d5a3fe0407101e2443499e4b95bca33f7a9a9ca";
sha256 = "0aghw6zmd3851xpzgy0jkh25wzs9a255gxlbdr3zw81948qd9wb1";
};
}
{
name = "fzf-z";
src = pkgs.fetchFromGitHub {
owner = "andrewferrier";
repo = "fzf-z";
rev = "089ba6cacd3876c349cfb6b65dc2c3e68b478fd0";
sha256 = "1lvvkz0v4xibq6z3y8lgfkl9ibcx0spr4qzni0n925ar38s20q81";
};
}
];
oh-my-zsh = {
enable = true;
plugins = [ "git" "sudo" "adb" "cargo" "emoji" ];
};
xdg.dataFile = { "z/.keep".text = ""; };
home.packages = with pkgs; [ fzf fd ];
programs.zsh = {
enable = true;
enableAutosuggestions = true;
shellAliases = {
nixdirfmt = "fd --color=never .nix | xargs nixfmt";
exa = "exa --time-style long-iso";
ls = "exa -G";
la = "exa -Ga";
ll = "exa -l";
lla = "exa -lga";
};
programs.starship = {
enable = true;
enableZshIntegration = true;
localVariables = {
_Z_DATA = "${config.xdg.dataHome}/z/data";
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=3,bold";
ZSH_AUTOSUGGEST_USE_ASYNC = 1;
};
programs.direnv = {
plugins = [
(with pkgs.zsh-syntax-highlighting; {
name = "zsh-syntax-highlighting";
inherit src;
})
{
name = "z";
file = "z.sh";
src = pkgs.fetchFromGitHub {
owner = "rupa";
repo = "z";
rev = "9d5a3fe0407101e2443499e4b95bca33f7a9a9ca";
sha256 = "0aghw6zmd3851xpzgy0jkh25wzs9a255gxlbdr3zw81948qd9wb1";
};
}
{
name = "fzf-z";
src = pkgs.fetchFromGitHub {
owner = "andrewferrier";
repo = "fzf-z";
rev = "089ba6cacd3876c349cfb6b65dc2c3e68b478fd0";
sha256 = "1lvvkz0v4xibq6z3y8lgfkl9ibcx0spr4qzni0n925ar38s20q81";
};
}
];
oh-my-zsh = {
enable = true;
enableZshIntegration = true;
enableNixDirenvIntegration = true;
plugins = [ "git" "sudo" "adb" "cargo" "emoji" ];
};
};
programs.starship = {
enable = true;
enableZshIntegration = true;
};
programs.direnv = {
enable = true;
enableZshIntegration = true;
enableNixDirenvIntegration = true;
};
}

View file

@ -17,6 +17,8 @@
};
};
options = { deploy.profile.kat = lib.mkEnableOption "uhh meow" // { default = true; }; };
options = {
deploy.profile.kat = lib.mkEnableOption "uhh meow" // { default = true; };
};
}

View file

@ -1,5 +1,9 @@
{ lib, ... }:
{
options = { deploy.profile.laptop = lib.mkEnableOption "lappytop" // { default = true; }; };
options = {
deploy.profile.laptop = lib.mkEnableOption "lappytop" // {
default = true;
};
};
}

View file

@ -3,7 +3,11 @@
{
imports = [ ./nixos ];
options = { deploy.profile.laptop = lib.mkEnableOption "lappytop" // { default = true; }; };
options = {
deploy.profile.laptop = lib.mkEnableOption "lappytop" // {
default = true;
};
};
config = { home-manager.users.kat = { imports = [ ./home.nix ]; }; };
}

View file

@ -1,4 +1,3 @@
{ config, lib, pkgs, ... }:
{
}
{ }

View file

@ -3,5 +3,7 @@
{
imports = [ ./home ];
options = { deploy.profile.sway = lib.mkEnableOption "sway wm" // { default = true; }; };
options = {
deploy.profile.sway = lib.mkEnableOption "sway wm" // { default = true; };
};
}

View file

@ -1,9 +1,9 @@
{ config, lib, ... }:
{
services.gammastep = {
enable = true;
latitude = "51.5074";
longitude = "0.1278";
};
services.gammastep = {
enable = true;
latitude = "51.5074";
longitude = "0.1278";
};
}

View file

@ -1,26 +1,26 @@
{ config, pkgs, lib, witch, ... }:
{
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" ]; };
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;
defaultTimeout = 3000;
borderColor = witch.style.base16.color7;
backgroundColor = "${witch.style.base16.color0}70";
textColor = witch.style.base16.color7;
};
programs.mako = {
enable = true;
defaultTimeout = 3000;
borderColor = witch.style.base16.color7;
backgroundColor = "${witch.style.base16.color0}70";
textColor = witch.style.base16.color7;
};
}

View file

@ -1,268 +1,268 @@
{ config, pkgs, lib, witch, ... }:
{
home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1;
XDG_CURRENT_DESKTOP = "sway";
XDG_SESSION_TYPE = "wayland";
home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1;
XDG_CURRENT_DESKTOP = "sway";
XDG_SESSION_TYPE = "wayland";
};
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 = 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
dmenu =
"${pkgs.bemenu}/bin/bemenu --fn '${witch.style.font.name} ${witch.style.font.size}' --nb '${witch.style.base16.color0}' --nf '${witch.style.base16.color7}' --sb '${witch.style.base16.color1}' --sf '${witch.style.base16.color7}' -l 5 -m -1 -i";
lockCommand = "swaylock -i eDP-1:${
../../../private/files/wallpapers/main.png
} -i HDMI-A-1:${../../../private/files/wallpapers/main.png} -i DP-1:${
../../../private/files/wallpapers/left.jpg
} -i DVI-D-1:${../../../private/files/wallpapers/right.jpg} -s fill";
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 = 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
dmenu =
"${pkgs.bemenu}/bin/bemenu --fn '${witch.style.font.name} ${witch.style.font.size}' --nb '${witch.style.base16.color0}' --nf '${witch.style.base16.color7}' --sb '${witch.style.base16.color1}' --sf '${witch.style.base16.color7}' -l 5 -m -1 -i";
lockCommand = "swaylock -i eDP-1:${
../../../private/files/wallpapers/main.png
} -i HDMI-A-1:${../../../private/files/wallpapers/main.png} -i DP-1:${
../../../private/files/wallpapers/left.jpg
} -i DVI-D-1:${../../../private/files/wallpapers/right.jpg} -s fill";
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
output = let
left = {
res = "1920x1080";
pos = "0 0";
bg = "${../../../private/files/wallpapers/left.jpg} fill";
};
middle = {
res = "1920x1080";
pos = "1920 0";
bg = "${../../../private/files/wallpapers/main.png} fill";
};
right = {
res = "1920x1080";
pos = "3840 0";
bg = "${../../../private/files/wallpapers/right.jpg} fill";
};
laptop = {
res = "1920x1080";
pos = "0 0";
bg = "${../../../private/files/wallpapers/main.png} fill";
};
in {
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
"DP-1" = left;
"DVI-D-1" = right;
"HDMI-A-1" = middle;
"eDP-1" = laptop;
};
output = let
left = {
res = "1920x1080";
pos = "0 0";
bg = "${../../../private/files/wallpapers/left.jpg} fill";
};
middle = {
res = "1920x1080";
pos = "1920 0";
bg = "${../../../private/files/wallpapers/main.png} fill";
};
right = {
res = "1920x1080";
pos = "3840 0";
bg = "${../../../private/files/wallpapers/right.jpg} fill";
};
laptop = {
res = "1920x1080";
pos = "0 0";
bg = "${../../../private/files/wallpapers/main.png} fill";
};
in {
"DP-1" = left;
"DVI-D-1" = right;
"HDMI-A-1" = middle;
"eDP-1" = laptop;
input = {
"1739:33362:Synaptics_TM3336-002" = {
dwt = "enabled";
tap = "enabled";
natural_scroll = "enabled";
middle_emulation = "enabled";
click_method = "clickfinger";
};
input = {
"1739:33362:Synaptics_TM3336-002" = {
dwt = "enabled";
tap = "enabled";
natural_scroll = "enabled";
middle_emulation = "enabled";
click_method = "clickfinger";
};
"5824:1503:screenstub-tablet" = { events = "disabled"; };
"5824:1503:screenstub-mouse" = { events = "disabled"; };
"5824:1503:screenstub-kbd" = { events = "disabled"; };
"*" = {
xkb_layout = "gb";
# xkb_variant = "nodeadkeys";
# xkb_options = "ctrl:nocaps";
};
};
fonts = [ "${witch.style.font.name} ${witch.style.font.size}" ];
terminal = "${pkgs.kitty}/bin/kitty";
# TODO: replace with wofi
menu =
"${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --dmenu=\"${dmenu}\" --term='${cfg.terminal}'";
modifier = "Mod4";
assigns = { "F1" = [{ class = "screenstub"; }]; };
startup = [
{
command = "systemctl --user restart mako";
always = true;
}
{ command = "${pkgs.i3gopher}/bin/i3gopher"; }
{ command = "mkchromecast -t"; }
];
window = {
border = 1;
titlebar = true;
};
keybindings = {
"${cfg.modifier}+Return" = "exec ${cfg.terminal}";
"${cfg.modifier}+Left" = "focus left";
"${cfg.modifier}+Down" = "focus down";
"${cfg.modifier}+Up" = "focus up";
"${cfg.modifier}+Right" = "focus right";
"${cfg.modifier}+Shift+Left" = "move left";
"${cfg.modifier}+Shift+Down" = "move down";
"${cfg.modifier}+Shift+Up" = "move up";
"${cfg.modifier}+Shift+Right" = "move right";
"${cfg.modifier}+Shift+space" = "floating toggle";
"${cfg.modifier}+space" = "focus mode_toggle";
"${cfg.modifier}+Tab" = "workspace back_and_forth";
"${cfg.modifier}+Shift+Tab" =
"${pkgs.i3gopher}/bin/i3gopher --focus-last";
"${cfg.modifier}+Ctrl+Left" = "workspace prev_on_output";
"${cfg.modifier}+Ctrl+Right" = "workspace next_on_output";
"XF86AudioRaiseVolume" =
"exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%";
"XF86AudioLowerVolume" =
"exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%";
"XF86AudioMute" =
"exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle";
"XF86AudioMicMute" =
"exec pactl set-source-mute $(pacmd list-sources |awk '/* index:/{print $3}') toggle";
"XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 5";
"XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 5";
"${cfg.modifier}+d" = "exec ${cfg.menu}";
"${cfg.modifier}+x" = "exec ${lockCommand}";
"${cfg.modifier}+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload screen";
"${cfg.modifier}+Shift+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload area";
"${cfg.modifier}+Mod1+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload window";
"Print" = "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify save screen";
"Shift+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify save area";
"Mod1+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify save window";
"${cfg.modifier}+i" = "move workspace to output left";
"${cfg.modifier}+o" = "move workspace to output right";
"${cfg.modifier}+b" = "splith";
"${cfg.modifier}+v" = "splitv";
"${cfg.modifier}+s" = "layout stacking";
"${cfg.modifier}+w" = "layout tabbed";
"${cfg.modifier}+e" = "layout toggle split";
"${cfg.modifier}+f" = "fullscreen";
"${cfg.modifier}+Shift+q" = "kill";
"${cfg.modifier}+Shift+c" = "reload";
"${cfg.modifier}+r" = "mode resize";
"${cfg.modifier}+Delete" = ''
mode "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown"'';
};
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";
};
};
colors = {
focused = {
border = witch.style.base16.color8;
background = witch.style.base16.color3;
text = witch.style.base16.color0;
indicator = witch.style.base16.color2;
childBorder = witch.style.base16.color8;
};
focusedInactive = {
border = witch.style.base16.color0;
background = witch.style.base16.color15;
text = witch.style.base16.color13;
indicator = witch.style.base16.color2;
childBorder = witch.style.base16.color8;
};
unfocused = {
border = witch.style.base16.color0;
background = witch.style.base16.color8;
text = witch.style.base16.color7;
indicator = witch.style.base16.color8;
childBorder = witch.style.base16.color8;
};
urgent = {
border = witch.style.base16.color0;
background = witch.style.base16.color9;
text = witch.style.base16.color0;
indicator = witch.style.base16.color1;
childBorder = witch.style.base16.color8;
};
"5824:1503:screenstub-tablet" = { events = "disabled"; };
"5824:1503:screenstub-mouse" = { events = "disabled"; };
"5824:1503:screenstub-kbd" = { events = "disabled"; };
"*" = {
xkb_layout = "gb";
# xkb_variant = "nodeadkeys";
# xkb_options = "ctrl:nocaps";
};
};
fonts = [ "${witch.style.font.name} ${witch.style.font.size}" ];
terminal = "${pkgs.kitty}/bin/kitty";
# TODO: replace with wofi
menu =
"${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --dmenu=\"${dmenu}\" --term='${cfg.terminal}'";
modifier = "Mod4";
assigns = { "F1" = [{ class = "screenstub"; }]; };
startup = [
{
command = "systemctl --user restart mako";
always = true;
}
{ command = "${pkgs.i3gopher}/bin/i3gopher"; }
{ command = "mkchromecast -t"; }
];
window = {
border = 1;
titlebar = true;
};
keybindings = {
"${cfg.modifier}+Return" = "exec ${cfg.terminal}";
"${cfg.modifier}+Left" = "focus left";
"${cfg.modifier}+Down" = "focus down";
"${cfg.modifier}+Up" = "focus up";
"${cfg.modifier}+Right" = "focus right";
"${cfg.modifier}+Shift+Left" = "move left";
"${cfg.modifier}+Shift+Down" = "move down";
"${cfg.modifier}+Shift+Up" = "move up";
"${cfg.modifier}+Shift+Right" = "move right";
"${cfg.modifier}+Shift+space" = "floating toggle";
"${cfg.modifier}+space" = "focus mode_toggle";
"${cfg.modifier}+Tab" = "workspace back_and_forth";
"${cfg.modifier}+Shift+Tab" =
"${pkgs.i3gopher}/bin/i3gopher --focus-last";
"${cfg.modifier}+Ctrl+Left" = "workspace prev_on_output";
"${cfg.modifier}+Ctrl+Right" = "workspace next_on_output";
"XF86AudioRaiseVolume" =
"exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%";
"XF86AudioLowerVolume" =
"exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%";
"XF86AudioMute" =
"exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle";
"XF86AudioMicMute" =
"exec pactl set-source-mute $(pacmd list-sources |awk '/* index:/{print $3}') toggle";
"XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 5";
"XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 5";
"${cfg.modifier}+d" = "exec ${cfg.menu}";
"${cfg.modifier}+x" = "exec ${lockCommand}";
"${cfg.modifier}+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload screen";
"${cfg.modifier}+Shift+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload area";
"${cfg.modifier}+Mod1+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload window";
"Print" = "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify save screen";
"Shift+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify save area";
"Mod1+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify save window";
"${cfg.modifier}+i" = "move workspace to output left";
"${cfg.modifier}+o" = "move workspace to output right";
"${cfg.modifier}+b" = "splith";
"${cfg.modifier}+v" = "splitv";
"${cfg.modifier}+s" = "layout stacking";
"${cfg.modifier}+w" = "layout tabbed";
"${cfg.modifier}+e" = "layout toggle split";
"${cfg.modifier}+f" = "fullscreen";
"${cfg.modifier}+Shift+q" = "kill";
"${cfg.modifier}+Shift+c" = "reload";
"${cfg.modifier}+r" = "mode resize";
"${cfg.modifier}+Delete" = ''
mode "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown"'';
};
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";
};
};
colors = {
focused = {
border = witch.style.base16.color8;
background = witch.style.base16.color3;
text = witch.style.base16.color0;
indicator = witch.style.base16.color2;
childBorder = witch.style.base16.color8;
};
focusedInactive = {
border = witch.style.base16.color0;
background = witch.style.base16.color15;
text = witch.style.base16.color13;
indicator = witch.style.base16.color2;
childBorder = witch.style.base16.color8;
};
unfocused = {
border = witch.style.base16.color0;
background = witch.style.base16.color8;
text = witch.style.base16.color7;
indicator = witch.style.base16.color8;
childBorder = witch.style.base16.color8;
};
urgent = {
border = witch.style.base16.color0;
background = witch.style.base16.color9;
text = witch.style.base16.color0;
indicator = witch.style.base16.color1;
childBorder = witch.style.base16.color8;
};
};
wrapperFeatures.gtk = true;
extraConfig = ''
seat seat0 xcursor_theme breeze_cursors 20
workspace "1" output "DP-1"
workspace "F2" output "DVI-D-1"
workspace "F1" output "HDMI-A-1"
workspace_auto_back_and_forth yes
${workspaceBindingsStr}
'';
};
wrapperFeatures.gtk = true;
extraConfig = ''
seat seat0 xcursor_theme breeze_cursors 20
workspace "1" output "DP-1"
workspace "F2" output "DVI-D-1"
workspace "F1" output "HDMI-A-1"
workspace_auto_back_and_forth yes
${workspaceBindingsStr}
'';
};
}

View file

@ -1,36 +1,32 @@
{ config, pkgs, lib, ... }:
{
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 -f -i eDP-1:${
../../../private/files/wallpapers/main.png
} -i HDMI-A-1:${
../../../private/files/wallpapers/main.png
} -i DP-1:${
../../../private/files/wallpapers/left.jpg
} -i DVI-D-1:${../../../private/files/wallpapers/right.jpg}' \
#timeout 600 'swaymsg "output * dpms off"' \
# resume 'swaymsg "output * dpms on"' \
before-sleep '${pkgs.swaylock}/bin/swaylock -f -i eDP-1:${
../../../private/files/wallpapers/main.png
} -i HDMI-A-1:${
../../../private/files/wallpapers/main.png
} -i DP-1:${
../../../private/files/wallpapers/left.jpg
} -i DVI-D-1:${../../../private/files/wallpapers/right.jpg}'
'';
RestartSec = 3;
Restart = "always";
};
Install = { WantedBy = [ "sway-session.target" ]; };
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 -f -i eDP-1:${
../../../private/files/wallpapers/main.png
} -i HDMI-A-1:${../../../private/files/wallpapers/main.png} -i DP-1:${
../../../private/files/wallpapers/left.jpg
} -i DVI-D-1:${../../../private/files/wallpapers/right.jpg}' \
#timeout 600 'swaymsg "output * dpms off"' \
# resume 'swaymsg "output * dpms on"' \
before-sleep '${pkgs.swaylock}/bin/swaylock -f -i eDP-1:${
../../../private/files/wallpapers/main.png
} -i HDMI-A-1:${../../../private/files/wallpapers/main.png} -i DP-1:${
../../../private/files/wallpapers/left.jpg
} -i DVI-D-1:${../../../private/files/wallpapers/right.jpg}'
'';
RestartSec = 3;
Restart = "always";
};
Install = { WantedBy = [ "sway-session.target" ]; };
};
}

View file

@ -3,7 +3,9 @@
{
imports = [ ./nixos ];
options = { deploy.profile.sway = lib.mkEnableOption "sway wm" // { default = true; }; };
options = {
deploy.profile.sway = lib.mkEnableOption "sway wm" // { default = true; };
};
config = { home-manager.users.kat = { imports = [ ./home.nix ]; }; };
}

View file

@ -1,8 +1,8 @@
{ config, pkgs, lib, sources, ... }:
{
programs.sway = {
enable = true;
extraPackages = with pkgs; lib.mkForce [ xwayland swaylock swayidle ];
};
programs.sway = {
enable = true;
extraPackages = with pkgs; lib.mkForce [ xwayland swaylock swayidle ];
};
}