remove support.nix, theme fixes

This commit is contained in:
Dmitriy Kholkin 2020-08-11 02:38:02 +04:00
parent bff63abd7e
commit ba48b6da38
29 changed files with 286 additions and 267 deletions

11
flake.lock generated
View File

@ -5,15 +5,16 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1597006283, "lastModified": 1597074307,
"narHash": "sha256-O7vu1L1TxSx7IS2BQL90RCR6S/9rGLs2NL+Porppp4I=", "narHash": "sha256-iPbbi0Ipv2ppoyPn3N2NF/OVzri/tBeHkMTvpG2uOzk=",
"owner": "alukardbf", "owner": "alukardbf",
"repo": "base16-nix", "repo": "base16-nix",
"rev": "ee0b1e4c6aaf2e9ea959eb649bc409bd10eeb7dc", "rev": "fdb349a3869ed9482254fc619df8a1cb615554d6",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "alukardbf", "owner": "alukardbf",
"ref": "custom-scheme",
"repo": "base16-nix", "repo": "base16-nix",
"type": "github" "type": "github"
} }
@ -23,13 +24,13 @@
"locked": { "locked": {
"lastModified": 1561359199, "lastModified": 1561359199,
"narHash": "sha256-A8v9S2+WHvKi7r7jIuf2igVkDEwb79bMLYzzsj/4CLE=", "narHash": "sha256-A8v9S2+WHvKi7r7jIuf2igVkDEwb79bMLYzzsj/4CLE=",
"owner": "AlukardBF", "owner": "michael-ball",
"repo": "base16-horizon-scheme", "repo": "base16-horizon-scheme",
"rev": "644d073863ba9f863eef3b88a8f8607d0ace0063", "rev": "644d073863ba9f863eef3b88a8f8607d0ace0063",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "AlukardBF", "owner": "michael-ball",
"repo": "base16-horizon-scheme", "repo": "base16-horizon-scheme",
"type": "github" "type": "github"
} }

View File

@ -4,10 +4,10 @@
inputs = { inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable; nixpkgs.url = github:nixos/nixpkgs/nixos-unstable;
home-manager.url = github:rycee/home-manager/bqv-flakes; home-manager.url = github:rycee/home-manager/bqv-flakes;
base16.url = github:alukardbf/base16-nix; base16.url = github:alukardbf/base16-nix/custom-scheme;
# base16.url = "/shared/nixos/base16-nix"; # base16.url = "/shared/nixos/base16-nix";
base16-horizon-scheme = { base16-horizon-scheme = {
url = github:AlukardBF/base16-horizon-scheme; url = github:michael-ball/base16-horizon-scheme;
flake = false; flake = false;
}; };
materia-theme = { materia-theme = {

View File

@ -1,5 +1,5 @@
{ pkgs, config, lib, ... }: { pkgs, config, lib, ... }:
with import ../support.nix { inherit lib config; }; { {
options.defaultApplications = lib.mkOption { options.defaultApplications = lib.mkOption {
type = lib.types.attrs; type = lib.types.attrs;
description = "Preferred applications"; description = "Preferred applications";

View File

@ -2,47 +2,28 @@
with rec { with rec {
inherit (config) device deviceSpecific; inherit (config) device deviceSpecific;
}; };
with deviceSpecific; with deviceSpecific; {
let
rust-stable = pkgs.latest.rustChannels.stable.rust.override {
extensions = [
"rls-preview"
"clippy-preview"
"rustfmt-preview"
];
};
in {
programs.adb.enable = true; programs.adb.enable = true;
programs.java = { programs.java = {
enable = true; enable = true;
package = if (device == "AMD-Workstation") then pkgs.jdk13 else pkgs.jre; package = if (device == "AMD-Workstation") then pkgs.jdk13 else pkgs.jre;
}; };
environment.systemPackages = with pkgs; [
curl
wget
cifs-utils
] ++ lib.optionals isLaptop [
# acpi
] ++ lib.optionals (!isVM) [
# rust-stable
] ++ lib.optionals (device == "AMD-Workstation") [
xonar-fp
];
home-manager.users.alukard.home.packages = with pkgs; [ home-manager.users.alukard.home.packages = with pkgs; [
# Utils # Utils
curl
wget
rxvt_unicode rxvt_unicode
xclip xclip
pciutils pciutils
usbutils usbutils
nix-prefetch-git nix-prefetch-git
vdpauinfo # vdpauinfo
libva-utils # libva-utils
lm_sensors lm_sensors
gparted gparted
neofetch neofetch
bashmount # bashmount
zip zip
feh feh
@ -55,11 +36,10 @@ in {
lnav lnav
advance-touch # python3 pip advance-touch # python3 pip
exa exa
nomino # rust build # nomino # 'heavy' rust build
bpytop bpytop
nnn nnn
micro micro
# vimv
# cli # cli
ranger ranger
youtube-dl youtube-dl
@ -75,8 +55,6 @@ in {
xfce4-14.thunar xfce4-14.thunar
xfce4-14.xfce4-taskmanager xfce4-14.xfce4-taskmanager
i3lock-fancy-rapid
bibata-cursors
git-crypt git-crypt
keepassxc keepassxc
qbittorrent qbittorrent
@ -84,13 +62,14 @@ in {
xarchiver xarchiver
tdesktop tdesktop
spotifywm spotifywm
spotify-tui # spotify-tui
discord discord
pulseeffects pulseeffects
# quodlibet # quodlibet
zathura zathura # pdf
] ++ lib.optionals (!isVM) [ ] ++ lib.optionals (!isVM) [
libreoffice libreoffice
# rust-stable
# steam # steam
# steam-run # steam-run
# protontricks # protontricks
@ -98,8 +77,9 @@ in {
# retroarch # retroarch
] ++ lib.optionals isLaptop [ ] ++ lib.optionals isLaptop [
# blueman # blueman
] ++ lib.optionals (enableVirtualisation) [ # acpi
docker-compose ] ++ lib.optionals (device == "AMD-Workstation") [
# xonar-fp
]; ];
} }

View File

@ -3,6 +3,7 @@ device:
imports = [ imports = [
./applications/alacritty.nix ./applications/alacritty.nix
./applications/packages.nix ./applications/packages.nix
./applications/qbittorrent
./applications/rofi.nix ./applications/rofi.nix
./applications/vscode.nix ./applications/vscode.nix
@ -18,7 +19,6 @@ device:
./workspace/misc.nix ./workspace/misc.nix
./workspace/mpv.nix ./workspace/mpv.nix
./workspace/pulseeffects ./workspace/pulseeffects
./workspace/qbittorrent
# ./workspace/spotifyd.nix # ./workspace/spotifyd.nix
./workspace/ssh.nix ./workspace/ssh.nix
./workspace/xresources.nix ./workspace/xresources.nix

View File

@ -10,7 +10,7 @@
rec { rec {
inherit inputs; inherit inputs;
youtube-to-mpv = pkgs.callPackage ./packages/youtube-to-mpv.nix { }; youtube-to-mpv = pkgs.callPackage ./packages/youtube-to-mpv.nix { term = config.defaultApplications.term.cmd; };
wg-conf = pkgs.callPackage ./packages/wg-conf.nix { }; wg-conf = pkgs.callPackage ./packages/wg-conf.nix { };
@ -26,10 +26,15 @@
ibm-plex-powerline = pkgs.callPackage ./packages/ibm-plex-powerline.nix { }; ibm-plex-powerline = pkgs.callPackage ./packages/ibm-plex-powerline.nix { };
# micro = super.micro.overrideAttrs (old: rec { # material-icons = pkgs.callPackage ./packages/material-icons-inline.nix { };
# version = "2.0.6";
# src = inputs.micro; # rust-stable = pkgs.latest.rustChannels.stable.rust.override {
# }); # extensions = [
# "rls-preview"
# "clippy-preview"
# "rustfmt-preview"
# ];
# };
wpgtk = super.wpgtk.overrideAttrs (old: rec { wpgtk = super.wpgtk.overrideAttrs (old: rec {
propagatedBuildInputs = with pkgs; [ propagatedBuildInputs = with pkgs; [
@ -46,9 +51,6 @@
}; };
}); });
# git-with-libsecret = super.git.override { withLibsecret = true; };
# spotifyd = super.spotifyd.override { withPulseAudio = true; }; # spotifyd = super.spotifyd.override { withPulseAudio = true; };
# spotify-tui = naersk.buildPackage { # spotify-tui = naersk.buildPackage {

View File

@ -0,0 +1,23 @@
{ stdenv, fetchurl }:
let
icons = "https://gist.github.com/draoncc/3c20d8d4262892ccd2e227eefeafa8ef/raw/3e6e12c213fba1ec28aaa26430c3606874754c30/MaterialIcons-Regular-for-inline.ttf";
in stdenv.mkDerivation {
name = "material-icons-inline";
src = fetchurl {
name = "material-icons-inline";
url = icons;
sha256 = "sha256-huy/En0YX6bkJmrDazxPltsWZOUPxGuQs12r6L+h+oA=";
};
dontUnpack = true;
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp $src $out/share/fonts/truetype/MaterialIcons-Regular-for-inline.ttf
'';
meta = with stdenv.lib; {
description = "Material Icons Font patched for inline";
};
}

View File

@ -1,5 +1,5 @@
{ stdenv, pkgs, config }: { stdenv, pkgs, term }:
# TODO: config.defaultApplications doesn't work # TODO: config.defaultApplications doesn't work
let let
yt-mpv = pkgs.writeShellScriptBin "yt-mpv" '' yt-mpv = pkgs.writeShellScriptBin "yt-mpv" ''
@ -8,7 +8,7 @@ let
${pkgs.mpv}/bin/mpv --fs "$(xclip -o)" ${pkgs.mpv}/bin/mpv --fs "$(xclip -o)"
else else
${pkgs.libnotify}/bin/notify-send -t 3000 --icon=video-television "Playing Audio" "$(xclip -o)" ${pkgs.libnotify}/bin/notify-send -t 3000 --icon=video-television "Playing Audio" "$(xclip -o)"
${pkgs.alacritty}/bin/alacritty -e ${pkgs.mpv}/bin/mpv --no-video "$(xclip -o)" ${term} -e ${pkgs.mpv}/bin/mpv --no-video "$(xclip -o)"
fi fi
''; '';
in in

View File

@ -46,9 +46,9 @@ with deviceSpecific; {
valid users = @smbgrp valid users = @smbgrp
''; '';
}; };
environment.systemPackages = environment.systemPackages = [
if isHost then pkgs.cifs-utils
[ config.services.samba.package ] ] ++ lib.optionals isHost [
else config.services.samba.package
[ ]; ];
} }

View File

@ -48,6 +48,7 @@ in {
services.upower.enable = true; services.upower.enable = true;
virtualisation.docker.enable = device.enableVirtualisation; virtualisation.docker.enable = device.enableVirtualisation;
environment.systemPackages = lib.mkIf (device.enableVirtualisation) [ pkgs.docker-compose ];
virtualisation.libvirtd = { virtualisation.libvirtd = {
enable = device.enableVirtualisation; enable = device.enableVirtualisation;

View File

@ -1,6 +1,7 @@
{ pkgs, config, lib, ... }: { { pkgs, config, lib, ... }: {
# TODO: FIXIT!
services.mopidy = { services.mopidy = {
enable = true; enable = false;
# extensionPackages = with pkgs; [ mopidy-gmusic mopidy-youtube ]; # extensionPackages = with pkgs; [ mopidy-gmusic mopidy-youtube ];
configuration = '' configuration = ''
[mpd] [mpd]

View File

@ -32,10 +32,12 @@ with lib;
# }; # };
config.themes.base16 = { config.themes.base16 = {
enable = true; enable = true;
# scheme = "tomorrow"; customScheme = {
# variant = "tomorrow-night"; enable = true;
scheme = "gruvbox"; path = "${inputs.base16-horizon-scheme}/horizon-dark.yaml";
variant = "gruvbox-dark-medium"; };
# scheme = "gruvbox";
# variant = "gruvbox-dark-medium";
extraParams = { extraParams = {
font = "IBM Plex Sans"; font = "IBM Plex Sans";
fontMono = "IBM Plex Mono"; fontMono = "IBM Plex Mono";
@ -43,10 +45,12 @@ with lib;
fallbackFont = "Roboto"; fallbackFont = "Roboto";
fallbackFontMono = "Roboto Mono"; fallbackFontMono = "Roboto Mono";
fallbackFontSerif = "Roboto Slab"; fallbackFontSerif = "Roboto Slab";
powerlineFont = "IBM Plex Mono for Powerline";
fontSize = "12"; fontSize = "12";
headerSize = "14"; headerSize = "14";
iconFont = "Material Icons"; iconFont = "Font Awesome 5 Free";
powerlineFont = "IBM Plex Mono for Powerline"; fallbackIcon = "Material Icons";
iconsTheme = "Papirus-Dark";
}; };
}; };
} }

View File

@ -2,9 +2,10 @@
with lib; with lib;
let let
cfg = config.secrets.wireguard.${config.device}; cfg = config.secrets.wireguard.${config.device};
kernel = config.boot.kernelPackages;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
# boot.extraModulePackages = optional (versionOlder kernel.kernel.version "5.6") kernel.wireguard; boot.extraModulePackages = optional (versionOlder kernel.kernel.version "5.6") kernel.wireguard;
environment.systemPackages = [ pkgs.wireguard-tools ]; environment.systemPackages = [ pkgs.wireguard-tools ];
networking.firewall.checkReversePath = false; networking.firewall.checkReversePath = false;
@ -21,6 +22,10 @@ in {
RemainAfterExit = true; RemainAfterExit = true;
}; };
unitConfig = {
ConditionPathExists = "/root/wg0.conf";
};
script = '' script = ''
${strings.optionalString (!config.boot.isContainer) "modprobe wireguard"} ${strings.optionalString (!config.boot.isContainer) "modprobe wireguard"}
wg-quick up /root/wg0.conf wg-quick up /root/wg0.conf

View File

@ -5,7 +5,7 @@ in {
services.dunst = { services.dunst = {
enable = true; enable = true;
iconTheme = { iconTheme = {
name = "Papirus-Dark"; name = "${thm.iconsTheme}";
package = pkgs.papirus-icon-theme; package = pkgs.papirus-icon-theme;
}; };
settings = { settings = {

View File

@ -8,13 +8,15 @@ in
ibm-plex ibm-plex
ibm-plex-powerline ibm-plex-powerline
fira-code fira-code
material-design-icons
material-icons
roboto roboto
roboto-mono roboto-mono
roboto-slab roboto-slab
font-awesome_4
# powerline-fonts # powerline-fonts
# Icons
# font-awesome_4
font-awesome
material-icons
# material-design-icons
]; ];
fontconfig = { fontconfig = {
enable = true; enable = true;

View File

@ -48,7 +48,7 @@ in {
gtk = { gtk = {
enable = true; enable = true;
iconTheme = { iconTheme = {
name = "Papirus-Dark"; name = "${thm.iconsTheme}";
package = pkgs.papirus-icon-theme; package = pkgs.papirus-icon-theme;
}; };
theme = { theme = {
@ -58,7 +58,7 @@ in {
# package = pkgs.flatcolor-gtk-theme; # package = pkgs.flatcolor-gtk-theme;
}; };
font = { font = {
name = "${thm.font} ${thm.fontSize}"; name = "${thm.font} 14";
}; };
gtk3.extraConfig.gtk-cursor-theme-name = "bibata_oil"; gtk3.extraConfig.gtk-cursor-theme-name = "bibata_oil";
}; };

View File

@ -95,13 +95,7 @@ in {
keybindings = let keybindings = let
script = name: content: "exec ${pkgs.writeScript name content}"; script = name: content: "exec ${pkgs.writeScript name content}";
workspaces = (builtins.genList (x: [ (toString x) (toString x) ]) 10) workspaces = (builtins.genList (x: [ (toString x) (toString x) ]) 10)
++ [ [ "c" "" ] [ "t" "" ] [ "m" "" ] ]; ++ [ [ "c" "" ] [ "t" "" ] ];
moveMouse = ''
exec "sh -c 'eval `${pkgs.xdotool}/bin/xdotool \
getactivewindow \
getwindowgeometry --shell`; ${pkgs.xdotool}/bin/xdotool \
mousemove \
$((X+WIDTH/2)) $((Y+HEIGHT/2))'"'';
in ({ in ({
"${modifier}+q" = "kill"; "${modifier}+q" = "kill";
"${modifier}+w" = "exec ${apps.dmenu.cmd}"; "${modifier}+w" = "exec ${apps.dmenu.cmd}";
@ -109,14 +103,14 @@ in {
"${modifier}+e" = "exec ${apps.editor.cmd}"; "${modifier}+e" = "exec ${apps.editor.cmd}";
# "${modifier}+l" = "layout toggle all"; # "${modifier}+l" = "layout toggle all";
"${modifier}+Left" = "focus child; focus left; ${moveMouse}"; "${modifier}+Left" = "focus child; focus left";
"${modifier}+Right" = "focus child; focus right; ${moveMouse}"; "${modifier}+Right" = "focus child; focus right";
"${modifier}+Up" = "focus child; focus up; ${moveMouse}"; "${modifier}+Up" = "focus child; focus up";
"${modifier}+Down" = "focus child; focus down; ${moveMouse}"; "${modifier}+Down" = "focus child; focus down";
"${modifier}+Control+Left" = "focus parent; focus left; ${moveMouse}"; "${modifier}+Control+Left" = "focus parent; focus left";
"${modifier}+Control+Right" = "focus parent; focus right; ${moveMouse}"; "${modifier}+Control+Right" = "focus parent; focus right";
"${modifier}+Control+Up" = "focus parent; focus up; ${moveMouse}"; "${modifier}+Control+Up" = "focus parent; focus up";
"${modifier}+Control+Down" = "focus parent; focus down; ${moveMouse}"; "${modifier}+Control+Down" = "focus parent; focus down";
"${modifier}+Shift+Up" = "move up"; "${modifier}+Shift+Up" = "move up";
"${modifier}+Shift+Down" = "move down"; "${modifier}+Shift+Down" = "move down";
"${modifier}+Shift+Right" = "move right"; "${modifier}+Shift+Right" = "move right";
@ -130,6 +124,7 @@ in {
"${modifier}+j" = "exec ${pkgs.playerctl}/bin/playerctl previous"; "${modifier}+j" = "exec ${pkgs.playerctl}/bin/playerctl previous";
"${modifier}+k" = "exec ${pkgs.playerctl}/bin/playerctl play-pause"; "${modifier}+k" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
"${modifier}+l" = "exec ${pkgs.playerctl}/bin/playerctl next"; "${modifier}+l" = "exec ${pkgs.playerctl}/bin/playerctl next";
"${modifier}+m" = "exec ${pkgs.alsaUtils}/bin/amixer set Master toggle";
"${modifier}+d" = "exec ${apps.fm.cmd}"; "${modifier}+d" = "exec ${apps.fm.cmd}";
"${modifier}+y" = "exec ${pkgs.youtube-to-mpv}/bin/yt-mpv"; "${modifier}+y" = "exec ${pkgs.youtube-to-mpv}/bin/yt-mpv";

View File

@ -3,7 +3,6 @@ with rec {
inherit (config) device deviceSpecific; inherit (config) device deviceSpecific;
}; };
with deviceSpecific; with deviceSpecific;
with import ../../../support.nix { inherit pkgs config lib; };
let let
scripts = import ./scripts pkgs config; scripts = import ./scripts pkgs config;
thm = config.lib.base16.theme; thm = config.lib.base16.theme;
@ -11,7 +10,7 @@ in {
home-manager.users.alukard.xsession.windowManager.i3.extraConfig = '' home-manager.users.alukard.xsession.windowManager.i3.extraConfig = ''
bar { bar {
id top id top
font pango:${thm.iconFont} 11, ${thm.fontMono} 11, ${thm.fallbackFontMono} 11 font pango:${thm.iconFont} Solid 10, ${thm.fallbackIcon} 10, ${thm.powerlineFont} SemiBold 10
mode dock mode dock
hidden_state hide hidden_state hide
position top position top
@ -21,12 +20,12 @@ in {
tray_output primary tray_output primary
colors { colors {
background #${thm.base00-hex} background #${thm.base00-hex}
separator #${thm.base01-hex} separator #${thm.base02-hex}
statusline #${thm.base04-hex} statusline #${thm.base04-hex}
focused_workspace #${thm.base00-hex} #${thm.base00-hex} #${thm.base0D-hex} focused_workspace #${thm.base00-hex} #${thm.base00-hex} #${thm.base0D-hex}
active_workspace #${thm.base00-hex} #${thm.base03-hex} #${thm.base00-hex} active_workspace #${thm.base00-hex} #${thm.base03-hex} #${thm.base00-hex}
inactive_workspace #${thm.base00-hex} #${thm.base01-hex} #${thm.base05-hex} inactive_workspace #${thm.base00-hex} #${thm.base01-hex} #${thm.base05-hex}
urgent_workspace #${thm.base00-hex} #${thm.base0A-hex} #${thm.base00-hex} urgent_workspace #${thm.base0A-hex} #${thm.base00-hex} #${thm.base05-hex}
binding_mode #${thm.base00-hex} #${thm.base0A-hex} #${thm.base00-hex} binding_mode #${thm.base00-hex} #${thm.base0A-hex} #${thm.base00-hex}
} }
} }
@ -48,8 +47,57 @@ in {
critical_bg = "#${thm.base08-hex}" critical_bg = "#${thm.base08-hex}"
critical_fg = "#${thm.base00-hex}" critical_fg = "#${thm.base00-hex}"
# Material Icons Cheatsheet [https://shanfan.github.io/material-icons-cheatsheet/]
# Font Awesome Cheatsheet [https://fontawesome.com/icons?d=gallery&m=free]
[icons] [icons]
name = "material" name = "awesome5"
[icons.overrides]
# backlight_empty = ""
# backlight_full = ""
# backlight_partial1 = ""
# backlight_partial2 = ""
# backlight_partial3 = ""
# bat_charging = ""
# bat_discharging = ""
# bat_full = ""
# bat = ""
# cogs = ""
cpu = " "
# gpu = ""
# mail = ""
memory_mem = " "
memory_swap = " "
music_next = ""
music_pause = ""
music_play = ""
music_prev = ""
music = " "
net_down = " "
net_up = " "
### net_up = " "
net_wired = ""
net_wireless = ""
### net_wired = "  "
### net_wireless = "  "
# ping = ""
# thermometer = ""
# time = ""
# toggle_off = ""
# toggle_on = ""
# update = ""
# uptime = ""
volume_empty = " "
volume_full = " "
volume_half = " "
volume_muted = " "
# weather_clouds = ""
# weather_default = ""
# weather_rain = ""
# weather_snow = ""
# weather_sun = ""
# weather_thunder = ""
# xrandr = ""
[[block]] [[block]]
block = "net" block = "net"
@ -81,7 +129,7 @@ in {
[[block]] [[block]]
block = "sound" block = "sound"
driver = "pulseaudio" driver = "auto"
[[block]] [[block]]
block = "cpu" block = "cpu"

View File

@ -1,16 +1,19 @@
p: c: p: c:
with p; with p;
builtins.mapAttrs (name: value: let
writeTextFile { writeScript = name: script:
inherit name; writeTextFile {
text = callPackage value { inherit name;
iconfont = "FontAwesome 11"; text = callPackage script {
config = c; iconfont = c.lib.base16.theme.iconFont;
config = c;
};
executable = true;
checkPhase =
"${bash}/bin/bash -n $src || ${python3}/bin/python3 -m compileall $src";
}; };
executable = true; in
checkPhase = builtins.mapAttrs writeScript {
"${bash}/bin/bash -n $src";
}) {
weather = ./weather.nix; weather = ./weather.nix;
df = ./df.nix; df = ./df.nix;
vpn-status = ./vpn-status.nix; vpn-status = ./vpn-status.nix;

View File

@ -1,4 +1,4 @@
{ bash, config, curl, ... }: with config.lib.base16.theme; '' { iconfont, ... }: ''
#!/usr/bin/env bash #!/usr/bin/env bash
echo '<span font="${iconFont}">folder</span>' `df -h / | tail -1 | awk '{print $4}'`iB echo '<span font="${iconfont} Solid"></span>' `df -BM / | tail -1 | awk '{printf "%.2fGiB / %.2fGiB", $3/1024, $2/1024}'`
'' ''

View File

@ -1,9 +1,9 @@
{ curl, ... }: '' { curl, iconfont, ... }: ''
#!/usr/bin/env bash #!/usr/bin/env bash
API="$(${curl}/bin/curl https://am.i.mullvad.net/connected)" API="$(${curl}/bin/curl https://am.i.mullvad.net/connected)"
if [[ $(echo "$API" | awk -F'[ ()]+' '{print $6}') = 'server' ]]; then if [[ $(echo "$API" | awk -F'[ ()]+' '{print $6}') = 'server' ]]; then
echo $(echo "$API" | awk -F'[ ()]+' '{print $7}') echo '<span font="${iconfont} Solid"></span>' `(echo "$API" | awk -F'[ ()]+' '{print $7}')`
else else
echo 'Not connected' echo '<span font="${iconfont} Solid"></span>' 'Not connected'
fi fi
'' ''

View File

@ -1,4 +1,4 @@
{ bash, config, curl, ... }: '' { curl, config, ... }: ''
#!/usr/bin/env bash #!/usr/bin/env bash
${curl}/bin/curl wttr.in/Volzhskiy\?format=3 | awk -F": " '{print $2}' ${curl}/bin/curl wttr.in/Volzhskiy\?format=3 | awk -F": " '{print $2}'
if [[ $BLOCK_BUTTON == 1 ]] if [[ $BLOCK_BUTTON == 1 ]]

View File

@ -1,7 +1,9 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
with import ../../../support.nix { inherit lib config; }; { let
thm = config.lib.base16.theme;
in
{
# xdg.portal.enable = true; # xdg.portal.enable = true;
# # services.flatpak.enable = true;
# xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-kde ]; # xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-kde ];
# services.dbus.packages = [ # services.dbus.packages = [
# pkgs.plasma5.xdg-desktop-portal-kde # pkgs.plasma5.xdg-desktop-portal-kde
@ -40,100 +42,100 @@ with import ../../../support.nix { inherit lib config; }; {
KDEDIRS = "/run/current-system/sw:/run/current-system/sw/share/kservices5:/run/current-system/sw/share/kservicetypes5:/run/current-system/sw/share/kxmlgui5"; KDEDIRS = "/run/current-system/sw:/run/current-system/sw/share/kservices5:/run/current-system/sw/share/kservicetypes5:/run/current-system/sw/share/kxmlgui5";
}; };
home-manager.users.alukard.xdg.configFile."kdeglobals".text = genIni { home-manager.users.alukard.xdg.configFile."kdeglobals".text = lib.generators.toINI {} {
# "Colors:Button" = { "Colors:Button" = {
# BackgroundAlternate = thmDec.dark; BackgroundAlternate = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
# BackgroundNormal = thmDec.bg; BackgroundNormal = "${thm.base00-rgb-r}, ${thm.base00-rgb-g}, ${thm.base00-rgb-b}";
# DecorationFocus = thmDec.alt; DecorationFocus = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# DecorationHover = thmDec.alt; DecorationHover = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# ForegroundActive = thmDec.alt; ForegroundActive = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# ForegroundInactive = thmDec.dark; ForegroundInactive = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
# ForegroundLink = thmDec.blue; ForegroundLink = "${thm.base0D-rgb-r}, ${thm.base0D-rgb-g}, ${thm.base0D-rgb-b}";
# ForegroundNegative = thmDec.red; ForegroundNegative = "${thm.base08-rgb-r}, ${thm.base08-rgb-g}, ${thm.base08-rgb-b}";
# ForegroundNeutral = thmDec.orange; ForegroundNeutral = "${thm.base09-rgb-r}, ${thm.base09-rgb-g}, ${thm.base09-rgb-b}";
# ForegroundNormal = thmDec.fg; ForegroundNormal = "${thm.base05-rgb-r}, ${thm.base05-rgb-g}, ${thm.base05-rgb-b}";
# ForegroundPositive = thmDec.green; ForegroundPositive = "${thm.base0B-rgb-r}, ${thm.base0B-rgb-g}, ${thm.base0B-rgb-b}";
# ForegroundVisited = thmDec.gray; ForegroundVisited = "${thm.base03-rgb-r}, ${thm.base03-rgb-g}, ${thm.base03-rgb-b}";
# }; };
# "Colors:Complementary" = { "Colors:Complementary" = {
# BackgroundAlternate = thmDec.dark; BackgroundAlternate = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
# BackgroundNormal = thmDec.bg; BackgroundNormal = "${thm.base00-rgb-r}, ${thm.base00-rgb-g}, ${thm.base00-rgb-b}";
# DecorationFocus = thmDec.alt; DecorationFocus = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# DecorationHover = thmDec.alt; DecorationHover = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# ForegroundActive = thmDec.orange; ForegroundActive = "${thm.base09-rgb-r}, ${thm.base09-rgb-g}, ${thm.base09-rgb-b}";
# ForegroundInactive = thmDec.dark; ForegroundInactive = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
# ForegroundLink = thmDec.blue; ForegroundLink = "${thm.base0D-rgb-r}, ${thm.base0D-rgb-g}, ${thm.base0D-rgb-b}";
# ForegroundNegative = thmDec.red; ForegroundNegative = "${thm.base08-rgb-r}, ${thm.base08-rgb-g}, ${thm.base08-rgb-b}";
# ForegroundNeutral = thmDec.yellow; ForegroundNeutral = "${thm.base0A-rgb-r}, ${thm.base0A-rgb-g}, ${thm.base0A-rgb-b}";
# ForegroundNormal = thmDec.fg; ForegroundNormal = "${thm.base05-rgb-r}, ${thm.base05-rgb-g}, ${thm.base05-rgb-b}";
# ForegroundPositive = thmDec.green; ForegroundPositive = "${thm.base0B-rgb-r}, ${thm.base0B-rgb-g}, ${thm.base0B-rgb-b}";
# ForegroundVisited = thmDec.alt; ForegroundVisited = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# }; };
# "Colors:Selection" = { "Colors:Selection" = {
# BackgroundAlternate = thmDec.alt; BackgroundAlternate = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# BackgroundNormal = thmDec.alt; BackgroundNormal = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# DecorationFocus = thmDec.alt; DecorationFocus = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# DecorationHover = thmDec.alt; DecorationHover = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# ForegroundActive = thmDec.fg; ForegroundActive = "${thm.base05-rgb-r}, ${thm.base05-rgb-g}, ${thm.base05-rgb-b}";
# ForegroundInactive = thmDec.fg; ForegroundInactive = "${thm.base05-rgb-r}, ${thm.base05-rgb-g}, ${thm.base05-rgb-b}";
# ForegroundLink = thmDec.blue; ForegroundLink = "${thm.base0D-rgb-r}, ${thm.base0D-rgb-g}, ${thm.base0D-rgb-b}";
# ForegroundNegative = thmDec.red; ForegroundNegative = "${thm.base08-rgb-r}, ${thm.base08-rgb-g}, ${thm.base08-rgb-b}";
# ForegroundNeutral = thmDec.orange; ForegroundNeutral = "${thm.base09-rgb-r}, ${thm.base09-rgb-g}, ${thm.base09-rgb-b}";
# ForegroundNormal = thmDec.fg; ForegroundNormal = "${thm.base05-rgb-r}, ${thm.base05-rgb-g}, ${thm.base05-rgb-b}";
# ForegroundPositive = thmDec.green; ForegroundPositive = "${thm.base0B-rgb-r}, ${thm.base0B-rgb-g}, ${thm.base0B-rgb-b}";
# ForegroundVisited = thmDec.alt; ForegroundVisited = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# }; };
# "Colors:Tooltip" = { "Colors:Tooltip" = {
# BackgroundAlternate = thmDec.dark; BackgroundAlternate = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
# BackgroundNormal = thmDec.bg; BackgroundNormal = "${thm.base00-rgb-r}, ${thm.base00-rgb-g}, ${thm.base00-rgb-b}";
# DecorationFocus = thmDec.alt; DecorationFocus = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# DecorationHover = thmDec.alt; DecorationHover = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# ForegroundActive = thmDec.alt; ForegroundActive = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# ForegroundInactive = thmDec.dark; ForegroundInactive = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
# ForegroundLink = thmDec.blue; ForegroundLink = "${thm.base0D-rgb-r}, ${thm.base0D-rgb-g}, ${thm.base0D-rgb-b}";
# ForegroundNegative = thmDec.red; ForegroundNegative = "${thm.base08-rgb-r}, ${thm.base08-rgb-g}, ${thm.base08-rgb-b}";
# ForegroundNeutral = thmDec.orange; ForegroundNeutral = "${thm.base09-rgb-r}, ${thm.base09-rgb-g}, ${thm.base09-rgb-b}";
# ForegroundNormal = thmDec.fg; ForegroundNormal = "${thm.base05-rgb-r}, ${thm.base05-rgb-g}, ${thm.base05-rgb-b}";
# ForegroundPositive = thmDec.green; ForegroundPositive = "${thm.base0B-rgb-r}, ${thm.base0B-rgb-g}, ${thm.base0B-rgb-b}";
# ForegroundVisited = thmDec.gray; ForegroundVisited = "${thm.base03-rgb-r}, ${thm.base03-rgb-g}, ${thm.base03-rgb-b}";
# }; };
# "Colors:View" = { "Colors:View" = {
# BackgroundAlternate = thmDec.dark; BackgroundAlternate = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
# BackgroundNormal = thmDec.bg; BackgroundNormal = "${thm.base00-rgb-r}, ${thm.base00-rgb-g}, ${thm.base00-rgb-b}";
# DecorationFocus = thmDec.alt; DecorationFocus = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# DecorationHover = thmDec.alt; DecorationHover = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# ForegroundActive = thmDec.alt; ForegroundActive = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# ForegroundInactive = thmDec.dark; ForegroundInactive = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
# ForegroundLink = thmDec.blue; ForegroundLink = "${thm.base0D-rgb-r}, ${thm.base0D-rgb-g}, ${thm.base0D-rgb-b}";
# ForegroundNegative = thmDec.red; ForegroundNegative = "${thm.base08-rgb-r}, ${thm.base08-rgb-g}, ${thm.base08-rgb-b}";
# ForegroundNeutral = thmDec.orange; ForegroundNeutral = "${thm.base09-rgb-r}, ${thm.base09-rgb-g}, ${thm.base09-rgb-b}";
# ForegroundNormal = thmDec.fg; ForegroundNormal = "${thm.base05-rgb-r}, ${thm.base05-rgb-g}, ${thm.base05-rgb-b}";
# ForegroundPositive = thmDec.green; ForegroundPositive = "${thm.base0B-rgb-r}, ${thm.base0B-rgb-g}, ${thm.base0B-rgb-b}";
# ForegroundVisited = thmDec.gray; ForegroundVisited = "${thm.base03-rgb-r}, ${thm.base03-rgb-g}, ${thm.base03-rgb-b}";
# }; };
# "Colors:Window" = { "Colors:Window" = {
# BackgroundAlternate = thmDec.dark; BackgroundAlternate = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
# BackgroundNormal = thmDec.bg; BackgroundNormal = "${thm.base00-rgb-r}, ${thm.base00-rgb-g}, ${thm.base00-rgb-b}";
# DecorationFocus = thmDec.alt; DecorationFocus = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# DecorationHover = thmDec.alt; DecorationHover = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# ForegroundActive = thmDec.alt; ForegroundActive = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
# ForegroundInactive = thmDec.dark; ForegroundInactive = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
# ForegroundLink = thmDec.blue; ForegroundLink = "${thm.base0D-rgb-r}, ${thm.base0D-rgb-g}, ${thm.base0D-rgb-b}";
# ForegroundNegative = thmDec.red; ForegroundNegative = "${thm.base08-rgb-r}, ${thm.base08-rgb-g}, ${thm.base08-rgb-b}";
# ForegroundNeutral = thmDec.orange; ForegroundNeutral = "${thm.base09-rgb-r}, ${thm.base09-rgb-g}, ${thm.base09-rgb-b}";
# ForegroundNormal = thmDec.fg; ForegroundNormal = "${thm.base05-rgb-r}, ${thm.base05-rgb-g}, ${thm.base05-rgb-b}";
# ForegroundPositive = thmDec.green; ForegroundPositive = "${thm.base0B-rgb-r}, ${thm.base0B-rgb-g}, ${thm.base0B-rgb-b}";
# ForegroundVisited = thmDec.gray; ForegroundVisited = "${thm.base03-rgb-r}, ${thm.base03-rgb-g}, ${thm.base03-rgb-b}";
# }; };
General = { General = {
ColorScheme = "Generated"; ColorScheme = "Generated";
Name = "Generated"; Name = "Generated";
fixed = "IBM Plex Mono,11,-1,5,50,0,0,0,0,0"; fixed = "${thm.fontMono},11,-1,5,50,0,0,0,0,0";
font = "IBM Plex,11,-1,5,50,0,0,0,0,0"; font = "${thm.font},11,-1,5,50,0,0,0,0,0";
menuFont = "IBM Plex,11,-1,5,50,0,0,0,0,0"; menuFont = "${thm.font},11,-1,5,50,0,0,0,0,0";
shadeSortColumn = true; shadeSortColumn = true;
smallestReadableFont = "IBM Plex,8,-1,5,57,0,0,0,0,0,Medium"; smallestReadableFont = "${thm.font},8,-1,5,57,0,0,0,0,0,Medium";
toolBarFont = "IBM Plex,11,-1,5,50,0,0,0,0,0"; toolBarFont = "${thm.font},11,-1,5,50,0,0,0,0,0";
}; };
KDE = { KDE = {
DoubleClickInterval = 400; DoubleClickInterval = 400;
@ -145,6 +147,6 @@ with import ../../../support.nix { inherit lib config; }; {
contrast = 4; contrast = 4;
widgetStyle = "Breeze"; widgetStyle = "Breeze";
}; };
Icons = { Theme = "Papirus-Dark"; }; Icons = { Theme = "${thm.iconsTheme}"; };
}; };
} }

View File

@ -125,7 +125,7 @@
"slope": "x1", "slope": "x1",
"solo": "false", "solo": "false",
"mute": "false", "mute": "false",
"gain": "3", "gain": "4",
"frequency": "45", "frequency": "45",
"q": "1.51" "q": "1.51"
}, },
@ -135,8 +135,8 @@
"slope": "x1", "slope": "x1",
"solo": "false", "solo": "false",
"mute": "false", "mute": "false",
"gain": "0", "gain": "3",
"frequency": "986", "frequency": "63",
"q": "1.88" "q": "1.88"
}, },
"band3": { "band3": {
@ -175,7 +175,7 @@
"slope": "x1", "slope": "x1",
"solo": "false", "solo": "false",
"mute": "false", "mute": "false",
"gain": "-3", "gain": "-2",
"frequency": "8042", "frequency": "8042",
"q": "3.32" "q": "3.32"
}, },
@ -205,7 +205,7 @@
"slope": "x1", "slope": "x1",
"solo": "false", "solo": "false",
"mute": "false", "mute": "false",
"gain": "-3", "gain": "-2",
"frequency": "19069", "frequency": "19069",
"q": "0.64" "q": "0.64"
} }
@ -227,7 +227,7 @@
"slope": "x1", "slope": "x1",
"solo": "false", "solo": "false",
"mute": "false", "mute": "false",
"gain": "3", "gain": "4",
"frequency": "45", "frequency": "45",
"q": "1.51" "q": "1.51"
}, },
@ -237,8 +237,8 @@
"slope": "x1", "slope": "x1",
"solo": "false", "solo": "false",
"mute": "false", "mute": "false",
"gain": "0", "gain": "3",
"frequency": "986", "frequency": "63",
"q": "1.88" "q": "1.88"
}, },
"band3": { "band3": {
@ -277,7 +277,7 @@
"slope": "x1", "slope": "x1",
"solo": "false", "solo": "false",
"mute": "false", "mute": "false",
"gain": "-3", "gain": "-2",
"frequency": "8042", "frequency": "8042",
"q": "3.32" "q": "3.32"
}, },
@ -307,7 +307,7 @@
"slope": "x1", "slope": "x1",
"solo": "false", "solo": "false",
"mute": "false", "mute": "false",
"gain": "-3", "gain": "-2",
"frequency": "19069", "frequency": "19069",
"q": "0.64" "q": "0.64"
} }
@ -348,7 +348,7 @@
}, },
"limiter": { "limiter": {
"state": "true", "state": "true",
"input-gain": "-6", "input-gain": "-7",
"limit": "0", "limit": "0",
"lookahead": "5", "lookahead": "5",
"release": "50", "release": "50",

View File

@ -52,15 +52,15 @@
initExtra = '' initExtra = ''
nixify() { nixify() {
if [ ! -e ./.envrc ]; then if [ ! -e ./.envrc ]; then
wget -O ./.envrc https://raw.githubusercontent.com/kalbasit/nur-packages/master/pkgs/nixify/envrc echo 'use nix' > .envrc
sed -i '$s/use_nix.\+/use_nix/' ./.envrc
direnv allow direnv allow
fi fi
if [ ! -e shell.nix ]; then if [ ! -e shell.nix ]; then
cat > shell.nix <<'EOF' cat > shell.nix <<'EOF'
{ pkgs ? import <nixpkgs> {} }: { pkgs ? import <nixpkgs> {} }:
# with import <nixpkgs> {};
pkgs.mkShell { pkgs.mkShell {
# Hack to SSL Cert error # Hack SSL Cert error
GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt; GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt;
SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt; SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt;
buildInputs = []; buildInputs = [];

View File

@ -1,50 +0,0 @@
{ lib, config, ... }: rec {
genIni = lib.generators.toINI {
mkKeyValue = key: value:
let
mvalue = if builtins.isBool value then
(if value then "true" else "false")
else if (builtins.isString value && key != "include-file") then
value
else
builtins.toString value;
in "${key}=${mvalue}";
};
# thm = config.themes.colors;
# splitHex = hexStr:
# map (x: builtins.elemAt x 0) (builtins.filter (a: a != "" && a != [ ])
# (builtins.split "(.{2})" (builtins.substring 1 6 hexStr)));
# hex2decDigits = rec {
# "0" = 0;
# "1" = 1;
# "2" = 2;
# "3" = 3;
# "4" = 4;
# "5" = 5;
# "6" = 6;
# "7" = 7;
# "8" = 8;
# "9" = 9;
# "a" = 10;
# "b" = 11;
# "c" = 12;
# "d" = 13;
# "e" = 14;
# "f" = 15;
# A = a;
# B = b;
# C = c;
# D = d;
# E = e;
# F = f;
# };
# doubleDigitHexToDec = hex:
# 16 * hex2decDigits."${builtins.substring 0 1 hex}"
# + hex2decDigits."${builtins.substring 1 2 hex}";
# thmDec = builtins.mapAttrs (name: color: colorHex2Dec color) thm;
# colorHex2Dec = color:
# builtins.concatStringsSep ","
# (map (x: toString (doubleDigitHexToDec x)) (splitHex color));
}

View File

@ -3,6 +3,8 @@
* i3 hotkeys with ru keyboard layout * i3 hotkeys with ru keyboard layout
* Add some dictionary program * Add some dictionary program
* spotifyd + cli * spotifyd + cli
* generated gtk icons * generate gtk icons
* overlay for my packages * overlay for my packages
* separators and icons in i3status-rust * [vscode base16](https://github.com/golf1052/base16-vscode)
* config qbittorrent
* mount music folder