mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
Refactor, mumble domain change, sway changes
This commit is contained in:
parent
22cf8ab600
commit
1de1018c02
113 changed files with 53 additions and 46 deletions
|
|
@ -1,3 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{ }
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ config, lib, pkgs, sources, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./nixos ];
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{ config, lib, pkgs, sources, ... }:
|
||||
|
||||
{
|
||||
security.sudo.wheelNeedsPassword = lib.mkForce false;
|
||||
|
||||
users.users.root = {
|
||||
openssh.authorizedKeys.keys = with pkgs.lib;
|
||||
concatLists (mapAttrsToList (name: user:
|
||||
if elem "wheel" user.extraGroups then
|
||||
user.openssh.authorizedKeys.keys
|
||||
else
|
||||
[ ]) config.users.users);
|
||||
};
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{ config, lib, pkgs, sources, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./system.nix
|
||||
./net.nix
|
||||
./access.nix
|
||||
./locale.nix
|
||||
./nix.nix
|
||||
./ssh.nix
|
||||
./packages.nix
|
||||
./secrets.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{ config, lib, pkgs, sources, ... }:
|
||||
|
||||
{
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
time.timeZone = "Europe/London";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "uk";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ config, lib, pkgs, sources, ... }:
|
||||
|
||||
{
|
||||
services.tailscale.enable = true;
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
{ config, lib, pkgs, sources, ... }:
|
||||
|
||||
{
|
||||
boot.loader.grub.configurationLimit = 8;
|
||||
boot.loader.systemd-boot.configurationLimit = 8;
|
||||
|
||||
nixpkgs.config = { allowUnfree = true; };
|
||||
|
||||
nix = {
|
||||
nixPath = [
|
||||
"nixpkgs=${sources.nixpkgs}"
|
||||
"nixpkgs-unstable=${sources.nixpkgs-unstable}"
|
||||
"nixpkgs-mozilla=${sources.nixpkgs-mozilla}"
|
||||
"NUR=${sources.NUR}"
|
||||
"arc=${sources.arc-nixexprs}"
|
||||
];
|
||||
binaryCaches = [ "https://arc.cachix.org" ];
|
||||
binaryCachePublicKeys =
|
||||
[ "arc.cachix.org-1:DZmhclLkB6UO0rc0rBzNpwFbbaeLfyn+fYccuAy7YVY=" ];
|
||||
gc.automatic = lib.mkDefault true;
|
||||
gc.options = lib.mkDefault "--delete-older-than 1w";
|
||||
trustedUsers = [ "root" "@wheel" ];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
smartmontools
|
||||
hddtemp
|
||||
lm_sensors
|
||||
htop
|
||||
cachix
|
||||
borgbackup
|
||||
ripgrep
|
||||
git
|
||||
nixfmt
|
||||
mprime
|
||||
wget
|
||||
rsync
|
||||
pv
|
||||
pinentry-curses
|
||||
progress
|
||||
bc
|
||||
zstd
|
||||
file
|
||||
whois
|
||||
fd
|
||||
exa
|
||||
socat
|
||||
tmux
|
||||
gnupg
|
||||
];
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
secrets = {
|
||||
root = "/var/lib/kat/secrets";
|
||||
persistentRoot = "/var/lib/kat/secrets";
|
||||
external = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = lib.mkDefault [ 62954 ];
|
||||
passwordAuthentication = false;
|
||||
challengeResponseAuthentication = false;
|
||||
permitRootLogin = lib.mkDefault "prohibit-password";
|
||||
kexAlgorithms = [ "curve25519-sha256@libssh.org" ];
|
||||
extraConfig = ''
|
||||
StreamLocalBindUnlink yes
|
||||
LogLevel VERBOSE
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ config, lib, pkgs, sources, ... }:
|
||||
|
||||
{
|
||||
#imports = [ (sources.home-manager + "/nixos") ];
|
||||
|
||||
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||
services.journald.extraConfig = "SystemMaxUse=512M";
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./home ];
|
||||
|
||||
options = { deploy.profile.gui = lib.mkEnableOption "graphical system"; };
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./firefox
|
||||
./kitty.nix
|
||||
./packages.nix
|
||||
./email.nix
|
||||
./gpg.nix
|
||||
./weechat.nix
|
||||
./gtk.nix
|
||||
./music.nix
|
||||
./mpv.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.gui {
|
||||
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 "kittywitch email"'';
|
||||
msmtp.enable = true;
|
||||
mbsync.enable = true;
|
||||
mbsync.create = "maildir";
|
||||
notmuch.enable = true;
|
||||
imap.host = "kittywit.ch";
|
||||
smtp.host = "kittywit.ch";
|
||||
gpg = {
|
||||
signByDefault = true;
|
||||
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.vim.plugins = [ pkgs.arc.pkgs.vimPlugins.notmuch-vim ];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
{ config, lib, pkgs, sources, superConfig, ... }:
|
||||
|
||||
let
|
||||
commonSettings = {
|
||||
"app.update.auto" = false;
|
||||
"identity.fxaccounts.account.device.name" = superConfig.networking.hostName;
|
||||
"signon.rememberSignons" = false;
|
||||
"browser.download.lastDir" = "/home/kat/downloads";
|
||||
"browser.urlbar.placeholderName" = "DuckDuckGo";
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"identity.sync.tokenserver.uri" =
|
||||
"https://sync.kittywit.ch/token/1.0/sync/1.5";
|
||||
};
|
||||
in {
|
||||
config = lib.mkIf config.deploy.profile.gui {
|
||||
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 // {
|
||||
|
||||
};
|
||||
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 = "lewd"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.file.".config/tridactyl/tridactylrc".source = ./tridactylrc;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,157 +0,0 @@
|
|||
" bovine3dom's dogfood
|
||||
|
||||
" WARNING: This file defines and runs a command called fixamo_quiet. If you
|
||||
" also have a malicious addon that operates on `<all_urls>` installed this
|
||||
" will allow it to steal your firefox account credentials!
|
||||
"
|
||||
" With those credentials, an attacker can read anything in your sync account,
|
||||
" publish addons to the AMO, etc, etc.
|
||||
"
|
||||
" Without this command a malicious addon can steal credentials from any site
|
||||
" that you visit that is not in the restrictedDomains list.
|
||||
"
|
||||
" You should comment out the fixamo lines unless you are entirely sure that
|
||||
" they are what you want.
|
||||
"
|
||||
" The advantage of running the command is that you can use the tridactyl
|
||||
" interface on addons.mozilla.org and other restricted sites.
|
||||
|
||||
" Provided only as an example.
|
||||
" Do not install/run without reading through as you may be surprised by some
|
||||
" of the settings.
|
||||
|
||||
" May require the latest beta builds.
|
||||
|
||||
" Move this to $XDG_CONFIG_DIR/tridactyl/tridactylrc (that's
|
||||
" ~/.config/tridactyl/tridactylrc to mere mortals) or ~/.tridactylrc and
|
||||
" install the native messenger (:installnative in Tridactyl). Run :source to
|
||||
" get it in the browser, or just restart.
|
||||
|
||||
|
||||
"
|
||||
" Binds
|
||||
"
|
||||
|
||||
bind / fillcmdline find
|
||||
bind ? fillcmdline find -?
|
||||
bind n findnext 1
|
||||
bind N findnext -1
|
||||
bind ,<Space> nohlsearc
|
||||
|
||||
" Comment toggler for Reddit, Hacker News and Lobste.rs
|
||||
bind ;c hint -Jc [class*="expand"],[class="togg"],[class="comment_folder"]
|
||||
|
||||
" GitHub pull request checkout command to clipboard (only works if you're a collaborator or above)
|
||||
bind yp composite js document.getElementById("clone-help-step-1").textContent.replace("git checkout -b", "git checkout -B").replace("git pull ", "git fetch ") + "git reset --hard " + document.getElementById("clone-help-step-1").textContent.split(" ")[3].replace("-","/") | yank
|
||||
|
||||
" Git{Hub,Lab} git clone via SSH yank
|
||||
bind yg composite js "git clone " + document.location.href.replace(/https?:\/\//,"git@").replace("/",":").replace(/$/,".git") | clipboard yank
|
||||
|
||||
" As above but execute it and open terminal in folder
|
||||
bind ,g js let uri = document.location.href.replace(/https?:\/\//,"git@").replace("/",":").replace(/$/,".git"); tri.native.run("cd ~/projects; git clone " + uri + "; cd \"$(basename \"" + uri + "\" .git)\"; st")
|
||||
|
||||
|
||||
" make d take you to the tab you were just on (I find it much less confusing)
|
||||
bind d composite tab #; tabclose #
|
||||
bind D tabclose
|
||||
|
||||
" I like wikiwand but I don't like the way it changes URLs
|
||||
bindurl wikiwand.com yy composite js document.location.href.replace("wikiwand.com/en","wikipedia.org/wiki") | clipboard yank
|
||||
|
||||
" Make gu take you back to subreddit from comments
|
||||
bindurl reddit.com gu urlparent 4
|
||||
|
||||
" Only hint search results on Google and DDG
|
||||
bindurl www.google.com f hint -Jc #search div:not(.action-menu) > a
|
||||
bindurl www.google.com F hint -Jbc #search div:not(.action-menu) > a
|
||||
|
||||
|
||||
bindurl ^https://duckduckgo.com f hint -Jc [class=result__a]
|
||||
bindurl ^https://duckduckgo.com F hint -Jbc [class=result__a]
|
||||
|
||||
" Allow Ctrl-a to select all in the commandline
|
||||
unbind --mode=ex <C-a>
|
||||
|
||||
" Allow Ctrl-c to copy in the commandline
|
||||
unbind --mode=ex <C-c>
|
||||
|
||||
" Handy multiwindow/multitasking binds
|
||||
bind gd tabdetach
|
||||
bind gD composite tabduplicate; tabdetach
|
||||
|
||||
" Make yy use canonical / short links on the 5 websites that support them
|
||||
bind yy clipboard yankcanon
|
||||
|
||||
" Stupid workaround to let hint -; be used with composite which steals semi-colons
|
||||
command hint_focus hint -;
|
||||
|
||||
" Open right click menu on links
|
||||
bind ;C composite hint_focus; !s xdotool key Menu
|
||||
|
||||
"
|
||||
" Misc settings
|
||||
"
|
||||
|
||||
" set editorcmd to suckless terminal, or use the defaults on other platforms
|
||||
js tri.browserBg.runtime.getPlatformInfo().then(os=>{const editorcmd = os.os=="linux" ? "st vim" : "auto"; tri.config.set("editorcmd", editorcmd)})
|
||||
|
||||
" set profile dir on Windows
|
||||
jsb browser.runtime.getPlatformInfo().then(os=>{const profiledir = os.os=="win" ? "C:\\Users\\olie\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\gwm76nmk.default" : "auto"; tri.config.set("profiledir", profiledir)})
|
||||
|
||||
" Sane hinting mode
|
||||
set hintfiltermode vimperator-reflow
|
||||
set hintnames numeric
|
||||
|
||||
" Defaults to 300ms but I'm a 'move fast and close the wrong tabs' kinda chap
|
||||
set hintdelay 100
|
||||
|
||||
" Add helper commands that Mozillians think make Firefox irredeemably
|
||||
" insecure. For details, read the comment at the top of this file.
|
||||
command fixamo_quiet jsb tri.excmds.setpref("privacy.resistFingerprinting.block_mozAddonManager", "true").then(tri.excmds.setpref("extensions.webextensions.restrictedDomains", '""'))
|
||||
command fixamo js tri.excmds.setpref("privacy.resistFingerprinting.block_mozAddonManager", "true").then(tri.excmds.setpref("extensions.webextensions.restrictedDomains", '""').then(tri.excmds.fillcmdline_tmp(3000, "Permissions added to user.js. Please restart Firefox to make them take affect.")))
|
||||
|
||||
" Make Tridactyl work on more sites at the expense of some security. For
|
||||
" details, read the comment at the top of this file.
|
||||
fixamo_quiet
|
||||
|
||||
" Equivalent to `set csp clobber` before it was removed. This weakens your
|
||||
" defences against cross-site-scripting attacks and other types of
|
||||
" code-injection by reducing the strictness of Content Security Policy on
|
||||
" every site in a couple of ways.
|
||||
"
|
||||
" You may not wish to run this. Mozilla strongly feels that you shouldn't.
|
||||
"
|
||||
" It allows Tridactyl to function on more pages, e.g. raw GitHub pages.
|
||||
"
|
||||
" We remove the sandbox directive
|
||||
" https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/sandbox
|
||||
" which allows our iframe to run (and anyone else's) on any website.
|
||||
"
|
||||
" We weaken the style-src directive
|
||||
" https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src
|
||||
" to allow us to theme our elements. This exposes you to 'cross site styling'
|
||||
" attacks.
|
||||
"
|
||||
" Read https://wiki.mozilla.org/Security/CSP#Goals for more information.
|
||||
jsb browser.webRequest.onHeadersReceived.addListener(tri.request.clobberCSP,{urls:["<all_urls>"],types:["main_frame"]},["blocking","responseHeaders"])
|
||||
|
||||
" Make quickmarks for the sane Tridactyl issue view
|
||||
quickmark t https://github.com/tridactyl/tridactyl/issues?utf8=%E2%9C%93&q=sort%3Aupdated-desc+
|
||||
|
||||
" Inject Google Translate
|
||||
" This (clearly) is remotely hosted code. Google will be sent the whole
|
||||
" contents of the page you are on if you run `:translate`
|
||||
" From https://github.com/jeremiahlee/page-translator
|
||||
command translate js let googleTranslateCallback = document.createElement('script'); googleTranslateCallback.innerHTML = "function googleTranslateElementInit(){ new google.translate.TranslateElement(); }"; document.body.insertBefore(googleTranslateCallback, document.body.firstChild); let googleTranslateScript = document.createElement('script'); googleTranslateScript.charset="UTF-8"; googleTranslateScript.src = "https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit&tl=&sl=&hl="; document.body.insertBefore(googleTranslateScript, document.body.firstChild);
|
||||
|
||||
"
|
||||
" URL redirects
|
||||
"
|
||||
|
||||
" New reddit is bad
|
||||
autocmd DocStart ^http(s?)://www.reddit.com js tri.excmds.urlmodify("-t", "www", "old")
|
||||
" Mosquito nets won't make themselves
|
||||
autocmd DocStart ^http(s?)://www.amazon.co.uk js tri.excmds.urlmodify("-t", "www", "smile")
|
||||
|
||||
" For syntax highlighting see https://github.com/tridactyl/vim-tridactyl
|
||||
" vim: set filetype=tridactyl
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{ profile }:
|
||||
|
||||
''
|
||||
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
|
||||
visibility: collapse !important;
|
||||
}
|
||||
|
||||
#sidebar-box[sidebarcommand="tabcenter-reborn_ariasuni-sidebar-action"] #sidebar-header {
|
||||
visibility: collapse;
|
||||
}
|
||||
''
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
{ config, lib, pkgs, sources, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.gui {
|
||||
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"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.gui {
|
||||
gtk = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "Numix-Square";
|
||||
package = pkgs.numix-icon-theme-square;
|
||||
};
|
||||
theme = {
|
||||
name = "Arc-Dark";
|
||||
package = pkgs.arc-theme;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
{ config, lib, pkgs, witch, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.gui {
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.gui {
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
profile = "gpu-hq";
|
||||
gpu-context = "wayland";
|
||||
vo = "gpu";
|
||||
hwdec = "auto";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
{ config, lib, pkgs, witch, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.gui {
|
||||
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"
|
||||
];
|
||||
};
|
||||
};
|
||||
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 "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"
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
{ 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
|
||||
bitw
|
||||
mpv
|
||||
element-desktop
|
||||
mumble
|
||||
obs-studio
|
||||
niv
|
||||
feh
|
||||
duc
|
||||
exiftool
|
||||
audacity
|
||||
avidemux
|
||||
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
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
{ 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./nixos ];
|
||||
|
||||
options = { deploy.profile.gui = lib.mkEnableOption "graphical system"; };
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.adb.enable = true;
|
||||
users.users.kat.extraGroups = [ "adbusers" ];
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./adb.nix
|
||||
./fonts.nix
|
||||
./gpg.nix
|
||||
./firefox.nix
|
||||
./dns.nix
|
||||
./nixpkgs.nix
|
||||
./mingetty.nix
|
||||
./sound.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
{ config, lib, pkgs, ... }: {
|
||||
config = lib.mkIf config.deploy.profile.gui {
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
resolvconf.useLocalResolver = true;
|
||||
networkmanager.dns = "none";
|
||||
};
|
||||
|
||||
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"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.dnscrypt-proxy2.serviceConfig = {
|
||||
StateDirectory = "dnscrypt-proxy2";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{ config, pkgs, lib, witch, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.gui {
|
||||
xdg = {
|
||||
portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
gtkUsePortal = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.gui {
|
||||
fonts.fontconfig.enable = true;
|
||||
fonts.fonts = with pkgs; [
|
||||
font-awesome
|
||||
nerdfonts
|
||||
iosevka
|
||||
emacs-all-the-icons-fonts
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.gui {
|
||||
services.pcscd.enable = true;
|
||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
pinentryFlavor = "gtk2";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
c1 = "\\e[22;34m";
|
||||
c2 = "\\e[1;35m";
|
||||
nixos_logo = [
|
||||
" ${c1} ::::. ${c2}'::::: ::::' "
|
||||
" ${c1} '::::: ${c2}':::::. ::::' "
|
||||
" ${c1} ::::: ${c2}'::::.::::: "
|
||||
" ${c1} .......:::::..... ${c2}:::::::: "
|
||||
" ${c1} ::::::::::::::::::. ${c2}:::::: ${c1}::::. "
|
||||
" ${c1} ::::::::::::::::::::: ${c2}:::::. ${c1}.::::' "
|
||||
" ${c2} ..... ::::' ${c1}:::::' "
|
||||
" ${c2} ::::: '::' ${c1}:::::' "
|
||||
" ${c2} ........::::: ' ${c1}:::::::::::. "
|
||||
" ${c2}::::::::::::: ${c1}::::::::::::: "
|
||||
" ${c2} ::::::::::: ${c1}.. ${c1}::::: "
|
||||
" ${c2} .::::: ${c1}.::: ${c1}::::: "
|
||||
" ${c2} .::::: ${c1}::::: ${c1}''''' ${c2}..... "
|
||||
" ${c2} ::::: ${c1}':::::. ${c2}......:::::::::::::' "
|
||||
" ${c2} ::: ${c1}::::::. ${c2}':::::::::::::::::' "
|
||||
" ${c1} .:::::::: ${c2}':::::::::: "
|
||||
" ${c1} .::::''::::. ${c2}'::::. "
|
||||
" ${c1} .::::' ::::. ${c2}'::::. "
|
||||
" ${c1} .:::: :::: ${c2}'::::. "
|
||||
];
|
||||
in {
|
||||
config = lib.mkIf config.deploy.profile.gui {
|
||||
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 "";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
pulseaudio = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.gui {
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./home ];
|
||||
|
||||
#home-manager.useGlobalPkgs = true;
|
||||
#home-manager.users.kat = {
|
||||
# imports = [ ../../../modules/home ];
|
||||
#};
|
||||
|
||||
options = { deploy.profile.kat = lib.mkEnableOption "uhh meow"; };
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.kat {
|
||||
base16 = {
|
||||
shell.enable = true;
|
||||
schemes = [ "rebecca.rebecca" ];
|
||||
};
|
||||
# home.base16-shell = {
|
||||
# enable = true;
|
||||
# defaultTheme = "rebecca.rebecca";
|
||||
# };
|
||||
};
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./zsh
|
||||
./vim
|
||||
./git.nix
|
||||
./kitty.nix
|
||||
./tmux.nix
|
||||
./secrets.nix
|
||||
#./base16.nix
|
||||
./xdg.nix
|
||||
./ssh.nix
|
||||
./packages.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.kat {
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.sessionVariables.TERMINFO_DIRS =
|
||||
"${pkgs.kitty.terminfo.outPath}/share/terminfo";
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.kat {
|
||||
home.packages = with pkgs; [ kitty.terminfo ];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.kat {
|
||||
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;
|
||||
};
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.kat {
|
||||
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"
|
||||
|
||||
# 256 color
|
||||
set -g default-terminal "screen-256color"
|
||||
|
||||
# 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'
|
||||
|
||||
# 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-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'
|
||||
|
||||
# messages
|
||||
set -g message-style 'fg=colour232 bg=colour16 bold'
|
||||
|
||||
# mouse
|
||||
set -g mouse on
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"python.formatting.provider": "black",
|
||||
"python.jediEnabled": true,
|
||||
"python.linting.flake8Enabled": true,
|
||||
"python.linting.enabled": true,
|
||||
"python.pythonPath": "nvim-python3"
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
{ config, lib, pkgs, witch, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.kat {
|
||||
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
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,208 +0,0 @@
|
|||
{ config, pkgs }:
|
||||
|
||||
''
|
||||
" Enable mouse
|
||||
set mouse=a
|
||||
|
||||
" colors
|
||||
let base16colorspace=256
|
||||
"colorscheme base16-rebecca
|
||||
colorscheme default
|
||||
|
||||
" notmuch!
|
||||
let g:notmuch_config_file='${config.xdg.configHome}/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='${pkgs.elinks}/bin/elinks --dump'
|
||||
|
||||
" Line numbers!
|
||||
set number
|
||||
|
||||
" Open NERDTree at start
|
||||
autocmd VimEnter * NERDTree | wincmd p
|
||||
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() |
|
||||
\ quit | endif
|
||||
autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 |
|
||||
\ let buf=bufnr() | buffer# | execute "normal! \<C-W>w" | execute 'buffer'.buf | endif
|
||||
nnoremap <leader>n :NERDTreeFocus<CR>
|
||||
nnoremap <C-n> :NERDTree<CR>
|
||||
nnoremap <C-t> :NERDTreeToggle<CR>
|
||||
nnoremap <C-f> :NERDTreeFind<CR>
|
||||
|
||||
let g:coc_node_path='${pkgs.nodejs}/bin/node'
|
||||
|
||||
" idk but this means .swp isn't everywhere
|
||||
set undodir=$XDG_DATA_HOME/vim/undo
|
||||
set directory=$XDG_DATA_HOME/vim/swap//
|
||||
set backupdir=$XDG_DATA_HOME/vim/backup
|
||||
|
||||
" TextEdit might fail if hidden is not set.
|
||||
set hidden
|
||||
|
||||
" Some servers have issues with backup files, see #649.
|
||||
set nobackup
|
||||
set nowritebackup
|
||||
|
||||
" Give more space for displaying messages.
|
||||
set cmdheight=2
|
||||
|
||||
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
|
||||
" delays and poor user experience.
|
||||
set updatetime=300
|
||||
|
||||
" Don't pass messages to |ins-completion-menu|.
|
||||
set shortmess+=c
|
||||
|
||||
" Always show the signcolumn, otherwise it would shift the text each time
|
||||
" diagnostics appear/become resolved.
|
||||
if has("patch-8.1.1564")
|
||||
" Recently vim can merge signcolumn and number column into one
|
||||
set signcolumn=number
|
||||
else
|
||||
set signcolumn=yes
|
||||
endif
|
||||
|
||||
" Use tab for trigger completion with characters ahead and navigate.
|
||||
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
|
||||
" other plugin before putting this into your config.
|
||||
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
|
||||
inoremap <silent><expr> <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>
|
||||
'' + (if config.deploy.profile.sway then ''
|
||||
noremap "+y y:call system("wl-copy", @")<CR>
|
||||
nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', ''', 'g')<CR>p
|
||||
nnoremap "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '<C-v><C-m>', ''', 'g')<CR>p
|
||||
'' else
|
||||
"")
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.kat {
|
||||
programs.zsh = {
|
||||
enable = 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";
|
||||
};
|
||||
initExtra = ''
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=3,bold"
|
||||
'';
|
||||
plugins = [{
|
||||
name = "zsh-autosuggestions";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-autosuggestions";
|
||||
rev = "v0.6.4";
|
||||
sha256 = "0h52p2waggzfshvy1wvhj4hf06fmzd44bv6j18k3l9rcx6aixzn6";
|
||||
};
|
||||
}];
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [ "git" "sudo" "adb" "cargo" "emoji" ];
|
||||
};
|
||||
};
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
enableNixDirenvIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,142 +0,0 @@
|
|||
function term_title {
|
||||
emulate -L zsh
|
||||
unsetopt prompt_subst
|
||||
|
||||
[[ -t 1 ]] || return
|
||||
|
||||
local TITLE="$1"
|
||||
local TAB="${2-$1}"
|
||||
|
||||
case "$TERM" in
|
||||
cygwin|xterm*|putty*|rxvt*|ansi)
|
||||
print -Pn "\e]2;$TITLE:q\a"
|
||||
print -Pn "\e]1;$TAB:q\a"
|
||||
;;
|
||||
screen*)
|
||||
print -Pn "\ek$TITLE:q\e\\"
|
||||
;;
|
||||
*)
|
||||
if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
|
||||
print -Pn "\e]2;$TITLE:q\a"
|
||||
print -Pn "\e]1;$TAB:q\a"
|
||||
else
|
||||
if [[ -n "$terminfo[fsl]" ]] && [[ -n "$terminfo[tsl]" ]]; then
|
||||
echoti tsl
|
||||
print -Pn "$TITLE"
|
||||
echoti fsl
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function term_dir {
|
||||
emulate -L zsh
|
||||
|
||||
[[ -t 1 ]] || return
|
||||
|
||||
local DIR="${1-$PWD}"
|
||||
|
||||
if [[ "${TERM_PROGRAM-}" == "Apple_Terminal" ]]; then
|
||||
local URL_PATH="$(__omz_urlencode -P "$DIR")"
|
||||
[[ $? != 0 ]] && return 1
|
||||
|
||||
printf '\e]7;%s\a' "file://$HOST$URL_PATH"
|
||||
fi
|
||||
}
|
||||
|
||||
function __arc_update_precmd {
|
||||
local TERM_TITLE="%~"
|
||||
local TERM_TAB="%~"
|
||||
|
||||
if [[ "${TERM_PROGRAM-}" == "Apple_Terminal" ]]; then
|
||||
TERM_TAB="$USER@%m"
|
||||
TERM_TITLE="$TERM_TAB"
|
||||
elif [[ "$USER" != "$DEFAULT_USER" || -n "${SSH_CLIENT-}" ]]; then
|
||||
TERM_TAB="$USER@%m"
|
||||
TERM_TITLE="$TERM_TAB - $TERM_TITLE"
|
||||
fi
|
||||
|
||||
term_title "$TERM_TITLE" "$TERM_TAB"
|
||||
}
|
||||
|
||||
function __arc_update_preexec {
|
||||
emulate -L zsh
|
||||
setopt extended_glob
|
||||
|
||||
local TERM_TAB=${1[(wr)^(*=*|sudo|ssh|mosh|rake|-*)]:gs/%/%%}
|
||||
local TERM_TITLE="${2:gs/%/%%}"
|
||||
|
||||
if [[ "$USER" != "$DEFAULT_USER" || -n "${SSH_CLIENT-}" ]]; then
|
||||
TERM_TAB="$USER@%m - $TERM_TAB"
|
||||
TERM_TITLE="$USER@%m - $TERM_TITLE"
|
||||
fi
|
||||
|
||||
term_title "$TERM_TITLE" "$TERM_TAB"
|
||||
}
|
||||
|
||||
zmodload zsh/langinfo
|
||||
|
||||
function __omz_urlencode() {
|
||||
emulate -L zsh
|
||||
zparseopts -D -E -a opts r m P
|
||||
|
||||
local in_str=$1
|
||||
local url_str=""
|
||||
local spaces_as_plus
|
||||
if [[ -z $opts[(r)-P] ]]; then spaces_as_plus=1; fi
|
||||
local str="$in_str"
|
||||
|
||||
# URLs must use UTF-8 encoding; convert str to UTF-8 if required
|
||||
local encoding=$langinfo[CODESET]
|
||||
local safe_encodings
|
||||
safe_encodings=(UTF-8 utf8 US-ASCII)
|
||||
if [[ -z ${safe_encodings[(r)$encoding]} ]]; then
|
||||
str=$(echo -E "$str" | iconv -f $encoding -t UTF-8)
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Error converting string from $encoding to UTF-8" >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Use LC_CTYPE=C to process text byte-by-byte
|
||||
local i byte ord LC_ALL=C
|
||||
export LC_ALL
|
||||
local reserved=';/?:@&=+$,'
|
||||
local mark='_.!~*''()-'
|
||||
local dont_escape="[A-Za-z0-9"
|
||||
if [[ -z $opts[(r)-r] ]]; then
|
||||
dont_escape+=$reserved
|
||||
fi
|
||||
# $mark must be last because of the "-"
|
||||
if [[ -z $opts[(r)-m] ]]; then
|
||||
dont_escape+=$mark
|
||||
fi
|
||||
dont_escape+="]"
|
||||
|
||||
# Implemented to use a single printf call and avoid subshells in the loop,
|
||||
# for performance (primarily on Windows).
|
||||
local url_str=""
|
||||
for (( i = 1; i <= ${#str}; ++i )); do
|
||||
byte="$str[i]"
|
||||
if [[ "$byte" =~ "$dont_escape" ]]; then
|
||||
url_str+="$byte"
|
||||
else
|
||||
if [[ "$byte" == " " && -n $spaces_as_plus ]]; then
|
||||
url_str+="+"
|
||||
else
|
||||
ord=$(( [##16] #byte ))
|
||||
url_str+="%$ord"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo -E "$url_str"
|
||||
}
|
||||
|
||||
if [[ -z "${ARC_PROMPT_RUN-}" ]]; then
|
||||
chpwd_functions+=(term_dir)
|
||||
precmd_functions+=(__arc_update_precmd)
|
||||
preexec_functions+=(__arc_update_preexec)
|
||||
|
||||
term_dir
|
||||
fi
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.kat {
|
||||
users.users.kat = {
|
||||
uid = 1000;
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCocjQqiDIvzq+Qu3jkf7FXw5piwtvZ1Mihw9cVjdVcsra3U2c9WYtYrA3rS50N3p00oUqQm9z1KUrvHzdE+03ZCrvaGdrtYVsaeoCuuvw7qxTQRbItTAEsfRcZLQ5c1v/57HNYNEsjVrt8VukMPRXWgl+lmzh37dd9w45cCY1QPi+JXQQ/4i9Vc3aWSe4X6PHOEMSBHxepnxm5VNHm4PObGcVbjBf0OkunMeztd1YYA9sEPyEK3b8IHxDl34e5t6NDLCIDz0N/UgzCxSxoz+YJ0feQuZtud/YLkuQcMxW2dSGvnJ0nYy7SA5DkW1oqcy6CGDndHl5StOlJ1IF9aGh0gGkx5SRrV7HOGvapR60RphKrR5zQbFFka99kvSQgOZqSB3CGDEQGHv8dXKXIFlzX78jjWDOBT67vA/M9BK9FS2iNnBF5x6shJ9SU5IK4ySxq8qvN7Us8emkN3pyO8yqgsSOzzJT1JmWUAx0tZWG/BwKcFBHfceAPQl6pwxx28TM3BTBRYdzPJLTkAy48y6iXW6UYdfAPlShy79IYjQtEThTuIiEzdzgYdros0x3PDniuAP0KOKMgbikr0gRa6zahPjf0qqBnHeLB6nHAfaVzI0aNbhOg2bdOueE1FX0x48sjKqjOpjlIfq4WeZp9REr2YHEsoLFOBfgId5P3BPtpBQ== cardno:000612078454"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [ "wheel" "video" ];
|
||||
hashedPassword =
|
||||
"$6$i28yOXoo$/WokLdKds5ZHtJHcuyGrH2WaDQQk/2Pj0xRGLgS8UcmY2oMv3fw2j/85PRpsJJwCB2GBRYRK5LlvdTleHd3mB.";
|
||||
};
|
||||
};
|
||||
|
||||
options = { deploy.profile.kat = lib.mkEnableOption "uhh meow"; };
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
options = { deploy.profile.laptop = lib.mkEnableOption "lappytop"; };
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./nixos ];
|
||||
|
||||
options = { deploy.profile.laptop = lib.mkEnableOption "lappytop"; };
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./light.nix ./wifi.nix ];
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config =
|
||||
lib.mkIf config.deploy.profile.laptop { programs.light.enable = true; };
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.laptop { };
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./home ];
|
||||
|
||||
options = { deploy.profile.sway = lib.mkEnableOption "sway wm"; };
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ config, pkgs, sources, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./waybar ./mako.nix ./sway.nix ./swayidle.nix ./gammastep.nix ];
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.sway {
|
||||
services.gammastep = {
|
||||
enable = true;
|
||||
latitude = "51.5074";
|
||||
longitude = "0.1278";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,151 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
## Grimshot: a helper for screenshots within sway
|
||||
## Requirements:
|
||||
## - `grim`: screenshot utility for wayland
|
||||
## - `slurp`: to select an area
|
||||
## - `swaymsg`: to read properties of current window
|
||||
## - `wl-copy`: clipboard utility
|
||||
## - `jq`: json utility to parse swaymsg output
|
||||
## - `notify-send`: to show notifications
|
||||
## Those are needed to be installed, if unsure, run `grimshot check`
|
||||
##
|
||||
## See `man 1 grimshot` or `grimshot usage` for further details.
|
||||
|
||||
getTargetDirectory() {
|
||||
echo "/home/kat/media/scrots"
|
||||
}
|
||||
|
||||
if [ "$1" = "--notify" ]; then
|
||||
NOTIFY=yes
|
||||
shift 1
|
||||
else
|
||||
NOTIFY=no
|
||||
fi
|
||||
|
||||
ACTION=${1:-usage}
|
||||
SUBJECT=${2:-screen}
|
||||
FILE=${3:-$(getTargetDirectory)/$(date -Ins).png}
|
||||
|
||||
if [ "$ACTION" != "save" ] && [ "$ACTION" != "copy" ] && [ "$ACTION" != "check" ]; then
|
||||
echo "Usage:"
|
||||
echo " grimshot [--notify] (copy|save) [active|screen|output|area|window] [FILE]"
|
||||
echo " grimshot check"
|
||||
echo " grimshot usage"
|
||||
echo ""
|
||||
echo "Commands:"
|
||||
echo " copy: Copy the screenshot data into the clipboard."
|
||||
echo " save: Save the screenshot to a regular file."
|
||||
echo " check: Verify if required tools are installed and exit."
|
||||
echo " usage: Show this message and exit."
|
||||
echo ""
|
||||
echo "Targets:"
|
||||
echo " active: Currently active window."
|
||||
echo " screen: All visible outputs."
|
||||
echo " output: Currently active output."
|
||||
echo " area: Manually select a region."
|
||||
echo " window: Manually select a window."
|
||||
exit
|
||||
fi
|
||||
|
||||
notify() {
|
||||
notify-send -t 3000 -a grimshot "$@"
|
||||
}
|
||||
notifyOk() {
|
||||
[ "$NOTIFY" = "no" ] && return
|
||||
|
||||
TITLE=${2:-"Screenshot"}
|
||||
MESSAGE=${1:-"OK"}
|
||||
notify "$TITLE" "$MESSAGE"
|
||||
}
|
||||
notifyError() {
|
||||
if [ $NOTIFY = "yes" ]; then
|
||||
TITLE=${2:-"Screenshot"}
|
||||
MESSAGE=${1:-"Error taking screenshot with grim"}
|
||||
notify -u critical "$TITLE" "$MESSAGE"
|
||||
else
|
||||
echo $1
|
||||
fi
|
||||
}
|
||||
|
||||
die() {
|
||||
MSG=${1:-Bye}
|
||||
notifyError "Error: $MSG"
|
||||
exit 2
|
||||
}
|
||||
|
||||
check() {
|
||||
COMMAND=$1
|
||||
if command -v "$COMMAND" > /dev/null 2>&1; then
|
||||
RESULT="OK"
|
||||
else
|
||||
RESULT="NOT FOUND"
|
||||
fi
|
||||
echo " $COMMAND: $RESULT"
|
||||
}
|
||||
|
||||
takeScreenshot() {
|
||||
FILE=$1
|
||||
GEOM=$2
|
||||
OUTPUT=$3
|
||||
if [ ! -z "$OUTPUT" ]; then
|
||||
grim -o "$OUTPUT" "$FILE" || die "Unable to invoke grim"
|
||||
elif [ -z "$GEOM" ]; then
|
||||
grim "$FILE" || die "Unable to invoke grim"
|
||||
else
|
||||
grim -g "$GEOM" "$FILE" || die "Unable to invoke grim"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$ACTION" = "check" ] ; then
|
||||
echo "Checking if required tools are installed. If something is missing, install it to your system and make it available in PATH..."
|
||||
check grim
|
||||
check slurp
|
||||
check swaymsg
|
||||
check wl-copy
|
||||
check jq
|
||||
check notify-send
|
||||
exit
|
||||
elif [ "$SUBJECT" = "area" ] ; then
|
||||
GEOM=$(slurp -d)
|
||||
# Check if user exited slurp without selecting the area
|
||||
if [ -z "$GEOM" ]; then
|
||||
exit
|
||||
fi
|
||||
WHAT="Area"
|
||||
elif [ "$SUBJECT" = "active" ] ; then
|
||||
FOCUSED=$(swaymsg -t get_tree | jq -r 'recurse(.nodes[]?, .floating_nodes[]?) | select(.focused)')
|
||||
GEOM=$(echo "$FOCUSED" | jq -r '.rect | "\(.x),\(.y) \(.width)x\(.height)"')
|
||||
APP_ID=$(echo "$FOCUSED" | jq -r '.app_id')
|
||||
WHAT="$APP_ID window"
|
||||
elif [ "$SUBJECT" = "screen" ] ; then
|
||||
GEOM=""
|
||||
WHAT="Screen"
|
||||
elif [ "$SUBJECT" = "output" ] ; then
|
||||
GEOM=""
|
||||
OUTPUT=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused)' | jq -r '.name')
|
||||
WHAT="$OUTPUT"
|
||||
elif [ "$SUBJECT" = "window" ] ; then
|
||||
GEOM=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp)
|
||||
# Check if user exited slurp without selecting the area
|
||||
if [ -z "$GEOM" ]; then
|
||||
exit
|
||||
fi
|
||||
WHAT="Window"
|
||||
else
|
||||
die "Unknown subject to take a screen shot from" "$SUBJECT"
|
||||
fi
|
||||
|
||||
if [ "$ACTION" = "copy" ] ; then
|
||||
takeScreenshot - "$GEOM" "$OUTPUT" | wl-copy --type image/png || die "Clipboard error"
|
||||
notifyOk "$WHAT copied to buffer"
|
||||
else
|
||||
if takeScreenshot "$FILE" "$GEOM" "$OUTPUT"; then
|
||||
TITLE="Screenshot of $SUBJECT"
|
||||
MESSAGE=$(basename "$FILE")
|
||||
notifyOk "$MESSAGE" "$TITLE"
|
||||
echo $FILE
|
||||
else
|
||||
notifyError "Error taking screenshot with grim"
|
||||
fi
|
||||
fi
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
{ config, pkgs, lib, witch, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.sway {
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,230 +0,0 @@
|
|||
{ config, pkgs, lib, witch, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.sway {
|
||||
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 = {
|
||||
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 ${./wallpapers/main.png} -s fill";
|
||||
cfg = config.wayland.windowManager.sway.config;
|
||||
in {
|
||||
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
|
||||
|
||||
output = let
|
||||
left = {
|
||||
res = "1920x1080";
|
||||
pos = "0 0";
|
||||
bg = "${./wallpapers/left.jpg} fill";
|
||||
};
|
||||
middle = {
|
||||
res = "1920x1080";
|
||||
pos = "1920 0";
|
||||
bg = "${./wallpapers/main.png} fill";
|
||||
};
|
||||
right = {
|
||||
res = "1920x1080";
|
||||
pos = "3840 0";
|
||||
bg = "${./wallpapers/right.jpg} fill";
|
||||
};
|
||||
laptop = {
|
||||
res = "1920x1080";
|
||||
pos = "0 0";
|
||||
bg = "${./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";
|
||||
};
|
||||
"*" = {
|
||||
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";
|
||||
|
||||
startup = [
|
||||
{
|
||||
command = "systemctl --user restart mako";
|
||||
always = true;
|
||||
}
|
||||
{ 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}+1" = "workspace 1";
|
||||
"${cfg.modifier}+2" = "workspace 2";
|
||||
"${cfg.modifier}+3" = "workspace 3";
|
||||
"${cfg.modifier}+4" = "workspace 4";
|
||||
"${cfg.modifier}+5" = "workspace 5";
|
||||
"${cfg.modifier}+6" = "workspace 6";
|
||||
"${cfg.modifier}+7" = "workspace 7";
|
||||
"${cfg.modifier}+8" = "workspace 8";
|
||||
"${cfg.modifier}+9" = "workspace 9";
|
||||
"${cfg.modifier}+0" = "workspace 10";
|
||||
|
||||
"${cfg.modifier}+Shift+1" = "move container to workspace 1";
|
||||
"${cfg.modifier}+Shift+2" = "move container to workspace 2";
|
||||
"${cfg.modifier}+Shift+3" = "move container to workspace 3";
|
||||
"${cfg.modifier}+Shift+4" = "move container to workspace 4";
|
||||
"${cfg.modifier}+Shift+5" = "move container to workspace 5";
|
||||
"${cfg.modifier}+Shift+6" = "move container to workspace 6";
|
||||
"${cfg.modifier}+Shift+7" = "move container to workspace 7";
|
||||
"${cfg.modifier}+Shift+8" = "move container to workspace 8";
|
||||
"${cfg.modifier}+Shift+9" = "move container to workspace 9";
|
||||
"${cfg.modifier}+Shift+0" = "move container to workspace 10";
|
||||
|
||||
"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 ${./grimshot.sh} --notify save screen";
|
||||
"${cfg.modifier}+Shift+Print" =
|
||||
"exec ${./grimshot.sh} --notify save area";
|
||||
"${cfg.modifier}+Mod1+Print" =
|
||||
"exec ${./grimshot.sh} --notify save window";
|
||||
|
||||
"${cfg.modifier}+i" = "move workspace to output left";
|
||||
"${cfg.modifier}+o" = "move workspace to output left";
|
||||
"${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
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
{ 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" ]; };
|
||||
};
|
||||
};
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 451 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.1 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 MiB |
|
|
@ -1,96 +0,0 @@
|
|||
{ config, lib, pkgs, witch, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.sway {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
style = import ./waybar.css.nix {
|
||||
style = witch.style;
|
||||
hextorgba = witch.colorhelpers.hextorgba;
|
||||
};
|
||||
settings = [{
|
||||
modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
|
||||
modules-center = [ ]; # "clock" "custom/weather"
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
"memory"
|
||||
"temperature"
|
||||
"backlight"
|
||||
"battery"
|
||||
"idle_inhibitor"
|
||||
#"mpd"
|
||||
"network"
|
||||
"custom/weather"
|
||||
"clock"
|
||||
"tray"
|
||||
];
|
||||
|
||||
modules = {
|
||||
#"custom/weather" = {
|
||||
# format = "{}";
|
||||
# interval = 3600;
|
||||
# on-click = "xdg-open 'https://google.com/search?q=weather'";
|
||||
# exec = "nix-shell --command 'python ${../../../../../scripts/weather/weather.py} ${witch.secrets.profiles.sway.city} ${witch.secrets.profiles.sway.api_key}' ${../../../../../scripts/weather}";
|
||||
#};
|
||||
"custom/weather" = {
|
||||
format = "{}";
|
||||
interval = 3600;
|
||||
on-click = "xdg-open 'https://google.com/search?q=weather'";
|
||||
exec =
|
||||
"${pkgs.kat-weather}/bin/kat-weather ${witch.secrets.profiles.sway.city} ${witch.secrets.profiles.sway.api_key}";
|
||||
};
|
||||
cpu = { format = " {usage}%"; };
|
||||
#mpd = {
|
||||
# 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 = [ "" "" ];
|
||||
on-scroll-up = "${pkgs.light}/bin/light -A 1";
|
||||
on-scroll-down = "${pkgs.light}/bin/light -U 1";
|
||||
};
|
||||
battery = {
|
||||
states = {
|
||||
good = 90;
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-alt = "{icon} {time}";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
};
|
||||
pulseaudio = {
|
||||
format = " {volume}%";
|
||||
on-click = "pavucontrol";
|
||||
};
|
||||
network = {
|
||||
format-wifi = " {essid} ({signalStrength}%)";
|
||||
format-ethernet = " {ifname}: {ipaddr}/{cidr}";
|
||||
format-linked = " {ifname} (No IP)";
|
||||
format-disconnected = " Disconnected ";
|
||||
format-alt = " {ifname}: {ipaddr}/{cidr}";
|
||||
};
|
||||
clock = {
|
||||
format = " {:%A, %F %T %Z}";
|
||||
interval = 1;
|
||||
};
|
||||
};
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
{ hextorgba, style }:
|
||||
|
||||
''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: "${style.font.name}";
|
||||
font-size: ${style.font.size_css};
|
||||
min-height: 14px
|
||||
}
|
||||
|
||||
#clock, #memory, #cpu, #temperature, #pulseaudio, #network, #mpd, #backlight, #battery, #custom-weather, #idle_inhibitor {
|
||||
margin-left: 8px;
|
||||
margin-right: 8px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
transition: none;
|
||||
border-bottom: 2px solid ${style.base16.color7};
|
||||
color: ${style.base16.color7}
|
||||
}
|
||||
|
||||
window#waybar { background: ${hextorgba style.base16.color0} }
|
||||
|
||||
#window {
|
||||
color: ${style.base16.color7};
|
||||
padding-left: 16px;
|
||||
padding-right: 16px
|
||||
}
|
||||
|
||||
#workspaces { padding: 0px 4px 0px 4px }
|
||||
|
||||
#workspaces button {
|
||||
color: ${style.base16.color7};
|
||||
background: ${hextorgba style.base16.color8};
|
||||
font-size: 16px;
|
||||
margin: 0px 4px 0px 4px;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-left: 1px solid ${style.base16.color7};
|
||||
border-right: 1px solid ${style.base16.color7}
|
||||
}
|
||||
|
||||
#workspaces button:last-child { margin-right: 0px }
|
||||
|
||||
#workspaces button.focused {
|
||||
color: ${style.base16.color5};
|
||||
border-bottom-color: ${style.base16.color5}
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
transition: none;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
color: ${style.base16.color2};
|
||||
border-bottom-color: ${style.base16.color2}
|
||||
}
|
||||
|
||||
#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} }
|
||||
#pulseaudio { border-color: ${style.base16.color2} }
|
||||
#temperature { border-color: ${style.base16.color4} }
|
||||
#battery { border-color: ${style.base16.color6} }
|
||||
#backlight { border-color: ${style.base16.color9} }
|
||||
#cpu { border-color: ${style.base16.color5} }
|
||||
#memory { border-color: ${style.base16.color17} }
|
||||
#clock { border-color: ${style.base16.color7} }
|
||||
''
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./nixos ];
|
||||
|
||||
options = { deploy.profile.sway = lib.mkEnableOption "sway wm"; };
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ config, pkgs, sources, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./sway.nix ];
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{ config, pkgs, lib, sources, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.sway {
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; lib.mkForce [ xwayland swaylock swayidle ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue