2024-06-13 15:38:40 +02:00
|
|
|
args @ { inputs, lib, config, pkgs, ... }:
|
|
|
|
let
|
|
|
|
importCfg = ({prefix, name}:
|
|
|
|
let
|
|
|
|
cfg_path = ./${prefix}/${name}.nix;
|
|
|
|
in (
|
|
|
|
if builtins.pathExists cfg_path then (
|
|
|
|
((import cfg_path) args)
|
|
|
|
) else (
|
|
|
|
{ enable = true; }
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
2024-06-15 21:59:32 +02:00
|
|
|
in rec {
|
2024-06-13 15:38:40 +02:00
|
|
|
home.stateVersion = "23.11";
|
|
|
|
home.username = "krizej";
|
|
|
|
home.homeDirectory = "/home/krizej";
|
|
|
|
|
|
|
|
services = lib.genAttrs (import ./services)
|
|
|
|
(cfg_name: importCfg { prefix = "services"; name = cfg_name; });
|
|
|
|
|
|
|
|
programs = lib.genAttrs (import ./programs)
|
|
|
|
(cfg_name: importCfg { prefix = "programs"; name = cfg_name; });
|
2024-06-18 01:04:32 +02:00
|
|
|
|
|
|
|
home.packages = with pkgs; [
|
2024-06-13 15:38:40 +02:00
|
|
|
xarchiver
|
|
|
|
fortune
|
2024-06-15 21:59:32 +02:00
|
|
|
jetbrains.pycharm-community
|
2024-06-18 01:04:32 +02:00
|
|
|
jetbrains.clion
|
2024-06-15 21:59:32 +02:00
|
|
|
# android-studio
|
|
|
|
# android-tools
|
2024-06-13 15:38:40 +02:00
|
|
|
feh
|
|
|
|
element-desktop
|
|
|
|
lxappearance
|
|
|
|
pavucontrol
|
|
|
|
ezquake
|
|
|
|
discord
|
|
|
|
libreoffice-qt
|
|
|
|
wineWowPackages.stable
|
|
|
|
winetricks
|
2024-06-15 21:59:32 +02:00
|
|
|
pamixer
|
|
|
|
gimp
|
|
|
|
xorg.xkill
|
2024-06-17 16:36:50 +02:00
|
|
|
gamemode
|
|
|
|
gdb
|
|
|
|
trenchbroom
|
|
|
|
vkquake
|
|
|
|
ericw-tools
|
|
|
|
xdotool
|
|
|
|
yad
|
2024-06-18 01:04:32 +02:00
|
|
|
pcmanfm
|
|
|
|
gvfs
|
2024-06-21 17:54:41 +02:00
|
|
|
sqlitebrowser
|
|
|
|
xdg-desktop-portal
|
|
|
|
xdg-desktop-portal-gnome
|
2024-06-13 15:38:40 +02:00
|
|
|
# # It is sometimes useful to fine-tune packages, for example, by applying
|
|
|
|
# # overrides. You can do that directly here, just don't forget the
|
|
|
|
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
|
|
|
# # fonts?
|
|
|
|
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
|
|
|
|
2024-06-18 01:04:32 +02:00
|
|
|
|
2024-06-13 15:38:40 +02:00
|
|
|
# # You can also create simple shell scripts directly inside your
|
|
|
|
# # configuration. For example, this adds a command 'my-hello' to your
|
|
|
|
# # environment:
|
|
|
|
# (pkgs.writeShellScriptBin "my-hello" ''
|
|
|
|
# echo "Hello, ${config.home.username}!"
|
|
|
|
# '')
|
2024-06-17 16:36:50 +02:00
|
|
|
|
|
|
|
(pkgs.writeShellScriptBin "i3custom-center-mouse-on-focus" ''
|
|
|
|
eval $(xdotool getwindowfocus getwindowgeometry --shell)
|
|
|
|
MX=$(($X + $WIDTH / 2))
|
|
|
|
MY=$(($Y + $HEIGHT / 2))
|
|
|
|
xdotool mousemove $MX $MY
|
|
|
|
'')
|
|
|
|
|
|
|
|
(pkgs.writeShellScriptBin "i3custom-window-actions" ''
|
2024-06-18 01:04:32 +02:00
|
|
|
yad --splash --mouse --close-on-unfocus --undecorated \
|
|
|
|
--gtkrc="${home.homeDirectory}/.config/i3/i3gtk.css" \
|
|
|
|
--text="i3 window actions" \
|
|
|
|
--button float:0 --button kill:1
|
|
|
|
|
2024-06-17 16:36:50 +02:00
|
|
|
case $? in
|
|
|
|
0) i3custom-floating-toggle;;
|
|
|
|
1) i3-msg "kill";;
|
|
|
|
-1) ;;
|
|
|
|
esac
|
|
|
|
'')
|
|
|
|
|
|
|
|
(pkgs.writeShellScriptBin "i3custom-floating-toggle" ''
|
|
|
|
i3-msg "mark --add _; [con_mark=f] floating disable, border pixel 1, mark --add --toggle _; [con_mark=_] floating enable, border normal; mark --add --toggle f;"
|
|
|
|
'')
|
2024-06-13 15:38:40 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
home.file = {
|
2024-06-15 21:59:32 +02:00
|
|
|
".config/i3/workspace2.json".source = files/workspace2.json;
|
2024-06-18 01:04:32 +02:00
|
|
|
".config/i3/i3gtk.css".source = files/i3gtk.css;
|
|
|
|
# FIXME not .vim bro!!!!!!!!!
|
|
|
|
".vim/colors/darcula.vim".source = files/darcula.vim;
|
2024-06-13 15:38:40 +02:00
|
|
|
# # You can also set the file content immediately.
|
|
|
|
# ".gradle/gradle.properties".text = ''
|
|
|
|
# org.gradle.console=verbose
|
|
|
|
# org.gradle.daemon.idletimeout=3600000
|
|
|
|
# '';
|
|
|
|
};
|
|
|
|
|
2024-06-18 01:04:32 +02:00
|
|
|
home.sessionVariables = let
|
|
|
|
HOME = home.homeDirectory;
|
|
|
|
in rec {
|
2024-06-13 15:38:40 +02:00
|
|
|
EDITOR = "vim";
|
|
|
|
MANSECT = "2:3:3p:3type:1:1p:n:l:8:0:0p:5:4:9:6:7";
|
|
|
|
|
|
|
|
# xdg crap thx poz
|
2024-06-15 21:59:32 +02:00
|
|
|
XDG_DATA_HOME = "${HOME}/.local/share";
|
|
|
|
XDG_CONFIG_HOME = "${HOME}/.config";
|
|
|
|
XDG_STATE_HOME = "${HOME}/.local/state";
|
|
|
|
XDG_CACHE_HOME = "${HOME}/.cache";
|
|
|
|
ANDROID_USER_HOME = "${XDG_DATA_HOME}/android";
|
|
|
|
ANDROID_HOME = "${XDG_DATA_HOME}/android/sdk";
|
|
|
|
GRADLE_USER_HOME = "${XDG_DATA_HOME}/gradle";
|
|
|
|
PYTHONSTARTUP = "${XDG_CONFIG_HOME}/python/pythonrc";
|
|
|
|
HISTFILE = "${XDG_CACHE_HOME}/bash/history";
|
|
|
|
CARGO_HOME = "${XDG_DATA_HOME}/cargo";
|
|
|
|
_JAVA_OPTIONS = "-Djava.utils.prefs.userRoot=${XDG_CONFIG_HOME}/java";
|
|
|
|
GNUPGHOME = "${XDG_DATA_HOME}/gnupg";
|
|
|
|
WINEPREFIX = "${XDG_DATA_HOME}/wine";
|
|
|
|
RUSTUP_HOME = "${XDG_DATA_HOME}/rustup";
|
|
|
|
NUGET_PACKAGES = "${XDG_CACHE_HOME}/NuGetPackages";
|
|
|
|
FCEUX_HOME = "${XDG_CONFIG_HOME}/fceux";
|
|
|
|
DOTNET_CLI_HOME = "${XDG_CONFIG_HOME}/dotnet";
|
|
|
|
GTK2_RC_FILES = lib.mkForce "${XDG_CONFIG_HOME}/gtk-2.0/gtkrc";
|
2024-06-13 15:38:40 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
xdg.userDirs = let
|
|
|
|
home = config.home.homeDirectory;
|
|
|
|
in {
|
|
|
|
enable = true;
|
|
|
|
desktop = "${home}/desktop";
|
|
|
|
documents = "${home}/documents";
|
|
|
|
download = "${home}/downloads";
|
|
|
|
music = "${home}/music";
|
|
|
|
pictures = "${home}/pictures";
|
|
|
|
publicShare = "${home}/public";
|
|
|
|
templates = "${home}/templates";
|
|
|
|
videos = "${home}/videos";
|
|
|
|
};
|
|
|
|
|
|
|
|
# xorg crap (incl. themes etc)
|
|
|
|
|
|
|
|
xsession = {
|
|
|
|
enable = true;
|
|
|
|
# special case - i3 is not listed in ./programs/default.nix
|
|
|
|
windowManager.i3 = (import ./programs/i3.nix args);
|
|
|
|
};
|
|
|
|
|
2024-06-15 21:59:32 +02:00
|
|
|
home.pointerCursor = {
|
|
|
|
gtk.enable = true;
|
|
|
|
x11.enable = true;
|
|
|
|
name = "aero-drop";
|
|
|
|
package = pkgs.win7-cursors;
|
|
|
|
};
|
2024-06-13 15:38:40 +02:00
|
|
|
|
|
|
|
gtk = {
|
|
|
|
enable = true;
|
|
|
|
iconTheme = {
|
2024-06-18 01:04:32 +02:00
|
|
|
name = "Arc";
|
|
|
|
package = pkgs.arc-icon-theme;
|
2024-06-13 15:38:40 +02:00
|
|
|
};
|
|
|
|
theme = {
|
2024-06-18 01:04:32 +02:00
|
|
|
name = "Arc-Mono";
|
|
|
|
package = pkgs.arc-mono-gtk-theme;
|
2024-06-13 15:38:40 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|