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:
Daniel Siepmann 2024-05-30 13:07:50 +02:00
parent 2df4d4eeae
commit d9ba963dad
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
16 changed files with 751 additions and 754 deletions

View file

@ -5,10 +5,10 @@
,...
}:
let
hostName = builtins.replaceStrings ["\n"] [""] (builtins.readFile /etc/hostname);
in {
{
_module.args = {
hostName = builtins.replaceStrings ["\n"] [""] (builtins.readFile /etc/hostname);
};
imports = [
./home/modules/programs/cmus.nix
@ -16,6 +16,22 @@ in {
./home/modules/programs/languagetool.nix
./home/modules/programs/mailhog.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 = [
@ -38,64 +54,16 @@ in {
# changes in each release.
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;
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;
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 = {
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
];
permittedInsecurePackages = [
];
};
}

Binary file not shown.

View file

@ -1,34 +1,37 @@
{
lib
,...
}:
{
enable = true;
settings = {
"org/gtk/settings/file-chooser" = {
date-format = "with-time";
location-mode = "path-bar";
show-hidden = false;
show-size-column = true;
show-type-column = true;
sidebar-width = 249;
sort-column = "size";
sort-directories-first = true;
sort-order = "ascending";
type-format = "category";
window-position = lib.hm.gvariant.mkTuple [652 415];
window-size = lib.hm.gvariant.mkTuple [1256 634];
};
dconf = {
enable = true;
settings = {
"org/gtk/settings/file-chooser" = {
date-format = "with-time";
location-mode = "path-bar";
show-hidden = false;
show-size-column = true;
show-type-column = true;
sidebar-width = 249;
sort-column = "size";
sort-directories-first = true;
sort-order = "ascending";
type-format = "category";
window-position = lib.hm.gvariant.mkTuple [652 415];
window-size = lib.hm.gvariant.mkTuple [1256 634];
};
"org/gnome/sound-juicer" = {
audio-profile = "audio/mpeg";
base-uri = "file:///home/daniels/Music";
device = "/dev/sr0";
eject = true;
file-pattern = "%dn - %tt";
path-pattern = "%aa/%at";
strip-special = true;
volume = 1.0;
"org/gnome/sound-juicer" = {
audio-profile = "audio/mpeg";
base-uri = "file:///home/daniels/Music";
device = "/dev/sr0";
eject = true;
file-pattern = "%dn - %tt";
path-pattern = "%aa/%at";
strip-special = true;
volume = 1.0;
};
};
};
}

View file

@ -1,7 +1,9 @@
_:
{
".nix-channels".source = ./files/nix-channels;
".profile".source = ./files/profile;
".myclirc".source = ./files/myclirc;
home.file = {
".nix-channels".source = ./files/nix-channels;
".profile".source = ./files/profile;
".myclirc".source = ./files/myclirc;
};
}

View file

@ -1,6 +1,7 @@
{
config
,pkgs
,...
}:
# Possible alternatives:
@ -9,39 +10,40 @@
# And maybe use https://github.com/themix-project/oomox to adjust the color to follow my color scheme
{
enable = true;
gtk = {
enable = true;
theme = {
package = pkgs.qogir-theme;
name = "Qogir-Dark";
};
theme = {
package = pkgs.qogir-theme;
name = "Qogir-Dark";
};
iconTheme = {
package = pkgs.qogir-icon-theme;
name = "Qogir-dark";
};
iconTheme = {
package = pkgs.qogir-icon-theme;
name = "Qogir-dark";
};
font = {
package = pkgs.roboto-mono;
name = "Roboto Mono";
size = 14;
};
font = {
package = pkgs.roboto-mono;
name = "Roboto Mono";
size = 14;
};
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
gtk3 = {
bookmarks = [
"file:///home/daniels/Downloads Downloads"
];
extraConfig = {
gtk3 = {
bookmarks = [
"file:///home/daniels/Downloads Downloads"
];
extraConfig = {
gtk-application-prefer-dark-theme = 1;
gtk-enable-animations = 0;
};
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = 1;
gtk-enable-animations = 0;
};
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = 1;
gtk-enable-animations = 0;
};
}

View file

@ -2,6 +2,7 @@
config
,pkgs
,hostName
,...
}:
let
@ -9,7 +10,7 @@ let
deLocale = "de_DE.utf8";
in {
home = {
language = {
# English
@ -104,4 +105,5 @@ in {
};
enableNixpkgsReleaseCheck = true;
};
}

View file

@ -1,101 +1,102 @@
{
pkgs
,hostName
,...
}:
with pkgs; [
nix
cacert
nvd
{
home.packages = with pkgs; [
nix
cacert
nvd
# System tools
dmenu
gnome.gnome-screenshot
libnotify # Provide notify-send command
# System tools
dmenu
gnome.gnome-screenshot
libnotify # Provide notify-send command
networkmanager_dmenu
i3blocks
st
ncdu
tree
networkmanager_dmenu
i3blocks
st
ncdu
tree
borgbackup
keepassxc
# Git itself is installed via git module
git-crypt
borgbackup
keepassxc
# Git itself is installed via git module
git-crypt
rclone
rclone
# Dev tools
litecli
sqlite
mycli
mkcert # TODO: Create own wrapper script to create new certs
tig
universal-ctags
ripgrep
curl
wget
# Can be installed ad-hock, I don't need it that often.
# kcachegrind
# Should be part of shell.nix for corresponding projects
# geckodriver
# Dev tools
litecli
sqlite
mycli
mkcert # TODO: Create own wrapper script to create new certs
tig
universal-ctags
ripgrep
curl
wget
# Can be installed ad-hock, I don't need it that often.
# kcachegrind
# Should be part of shell.nix for corresponding projects
# geckodriver
podman-compose
# Dependencies of podman-compose
podman
podman-compose
# Dependencies of podman-compose
podman
# Coding / Neovim
# Does not provide any autocompletion yet, don't know why
# Use in conjuncion with https://github.com/autozimu/LanguageClient-neovim
# rnix-lsp
# Coding / Neovim
# Does not provide any autocompletion yet, don't know why
# Use in conjuncion with https://github.com/autozimu/LanguageClient-neovim
# rnix-lsp
# Communication
thunderbird
# Communication
thunderbird
# Media
vlc
# gtkpod
feh
# python311Packages.mutagen
# spotdl
# tenacity
# 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'
yt-dlp
# Start Google Chrome: NIXPKGS_ALLOW_UNFREE=1 nix-shell -p google-chrome --run google-chrome-stable
ffmpeg-full # full in order to grab x11
# Recording system audio while keeping audio quite:
# 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
# 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
# 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
# Find list of audio on ubuntu: pactl list | grep -A2 'Source #' | grep 'Name: '
# Media
vlc
# gtkpod
feh
# python311Packages.mutagen
# spotdl
# tenacity
# 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'
yt-dlp
# Start Google Chrome: NIXPKGS_ALLOW_UNFREE=1 nix-shell -p google-chrome --run google-chrome-stable
ffmpeg-full # full in order to grab x11
# Recording system audio while keeping audio quite:
# 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
# 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
# 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
# Find list of audio on ubuntu: pactl list | grep -A2 'Source #' | grep 'Name: '
chromium
chromium
unzip
unzip
gtk-engine-murrine
] ++ (if hostName == "hikari" then [
# hikari
gtk-engine-murrine
] ++ (if hostName == "hikari" then [
# hikari
acpilight # Used to support xbacklight
acpilight # Used to support xbacklight
(callPackage ./packages/custom/update-nixos-system { })
handbrake
# Needs to be installed by ubuntu on ubuntu, therefore only add on hikari
sound-juicer
(callPackage ./packages/custom/update-nixos-system { })
handbrake
# Needs to be installed by ubuntu on ubuntu, therefore only add on hikari
sound-juicer
] else [
# hikari 2
] else [
# hikari 2
(callPackage ./packages/custom/update-ubuntu-system { })
# TODO: Right now only for Ubuntu (hikari2) system
(callPackage ./packages/custom/backup { })
(callPackage ./packages/custom/vpn-reuter-dynamics { })
]) ++ (callPackage ./packages/custom {
inherit hostName;
})
(callPackage ./packages/custom/update-ubuntu-system { })
# TODO: Right now only for Ubuntu (hikari2) system
(callPackage ./packages/custom/backup { })
(callPackage ./packages/custom/vpn-reuter-dynamics { })
]);
}

View file

@ -1,19 +1,22 @@
{
callPackage
pkgs
,hostName
,...
}:
[
(callPackage ./dmenu-scripts { })
(callPackage ./update-system { })
(callPackage ./nextcloud-sync/from-local.nix { })
(callPackage ./nextcloud-sync/from-remote.nix { })
(callPackage ./typo3-documentation-rendering { })
(callPackage ./typo3-documentation-rendering-old { })
(callPackage ./typo3-serve-testing-instance { })
(callPackage ./typo3-push-core { })
(callPackage ./zcat-progress { })
(callPackage ./project {
inherit hostName;
})
]
{
home.packages = [
(pkgs.callPackage ./dmenu-scripts { })
(pkgs.callPackage ./update-system { })
(pkgs.callPackage ./nextcloud-sync/from-local.nix { })
(pkgs.callPackage ./nextcloud-sync/from-remote.nix { })
(pkgs.callPackage ./typo3-documentation-rendering { })
(pkgs.callPackage ./typo3-documentation-rendering-old { })
(pkgs.callPackage ./typo3-serve-testing-instance { })
(pkgs.callPackage ./typo3-push-core { })
(pkgs.callPackage ./zcat-progress { })
(pkgs.callPackage ./project {
inherit hostName;
})
];
}

View file

@ -2,6 +2,7 @@
config
,pkgs
,hostName
,...
}:
let
@ -10,55 +11,57 @@ let
};
in {
# Let Home Manager install and manage itself.
home-manager.enable = true;
programs = {
# Let Home Manager install and manage itself.
home-manager.enable = true;
neovim = import ./programs/neovim.nix {
inherit pkgs sqlformat;
neovim = import ./programs/neovim.nix {
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;
}

View file

@ -1,29 +1,31 @@
{
pkgs
,...
}:
{
enable = true;
nix = {
enable = true;
package = pkgs.nix;
package = pkgs.nix;
settings = {
settings = {
experimental-features = [
"nix-command"
"flakes"
];
experimental-features = [
"nix-command"
"flakes"
];
substituters = [
"https://cache.nixos.org"
"https://fossar.cachix.org"
];
substituters = [
"https://cache.nixos.org"
"https://fossar.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"fossar.cachix.org-1:Zv6FuqIboeHPWQS7ysLCJ7UT7xExb4OE8c4LyGb5AsE="
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"fossar.cachix.org-1:Zv6FuqIboeHPWQS7ysLCJ7UT7xExb4OE8c4LyGb5AsE="
];
};
};
}

View file

@ -1,12 +1,15 @@
{
pkgs
,...
}:
{
enable = true;
qt = {
enable = true;
platformTheme = {
# Re use existing gtk theme
name = "gtk";
platformTheme = {
# Re use existing gtk theme
name = "gtk";
};
};
}

View file

@ -2,27 +2,28 @@
config
,hostName
,pkgs
,...
}:
{
services = {
dunst = import ./services/dunst.nix {
inherit config;
};
dunst = import ./services/dunst.nix {
inherit config;
};
gpg-agent = import ./services/gpg-agent.nix {
inherit pkgs;
};
gpg-agent = import ./services/gpg-agent.nix {
inherit pkgs;
};
vdirsyncer = {
enable = true;
frequency = "Mon..Thu *-*-* 15,12,8:00";
};
vdirsyncer = {
enable = true;
frequency = "Mon..Thu *-*-* 15,12,8:00";
};
languagetool.enable = true;
mailhog.enable = true;
} // (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 {
});
}

View file

@ -1,17 +1,20 @@
{
config
,pkgs
,...
}:
{
services = {
batteryicon = import ./services/batteryicon.nix {
inherit pkgs;
systemd.user = {
services = {
batteryicon = import ./services/batteryicon.nix {
inherit pkgs;
};
};
};
tmpfiles.rules = [
"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}"
];
tmpfiles.rules = [
"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}"
];
};
}

View file

@ -2,13 +2,14 @@
config
,pkgs
,hostName
,...
}:
# 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
let
modifier = config.xsession.windowManager.i3.config.modifier;
inherit(config.xsession.windowManager.i3.config) modifier;
soundSwitcherForHikari2 = if hostName == "hikari" then "" else "-D pulse";
keyboardBrightnessDevice = if hostName == "hikari" then "--device smc::kbd_backlight" else "";
@ -16,366 +17,368 @@ let
displayBuiltInOutput = if hostName == "hikari" then "eDP-1" else "eDP1";
displayDefaults = if hostName == "hikari" then "--output ${displayBuiltInOutput} --mode 1366x768 --scale 1.25x1.25" else "";
in {
enable = true;
config = {
xsession.windowManager.i3 = {
enable = true;
config = {
modifier = "Mod4";
modifier = "Mod4";
workspaceLayout = "tabbed";
workspaceAutoBackAndForth = true;
workspaceLayout = "tabbed";
workspaceAutoBackAndForth = true;
defaultWorkspace = "workspace 1";
defaultWorkspace = "workspace 1";
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";
menu = "i3-dmenu-desktop";
fonts = {
names = ["monospace"];
names = [ "monospace" ];
style = "Bold";
size = 12.0;
};
colors = {
background = "#000000";
statusline = "#72B3CC";
separator = "#72B3CC";
focusedWorkspace = {
border = "#72B3CC";
background = "#000000";
text = "#72B3CC";
};
activeWorkspace = {
background = "#2E3436";
focused = {
border = "#000000";
background = "#000000";
text = "#72B3CC";
indicator = "#72B3CC";
childBorder = "#000000";
};
inactiveWorkspace = {
focusedInactive = {
border = "#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";
background = "#72B3CC";
text = "#FFFFFF";
indicator = "#72B3CC";
childBorder = "#72B3CC";
};
bindingMode = {
border = "#72B3CC";
background = "#72B3CC";
text = "#FFFFFF";
placeholder = {
border = "#000000";
background = "#000000";
text = "#D3D7CF";
indicator = "#000000";
childBorder = "#000000";
};
};
extraConfig = ''
separator_symbol " "
'';
}];
bars = [{
mode = "hide";
position = "top";
window = {
titlebar = true;
border = 0;
hideEdgeBorders = "both";
workspaceButtons = true;
workspaceNumbers = true;
commands = [
{
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$"; };
}
];
};
statusCommand = "i3blocks";
floating = {
titlebar = true;
border = 0;
fonts = {
names = ["monospace"];
style = "Bold";
size = 12.0;
};
criteria = [
{ "class" = "KeePassXC"; }
];
};
colors = {
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)
# 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$"; }
];
};
extraConfig = ''
separator_symbol " "
'';
}];
startup = [
# Start programs / applets
{
command = "nm-applet";
notification = false;
}
{
command = "${pkgs.udiskie}/bin/udiskie --smart-tray";
notification = false;
}
];
window = {
titlebar = true;
border = 0;
hideEdgeBorders = "both";
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";
commands = [
{
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$"; };
}
];
};
# "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}
floating = {
titlebar = true;
border = 0;
# 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";
criteria = [
{ "class" = "KeePassXC"; }
];
};
};
# 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";
};
};
};
};
}

View file

@ -1,140 +1,142 @@
{
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;
"ctags/config.ctags".source = ./files/ctags;
"sc-im/scimrc".source = ./files/scimrc;
"ncdu/config".source = ./files/ncdu;
"keepassxc/keepassxc.ini".text = pkgs.lib.generators.toINI { } (import ./files/keepassxc-ini.nix);
"litecli/config".source = ./files/litecli;
"phpactor".source = ./files/phpactor;
"tig/config".source = ./files/tig;
"yamllint/config".source = ./files/yamllint/config;
"borg/exclude".source = ./files/borg-exclude;
"ctags/config.ctags".source = ./files/ctags;
"sc-im/scimrc".source = ./files/scimrc;
"ncdu/config".source = ./files/ncdu;
"keepassxc/keepassxc.ini".text = pkgs.lib.generators.toINI { } (import ./files/keepassxc-ini.nix);
"litecli/config".source = ./files/litecli;
"phpactor".source = ./files/phpactor;
"tig/config".source = ./files/tig;
"yamllint/config".source = ./files/yamllint/config;
# Music player
"cmus/rc".source = ./files/cmus/rc;
"cmus/smyckblue.theme".source = ./files/cmus/smyckblue.theme;
# Music player
"cmus/rc".source = ./files/cmus/rc;
"cmus/smyckblue.theme".source = ./files/cmus/smyckblue.theme;
"networkmanager-dmenu/config.ini".text = pkgs.lib.generators.toINI { } {
dmenu = {
dmenu_command = "dmenu -i -l 25";
"networkmanager-dmenu/config.ini".text = pkgs.lib.generators.toINI { } {
dmenu = {
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";
"composer/auth.json".source = ./files/composer/auth.json;
mime.enable = true;
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
"ghb/preferences.json".source = ./files/ghb/preferences.json;
"ghb/presets.json".source = ./files/ghb/presets.json;
"text/calendar" = [ "org.kde.korganizer.desktop" ];
"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 = {
"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;
};
# Audio
"audio/mpeg" = [ "vlc.desktop" ];
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/";
# Video
"video/mp4" = [ "vlc.desktop" ];
"video/m4v" = [ "vlc.desktop" ];
"video/x-matroska" = [ "vlc.desktop" ];
"video/quicktime" = [ "vlc.desktop" ];
};
};
};
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" ];
};
};
}

View file

@ -2,6 +2,7 @@
config
,pkgs
,hostName
,...
}:
let
@ -21,25 +22,23 @@ let
xinput --set-prop 'DELL07E6:00 06CB:76AF Touchpad' 'libinput Natural Scrolling Enabled' 1
'';
in {
enable = true;
xsession = {
enable = true;
numlock.enable = true;
numlock.enable = true;
initExtra = (if hostName == "hikari" then initExtraHikari else initExtraHikari2) + ''
# Set backlight of output
xbacklight -set 25
initExtra = (if hostName == "hikari" then initExtraHikari else initExtraHikari2) + ''
# Set backlight of output
xbacklight -set 25
# Set background color
xsetroot -solid "#2E3436"
# Set background color
xsetroot -solid "#2E3436"
# Disable screen saver
xset s off
# Disable screen saver
xset s off
# Increase mouse speed
xinput --set-prop 13 'libinput Accel Speed' 1
'';
windowManager.i3 = import ./windowManager/i3.nix {
inherit config pkgs hostName;
# Increase mouse speed
xinput --set-prop 13 'libinput Accel Speed' 1
'';
};
}