another commit
This commit is contained in:
parent
5424bfb0f6
commit
9cd36ccfd6
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -4,3 +4,6 @@
|
|||||||
[submodule "imports/github/michael-ball/base16-horizon-scheme"]
|
[submodule "imports/github/michael-ball/base16-horizon-scheme"]
|
||||||
path = imports/github/michael-ball/base16-horizon-scheme
|
path = imports/github/michael-ball/base16-horizon-scheme
|
||||||
url = https://github.com/michael-ball/base16-horizon-scheme.git
|
url = https://github.com/michael-ball/base16-horizon-scheme.git
|
||||||
|
[submodule "/shared/nixos-configuration/imports/github/nana-4/materia-theme"]
|
||||||
|
path = /shared/nixos-configuration/imports/github/nana-4/materia-theme
|
||||||
|
url = https://github.com/nana-4/materia-theme
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# This is balsoft's configuration file.
|
# This is AlukardBF's configuration file.
|
||||||
#
|
#
|
||||||
# https://github.com/balsoft/nixos-config
|
# Thanks for original config - balsoft.
|
||||||
|
#
|
||||||
|
# https://github.com/AlukardBF/nixos-config
|
||||||
#
|
#
|
||||||
# This is main nixos configuration
|
# This is main nixos configuration
|
||||||
# To use this configuration:
|
# To use this configuration:
|
||||||
|
1
imports/github/nana-4/materia-theme
Submodule
1
imports/github/nana-4/materia-theme
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit a7d4b8e513a06846aa6f320e181d5b9dc53dc07a
|
@ -18,10 +18,10 @@ with import ../support.nix { inherit lib config; }; {
|
|||||||
cmd = "${pkgs.vivaldi}/bin/vivaldi";
|
cmd = "${pkgs.vivaldi}/bin/vivaldi";
|
||||||
desktop = "vivaldi";
|
desktop = "vivaldi";
|
||||||
};
|
};
|
||||||
# fm = {
|
fm = {
|
||||||
# cmd = "${pkgs.dolphin}/bin/dolphin";
|
cmd = "${pkgs.xfce4-14.thunar}/bin/thunar";
|
||||||
# desktop = "dolphin";
|
desktop = "thunar";
|
||||||
# };
|
};
|
||||||
monitor = {
|
monitor = {
|
||||||
cmd = "${pkgs.xfce4-14.xfce4-taskmanager}/bin/xfce4-taskmanager";
|
cmd = "${pkgs.xfce4-14.xfce4-taskmanager}/bin/xfce4-taskmanager";
|
||||||
desktop = "taskmanager";
|
desktop = "taskmanager";
|
||||||
@ -55,37 +55,37 @@ with import ../support.nix { inherit lib config; }; {
|
|||||||
# desktop = "gnumeric";
|
# desktop = "gnumeric";
|
||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
home-manager.users.balsoft.xdg.configFile."mimeapps.list.home".text =
|
# home-manager.users.alukard.xdg.configFile."mimeapps.list.home".text =
|
||||||
with config.defaultApplications;
|
# with config.defaultApplications;
|
||||||
let
|
# let
|
||||||
apps = builtins.mapAttrs (name: value: "${value.desktop}.desktop;") {
|
# apps = builtins.mapAttrs (name: value: "${value.desktop}.desktop;") {
|
||||||
"text/html" = browser;
|
# "text/html" = browser;
|
||||||
# "image/*" = { desktop = "org.kde.gwenview"; };
|
# # "image/*" = { desktop = "org.kde.gwenview"; };
|
||||||
"application/x-bittorrent" = torrent;
|
# "application/x-bittorrent" = torrent;
|
||||||
"application/zip" = archive;
|
# "application/zip" = archive;
|
||||||
"application/rar" = archive;
|
# "application/rar" = archive;
|
||||||
"application/7z" = archive;
|
# "application/7z" = archive;
|
||||||
"application/*tar" = archive;
|
# "application/*tar" = archive;
|
||||||
"application/x-kdenlive" = archive;
|
# "application/x-kdenlive" = archive;
|
||||||
"x-scheme-handler/http" = browser;
|
# "x-scheme-handler/http" = browser;
|
||||||
"x-scheme-handler/https" = browser;
|
# "x-scheme-handler/https" = browser;
|
||||||
"x-scheme-handler/about" = browser;
|
# "x-scheme-handler/about" = browser;
|
||||||
"x-scheme-handler/unknown" = browser;
|
# "x-scheme-handler/unknown" = browser;
|
||||||
# "x-scheme-handler/mailto" = mail;
|
# # "x-scheme-handler/mailto" = mail;
|
||||||
# "application/pdf" = { desktop = "org.kde.okular"; };
|
# # "application/pdf" = { desktop = "org.kde.okular"; };
|
||||||
# "application/vnd.openxmlformats-officedocument.wordprocessingml.document" =
|
# # "application/vnd.openxmlformats-officedocument.wordprocessingml.document" =
|
||||||
# text_processor;
|
# # text_processor;
|
||||||
# "application/msword" = text_processor;
|
# # "application/msword" = text_processor;
|
||||||
# "application/vnd.oasis.opendocument.text" = text_processor;
|
# # "application/vnd.oasis.opendocument.text" = text_processor;
|
||||||
# "text/csv" = spreadsheet;
|
# # "text/csv" = spreadsheet;
|
||||||
# "application/vnd.oasis.opendocument.spreadsheet" = spreadsheet;
|
# # "application/vnd.oasis.opendocument.spreadsheet" = spreadsheet;
|
||||||
# This actually makes Emacs an editor for everything... XDG is wierd
|
# # This actually makes Emacs an editor for everything... XDG is wierd
|
||||||
"text/plain" = editor;
|
# "text/plain" = editor;
|
||||||
};
|
# };
|
||||||
in genIni {
|
# in genIni {
|
||||||
"Default Applications" = apps;
|
# "Default Applications" = apps;
|
||||||
"Added Associations" = apps;
|
# "Added Associations" = apps;
|
||||||
};
|
# };
|
||||||
home-manager.users.alukard.xdg.configFile."filetypesrc".text = genIni {
|
home-manager.users.alukard.xdg.configFile."filetypesrc".text = genIni {
|
||||||
EmbedSettings = {
|
EmbedSettings = {
|
||||||
"embed-application/*" = false;
|
"embed-application/*" = false;
|
||||||
@ -93,11 +93,11 @@ with import ../support.nix { inherit lib config; }; {
|
|||||||
"embed-text/plain" = false;
|
"embed-text/plain" = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home-manager.users.alukard.home.activation.mimeapps = {
|
# home-manager.users.alukard.home.activation.mimeapps = {
|
||||||
before = [];
|
# before = [];
|
||||||
after = ["linkGeneration"];
|
# after = ["linkGeneration"];
|
||||||
data =
|
# data =
|
||||||
"$DRY_RUN_CMD cp ~/.config/mimeapps.list.home ~/.config/mimeapps.list";
|
# "$DRY_RUN_CMD cp ~/.config/mimeapps.list.home ~/.config/mimeapps.list";
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -13,15 +13,17 @@
|
|||||||
p7zip
|
p7zip
|
||||||
zip
|
zip
|
||||||
ranger
|
ranger
|
||||||
|
xfce4-14.thunar
|
||||||
|
xfce4-14.xfce4-taskmanager
|
||||||
|
xclip
|
||||||
|
git
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.balsoft.home.packages = with pkgs; [
|
home-manager.users.alukard.home.packages = with pkgs; [
|
||||||
nix-zsh-completions
|
nix-zsh-completions
|
||||||
qbittorrent
|
qbittorrent
|
||||||
vscodium
|
vscodium
|
||||||
xarchiver
|
xarchiver
|
||||||
xfce4-14.xfce4-taskmanager
|
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,24 +10,24 @@
|
|||||||
# ./applications/weechat.nix
|
# ./applications/weechat.nix
|
||||||
# ./applications/spectral.nix
|
# ./applications/spectral.nix
|
||||||
# ./workspace/i3blocks
|
# ./workspace/i3blocks
|
||||||
# ./workspace/i3
|
./workspace/i3
|
||||||
./workspace/zsh.nix
|
./workspace/zsh.nix
|
||||||
# ./workspace/gtk.nix
|
./workspace/gtk.nix
|
||||||
# ./workspace/compton.nix
|
./workspace/compton.nix
|
||||||
# ./workspace/misc.nix
|
./workspace/misc.nix
|
||||||
# ./workspace/dunst.nix
|
./workspace/dunst.nix
|
||||||
# ./workspace/kde
|
# ./workspace/kde
|
||||||
# ./workspace/synergy.nix
|
# ./workspace/synergy.nix
|
||||||
# ./workspace/ssh.nix
|
# ./workspace/ssh.nix
|
||||||
./workspace/locale.nix
|
./workspace/locale.nix
|
||||||
./workspace/fonts.nix
|
./workspace/fonts.nix
|
||||||
# ./workspace/light.nix
|
./workspace/light.nix
|
||||||
# ./workspace/autorandr.nix
|
# ./workspace/autorandr.nix
|
||||||
# ./workspace/gcalcli.nix
|
# ./workspace/gcalcli.nix
|
||||||
# ./workspace/rclone.nix
|
# ./workspace/rclone.nix
|
||||||
./workspace/xresources.nix
|
./workspace/xresources.nix
|
||||||
./themes.nix
|
./themes.nix
|
||||||
# ./applications.nix
|
./applications.nix
|
||||||
./secrets.nix
|
./secrets.nix
|
||||||
./devices.nix
|
./devices.nix
|
||||||
# ./packages.nix
|
# ./packages.nix
|
||||||
|
@ -1,103 +1,9 @@
|
|||||||
{ pkgs, config, lib, ... }: {
|
{ pkgs, config, lib, ... }: {
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(self: old:
|
(self: old:
|
||||||
{
|
rec {
|
||||||
termNote =
|
# nerdfonts = nur.balsoft.pkgs.roboto-mono-nerd;
|
||||||
self.callPackage ../imports/github/terodom/termNote/termNote.nix { };
|
}
|
||||||
|
)
|
||||||
nixfmt = self.callPackage ../imports/github/serokell/nixfmt { };
|
|
||||||
|
|
||||||
lambda-launcher = (import ../imports/github/balsoft/lambda-launcher {
|
|
||||||
pkgs = old;
|
|
||||||
}).lambda-launcher;
|
|
||||||
|
|
||||||
tdesktop = old.tdesktop.overrideAttrs (oldAttrs: {
|
|
||||||
patches = [
|
|
||||||
../imports/github/msva/mva-overlay/net-im/telegram-desktop/files/patches/0/conditional/wide-baloons/0001_baloons-follows-text-width-on-adaptive-layout.patch
|
|
||||||
] ++ oldAttrs.patches;
|
|
||||||
});
|
|
||||||
|
|
||||||
all-hies = import ../imports/github/Infinisil/all-hies { };
|
|
||||||
|
|
||||||
mtxclient = old.mtxclient.overrideAttrs (_: rec {
|
|
||||||
name = "${pname}-${version}";
|
|
||||||
pname = "mtxclient";
|
|
||||||
version = "0.3.0";
|
|
||||||
src = ../imports/github/nheko-reborn/mtxclient;
|
|
||||||
});
|
|
||||||
nheko = old.nheko.overrideAttrs (_: rec {
|
|
||||||
name = "${pname}-${version}";
|
|
||||||
pname = "nheko";
|
|
||||||
version = "0.7.0";
|
|
||||||
src = ../imports/github/nheko-reborn/nheko;
|
|
||||||
});
|
|
||||||
|
|
||||||
nerdfonts = old.stdenv.mkDerivation rec {
|
|
||||||
name = "RobotoMonoNerd";
|
|
||||||
src = old.fetchzip {
|
|
||||||
url =
|
|
||||||
"https://github.com/ryanoasis/nerd-fonts/releases/download/v2.0.0/RobotoMono.zip";
|
|
||||||
sha256 =
|
|
||||||
"sha256:1i78fn62x0337p2974dn1nga1pbdi7mqg203h81yi9b79pyxv9bh";
|
|
||||||
stripRoot = false;
|
|
||||||
};
|
|
||||||
installPhase = "mkdir -p $out/share/fonts; cp $src/* $out/share/fonts";
|
|
||||||
};
|
|
||||||
|
|
||||||
pythonPackages = old.pythonPackages.override {
|
|
||||||
overrides = (self: super: {
|
|
||||||
backports_functools_lru_cache =
|
|
||||||
super.backports_functools_lru_cache.overrideAttrs
|
|
||||||
(oldAttrs: oldAttrs // { meta.priority = 1000; });
|
|
||||||
});
|
|
||||||
};
|
|
||||||
} // (if config.device == "Prestigio-Laptop" then {
|
|
||||||
grub2 = old.pkgsi686Linux.grub2;
|
|
||||||
} else
|
|
||||||
{ }))
|
|
||||||
];
|
];
|
||||||
nixpkgs.pkgs = import ../imports/github/nixos/nixpkgs {
|
}
|
||||||
config.allowUnfree = true;
|
|
||||||
config.android_sdk.accept_license = true;
|
|
||||||
config.firefox.enablePlasmaBrowserIntegration = true;
|
|
||||||
} // config.nixpkgs.config;
|
|
||||||
|
|
||||||
systemd.services.setup_root = {
|
|
||||||
serviceConfig.User = "root";
|
|
||||||
script = ''
|
|
||||||
cat << EOF > /root/id_rsa
|
|
||||||
${config.secrets.id_rsa}
|
|
||||||
EOF
|
|
||||||
chmod 100 /root/id_rsa
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
environment.etc.nixpkgs.source = ../imports/github/nixos/nixpkgs;
|
|
||||||
nix = rec {
|
|
||||||
nixPath = lib.mkForce [
|
|
||||||
"nixpkgs=/etc/nixpkgs"
|
|
||||||
"nixos-config=/etc/nixos/configuration.nix"
|
|
||||||
];
|
|
||||||
binaryCaches = [
|
|
||||||
"https://cache.nixos.org"
|
|
||||||
"http://hydra.typeable.io:5000"
|
|
||||||
"https://nixcache.reflex-frp.org"
|
|
||||||
"https://all-hies.cachix.org"
|
|
||||||
"https://balsoft.ru:5000"
|
|
||||||
];
|
|
||||||
|
|
||||||
trustedBinaryCaches =
|
|
||||||
(builtins.map (x: "http://${x}:5000") (builtins.attrNames config.devices))
|
|
||||||
++ binaryCaches;
|
|
||||||
|
|
||||||
trustedUsers = [ "root" "balsoft" "@wheel" ];
|
|
||||||
|
|
||||||
optimise.automatic = true;
|
|
||||||
|
|
||||||
binaryCachePublicKeys = [
|
|
||||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
||||||
"hydra.example.org-1:3cfw8jj8xtoKkQ2mAQxMFcEv2/fQATA/mjoUUIFxSgo="
|
|
||||||
"ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI="
|
|
||||||
"all-hies.cachix.org-1:JjrzAOEUsD9ZMt8fdFbzo3jNAyEWlPAwdVuHw4RD43k="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
@ -30,7 +30,7 @@
|
|||||||
# security.sudo = {
|
# security.sudo = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
# extraConfig = ''
|
# extraConfig = ''
|
||||||
# balsoft ALL = (root) NOPASSWD: /run/current-system/sw/bin/nixos-rebuild switch
|
# alukard ALL = (root) NOPASSWD: /run/current-system/sw/bin/nixos-rebuild switch
|
||||||
# '';
|
# '';
|
||||||
# };
|
# };
|
||||||
# nix.requireSignedBinaryCaches = false;
|
# nix.requireSignedBinaryCaches = false;
|
||||||
|
14
modules/workspace/compton.nix
Normal file
14
modules/workspace/compton.nix
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{ pkgs, lib, config, ... }: {
|
||||||
|
home-manager.users.alukard = {
|
||||||
|
programs.autorandr.hooks.preswitch.compton = "systemctl --user stop compton";
|
||||||
|
programs.autorandr.hooks.postswitch.compton = "systemctl --user start compton";
|
||||||
|
services.compton = {
|
||||||
|
enable = true;
|
||||||
|
backend = "glx";
|
||||||
|
noDNDShadow = false;
|
||||||
|
shadow = true;
|
||||||
|
shadowExclude = [ "!(I3_FLOATING_WINDOW@:c = 1)" ];
|
||||||
|
vSync = "opengl-swc";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
49
modules/workspace/dunst.nix
Normal file
49
modules/workspace/dunst.nix
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
let thm = config.themes.colors;
|
||||||
|
in {
|
||||||
|
home-manager.users.alukard = {
|
||||||
|
services.dunst = {
|
||||||
|
enable = true;
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus-Dark";
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
global = {
|
||||||
|
geometry = "500x5-30+50";
|
||||||
|
transparency = 10;
|
||||||
|
frame_color = thm.blue;
|
||||||
|
font = "Roboto 13";
|
||||||
|
padding = 15;
|
||||||
|
horizontal_padding = 17;
|
||||||
|
word_wrap = true;
|
||||||
|
follow = "keyboard";
|
||||||
|
format = ''
|
||||||
|
%s %p %I
|
||||||
|
%b'';
|
||||||
|
markup = "full";
|
||||||
|
};
|
||||||
|
|
||||||
|
urgency_low = {
|
||||||
|
background = thm.bg;
|
||||||
|
foreground = thm.fg;
|
||||||
|
timeout = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
urgency_normal = {
|
||||||
|
background = thm.alt;
|
||||||
|
foreground = thm.fg;
|
||||||
|
timeout = 10;
|
||||||
|
};
|
||||||
|
|
||||||
|
urgency_critical = {
|
||||||
|
background = thm.fg;
|
||||||
|
foreground = thm.bg;
|
||||||
|
timeout = 15;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
xsession.windowManager.i3.config.startup =
|
||||||
|
[{ command = "${pkgs.dunst}/bin/dunst"; }];
|
||||||
|
};
|
||||||
|
}
|
@ -11,6 +11,7 @@
|
|||||||
noto-fonts
|
noto-fonts
|
||||||
noto-fonts-emoji
|
noto-fonts-emoji
|
||||||
hasklig
|
hasklig
|
||||||
|
powerline-fonts
|
||||||
];
|
];
|
||||||
fontconfig = {
|
fontconfig = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
61
modules/workspace/gtk.nix
Normal file
61
modules/workspace/gtk.nix
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
let
|
||||||
|
thm = config.themes.colors;
|
||||||
|
thm' = builtins.mapAttrs (name: value: builtins.substring 1 7 value) thm;
|
||||||
|
materia_colors = pkgs.writeTextFile {
|
||||||
|
name = "gtk-generated-colors";
|
||||||
|
text = ''
|
||||||
|
BG=${thm'.bg}
|
||||||
|
FG=${thm'.fg}
|
||||||
|
BTN_BG=${thm'.bg}
|
||||||
|
BTN_FG=${thm'.fg}
|
||||||
|
MENU_BG=${thm'.bg}
|
||||||
|
MENU_FG=${thm'.fg}
|
||||||
|
ACCENT_BG=${thm'.blue}
|
||||||
|
SEL_BG=${thm'.blue}
|
||||||
|
SEL_FG=${thm'.bg}
|
||||||
|
TXT_BG=${thm'.bg}
|
||||||
|
TXT_FG=${thm'.fg}
|
||||||
|
HDR_BTN_BG=${thm'.bg}
|
||||||
|
HDR_BTN_FG=${thm'.fg}
|
||||||
|
WM_BORDER_FOCUS=${thm'.blue}
|
||||||
|
WM_BORDER_UNFOCUS=${thm'.alt}
|
||||||
|
MATERIA_STYLE_COMPACT=True
|
||||||
|
MATERIA_COLOR_VARIANT=dark
|
||||||
|
UNITY_DEFAULT_LAUNCHER_STYLE=False
|
||||||
|
NAME=generated
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
nixpkgs.overlays = [(self: super: {
|
||||||
|
generated-gtk-theme = self.stdenv.mkDerivation rec {
|
||||||
|
name = "generated-gtk-theme";
|
||||||
|
src = ../../imports/github/nana-4/materia-theme;
|
||||||
|
buildInputs = with self; [ sassc bc which inkscape optipng bash ];
|
||||||
|
installPhase = ''
|
||||||
|
chmod 777 -R .
|
||||||
|
mkdir -p $out/share/themes
|
||||||
|
patchShebangs .
|
||||||
|
substituteInPlace change_color.sh --replace "\$HOME/.themes" "$out/share/themes"
|
||||||
|
echo "Changing colours:"
|
||||||
|
./change_color.sh -o Generated ${materia_colors}
|
||||||
|
chmod 555 -R .
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})];
|
||||||
|
home-manager.users.alukard = {
|
||||||
|
home.packages = [pkgs.generated-gtk-theme];
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus-Dark";
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
};
|
||||||
|
theme = {
|
||||||
|
name = "Generated";
|
||||||
|
package = pkgs.generated-gtk-theme;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.sessionVariables.GTK_THEME = "Generated";
|
||||||
|
}
|
179
modules/workspace/i3/default.nix
Normal file
179
modules/workspace/i3/default.nix
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
{ pkgs, config, ... }:
|
||||||
|
let
|
||||||
|
thm = config.themes.colors;
|
||||||
|
apps = config.defaultApplications;
|
||||||
|
customPackages = pkgs.callPackage ../../../packages { };
|
||||||
|
in {
|
||||||
|
systemd.services.changeNice = {
|
||||||
|
description = "Update niceness levels of important processes";
|
||||||
|
serviceConfig.User = "root";
|
||||||
|
wantedBy = [ "graphical.target" ];
|
||||||
|
script = ''
|
||||||
|
sleep 5
|
||||||
|
${pkgs.utillinux}/bin/renice -n -10 -p $(${pkgs.procps}/bin/pidof i3)
|
||||||
|
${pkgs.utillinux}/bin/renice -n -10 -p $(${pkgs.procps}/bin/pidof X)
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
environment.sessionVariables._JAVA_AWT_WM_NONREPARENTING = "1";
|
||||||
|
home-manager.users.alukard.xsession.windowManager.i3 = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.i3-gaps;
|
||||||
|
config = rec {
|
||||||
|
assigns = {
|
||||||
|
"" = [ { class = "Chromium"; } { class = "Firefox"; } ];
|
||||||
|
"" = [
|
||||||
|
{ class = "^Telegram"; }
|
||||||
|
{ class = "^VK"; }
|
||||||
|
{ class = "^trojita"; }
|
||||||
|
{ title = "weechat"; }
|
||||||
|
{ class = "nheko"; }
|
||||||
|
];
|
||||||
|
"ﱘ" = [{ class = "cantata"; }];
|
||||||
|
};
|
||||||
|
bars = [ ];
|
||||||
|
fonts = [ "RobotoMono 9" ];
|
||||||
|
|
||||||
|
colors = rec {
|
||||||
|
background = thm.bg;
|
||||||
|
unfocused = {
|
||||||
|
text = thm.alt;
|
||||||
|
border = thm.dark;
|
||||||
|
background = thm.bg;
|
||||||
|
childBorder = thm.dark;
|
||||||
|
indicator = thm.fg;
|
||||||
|
};
|
||||||
|
focusedInactive = unfocused;
|
||||||
|
urgent = unfocused // {
|
||||||
|
text = thm.fg;
|
||||||
|
border = thm.orange;
|
||||||
|
childBorder = thm.orange;
|
||||||
|
};
|
||||||
|
focused = unfocused // {
|
||||||
|
childBorder = thm.blue;
|
||||||
|
border = thm.blue;
|
||||||
|
background = thm.dark;
|
||||||
|
text = thm.fg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
gaps = {
|
||||||
|
inner = 6;
|
||||||
|
smartGaps = true;
|
||||||
|
smartBorders = "on";
|
||||||
|
};
|
||||||
|
focus.mouseWarping = true;
|
||||||
|
focus.followMouse = false;
|
||||||
|
modifier = "Mod4";
|
||||||
|
window = {
|
||||||
|
border = 1;
|
||||||
|
titlebar = false;
|
||||||
|
hideEdgeBorders = "smart";
|
||||||
|
commands = [
|
||||||
|
{
|
||||||
|
command = "border pixel 2px";
|
||||||
|
criteria = { window_role = "popup"; };
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "floating disable";
|
||||||
|
criteria = { class = "pavucontrol-qt"; };
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# startup = map (a: { notification = false; } // a) [
|
||||||
|
# { command = apps.browser.cmd; }
|
||||||
|
# { command = "${pkgs.kdeconnect}/lib/libexec/kdeconnectd"; }
|
||||||
|
# {
|
||||||
|
# command =
|
||||||
|
# "${pkgs.polkit-kde-agent}/lib/libexec/polkit-kde-authentication-agent-1";
|
||||||
|
# }
|
||||||
|
# {
|
||||||
|
# command =
|
||||||
|
# "${pkgs.keepassxc}/bin/keepassxc /home/alukard/projects/nixos-config/misc/Passwords.kdbx";
|
||||||
|
# }
|
||||||
|
# { command = "balooctl start"; }
|
||||||
|
# { command = "${pkgs.trojita}/bin/trojita"; }
|
||||||
|
# {
|
||||||
|
# command = "${pkgs.hsetroot}/bin/hsetroot -solid '${thm.bg}'";
|
||||||
|
# always = true;
|
||||||
|
# }
|
||||||
|
# { command = "${pkgs.termNote}/bin/noted"; }
|
||||||
|
# { command = "${pkgs.nheko}/bin/nheko"; }
|
||||||
|
# ];
|
||||||
|
keybindings = let
|
||||||
|
moveMouse = ''
|
||||||
|
"sh -c 'eval `${pkgs.xdotool}/bin/xdotool \
|
||||||
|
getactivewindow \
|
||||||
|
getwindowgeometry --shell`; ${pkgs.xdotool}/bin/xdotool \
|
||||||
|
mousemove \
|
||||||
|
$((X+WIDTH/2)) $((Y+HEIGHT/2))'"'';
|
||||||
|
in ({
|
||||||
|
"${modifier}+q" = "kill";
|
||||||
|
"${modifier}+Return" = "exec ${apps.term.cmd}";
|
||||||
|
"${modifier}+e" = "exec ${apps.editor.cmd} -c -n";
|
||||||
|
"${modifier}+l" = "layout toggle";
|
||||||
|
"${modifier}+Left" = "focus child; focus left; exec ${moveMouse}";
|
||||||
|
"${modifier}+Right" = "focus child; focus right; exec ${moveMouse}";
|
||||||
|
"${modifier}+Up" = "focus child; focus up; exec ${moveMouse}";
|
||||||
|
"${modifier}+Down" = "focus child; focus down; exec ${moveMouse}";
|
||||||
|
"${modifier}+Control+Left" =
|
||||||
|
"focus parent; focus left; exec ${moveMouse}";
|
||||||
|
"${modifier}+Control+Right" =
|
||||||
|
"focus parent; focus right; exec ${moveMouse}";
|
||||||
|
"${modifier}+Control+Up" =
|
||||||
|
"focus parent; focus up; exec ${moveMouse}";
|
||||||
|
"${modifier}+Control+Down" =
|
||||||
|
"focus parent; focus down; exec ${moveMouse}";
|
||||||
|
"${modifier}+Shift+Up" = "move up";
|
||||||
|
"${modifier}+Shift+Down" = "move down";
|
||||||
|
"${modifier}+Shift+Right" = "move right";
|
||||||
|
"${modifier}+Shift+Left" = "move left";
|
||||||
|
"${modifier}+f" = "fullscreen toggle";
|
||||||
|
"${modifier}+r" = "mode resize";
|
||||||
|
"${modifier}+Shift+f" = "floating toggle";
|
||||||
|
"${modifier}+d" = "exec ${apps.fm.cmd}";
|
||||||
|
"${modifier}+Escape" = "exec ${apps.monitor.cmd}";
|
||||||
|
"${modifier}+Print" = "exec ${pkgs.spectacle}/bin/spectacle -b";
|
||||||
|
"${modifier}+Control+Print" = "exec ${pkgs.spectacle}/bin/spectacle";
|
||||||
|
"--release ${modifier}+Shift+Print" =
|
||||||
|
"exec ${pkgs.spectacle}/bin/spectacle -b -r";
|
||||||
|
"--release ${modifier}+Control+Shift+Print" =
|
||||||
|
"exec ${pkgs.spectacle}/bin/spectacle -r";
|
||||||
|
"${modifier}+x" = "move workspace to output right";
|
||||||
|
"${modifier}+c" = "workspace ";
|
||||||
|
"${modifier}+Shift+c" = "move container to workspace ";
|
||||||
|
"${modifier}+t" = "workspace ";
|
||||||
|
"${modifier}+Shift+t" = "move container to workspace ";
|
||||||
|
"${modifier}+m" = "workspace ﱘ";
|
||||||
|
"${modifier}+Shift+m" = "move container to workspace ﱘ";
|
||||||
|
"${modifier}+k" = "exec '${pkgs.xorg.xkill}/bin/xkill'";
|
||||||
|
"${modifier}+F5" = "restart";
|
||||||
|
"${modifier}+Shift+F5" = "exit";
|
||||||
|
"${modifier}+Shift+h" = "layout splith";
|
||||||
|
"${modifier}+Shift+v" = "layout splitv";
|
||||||
|
"${modifier}+h" = "split h";
|
||||||
|
"${modifier}+v" = "split v";
|
||||||
|
"${modifier}+F1" = "move to scratchpad";
|
||||||
|
"${modifier}+F2" = "scratchpad show";
|
||||||
|
"${modifier}+i" =
|
||||||
|
"exec sh -c 'xclip -selection clipboard -out | curl -F \"f:1=<-\" ix.io | xclip -selection clipboard -in'";
|
||||||
|
# "${modifier}+z" = "exec ${pkgs.lambda-launcher}/bin/lambda-launcher";
|
||||||
|
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||||
|
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||||
|
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||||
|
"--release button2" = "kill";
|
||||||
|
"--whole-window ${modifier}+button2" = "kill";
|
||||||
|
} // builtins.listToAttrs (builtins.genList (x: {
|
||||||
|
name = "${modifier}+${toString x}";
|
||||||
|
value = "workspace ${toString x}";
|
||||||
|
}) 10) // builtins.listToAttrs (builtins.genList (x: {
|
||||||
|
name = "${modifier}+Shift+${toString x}";
|
||||||
|
value = "move container to workspace ${toString x}";
|
||||||
|
}) 10));
|
||||||
|
keycodebindings = {
|
||||||
|
"122" = "exec ${pkgs.pamixer}/bin/pamixer -d 1";
|
||||||
|
"123" = "exec ${pkgs.pamixer}/bin/pamixer -i 1";
|
||||||
|
"121" = "exec ${pkgs.pamixer}/bin/pamixer -t";
|
||||||
|
};
|
||||||
|
workspaceLayout = "tabbed";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
54
modules/workspace/i3/workspace-layouts.pl
Normal file
54
modules/workspace/i3/workspace-layouts.pl
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
#!nix-shell -p perlPackages.AnyEvent perlPackages.AnyEventI3 perl -i perl
|
||||||
|
# vim:ts=4:sw=4:expandtab
|
||||||
|
# © 2012 Michael Stapelberg
|
||||||
|
# Licensed under BSD license, see https://github.com/i3/i3/blob/next/LICENSE
|
||||||
|
#
|
||||||
|
# Append this line to your i3 config file:
|
||||||
|
# exec_always ~/per-workspace-layout.pl
|
||||||
|
#
|
||||||
|
# Then, change the %layouts hash like you want your workspaces to be set up.
|
||||||
|
# This script requires i3 >= v4.4 for the extended workspace event.
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use AnyEvent;
|
||||||
|
use AnyEvent::I3;
|
||||||
|
use v5.10;
|
||||||
|
use utf8;
|
||||||
|
|
||||||
|
my %layouts = (
|
||||||
|
'' => 'tabbed',
|
||||||
|
'' => 'tabbed',
|
||||||
|
);
|
||||||
|
|
||||||
|
my $i3 = i3();
|
||||||
|
|
||||||
|
die "Could not connect to i3: $!" unless $i3->connect->recv();
|
||||||
|
|
||||||
|
die "Could not subscribe to the workspace event: $!" unless
|
||||||
|
$i3->subscribe({
|
||||||
|
workspace => sub {
|
||||||
|
my ($msg) = @_;
|
||||||
|
return unless $msg->{change} eq 'focus';
|
||||||
|
die "Your version of i3 is too old. You need >= v4.4"
|
||||||
|
unless exists($msg->{current});
|
||||||
|
my $ws = $msg->{current};
|
||||||
|
|
||||||
|
my $name = $ws->{name};
|
||||||
|
my $con_id = $ws->{id};
|
||||||
|
|
||||||
|
return unless exists $layouts{$name};
|
||||||
|
|
||||||
|
$i3->command(qq|[con_id="$con_id"] layout | . $layouts{$name});
|
||||||
|
},
|
||||||
|
_error => sub {
|
||||||
|
my ($msg) = @_;
|
||||||
|
say "AnyEvent::I3 error: $msg";
|
||||||
|
say "Exiting.";
|
||||||
|
exit 1;
|
||||||
|
},
|
||||||
|
})->recv->{success};
|
||||||
|
|
||||||
|
# Run forever.
|
||||||
|
AnyEvent->condvar->recv
|
58
modules/workspace/light.nix
Normal file
58
modules/workspace/light.nix
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
programs.light.enable = config.deviceSpecific.isLaptop;
|
||||||
|
services.actkbd = {
|
||||||
|
enable = config.deviceSpecific.isLaptop;
|
||||||
|
bindings = map (x:
|
||||||
|
x // {
|
||||||
|
events = ["key"];
|
||||||
|
attributes = ["exec"];
|
||||||
|
}) ((if config.device == "ASUS-Laptop" then [
|
||||||
|
{
|
||||||
|
keys = [229];
|
||||||
|
command =
|
||||||
|
"expr -1 + `cat '/sys/class/leds/asus::kbd_backlight/brightness'` > '/sys/class/leds/asus::kbd_backlight/brightness'";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
keys = [230];
|
||||||
|
command =
|
||||||
|
"expr 1 + `cat '/sys/class/leds/asus::kbd_backlight/brightness'` > '/sys/class/leds/asus::kbd_backlight/brightness'";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
keys = [560];
|
||||||
|
command = toString (pkgs.stdenv.mkDerivation {
|
||||||
|
name = "als-script";
|
||||||
|
src = ./als-script.hs;
|
||||||
|
buildInputs = [pkgs.ghc];
|
||||||
|
buildPhase = "ghc $src -o $out";
|
||||||
|
unpackPhase = "true";
|
||||||
|
installPhase = "true";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
] else
|
||||||
|
[]) ++ [
|
||||||
|
{
|
||||||
|
keys = [225];
|
||||||
|
command = "${pkgs.light}/bin/light -A 10";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
keys = [224];
|
||||||
|
command = "${pkgs.light}/bin/light -U 10";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
keys = [431];
|
||||||
|
command = (toString (pkgs.writeTextFile {
|
||||||
|
name = "dark-script";
|
||||||
|
text = ''
|
||||||
|
if [[ `${pkgs.light}/bin/light` -eq 0 ]]
|
||||||
|
then
|
||||||
|
${pkgs.light}/bin/light -I
|
||||||
|
else
|
||||||
|
${pkgs.light}/bin/light -O
|
||||||
|
${pkgs.light}/bin/light -S 0
|
||||||
|
fi'';
|
||||||
|
executable = true;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
}
|
32
modules/workspace/misc.nix
Normal file
32
modules/workspace/misc.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{ pkgs, lib, config, ... }: {
|
||||||
|
|
||||||
|
# programs.ssh.askPassword = "${pkgs.plasma5.ksshaskpass}/bin/ksshaskpass";
|
||||||
|
environment.sessionVariables = {
|
||||||
|
EDITOR = config.defaultApplications.editor.cmd;
|
||||||
|
VISUAL = config.defaultApplications.editor.cmd;
|
||||||
|
LESS = "-asrRix8";
|
||||||
|
NIX_AUTO_RUN = "1";
|
||||||
|
};
|
||||||
|
services.atd.enable = true;
|
||||||
|
home-manager.users.alukard = {
|
||||||
|
xdg.enable = true;
|
||||||
|
|
||||||
|
services.udiskie.enable = true;
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userEmail = "alukard.develop@gmail.com";
|
||||||
|
userName = "Dmitriy Holkin";
|
||||||
|
};
|
||||||
|
news.display = "silent";
|
||||||
|
# programs.command-not-found = {
|
||||||
|
# enable = true;
|
||||||
|
# dbPath = ../../imports/programs.sqlite;
|
||||||
|
# };
|
||||||
|
home.keyboard = {
|
||||||
|
options = [ "grp:win_space_toogle" ];
|
||||||
|
layout = "us,ru";
|
||||||
|
};
|
||||||
|
# home.file.".icons/default".source ="${pkgs.breeze-qt5}/share/icons/breeze_cursors";
|
||||||
|
systemd.user.startServices = true;
|
||||||
|
};
|
||||||
|
}
|
@ -22,10 +22,11 @@
|
|||||||
"*color14" = cyan;
|
"*color14" = cyan;
|
||||||
"*color15" = fg;
|
"*color15" = fg;
|
||||||
|
|
||||||
# "URxvt.font" = "Fira Code:style=Regular:size=8";
|
"URxvt.font" = "xft:Roboto Mono for Powerline:style=Regular:size=11";
|
||||||
# "URxvt.boldFont" = "Fira Code:style=Bold:size=8";
|
"URxvt.boldFont" = "xft:Roboto Mono for Powerline:style=Bold:size=11";
|
||||||
# "URxvt.italicFont" = "Fira Code:style=Italic:size=8";
|
"URxvt.italicFont" = "xft:Roboto Mono for Powerline:style=Italic:size=11";
|
||||||
# "URxvt.boldItalicfont" = "Fira Code:style=Bold Italic:size=8";
|
"URxvt.boldItalicfont" = "xft:Roboto Mono for Powerline:style=Bold Italic:size=11";
|
||||||
|
|
||||||
"URxvt.letterSpace" = "0";
|
"URxvt.letterSpace" = "0";
|
||||||
"URxvt.lineSpace" = "0";
|
"URxvt.lineSpace" = "0";
|
||||||
"URxvt.geometry" = "92x24";
|
"URxvt.geometry" = "92x24";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user