Migrate explicit imports to home manager imports
That way I do not need to explicitly provide dependencies. But home-manager will pass all the special args.
This commit is contained in:
parent
2df4d4eeae
commit
d9ba963dad
72
home.nix
72
home.nix
|
@ -5,10 +5,10 @@
|
||||||
,...
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
{
|
||||||
hostName = builtins.replaceStrings ["\n"] [""] (builtins.readFile /etc/hostname);
|
_module.args = {
|
||||||
|
hostName = builtins.replaceStrings ["\n"] [""] (builtins.readFile /etc/hostname);
|
||||||
in {
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./home/modules/programs/cmus.nix
|
./home/modules/programs/cmus.nix
|
||||||
|
@ -16,6 +16,22 @@ in {
|
||||||
./home/modules/programs/languagetool.nix
|
./home/modules/programs/languagetool.nix
|
||||||
./home/modules/programs/mailhog.nix
|
./home/modules/programs/mailhog.nix
|
||||||
./home/modules/programs/my-pidgin.nix
|
./home/modules/programs/my-pidgin.nix
|
||||||
|
|
||||||
|
./home/accounts.nix
|
||||||
|
./home/programs/nix.nix
|
||||||
|
./home/files.nix
|
||||||
|
./home/packages.nix
|
||||||
|
./home/packages/custom
|
||||||
|
./home/home.nix
|
||||||
|
./home/programs.nix
|
||||||
|
./home/xsession.nix
|
||||||
|
./home/windowManager/i3.nix
|
||||||
|
./home/xdg.nix
|
||||||
|
./home/dconf.nix
|
||||||
|
./home/qt.nix
|
||||||
|
./home/gtk.nix
|
||||||
|
./home/services.nix
|
||||||
|
./home/systemd.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
disabledModules = [
|
disabledModules = [
|
||||||
|
@ -38,64 +54,16 @@ in {
|
||||||
# changes in each release.
|
# changes in each release.
|
||||||
stateVersion = "22.05";
|
stateVersion = "22.05";
|
||||||
|
|
||||||
packages = import ./home/packages.nix {
|
|
||||||
inherit pkgs hostName;
|
|
||||||
};
|
|
||||||
|
|
||||||
file = import ./home/files.nix { };
|
|
||||||
|
|
||||||
} // import ./home/home.nix {
|
|
||||||
inherit config pkgs hostName;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
targets.genericLinux.enable = true;
|
targets.genericLinux.enable = true;
|
||||||
|
|
||||||
accounts = import ./home/accounts.nix {
|
|
||||||
inherit config pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
nix = import ./home/programs/nix.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = import ./home/programs.nix {
|
|
||||||
inherit config pkgs hostName;
|
|
||||||
};
|
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
xsession = import ./home/xsession.nix {
|
|
||||||
inherit config pkgs hostName;
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg = import ./home/xdg.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
dconf = import ./home/dconf.nix {
|
|
||||||
inherit lib;
|
|
||||||
};
|
|
||||||
|
|
||||||
qt = import ./home/qt.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
};
|
|
||||||
gtk = import ./home/gtk.nix {
|
|
||||||
inherit config pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
services = import ./home/services.nix {
|
|
||||||
inherit config hostName pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user = import ./home/systemd.nix {
|
|
||||||
inherit config pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||||
];
|
];
|
||||||
permittedInsecurePackages = [
|
permittedInsecurePackages = [
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -1,34 +1,37 @@
|
||||||
{
|
{
|
||||||
lib
|
lib
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
enable = true;
|
dconf = {
|
||||||
settings = {
|
enable = true;
|
||||||
"org/gtk/settings/file-chooser" = {
|
settings = {
|
||||||
date-format = "with-time";
|
"org/gtk/settings/file-chooser" = {
|
||||||
location-mode = "path-bar";
|
date-format = "with-time";
|
||||||
show-hidden = false;
|
location-mode = "path-bar";
|
||||||
show-size-column = true;
|
show-hidden = false;
|
||||||
show-type-column = true;
|
show-size-column = true;
|
||||||
sidebar-width = 249;
|
show-type-column = true;
|
||||||
sort-column = "size";
|
sidebar-width = 249;
|
||||||
sort-directories-first = true;
|
sort-column = "size";
|
||||||
sort-order = "ascending";
|
sort-directories-first = true;
|
||||||
type-format = "category";
|
sort-order = "ascending";
|
||||||
window-position = lib.hm.gvariant.mkTuple [652 415];
|
type-format = "category";
|
||||||
window-size = lib.hm.gvariant.mkTuple [1256 634];
|
window-position = lib.hm.gvariant.mkTuple [652 415];
|
||||||
};
|
window-size = lib.hm.gvariant.mkTuple [1256 634];
|
||||||
|
};
|
||||||
|
|
||||||
"org/gnome/sound-juicer" = {
|
"org/gnome/sound-juicer" = {
|
||||||
audio-profile = "audio/mpeg";
|
audio-profile = "audio/mpeg";
|
||||||
base-uri = "file:///home/daniels/Music";
|
base-uri = "file:///home/daniels/Music";
|
||||||
device = "/dev/sr0";
|
device = "/dev/sr0";
|
||||||
eject = true;
|
eject = true;
|
||||||
file-pattern = "%dn - %tt";
|
file-pattern = "%dn - %tt";
|
||||||
path-pattern = "%aa/%at";
|
path-pattern = "%aa/%at";
|
||||||
strip-special = true;
|
strip-special = true;
|
||||||
volume = 1.0;
|
volume = 1.0;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
_:
|
_:
|
||||||
|
|
||||||
{
|
{
|
||||||
".nix-channels".source = ./files/nix-channels;
|
home.file = {
|
||||||
".profile".source = ./files/profile;
|
".nix-channels".source = ./files/nix-channels;
|
||||||
".myclirc".source = ./files/myclirc;
|
".profile".source = ./files/profile;
|
||||||
|
".myclirc".source = ./files/myclirc;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
54
home/gtk.nix
54
home/gtk.nix
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config
|
config
|
||||||
,pkgs
|
,pkgs
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# Possible alternatives:
|
# Possible alternatives:
|
||||||
|
@ -9,39 +10,40 @@
|
||||||
# And maybe use https://github.com/themix-project/oomox to adjust the color to follow my color scheme
|
# And maybe use https://github.com/themix-project/oomox to adjust the color to follow my color scheme
|
||||||
|
|
||||||
{
|
{
|
||||||
enable = true;
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
theme = {
|
theme = {
|
||||||
package = pkgs.qogir-theme;
|
package = pkgs.qogir-theme;
|
||||||
name = "Qogir-Dark";
|
name = "Qogir-Dark";
|
||||||
};
|
};
|
||||||
|
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
package = pkgs.qogir-icon-theme;
|
package = pkgs.qogir-icon-theme;
|
||||||
name = "Qogir-dark";
|
name = "Qogir-dark";
|
||||||
};
|
};
|
||||||
|
|
||||||
font = {
|
font = {
|
||||||
package = pkgs.roboto-mono;
|
package = pkgs.roboto-mono;
|
||||||
name = "Roboto Mono";
|
name = "Roboto Mono";
|
||||||
size = 14;
|
size = 14;
|
||||||
};
|
};
|
||||||
|
|
||||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||||
|
|
||||||
gtk3 = {
|
gtk3 = {
|
||||||
bookmarks = [
|
bookmarks = [
|
||||||
"file:///home/daniels/Downloads Downloads"
|
"file:///home/daniels/Downloads Downloads"
|
||||||
];
|
];
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
gtk-enable-animations = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk4.extraConfig = {
|
||||||
gtk-application-prefer-dark-theme = 1;
|
gtk-application-prefer-dark-theme = 1;
|
||||||
gtk-enable-animations = 0;
|
gtk-enable-animations = 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
gtk4.extraConfig = {
|
|
||||||
gtk-application-prefer-dark-theme = 1;
|
|
||||||
gtk-enable-animations = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
config
|
config
|
||||||
,pkgs
|
,pkgs
|
||||||
,hostName
|
,hostName
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -9,7 +10,7 @@ let
|
||||||
deLocale = "de_DE.utf8";
|
deLocale = "de_DE.utf8";
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
home = {
|
||||||
language = {
|
language = {
|
||||||
# English
|
# English
|
||||||
|
|
||||||
|
@ -104,4 +105,5 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
enableNixpkgsReleaseCheck = true;
|
enableNixpkgsReleaseCheck = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,101 +1,102 @@
|
||||||
{
|
{
|
||||||
pkgs
|
pkgs
|
||||||
,hostName
|
,hostName
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with pkgs; [
|
{
|
||||||
nix
|
home.packages = with pkgs; [
|
||||||
cacert
|
nix
|
||||||
nvd
|
cacert
|
||||||
|
nvd
|
||||||
|
|
||||||
# System tools
|
# System tools
|
||||||
dmenu
|
dmenu
|
||||||
gnome.gnome-screenshot
|
gnome.gnome-screenshot
|
||||||
libnotify # Provide notify-send command
|
libnotify # Provide notify-send command
|
||||||
|
|
||||||
networkmanager_dmenu
|
networkmanager_dmenu
|
||||||
i3blocks
|
i3blocks
|
||||||
st
|
st
|
||||||
ncdu
|
ncdu
|
||||||
tree
|
tree
|
||||||
|
|
||||||
borgbackup
|
borgbackup
|
||||||
keepassxc
|
keepassxc
|
||||||
# Git itself is installed via git module
|
# Git itself is installed via git module
|
||||||
git-crypt
|
git-crypt
|
||||||
|
|
||||||
rclone
|
rclone
|
||||||
|
|
||||||
# Dev tools
|
# Dev tools
|
||||||
litecli
|
litecli
|
||||||
sqlite
|
sqlite
|
||||||
mycli
|
mycli
|
||||||
mkcert # TODO: Create own wrapper script to create new certs
|
mkcert # TODO: Create own wrapper script to create new certs
|
||||||
tig
|
tig
|
||||||
universal-ctags
|
universal-ctags
|
||||||
ripgrep
|
ripgrep
|
||||||
curl
|
curl
|
||||||
wget
|
wget
|
||||||
# Can be installed ad-hock, I don't need it that often.
|
# Can be installed ad-hock, I don't need it that often.
|
||||||
# kcachegrind
|
# kcachegrind
|
||||||
# Should be part of shell.nix for corresponding projects
|
# Should be part of shell.nix for corresponding projects
|
||||||
# geckodriver
|
# geckodriver
|
||||||
|
|
||||||
podman-compose
|
podman-compose
|
||||||
# Dependencies of podman-compose
|
# Dependencies of podman-compose
|
||||||
podman
|
podman
|
||||||
|
|
||||||
# Coding / Neovim
|
# Coding / Neovim
|
||||||
# Does not provide any autocompletion yet, don't know why
|
# Does not provide any autocompletion yet, don't know why
|
||||||
# Use in conjuncion with https://github.com/autozimu/LanguageClient-neovim
|
# Use in conjuncion with https://github.com/autozimu/LanguageClient-neovim
|
||||||
# rnix-lsp
|
# rnix-lsp
|
||||||
|
|
||||||
# Communication
|
# Communication
|
||||||
thunderbird
|
thunderbird
|
||||||
|
|
||||||
# Media
|
# Media
|
||||||
vlc
|
vlc
|
||||||
# gtkpod
|
# gtkpod
|
||||||
feh
|
feh
|
||||||
# python311Packages.mutagen
|
# python311Packages.mutagen
|
||||||
# spotdl
|
# spotdl
|
||||||
# tenacity
|
# tenacity
|
||||||
# Typical download looks like: yt-dlp -S 'res:700,ext:mp4' <url>
|
# Typical download looks like: yt-dlp -S 'res:700,ext:mp4' <url>
|
||||||
# Output file name can be improved: -o 'Staffel-04/S04E%(video_autonumber+9)2.0d - %(fulltitle)s.%(ext)s'
|
# Output file name can be improved: -o 'Staffel-04/S04E%(video_autonumber+9)2.0d - %(fulltitle)s.%(ext)s'
|
||||||
yt-dlp
|
yt-dlp
|
||||||
# Start Google Chrome: NIXPKGS_ALLOW_UNFREE=1 nix-shell -p google-chrome --run google-chrome-stable
|
# Start Google Chrome: NIXPKGS_ALLOW_UNFREE=1 nix-shell -p google-chrome --run google-chrome-stable
|
||||||
ffmpeg-full # full in order to grab x11
|
ffmpeg-full # full in order to grab x11
|
||||||
# Recording system audio while keeping audio quite:
|
# Recording system audio while keeping audio quite:
|
||||||
# ffmpeg -f pulse -i default output.mp3
|
# ffmpeg -f pulse -i default output.mp3
|
||||||
# Change recording from output to monitor: https://askubuntu.com/questions/682144/capturing-only-desktop-audio-with-ffmpeg/682793#682793
|
# Change recording from output to monitor: https://askubuntu.com/questions/682144/capturing-only-desktop-audio-with-ffmpeg/682793#682793
|
||||||
# Split large file into chunks (https://unix.stackexchange.com/questions/1670/how-can-i-use-ffmpeg-to-split-mpeg-video-into-10-minute-chunks):
|
# Split large file into chunks (https://unix.stackexchange.com/questions/1670/how-can-i-use-ffmpeg-to-split-mpeg-video-into-10-minute-chunks):
|
||||||
# ffmpeg -i output.mp3 -c copy -map 0 -segment_time 00:15:00 -f segment output%03d.mp3
|
# ffmpeg -i output.mp3 -c copy -map 0 -segment_time 00:15:00 -f segment output%03d.mp3
|
||||||
# Combine multiple files: https://trac.ffmpeg.org/wiki/Concatenate
|
# Combine multiple files: https://trac.ffmpeg.org/wiki/Concatenate
|
||||||
# Record audio and video on ubuntu: ffmpeg -f pulse -i alsa_output.pci-0000_00_1f.3.analog-stereo.monitor -f x11grab -y -framerate 30 -s 1280x720 -i :0.0 -c:v libx264 -preset superfast -crf 18 output.mkv
|
# Record audio and video on ubuntu: ffmpeg -f pulse -i alsa_output.pci-0000_00_1f.3.analog-stereo.monitor -f x11grab -y -framerate 30 -s 1280x720 -i :0.0 -c:v libx264 -preset superfast -crf 18 output.mkv
|
||||||
# Find list of audio on ubuntu: pactl list | grep -A2 'Source #' | grep 'Name: '
|
# Find list of audio on ubuntu: pactl list | grep -A2 'Source #' | grep 'Name: '
|
||||||
|
|
||||||
chromium
|
chromium
|
||||||
|
|
||||||
unzip
|
unzip
|
||||||
|
|
||||||
gtk-engine-murrine
|
gtk-engine-murrine
|
||||||
] ++ (if hostName == "hikari" then [
|
] ++ (if hostName == "hikari" then [
|
||||||
# hikari
|
# hikari
|
||||||
|
|
||||||
acpilight # Used to support xbacklight
|
acpilight # Used to support xbacklight
|
||||||
|
|
||||||
(callPackage ./packages/custom/update-nixos-system { })
|
(callPackage ./packages/custom/update-nixos-system { })
|
||||||
handbrake
|
handbrake
|
||||||
# Needs to be installed by ubuntu on ubuntu, therefore only add on hikari
|
# Needs to be installed by ubuntu on ubuntu, therefore only add on hikari
|
||||||
sound-juicer
|
sound-juicer
|
||||||
|
|
||||||
] else [
|
] else [
|
||||||
# hikari 2
|
# hikari 2
|
||||||
|
|
||||||
(callPackage ./packages/custom/update-ubuntu-system { })
|
(callPackage ./packages/custom/update-ubuntu-system { })
|
||||||
# TODO: Right now only for Ubuntu (hikari2) system
|
# TODO: Right now only for Ubuntu (hikari2) system
|
||||||
(callPackage ./packages/custom/backup { })
|
(callPackage ./packages/custom/backup { })
|
||||||
(callPackage ./packages/custom/vpn-reuter-dynamics { })
|
(callPackage ./packages/custom/vpn-reuter-dynamics { })
|
||||||
]) ++ (callPackage ./packages/custom {
|
]);
|
||||||
inherit hostName;
|
}
|
||||||
})
|
|
||||||
|
|
|
@ -1,19 +1,22 @@
|
||||||
{
|
{
|
||||||
callPackage
|
pkgs
|
||||||
,hostName
|
,hostName
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
[
|
{
|
||||||
(callPackage ./dmenu-scripts { })
|
home.packages = [
|
||||||
(callPackage ./update-system { })
|
(pkgs.callPackage ./dmenu-scripts { })
|
||||||
(callPackage ./nextcloud-sync/from-local.nix { })
|
(pkgs.callPackage ./update-system { })
|
||||||
(callPackage ./nextcloud-sync/from-remote.nix { })
|
(pkgs.callPackage ./nextcloud-sync/from-local.nix { })
|
||||||
(callPackage ./typo3-documentation-rendering { })
|
(pkgs.callPackage ./nextcloud-sync/from-remote.nix { })
|
||||||
(callPackage ./typo3-documentation-rendering-old { })
|
(pkgs.callPackage ./typo3-documentation-rendering { })
|
||||||
(callPackage ./typo3-serve-testing-instance { })
|
(pkgs.callPackage ./typo3-documentation-rendering-old { })
|
||||||
(callPackage ./typo3-push-core { })
|
(pkgs.callPackage ./typo3-serve-testing-instance { })
|
||||||
(callPackage ./zcat-progress { })
|
(pkgs.callPackage ./typo3-push-core { })
|
||||||
(callPackage ./project {
|
(pkgs.callPackage ./zcat-progress { })
|
||||||
inherit hostName;
|
(pkgs.callPackage ./project {
|
||||||
})
|
inherit hostName;
|
||||||
]
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
config
|
config
|
||||||
,pkgs
|
,pkgs
|
||||||
,hostName
|
,hostName
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -10,55 +11,57 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
# Let Home Manager install and manage itself.
|
programs = {
|
||||||
home-manager.enable = true;
|
# Let Home Manager install and manage itself.
|
||||||
|
home-manager.enable = true;
|
||||||
|
|
||||||
neovim = import ./programs/neovim.nix {
|
neovim = import ./programs/neovim.nix {
|
||||||
inherit pkgs sqlformat;
|
inherit pkgs sqlformat;
|
||||||
|
};
|
||||||
|
|
||||||
|
git = import ./programs/git.nix {
|
||||||
|
inherit pkgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
htop = import ./programs/htop.nix {
|
||||||
|
inherit config;
|
||||||
|
};
|
||||||
|
|
||||||
|
tmux = import ./programs/tmux.nix {
|
||||||
|
inherit pkgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
jq = import ./programs/jq.nix {
|
||||||
|
inherit config;
|
||||||
|
};
|
||||||
|
|
||||||
|
fzf = import ./programs/fzf.nix {
|
||||||
|
};
|
||||||
|
|
||||||
|
zsh = import ./programs/zsh.nix {
|
||||||
|
inherit config pkgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
gpg = import ./programs/gpg.nix {
|
||||||
|
inherit config;
|
||||||
|
};
|
||||||
|
|
||||||
|
ssh = import ./programs/ssh.nix {
|
||||||
|
};
|
||||||
|
|
||||||
|
zathura = import ./programs/zathura.nix {
|
||||||
|
};
|
||||||
|
|
||||||
|
firefox = import ./programs/firefox.nix {
|
||||||
|
inherit pkgs hostName;
|
||||||
|
};
|
||||||
|
|
||||||
|
vdirsyncer.enable = true;
|
||||||
|
khal = import ./programs/khal.nix {
|
||||||
|
inherit config;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Media
|
||||||
|
cmus.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
git = import ./programs/git.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
htop = import ./programs/htop.nix {
|
|
||||||
inherit config;
|
|
||||||
};
|
|
||||||
|
|
||||||
tmux = import ./programs/tmux.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
jq = import ./programs/jq.nix {
|
|
||||||
inherit config;
|
|
||||||
};
|
|
||||||
|
|
||||||
fzf = import ./programs/fzf.nix {
|
|
||||||
};
|
|
||||||
|
|
||||||
zsh = import ./programs/zsh.nix {
|
|
||||||
inherit config pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
gpg = import ./programs/gpg.nix {
|
|
||||||
inherit config;
|
|
||||||
};
|
|
||||||
|
|
||||||
ssh = import ./programs/ssh.nix {
|
|
||||||
};
|
|
||||||
|
|
||||||
zathura = import ./programs/zathura.nix {
|
|
||||||
};
|
|
||||||
|
|
||||||
firefox = import ./programs/firefox.nix {
|
|
||||||
inherit pkgs hostName;
|
|
||||||
};
|
|
||||||
|
|
||||||
vdirsyncer.enable = true;
|
|
||||||
khal = import ./programs/khal.nix {
|
|
||||||
inherit config;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Media
|
|
||||||
cmus.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,31 @@
|
||||||
{
|
{
|
||||||
pkgs
|
pkgs
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
enable = true;
|
nix = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
package = pkgs.nix;
|
package = pkgs.nix;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
|
||||||
experimental-features = [
|
experimental-features = [
|
||||||
"nix-command"
|
"nix-command"
|
||||||
"flakes"
|
"flakes"
|
||||||
];
|
];
|
||||||
|
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://cache.nixos.org"
|
"https://cache.nixos.org"
|
||||||
"https://fossar.cachix.org"
|
"https://fossar.cachix.org"
|
||||||
];
|
];
|
||||||
|
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
"fossar.cachix.org-1:Zv6FuqIboeHPWQS7ysLCJ7UT7xExb4OE8c4LyGb5AsE="
|
"fossar.cachix.org-1:Zv6FuqIboeHPWQS7ysLCJ7UT7xExb4OE8c4LyGb5AsE="
|
||||||
];
|
];
|
||||||
|
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
11
home/qt.nix
11
home/qt.nix
|
@ -1,12 +1,15 @@
|
||||||
{
|
{
|
||||||
pkgs
|
pkgs
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
enable = true;
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
platformTheme = {
|
platformTheme = {
|
||||||
# Re use existing gtk theme
|
# Re use existing gtk theme
|
||||||
name = "gtk";
|
name = "gtk";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,27 +2,28 @@
|
||||||
config
|
config
|
||||||
,hostName
|
,hostName
|
||||||
,pkgs
|
,pkgs
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
services = {
|
||||||
|
dunst = import ./services/dunst.nix {
|
||||||
|
inherit config;
|
||||||
|
};
|
||||||
|
|
||||||
dunst = import ./services/dunst.nix {
|
gpg-agent = import ./services/gpg-agent.nix {
|
||||||
inherit config;
|
inherit pkgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
gpg-agent = import ./services/gpg-agent.nix {
|
vdirsyncer = {
|
||||||
inherit pkgs;
|
enable = true;
|
||||||
};
|
frequency = "Mon..Thu *-*-* 15,12,8:00";
|
||||||
|
};
|
||||||
|
|
||||||
vdirsyncer = {
|
languagetool.enable = true;
|
||||||
enable = true;
|
mailhog.enable = true;
|
||||||
frequency = "Mon..Thu *-*-* 15,12,8:00";
|
} // (if hostName == "hikari" then {
|
||||||
};
|
network-manager-applet.enable = true;
|
||||||
|
} else {
|
||||||
languagetool.enable = true;
|
});
|
||||||
mailhog.enable = true;
|
}
|
||||||
|
|
||||||
} // (if hostName == "hikari" then {
|
|
||||||
network-manager-applet.enable = true;
|
|
||||||
} else {
|
|
||||||
})
|
|
||||||
|
|
|
@ -1,17 +1,20 @@
|
||||||
{
|
{
|
||||||
config
|
config
|
||||||
,pkgs
|
,pkgs
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
services = {
|
systemd.user = {
|
||||||
batteryicon = import ./services/batteryicon.nix {
|
services = {
|
||||||
inherit pkgs;
|
batteryicon = import ./services/batteryicon.nix {
|
||||||
|
inherit pkgs;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
tmpfiles.rules = [
|
tmpfiles.rules = [
|
||||||
"L ${config.xdg.dataHome}/themes - - - - ${config.home.profileDirectory}/share/themes"
|
"L ${config.xdg.dataHome}/themes - - - - ${config.home.profileDirectory}/share/themes"
|
||||||
"L ${config.xdg.dataHome}/icons/${config.gtk.iconTheme.name} - - - - ${config.home.profileDirectory}/share/icons/${config.gtk.iconTheme.name}"
|
"L ${config.xdg.dataHome}/icons/${config.gtk.iconTheme.name} - - - - ${config.home.profileDirectory}/share/icons/${config.gtk.iconTheme.name}"
|
||||||
];
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,14 @@
|
||||||
config
|
config
|
||||||
,pkgs
|
,pkgs
|
||||||
,hostName
|
,hostName
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# Use `xbindkeys --key` to find key name, see: https://wiki.archlinux.org/title/Xbindkeys
|
# Use `xbindkeys --key` to find key name, see: https://wiki.archlinux.org/title/Xbindkeys
|
||||||
# Use `xset -dpms` to disable black out screen for power saving
|
# Use `xset -dpms` to disable black out screen for power saving
|
||||||
|
|
||||||
let
|
let
|
||||||
modifier = config.xsession.windowManager.i3.config.modifier;
|
inherit(config.xsession.windowManager.i3.config) modifier;
|
||||||
|
|
||||||
soundSwitcherForHikari2 = if hostName == "hikari" then "" else "-D pulse";
|
soundSwitcherForHikari2 = if hostName == "hikari" then "" else "-D pulse";
|
||||||
keyboardBrightnessDevice = if hostName == "hikari" then "--device smc::kbd_backlight" else "";
|
keyboardBrightnessDevice = if hostName == "hikari" then "--device smc::kbd_backlight" else "";
|
||||||
|
@ -16,366 +17,368 @@ let
|
||||||
displayBuiltInOutput = if hostName == "hikari" then "eDP-1" else "eDP1";
|
displayBuiltInOutput = if hostName == "hikari" then "eDP-1" else "eDP1";
|
||||||
displayDefaults = if hostName == "hikari" then "--output ${displayBuiltInOutput} --mode 1366x768 --scale 1.25x1.25" else "";
|
displayDefaults = if hostName == "hikari" then "--output ${displayBuiltInOutput} --mode 1366x768 --scale 1.25x1.25" else "";
|
||||||
in {
|
in {
|
||||||
enable = true;
|
xsession.windowManager.i3 = {
|
||||||
config = {
|
enable = true;
|
||||||
|
config = {
|
||||||
|
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
|
|
||||||
workspaceLayout = "tabbed";
|
workspaceLayout = "tabbed";
|
||||||
workspaceAutoBackAndForth = true;
|
workspaceAutoBackAndForth = true;
|
||||||
|
|
||||||
defaultWorkspace = "workspace 1";
|
defaultWorkspace = "workspace 1";
|
||||||
|
|
||||||
menu = "i3-dmenu-desktop";
|
menu = "i3-dmenu-desktop";
|
||||||
|
|
||||||
fonts = {
|
|
||||||
names = [ "monospace" ];
|
|
||||||
style = "Bold";
|
|
||||||
size = 12.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
colors = {
|
|
||||||
background = "#2E3436";
|
|
||||||
focused = {
|
|
||||||
border = "#000000";
|
|
||||||
background = "#000000";
|
|
||||||
text = "#72B3CC";
|
|
||||||
indicator = "#72B3CC";
|
|
||||||
childBorder = "#000000";
|
|
||||||
};
|
|
||||||
focusedInactive = {
|
|
||||||
border = "#000000";
|
|
||||||
background = "#000000";
|
|
||||||
text = "#B0B0B0";
|
|
||||||
indicator = "#5D5D5D";
|
|
||||||
childBorder = "#000000";
|
|
||||||
};
|
|
||||||
unfocused = {
|
|
||||||
border = "#000000";
|
|
||||||
background = "#000000";
|
|
||||||
text = "#B0B0B0";
|
|
||||||
indicator = "#5D5D5D";
|
|
||||||
childBorder = "#000000";
|
|
||||||
};
|
|
||||||
urgent = {
|
|
||||||
border = "#72B3CC";
|
|
||||||
background = "#72B3CC";
|
|
||||||
text = "#FFFFFF";
|
|
||||||
indicator = "#72B3CC";
|
|
||||||
childBorder = "#72B3CC";
|
|
||||||
};
|
|
||||||
placeholder = {
|
|
||||||
border = "#000000";
|
|
||||||
background = "#000000";
|
|
||||||
text = "#D3D7CF";
|
|
||||||
indicator = "#000000";
|
|
||||||
childBorder = "#000000";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
bars = [{
|
|
||||||
mode = "hide";
|
|
||||||
position = "top";
|
|
||||||
|
|
||||||
workspaceButtons = true;
|
|
||||||
workspaceNumbers = true;
|
|
||||||
|
|
||||||
statusCommand = "i3blocks";
|
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
names = ["monospace"];
|
names = [ "monospace" ];
|
||||||
style = "Bold";
|
style = "Bold";
|
||||||
size = 12.0;
|
size = 12.0;
|
||||||
};
|
};
|
||||||
|
|
||||||
colors = {
|
colors = {
|
||||||
background = "#000000";
|
background = "#2E3436";
|
||||||
statusline = "#72B3CC";
|
focused = {
|
||||||
separator = "#72B3CC";
|
|
||||||
focusedWorkspace = {
|
|
||||||
border = "#72B3CC";
|
|
||||||
background = "#000000";
|
|
||||||
text = "#72B3CC";
|
|
||||||
};
|
|
||||||
activeWorkspace = {
|
|
||||||
border = "#000000";
|
border = "#000000";
|
||||||
background = "#000000";
|
background = "#000000";
|
||||||
text = "#72B3CC";
|
text = "#72B3CC";
|
||||||
|
indicator = "#72B3CC";
|
||||||
|
childBorder = "#000000";
|
||||||
};
|
};
|
||||||
inactiveWorkspace = {
|
focusedInactive = {
|
||||||
border = "#000000";
|
border = "#000000";
|
||||||
background = "#000000";
|
background = "#000000";
|
||||||
text = "#72B3CC";
|
text = "#B0B0B0";
|
||||||
|
indicator = "#5D5D5D";
|
||||||
|
childBorder = "#000000";
|
||||||
};
|
};
|
||||||
urgentWorkspace = {
|
unfocused = {
|
||||||
|
border = "#000000";
|
||||||
|
background = "#000000";
|
||||||
|
text = "#B0B0B0";
|
||||||
|
indicator = "#5D5D5D";
|
||||||
|
childBorder = "#000000";
|
||||||
|
};
|
||||||
|
urgent = {
|
||||||
border = "#72B3CC";
|
border = "#72B3CC";
|
||||||
background = "#72B3CC";
|
background = "#72B3CC";
|
||||||
text = "#FFFFFF";
|
text = "#FFFFFF";
|
||||||
|
indicator = "#72B3CC";
|
||||||
|
childBorder = "#72B3CC";
|
||||||
};
|
};
|
||||||
bindingMode = {
|
placeholder = {
|
||||||
border = "#72B3CC";
|
border = "#000000";
|
||||||
background = "#72B3CC";
|
background = "#000000";
|
||||||
text = "#FFFFFF";
|
text = "#D3D7CF";
|
||||||
|
indicator = "#000000";
|
||||||
|
childBorder = "#000000";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = ''
|
bars = [{
|
||||||
separator_symbol " "
|
mode = "hide";
|
||||||
'';
|
position = "top";
|
||||||
}];
|
|
||||||
|
|
||||||
window = {
|
workspaceButtons = true;
|
||||||
titlebar = true;
|
workspaceNumbers = true;
|
||||||
border = 0;
|
|
||||||
hideEdgeBorders = "both";
|
|
||||||
|
|
||||||
commands = [
|
statusCommand = "i3blocks";
|
||||||
{
|
|
||||||
command = ''title_format "<b>%title</b>"'';
|
|
||||||
criteria = { class = ".*"; };
|
|
||||||
}
|
|
||||||
{
|
|
||||||
command = "sticky enable";
|
|
||||||
criteria = { window_type = "dialog"; };
|
|
||||||
}
|
|
||||||
{
|
|
||||||
command = "sticky enable";
|
|
||||||
criteria = { class = "KeePassXC"; };
|
|
||||||
}
|
|
||||||
{
|
|
||||||
command = "border none";
|
|
||||||
criteria = { class = "^vlc$"; };
|
|
||||||
}
|
|
||||||
{
|
|
||||||
command = "floating disable";
|
|
||||||
criteria = { class = "^Pidgin$"; };
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
floating = {
|
fonts = {
|
||||||
titlebar = true;
|
names = ["monospace"];
|
||||||
border = 0;
|
style = "Bold";
|
||||||
|
size = 12.0;
|
||||||
|
};
|
||||||
|
|
||||||
criteria = [
|
colors = {
|
||||||
{ "class" = "KeePassXC"; }
|
background = "#000000";
|
||||||
];
|
statusline = "#72B3CC";
|
||||||
};
|
separator = "#72B3CC";
|
||||||
|
focusedWorkspace = {
|
||||||
|
border = "#72B3CC";
|
||||||
|
background = "#000000";
|
||||||
|
text = "#72B3CC";
|
||||||
|
};
|
||||||
|
activeWorkspace = {
|
||||||
|
border = "#000000";
|
||||||
|
background = "#000000";
|
||||||
|
text = "#72B3CC";
|
||||||
|
};
|
||||||
|
inactiveWorkspace = {
|
||||||
|
border = "#000000";
|
||||||
|
background = "#000000";
|
||||||
|
text = "#72B3CC";
|
||||||
|
};
|
||||||
|
urgentWorkspace = {
|
||||||
|
border = "#72B3CC";
|
||||||
|
background = "#72B3CC";
|
||||||
|
text = "#FFFFFF";
|
||||||
|
};
|
||||||
|
bindingMode = {
|
||||||
|
border = "#72B3CC";
|
||||||
|
background = "#72B3CC";
|
||||||
|
text = "#FFFFFF";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# For debugging, include class (https://i3wm.org/docs/userguide.html#command_criteria)
|
extraConfig = ''
|
||||||
# also use bash tool "xprop" or "xwininfo"
|
separator_symbol " "
|
||||||
assigns = {
|
'';
|
||||||
"2:💶" = [
|
}];
|
||||||
{ class = "^time-tracking$"; }
|
|
||||||
{ class = "^mailhog$"; }
|
|
||||||
{ window_role = "^browser$"; }
|
|
||||||
];
|
|
||||||
"3:💬" = [
|
|
||||||
{ class = "^Pidgin$"; }
|
|
||||||
{ class = "^chat$"; }
|
|
||||||
{ class = "^phone$"; }
|
|
||||||
];
|
|
||||||
"4:📧" = [
|
|
||||||
{ class = "^thunderbird$"; }
|
|
||||||
{ class = "^mail$"; }
|
|
||||||
];
|
|
||||||
"5:🎵" = [
|
|
||||||
# TODO: Assign cmus, but it is opened within terminal
|
|
||||||
# i3-dmenu-desktop does not allow to pass the wm class for the terminal, should I wrap the .desktop call or cmus binary?
|
|
||||||
{ class = "^Pavucontrol$"; }
|
|
||||||
{ class = "^vlc$"; }
|
|
||||||
{ class = "^Audacity$"; }
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
startup = [
|
window = {
|
||||||
# Start programs / applets
|
titlebar = true;
|
||||||
{
|
border = 0;
|
||||||
command = "nm-applet";
|
hideEdgeBorders = "both";
|
||||||
notification = false;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
command = "${pkgs.udiskie}/bin/udiskie --smart-tray";
|
|
||||||
notification = false;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
keybindings = {
|
commands = [
|
||||||
# kill focused window
|
{
|
||||||
"${modifier}+Shift+q" = "kill";
|
command = ''title_format "<b>%title</b>"'';
|
||||||
|
criteria = { class = ".*"; };
|
||||||
# start a terminal
|
}
|
||||||
"${modifier}+Return" = "exec st zsh";
|
{
|
||||||
|
command = "sticky enable";
|
||||||
"${modifier}+Shift+a" = "exec xrandr --auto";
|
criteria = { window_type = "dialog"; };
|
||||||
|
}
|
||||||
# start dmenu (a program launcher)
|
{
|
||||||
# "${modifier}+d" = "exec dmenu_run";
|
command = "sticky enable";
|
||||||
# There also is the (new) i3-dmenu-desktop which only displays applications
|
criteria = { class = "KeePassXC"; };
|
||||||
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
|
}
|
||||||
# installed.
|
{
|
||||||
# For docs, see: https://developer.gnome.org/integration-guide/stable/desktop-files.html.en
|
command = "border none";
|
||||||
"${modifier}+a" = "exec --no-startup-id i3-dmenu-desktop --dmenu='dmenu -i -l 20'";
|
criteria = { class = "^vlc$"; };
|
||||||
|
}
|
||||||
"${modifier}+space" = "exec --no-startup-id custom-dmenu-selection";
|
{
|
||||||
|
command = "floating disable";
|
||||||
# change focus
|
criteria = { class = "^Pidgin$"; };
|
||||||
"${modifier}+h" = "focus left";
|
}
|
||||||
"${modifier}+j" = "focus down";
|
];
|
||||||
"${modifier}+k" = "focus up";
|
|
||||||
"${modifier}+l" = "focus right";
|
|
||||||
|
|
||||||
# move focused window
|
|
||||||
"${modifier}+Shift+h" = "move left";
|
|
||||||
"${modifier}+Shift+j" = "move down";
|
|
||||||
"${modifier}+Shift+k" = "move up";
|
|
||||||
"${modifier}+Shift+l" = "move right";
|
|
||||||
|
|
||||||
# split in horizontal orientation
|
|
||||||
"${modifier}+Right" = "split h";
|
|
||||||
|
|
||||||
# split in vertical orientation
|
|
||||||
"${modifier}+Down" = "split v";
|
|
||||||
|
|
||||||
# enter fullscreen mode for the focused container
|
|
||||||
"${modifier}+f" = "fullscreen toggle";
|
|
||||||
|
|
||||||
# toggle tiling / floating
|
|
||||||
"${modifier}+Shift+f" = "floating toggle";
|
|
||||||
|
|
||||||
# toggle sticky
|
|
||||||
"${modifier}+Shift+s" = "sticky toggle";
|
|
||||||
|
|
||||||
# switch to workspace
|
|
||||||
"${modifier}+1" = "workspace 1";
|
|
||||||
"${modifier}+2" = "workspace 2:💶";
|
|
||||||
"${modifier}+3" = "workspace 3:💬";
|
|
||||||
"${modifier}+4" = "workspace 4:📧";
|
|
||||||
"${modifier}+5" = "workspace 5:🎵";
|
|
||||||
"${modifier}+6" = "workspace 6:T3";
|
|
||||||
"${modifier}+7" = "workspace 7";
|
|
||||||
"${modifier}+8" = "workspace 8";
|
|
||||||
"${modifier}+9" = "workspace 9:🖥️";
|
|
||||||
"${modifier}+0" = "workspace 10:🌐";
|
|
||||||
|
|
||||||
# move focused container to workspace
|
|
||||||
"${modifier}+Shift+1" = "move container to workspace 1";
|
|
||||||
"${modifier}+Shift+2" = "move container to workspace 2:💶";
|
|
||||||
"${modifier}+Shift+3" = "move container to workspace 3:💬";
|
|
||||||
"${modifier}+Shift+4" = "move container to workspace 4:📧";
|
|
||||||
"${modifier}+Shift+5" = "move container to workspace 5:🎵";
|
|
||||||
"${modifier}+Shift+6" = "move container to workspace 6:T3";
|
|
||||||
"${modifier}+Shift+7" = "move container to workspace 7";
|
|
||||||
"${modifier}+Shift+8" = "move container to workspace 8";
|
|
||||||
"${modifier}+Shift+9" = "move container to workspace 9:🖥️";
|
|
||||||
"${modifier}+Shift+0" = "move container to workspace 10:🌐";
|
|
||||||
|
|
||||||
# workspace 9:🖥️ output DP2
|
|
||||||
|
|
||||||
# Make the currently focused window a scratchpad
|
|
||||||
"${modifier}+Shift+minus" = "move scratchpad";
|
|
||||||
# Show the first scratchpad window
|
|
||||||
"${modifier}+minus" = "scratchpad show";
|
|
||||||
|
|
||||||
# Show Terminal
|
|
||||||
"${modifier}+t" = "[class=\"st-256color\"] scratchpad show";
|
|
||||||
# Show KeepassXC
|
|
||||||
"${modifier}+p" = "[class=\"KeePassXC\"] scratchpad show";
|
|
||||||
|
|
||||||
# reload the configuration file
|
|
||||||
"${modifier}+Shift+c" = "reload";
|
|
||||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
|
||||||
"${modifier}+Shift+r" = "restart";
|
|
||||||
# exit i3 (logs you out of your X session)
|
|
||||||
"${modifier}+Shift+e" = "exec \"i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'\"";
|
|
||||||
|
|
||||||
# Move workspace between displays
|
|
||||||
"${modifier}+Shift+Left" = "move workspace to output left";
|
|
||||||
"${modifier}+Shift+Right" = "move workspace to output right";
|
|
||||||
|
|
||||||
# Function Key Bindings (🎵)
|
|
||||||
"XF86AudioPause" = "exec cmus-remote --pause";
|
|
||||||
"XF86AudioPlay" = "exec cmus-remote --pause";
|
|
||||||
"XF86AudioPrev" = "exec cmus-remote --prev";
|
|
||||||
"XF86AudioNext" = "exec cmus-remote --next";
|
|
||||||
"XF86AudioMute" = "exec \"amixer ${soundSwitcherForHikari2} sset Master 0\"";
|
|
||||||
"XF86AudioRaiseVolume" = "exec \"amixer ${soundSwitcherForHikari2} sset Master 5%+\"";
|
|
||||||
"XF86AudioLowerVolume" = "exec \"amixer ${soundSwitcherForHikari2} sset Master 5%-\"";
|
|
||||||
|
|
||||||
# Switch sound device:
|
|
||||||
# https://askubuntu.com/a/72076/491377
|
|
||||||
#
|
|
||||||
# Detect current devices
|
|
||||||
# pulseaudio -k && pactl load-module module-detect
|
|
||||||
#
|
|
||||||
# Run Pulseaudio Volume Control and adjust
|
|
||||||
# Adjust also "default / fallback" device, in order to make volume control work.
|
|
||||||
#
|
|
||||||
# Alternativly via cli:
|
|
||||||
# ~ > pacmd list-sinks
|
|
||||||
# ~ > pacmd list-sink-inputs
|
|
||||||
# ~ > pacmd set-default-sink 8
|
|
||||||
# ~ > pacmd move-sink-input 3 8
|
|
||||||
|
|
||||||
# Function Key Bindings (💡)
|
|
||||||
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl ${displayBrightnessDevice} s +10";
|
|
||||||
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl ${displayBrightnessDevice} s 10-";
|
|
||||||
"SHIFT+XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl ${displayBrightnessDevice} s +1";
|
|
||||||
"SHIFT+XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl ${displayBrightnessDevice} s 1-";
|
|
||||||
|
|
||||||
"XF86KbdBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl ${keyboardBrightnessDevice} s +1";
|
|
||||||
"XF86KbdBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl ${keyboardBrightnessDevice} s 1-";
|
|
||||||
|
|
||||||
# Dunst Key Bindings
|
|
||||||
# See: man dunstctl.1
|
|
||||||
"Control+space" = "exec --no-startup-id dunstctl close-all";
|
|
||||||
"Control+grave" = "exec --no-startup-id dunstctl history-pop";
|
|
||||||
|
|
||||||
"${modifier}+d" = "mode displays";
|
|
||||||
"${modifier}+r" = "mode resize";
|
|
||||||
};
|
|
||||||
|
|
||||||
modes = {
|
|
||||||
resize = {
|
|
||||||
"h" = "resize shrink width 10 px or 10 ppt";
|
|
||||||
"j" = "resize grow height 10 px or 10 ppt";
|
|
||||||
"k" = "resize shrink height 10 px or 10 ppt";
|
|
||||||
"l" = "resize grow width 10 px or 10 ppt";
|
|
||||||
"Shift+h" = "resize shrink width 50 px or 50 ppt";
|
|
||||||
"Shift+j" = "resize grow height 50 px or 50 ppt";
|
|
||||||
"Shift+k" = "resize shrink height 50 px or 50 ppt";
|
|
||||||
"Shift+l" = "resize grow width 50 px or 50 ppt";
|
|
||||||
|
|
||||||
# same bindings, but for the arrow keys
|
|
||||||
"Left" = "resize shrink width 10 px or 10 ppt";
|
|
||||||
"Down" = "resize grow height 10 px or 10 ppt";
|
|
||||||
"Up" = "resize shrink height 10 px or 10 ppt";
|
|
||||||
"Right" = "resize grow width 10 px or 10 ppt";
|
|
||||||
|
|
||||||
# back to normal: Enter or Escape
|
|
||||||
"Return" = "mode default";
|
|
||||||
"Escape" = "mode default";
|
|
||||||
};
|
};
|
||||||
# "display setup: [a]uto [e]extern only [h]ome [o]ffice" = {
|
|
||||||
displays = {
|
|
||||||
"a" = "exec xrandr --auto ${displayDefaults} && ${pkgs.brightnessctl}/bin/brightnessctl --device ${displayBrightnessDevice} s 10;";
|
|
||||||
"e" = "exec xrandr --auto --output ${displayBuiltInOutput} --off";
|
|
||||||
"h" = "exec xrandr --output ${displayBuiltInOutput} --off --output DP1 --scale 1x1 --mode 2560x1440";
|
|
||||||
"o" = "exec xrandr --output DP2 --primary --mode 3840x2160 --scale 0.65x0.65 --output ${displayBuiltInOutput} --off";
|
|
||||||
|
|
||||||
# Mirror
|
floating = {
|
||||||
# xrandr --output ${displayBuiltInOutput} --rate 60 --mode 1920x1080 --fb 1920x1080 --output DP1 --mode 1920x1080 --same-as ${displayBuiltInOutput}
|
titlebar = true;
|
||||||
# To turn off, use position, e.g.:
|
border = 0;
|
||||||
# xrandr --output DP1 --right-of ${displayBuiltInOutput}
|
|
||||||
|
|
||||||
# Hikari present
|
criteria = [
|
||||||
# xrandr --output eDP-1 --same-as HDMI-1 --scale 1.5x1.5 --output HDMI-1 --mode 1920x1080
|
{ "class" = "KeePassXC"; }
|
||||||
|
];
|
||||||
# back to normal: Enter or Escape
|
|
||||||
"Return" = "mode default";
|
|
||||||
"Escape" = "mode default";
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
|
# For debugging, include class (https://i3wm.org/docs/userguide.html#command_criteria)
|
||||||
|
# also use bash tool "xprop" or "xwininfo"
|
||||||
|
assigns = {
|
||||||
|
"2:💶" = [
|
||||||
|
{ class = "^time-tracking$"; }
|
||||||
|
{ class = "^mailhog$"; }
|
||||||
|
{ window_role = "^browser$"; }
|
||||||
|
];
|
||||||
|
"3:💬" = [
|
||||||
|
{ class = "^Pidgin$"; }
|
||||||
|
{ class = "^chat$"; }
|
||||||
|
{ class = "^phone$"; }
|
||||||
|
];
|
||||||
|
"4:📧" = [
|
||||||
|
{ class = "^thunderbird$"; }
|
||||||
|
{ class = "^mail$"; }
|
||||||
|
];
|
||||||
|
"5:🎵" = [
|
||||||
|
# TODO: Assign cmus, but it is opened within terminal
|
||||||
|
# i3-dmenu-desktop does not allow to pass the wm class for the terminal, should I wrap the .desktop call or cmus binary?
|
||||||
|
{ class = "^Pavucontrol$"; }
|
||||||
|
{ class = "^vlc$"; }
|
||||||
|
{ class = "^Audacity$"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
startup = [
|
||||||
|
# Start programs / applets
|
||||||
|
{
|
||||||
|
command = "nm-applet";
|
||||||
|
notification = false;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "${pkgs.udiskie}/bin/udiskie --smart-tray";
|
||||||
|
notification = false;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
keybindings = {
|
||||||
|
# kill focused window
|
||||||
|
"${modifier}+Shift+q" = "kill";
|
||||||
|
|
||||||
|
# start a terminal
|
||||||
|
"${modifier}+Return" = "exec st zsh";
|
||||||
|
|
||||||
|
"${modifier}+Shift+a" = "exec xrandr --auto";
|
||||||
|
|
||||||
|
# start dmenu (a program launcher)
|
||||||
|
# "${modifier}+d" = "exec dmenu_run";
|
||||||
|
# There also is the (new) i3-dmenu-desktop which only displays applications
|
||||||
|
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
|
||||||
|
# installed.
|
||||||
|
# For docs, see: https://developer.gnome.org/integration-guide/stable/desktop-files.html.en
|
||||||
|
"${modifier}+a" = "exec --no-startup-id i3-dmenu-desktop --dmenu='dmenu -i -l 20'";
|
||||||
|
|
||||||
|
"${modifier}+space" = "exec --no-startup-id custom-dmenu-selection";
|
||||||
|
|
||||||
|
# change focus
|
||||||
|
"${modifier}+h" = "focus left";
|
||||||
|
"${modifier}+j" = "focus down";
|
||||||
|
"${modifier}+k" = "focus up";
|
||||||
|
"${modifier}+l" = "focus right";
|
||||||
|
|
||||||
|
# move focused window
|
||||||
|
"${modifier}+Shift+h" = "move left";
|
||||||
|
"${modifier}+Shift+j" = "move down";
|
||||||
|
"${modifier}+Shift+k" = "move up";
|
||||||
|
"${modifier}+Shift+l" = "move right";
|
||||||
|
|
||||||
|
# split in horizontal orientation
|
||||||
|
"${modifier}+Right" = "split h";
|
||||||
|
|
||||||
|
# split in vertical orientation
|
||||||
|
"${modifier}+Down" = "split v";
|
||||||
|
|
||||||
|
# enter fullscreen mode for the focused container
|
||||||
|
"${modifier}+f" = "fullscreen toggle";
|
||||||
|
|
||||||
|
# toggle tiling / floating
|
||||||
|
"${modifier}+Shift+f" = "floating toggle";
|
||||||
|
|
||||||
|
# toggle sticky
|
||||||
|
"${modifier}+Shift+s" = "sticky toggle";
|
||||||
|
|
||||||
|
# switch to workspace
|
||||||
|
"${modifier}+1" = "workspace 1";
|
||||||
|
"${modifier}+2" = "workspace 2:💶";
|
||||||
|
"${modifier}+3" = "workspace 3:💬";
|
||||||
|
"${modifier}+4" = "workspace 4:📧";
|
||||||
|
"${modifier}+5" = "workspace 5:🎵";
|
||||||
|
"${modifier}+6" = "workspace 6:T3";
|
||||||
|
"${modifier}+7" = "workspace 7";
|
||||||
|
"${modifier}+8" = "workspace 8";
|
||||||
|
"${modifier}+9" = "workspace 9:🖥️";
|
||||||
|
"${modifier}+0" = "workspace 10:🌐";
|
||||||
|
|
||||||
|
# move focused container to workspace
|
||||||
|
"${modifier}+Shift+1" = "move container to workspace 1";
|
||||||
|
"${modifier}+Shift+2" = "move container to workspace 2:💶";
|
||||||
|
"${modifier}+Shift+3" = "move container to workspace 3:💬";
|
||||||
|
"${modifier}+Shift+4" = "move container to workspace 4:📧";
|
||||||
|
"${modifier}+Shift+5" = "move container to workspace 5:🎵";
|
||||||
|
"${modifier}+Shift+6" = "move container to workspace 6:T3";
|
||||||
|
"${modifier}+Shift+7" = "move container to workspace 7";
|
||||||
|
"${modifier}+Shift+8" = "move container to workspace 8";
|
||||||
|
"${modifier}+Shift+9" = "move container to workspace 9:🖥️";
|
||||||
|
"${modifier}+Shift+0" = "move container to workspace 10:🌐";
|
||||||
|
|
||||||
|
# workspace 9:🖥️ output DP2
|
||||||
|
|
||||||
|
# Make the currently focused window a scratchpad
|
||||||
|
"${modifier}+Shift+minus" = "move scratchpad";
|
||||||
|
# Show the first scratchpad window
|
||||||
|
"${modifier}+minus" = "scratchpad show";
|
||||||
|
|
||||||
|
# Show Terminal
|
||||||
|
"${modifier}+t" = "[class=\"st-256color\"] scratchpad show";
|
||||||
|
# Show KeepassXC
|
||||||
|
"${modifier}+p" = "[class=\"KeePassXC\"] scratchpad show";
|
||||||
|
|
||||||
|
# reload the configuration file
|
||||||
|
"${modifier}+Shift+c" = "reload";
|
||||||
|
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||||
|
"${modifier}+Shift+r" = "restart";
|
||||||
|
# exit i3 (logs you out of your X session)
|
||||||
|
"${modifier}+Shift+e" = "exec \"i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'\"";
|
||||||
|
|
||||||
|
# Move workspace between displays
|
||||||
|
"${modifier}+Shift+Left" = "move workspace to output left";
|
||||||
|
"${modifier}+Shift+Right" = "move workspace to output right";
|
||||||
|
|
||||||
|
# Function Key Bindings (🎵)
|
||||||
|
"XF86AudioPause" = "exec cmus-remote --pause";
|
||||||
|
"XF86AudioPlay" = "exec cmus-remote --pause";
|
||||||
|
"XF86AudioPrev" = "exec cmus-remote --prev";
|
||||||
|
"XF86AudioNext" = "exec cmus-remote --next";
|
||||||
|
"XF86AudioMute" = "exec \"amixer ${soundSwitcherForHikari2} sset Master 0\"";
|
||||||
|
"XF86AudioRaiseVolume" = "exec \"amixer ${soundSwitcherForHikari2} sset Master 5%+\"";
|
||||||
|
"XF86AudioLowerVolume" = "exec \"amixer ${soundSwitcherForHikari2} sset Master 5%-\"";
|
||||||
|
|
||||||
|
# Switch sound device:
|
||||||
|
# https://askubuntu.com/a/72076/491377
|
||||||
|
#
|
||||||
|
# Detect current devices
|
||||||
|
# pulseaudio -k && pactl load-module module-detect
|
||||||
|
#
|
||||||
|
# Run Pulseaudio Volume Control and adjust
|
||||||
|
# Adjust also "default / fallback" device, in order to make volume control work.
|
||||||
|
#
|
||||||
|
# Alternativly via cli:
|
||||||
|
# ~ > pacmd list-sinks
|
||||||
|
# ~ > pacmd list-sink-inputs
|
||||||
|
# ~ > pacmd set-default-sink 8
|
||||||
|
# ~ > pacmd move-sink-input 3 8
|
||||||
|
|
||||||
|
# Function Key Bindings (💡)
|
||||||
|
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl ${displayBrightnessDevice} s +10";
|
||||||
|
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl ${displayBrightnessDevice} s 10-";
|
||||||
|
"SHIFT+XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl ${displayBrightnessDevice} s +1";
|
||||||
|
"SHIFT+XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl ${displayBrightnessDevice} s 1-";
|
||||||
|
|
||||||
|
"XF86KbdBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl ${keyboardBrightnessDevice} s +1";
|
||||||
|
"XF86KbdBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl ${keyboardBrightnessDevice} s 1-";
|
||||||
|
|
||||||
|
# Dunst Key Bindings
|
||||||
|
# See: man dunstctl.1
|
||||||
|
"Control+space" = "exec --no-startup-id dunstctl close-all";
|
||||||
|
"Control+grave" = "exec --no-startup-id dunstctl history-pop";
|
||||||
|
|
||||||
|
"${modifier}+d" = "mode displays";
|
||||||
|
"${modifier}+r" = "mode resize";
|
||||||
|
};
|
||||||
|
|
||||||
|
modes = {
|
||||||
|
resize = {
|
||||||
|
"h" = "resize shrink width 10 px or 10 ppt";
|
||||||
|
"j" = "resize grow height 10 px or 10 ppt";
|
||||||
|
"k" = "resize shrink height 10 px or 10 ppt";
|
||||||
|
"l" = "resize grow width 10 px or 10 ppt";
|
||||||
|
"Shift+h" = "resize shrink width 50 px or 50 ppt";
|
||||||
|
"Shift+j" = "resize grow height 50 px or 50 ppt";
|
||||||
|
"Shift+k" = "resize shrink height 50 px or 50 ppt";
|
||||||
|
"Shift+l" = "resize grow width 50 px or 50 ppt";
|
||||||
|
|
||||||
|
# same bindings, but for the arrow keys
|
||||||
|
"Left" = "resize shrink width 10 px or 10 ppt";
|
||||||
|
"Down" = "resize grow height 10 px or 10 ppt";
|
||||||
|
"Up" = "resize shrink height 10 px or 10 ppt";
|
||||||
|
"Right" = "resize grow width 10 px or 10 ppt";
|
||||||
|
|
||||||
|
# back to normal: Enter or Escape
|
||||||
|
"Return" = "mode default";
|
||||||
|
"Escape" = "mode default";
|
||||||
|
};
|
||||||
|
# "display setup: [a]uto [e]extern only [h]ome [o]ffice" = {
|
||||||
|
displays = {
|
||||||
|
"a" = "exec xrandr --auto ${displayDefaults} && ${pkgs.brightnessctl}/bin/brightnessctl --device ${displayBrightnessDevice} s 10;";
|
||||||
|
"e" = "exec xrandr --auto --output ${displayBuiltInOutput} --off";
|
||||||
|
"h" = "exec xrandr --output ${displayBuiltInOutput} --off --output DP1 --scale 1x1 --mode 2560x1440";
|
||||||
|
"o" = "exec xrandr --output DP2 --primary --mode 3840x2160 --scale 0.65x0.65 --output ${displayBuiltInOutput} --off";
|
||||||
|
|
||||||
|
# Mirror
|
||||||
|
# xrandr --output ${displayBuiltInOutput} --rate 60 --mode 1920x1080 --fb 1920x1080 --output DP1 --mode 1920x1080 --same-as ${displayBuiltInOutput}
|
||||||
|
# To turn off, use position, e.g.:
|
||||||
|
# xrandr --output DP1 --right-of ${displayBuiltInOutput}
|
||||||
|
|
||||||
|
# Hikari present
|
||||||
|
# xrandr --output eDP-1 --same-as HDMI-1 --scale 1.5x1.5 --output HDMI-1 --mode 1920x1080
|
||||||
|
|
||||||
|
# back to normal: Enter or Escape
|
||||||
|
"Return" = "mode default";
|
||||||
|
"Escape" = "mode default";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
236
home/xdg.nix
236
home/xdg.nix
|
@ -1,140 +1,142 @@
|
||||||
{
|
{
|
||||||
pkgs
|
pkgs
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
enable = true;
|
xdg = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
configFile = {
|
configFile = {
|
||||||
|
|
||||||
"i3blocks/config".source = ./files/i3-blocks;
|
"i3blocks/config".source = ./files/i3-blocks;
|
||||||
|
|
||||||
"borg/exclude".source = ./files/borg-exclude;
|
"borg/exclude".source = ./files/borg-exclude;
|
||||||
"ctags/config.ctags".source = ./files/ctags;
|
"ctags/config.ctags".source = ./files/ctags;
|
||||||
"sc-im/scimrc".source = ./files/scimrc;
|
"sc-im/scimrc".source = ./files/scimrc;
|
||||||
"ncdu/config".source = ./files/ncdu;
|
"ncdu/config".source = ./files/ncdu;
|
||||||
"keepassxc/keepassxc.ini".text = pkgs.lib.generators.toINI { } (import ./files/keepassxc-ini.nix);
|
"keepassxc/keepassxc.ini".text = pkgs.lib.generators.toINI { } (import ./files/keepassxc-ini.nix);
|
||||||
"litecli/config".source = ./files/litecli;
|
"litecli/config".source = ./files/litecli;
|
||||||
"phpactor".source = ./files/phpactor;
|
"phpactor".source = ./files/phpactor;
|
||||||
"tig/config".source = ./files/tig;
|
"tig/config".source = ./files/tig;
|
||||||
"yamllint/config".source = ./files/yamllint/config;
|
"yamllint/config".source = ./files/yamllint/config;
|
||||||
|
|
||||||
# Music player
|
# Music player
|
||||||
"cmus/rc".source = ./files/cmus/rc;
|
"cmus/rc".source = ./files/cmus/rc;
|
||||||
"cmus/smyckblue.theme".source = ./files/cmus/smyckblue.theme;
|
"cmus/smyckblue.theme".source = ./files/cmus/smyckblue.theme;
|
||||||
|
|
||||||
"networkmanager-dmenu/config.ini".text = pkgs.lib.generators.toINI { } {
|
"networkmanager-dmenu/config.ini".text = pkgs.lib.generators.toINI { } {
|
||||||
dmenu = {
|
dmenu = {
|
||||||
dmenu_command = "dmenu -i -l 25";
|
dmenu_command = "dmenu -i -l 25";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"composer/update-channel".text = "stable";
|
||||||
|
"composer/auth.json".source = ./files/composer/auth.json;
|
||||||
|
|
||||||
|
"containers/registries.conf".source = ./files/containers/registries.conf;
|
||||||
|
|
||||||
|
# Handbrake
|
||||||
|
"ghb/preferences.json".source = ./files/ghb/preferences.json;
|
||||||
|
"ghb/presets.json".source = ./files/ghb/presets.json;
|
||||||
|
|
||||||
|
"rclone/rclone.conf".source = ./files/rclone.conf;
|
||||||
|
|
||||||
|
"docker/config.json".source = ./files/docker/config.json;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
dataFile = {
|
||||||
|
"xsd/xliff-core-1.2-strict.xsd".source = pkgs.fetchurl {
|
||||||
|
url = "https://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd";
|
||||||
|
sha256 = "nzevVk7NJ9X2kVTXz+e6jesfYgyBuUzw6rH0IFx01fg=";
|
||||||
|
};
|
||||||
|
"typo3-configuration".source = ./files/typo3-configuration;
|
||||||
|
};
|
||||||
|
|
||||||
|
desktopEntries = {
|
||||||
|
kimai = {
|
||||||
|
name = "Kimai Time Tracking";
|
||||||
|
type = "Application";
|
||||||
|
exec = "firefox --new-instance -P time-tracking --class=\"time-tracking\" https://track.codappix.com";
|
||||||
|
};
|
||||||
|
mailhog-ui = {
|
||||||
|
name = "Mailhog";
|
||||||
|
type = "Application";
|
||||||
|
exec = "firefox --new-instance -P mailhog --class=\"mailhog\" https://mailhog.localhost";
|
||||||
|
};
|
||||||
|
microsoft-teams = {
|
||||||
|
name = "Microsoft Teams";
|
||||||
|
type = "Application";
|
||||||
|
exec = "${pkgs.chromium}/bin/chromium --class=\"chat\" --new-window --app=https://teams.microsoft.com/ --user-agent=\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\"";
|
||||||
|
};
|
||||||
|
jitsi = {
|
||||||
|
name = "Jitsi";
|
||||||
|
type = "Application";
|
||||||
|
exec = "${pkgs.chromium}/bin/chromium --class=\"chat\" --new-window --app=https://meet.codappix.com/";
|
||||||
|
};
|
||||||
|
slack-codappix = {
|
||||||
|
name = "Slack: Codappix";
|
||||||
|
type = "Application";
|
||||||
|
exec = "${pkgs.chromium}/bin/chromium --class=\"chat\" --new-window --app=https://codappix.slack.com/";
|
||||||
|
};
|
||||||
|
slack-typo3 = {
|
||||||
|
name = "Slack: TYPO3";
|
||||||
|
type = "Application";
|
||||||
|
exec = "${pkgs.chromium}/bin/chromium --class=\"chat\" --new-window --app=https://typo3.slack.com/";
|
||||||
|
};
|
||||||
|
slack-sac = {
|
||||||
|
name = "Slack: SAC";
|
||||||
|
type = "Application";
|
||||||
|
exec = "${pkgs.chromium}/bin/chromium --class=\"chat\" --new-window --app=https://saccas.slack.com/";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
"composer/update-channel".text = "stable";
|
mime.enable = true;
|
||||||
"composer/auth.json".source = ./files/composer/auth.json;
|
mimeApps = {
|
||||||
|
enable = true;
|
||||||
|
# Use file --mime-type <filename> to detect mime type
|
||||||
|
defaultApplications = {
|
||||||
|
|
||||||
"containers/registries.conf".source = ./files/containers/registries.conf;
|
"inode/directory" = [ "org.gnome.Nautilus.desktop" ];
|
||||||
|
|
||||||
# Handbrake
|
"text/calendar" = [ "org.kde.korganizer.desktop" ];
|
||||||
"ghb/preferences.json".source = ./files/ghb/preferences.json;
|
|
||||||
"ghb/presets.json".source = ./files/ghb/presets.json;
|
|
||||||
|
|
||||||
"rclone/rclone.conf".source = ./files/rclone.conf;
|
"application/pdf" = [ "org.pwmt.zathura-pdf-mupdf.desktop" ];
|
||||||
|
|
||||||
"docker/config.json".source = ./files/docker/config.json;
|
# Browser
|
||||||
|
"text/html" = [ "firefox.desktop" ];
|
||||||
|
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
||||||
|
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
||||||
|
|
||||||
};
|
# Images
|
||||||
|
"image/bmp" = [ "feh.desktop" ];
|
||||||
|
"image/gif" = [ "feh.desktop" ];
|
||||||
|
"image/jpeg" = [ "feh.desktop" ];
|
||||||
|
"image/jpg" = [ "feh.desktop" ];
|
||||||
|
"image/pjpeg" = [ "feh.desktop" ];
|
||||||
|
"image/png" = [ "feh.desktop" ];
|
||||||
|
"image/tiff" = [ "feh.desktop" ];
|
||||||
|
"image/webp" = [ "feh.desktop" ];
|
||||||
|
"image/x-bmp" = [ "feh.desktop" ];
|
||||||
|
"image/x-pcx" = [ "feh.desktop" ];
|
||||||
|
"image/x-png" = [ "feh.desktop" ];
|
||||||
|
"image/x-portable-anymap" = [ "feh.desktop" ];
|
||||||
|
"image/x-portable-bitmap" = [ "feh.desktop" ];
|
||||||
|
"image/x-portable-graymap" = [ "feh.desktop" ];
|
||||||
|
"image/x-portable-pixmap" = [ "feh.desktop" ];
|
||||||
|
"image/x-tga" = [ "feh.desktop" ];
|
||||||
|
"image/x-xbitmap" = [ "feh.desktop" ];
|
||||||
|
|
||||||
dataFile = {
|
# Audio
|
||||||
"xsd/xliff-core-1.2-strict.xsd".source = pkgs.fetchurl {
|
"audio/mpeg" = [ "vlc.desktop" ];
|
||||||
url = "https://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd";
|
|
||||||
sha256 = "nzevVk7NJ9X2kVTXz+e6jesfYgyBuUzw6rH0IFx01fg=";
|
|
||||||
};
|
|
||||||
"typo3-configuration".source = ./files/typo3-configuration;
|
|
||||||
};
|
|
||||||
|
|
||||||
desktopEntries = {
|
# Video
|
||||||
kimai = {
|
"video/mp4" = [ "vlc.desktop" ];
|
||||||
name = "Kimai Time Tracking";
|
"video/m4v" = [ "vlc.desktop" ];
|
||||||
type = "Application";
|
"video/x-matroska" = [ "vlc.desktop" ];
|
||||||
exec = "firefox --new-instance -P time-tracking --class=\"time-tracking\" https://track.codappix.com";
|
"video/quicktime" = [ "vlc.desktop" ];
|
||||||
};
|
};
|
||||||
mailhog-ui = {
|
|
||||||
name = "Mailhog";
|
|
||||||
type = "Application";
|
|
||||||
exec = "firefox --new-instance -P mailhog --class=\"mailhog\" https://mailhog.localhost";
|
|
||||||
};
|
|
||||||
microsoft-teams = {
|
|
||||||
name = "Microsoft Teams";
|
|
||||||
type = "Application";
|
|
||||||
exec = "${pkgs.chromium}/bin/chromium --class=\"chat\" --new-window --app=https://teams.microsoft.com/ --user-agent=\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\"";
|
|
||||||
};
|
|
||||||
jitsi = {
|
|
||||||
name = "Jitsi";
|
|
||||||
type = "Application";
|
|
||||||
exec = "${pkgs.chromium}/bin/chromium --class=\"chat\" --new-window --app=https://meet.codappix.com/";
|
|
||||||
};
|
|
||||||
slack-codappix = {
|
|
||||||
name = "Slack: Codappix";
|
|
||||||
type = "Application";
|
|
||||||
exec = "${pkgs.chromium}/bin/chromium --class=\"chat\" --new-window --app=https://codappix.slack.com/";
|
|
||||||
};
|
|
||||||
slack-typo3 = {
|
|
||||||
name = "Slack: TYPO3";
|
|
||||||
type = "Application";
|
|
||||||
exec = "${pkgs.chromium}/bin/chromium --class=\"chat\" --new-window --app=https://typo3.slack.com/";
|
|
||||||
};
|
|
||||||
slack-sac = {
|
|
||||||
name = "Slack: SAC";
|
|
||||||
type = "Application";
|
|
||||||
exec = "${pkgs.chromium}/bin/chromium --class=\"chat\" --new-window --app=https://saccas.slack.com/";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
mime.enable = true;
|
|
||||||
mimeApps = {
|
|
||||||
enable = true;
|
|
||||||
# Use file --mime-type <filename> to detect mime type
|
|
||||||
defaultApplications = {
|
|
||||||
|
|
||||||
"inode/directory" = [ "org.gnome.Nautilus.desktop" ];
|
|
||||||
|
|
||||||
"text/calendar" = [ "org.kde.korganizer.desktop" ];
|
|
||||||
|
|
||||||
"application/pdf" = [ "org.pwmt.zathura-pdf-mupdf.desktop" ];
|
|
||||||
|
|
||||||
# Browser
|
|
||||||
"text/html" = [ "firefox.desktop" ];
|
|
||||||
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
|
||||||
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
|
||||||
|
|
||||||
# Images
|
|
||||||
"image/bmp" = [ "feh.desktop" ];
|
|
||||||
"image/gif" = [ "feh.desktop" ];
|
|
||||||
"image/jpeg" = [ "feh.desktop" ];
|
|
||||||
"image/jpg" = [ "feh.desktop" ];
|
|
||||||
"image/pjpeg" = [ "feh.desktop" ];
|
|
||||||
"image/png" = [ "feh.desktop" ];
|
|
||||||
"image/tiff" = [ "feh.desktop" ];
|
|
||||||
"image/webp" = [ "feh.desktop" ];
|
|
||||||
"image/x-bmp" = [ "feh.desktop" ];
|
|
||||||
"image/x-pcx" = [ "feh.desktop" ];
|
|
||||||
"image/x-png" = [ "feh.desktop" ];
|
|
||||||
"image/x-portable-anymap" = [ "feh.desktop" ];
|
|
||||||
"image/x-portable-bitmap" = [ "feh.desktop" ];
|
|
||||||
"image/x-portable-graymap" = [ "feh.desktop" ];
|
|
||||||
"image/x-portable-pixmap" = [ "feh.desktop" ];
|
|
||||||
"image/x-tga" = [ "feh.desktop" ];
|
|
||||||
"image/x-xbitmap" = [ "feh.desktop" ];
|
|
||||||
|
|
||||||
# Audio
|
|
||||||
"audio/mpeg" = [ "vlc.desktop" ];
|
|
||||||
|
|
||||||
# Video
|
|
||||||
"video/mp4" = [ "vlc.desktop" ];
|
|
||||||
"video/m4v" = [ "vlc.desktop" ];
|
|
||||||
"video/x-matroska" = [ "vlc.desktop" ];
|
|
||||||
"video/quicktime" = [ "vlc.desktop" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
config
|
config
|
||||||
,pkgs
|
,pkgs
|
||||||
,hostName
|
,hostName
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -21,25 +22,23 @@ let
|
||||||
xinput --set-prop 'DELL07E6:00 06CB:76AF Touchpad' 'libinput Natural Scrolling Enabled' 1
|
xinput --set-prop 'DELL07E6:00 06CB:76AF Touchpad' 'libinput Natural Scrolling Enabled' 1
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
enable = true;
|
xsession = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
numlock.enable = true;
|
numlock.enable = true;
|
||||||
|
|
||||||
initExtra = (if hostName == "hikari" then initExtraHikari else initExtraHikari2) + ''
|
initExtra = (if hostName == "hikari" then initExtraHikari else initExtraHikari2) + ''
|
||||||
# Set backlight of output
|
# Set backlight of output
|
||||||
xbacklight -set 25
|
xbacklight -set 25
|
||||||
|
|
||||||
# Set background color
|
# Set background color
|
||||||
xsetroot -solid "#2E3436"
|
xsetroot -solid "#2E3436"
|
||||||
|
|
||||||
# Disable screen saver
|
# Disable screen saver
|
||||||
xset s off
|
xset s off
|
||||||
|
|
||||||
# Increase mouse speed
|
# Increase mouse speed
|
||||||
xinput --set-prop 13 'libinput Accel Speed' 1
|
xinput --set-prop 13 'libinput Accel Speed' 1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
windowManager.i3 = import ./windowManager/i3.nix {
|
|
||||||
inherit config pkgs hostName;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue