Want to contribute? Fork me on Codeberg.org!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

172 lines
3.8 KiB

{ config, pkgs, user, ... }:
let
colors = import ../colors;
in
{
imports = [
../neovim
../ranger.nix
../fcitx5
../picom.nix
../i3.nix
../polybar
../rofi
../git.nix
../terminal.nix
2 years ago
../startpage
../firefox.nix
];
home.file."./.background-image".source = ../wallpapers/${colors.wallpaper};
2 years ago
programs.home-manager.enable = true;
xdg = {
userDirs = rec {
enable = true;
desktop = "${config.home.homeDirectory}"; # weird hack for disabling desktop in nautilus
documents = null;
music = null;
pictures = "${publicShare}/Pictures";
templates = null;
publicShare = "${config.home.homeDirectory}/Nextcloud";
};
mimeApps = {
enable = true;
defaultApplications = {
# Make sure directories are opened in nautilus
# .desktop files can be found in /etc/profiles/per-user/elnu/share/applications
# mimetypes can be found with the mimetype command:
# nix-shell -p perl536Packages.FileMimeInfo
"inode/directory" = "org.gnome.Nautilus.desktop";
"application/zip" = "org.gnome.FileRoller.desktop";
"application/octet-stream" = "org.gnome.GHex.desktop";
};
};
};
2 years ago
gtk = {
enable = true;
iconTheme = colors.gtkIconTheme pkgs;
theme = colors.gtkTheme pkgs;
gtk3 = {
bookmarks = let
home = "file://${config.home.homeDirectory}/";
in [
"${home}Nextcloud"
"${home}Projects"
"${home}nix-config Config"
"sftp://elnu@elnuhub elnuhub"
];
# Remove minimize, maximize, and close buttons
extraConfig.gtk-decoration-layout = "appmenu:none";
2 years ago
};
gtk4.extraConfig.gtk-decoration-layout = "appmenu:none";
2 years ago
};
qt = {
enable = true;
platformTheme = "gtk";
};
home = {
username = "${user}";
homeDirectory = "/home/${user}";
stateVersion = "22.05";
packages = with pkgs; [
# Command line utilities
wget
neofetch
pfetch
fortune
2 years ago
killall
trash-cli # aliased to rm in .bashrc
unzip
2 years ago
pipes
wine
2 years ago
pandoc
2 years ago
texlive.combined.scheme-full
2 years ago
# Dev command line utilities
hugo
2 years ago
# Programming languages
jdk
# Tray applications
networkmanagerapplet # nm-applet
nextcloud-client
# System GUI applications
gnome.nautilus
gnome.file-roller
gnome.gnome-calculator
2 years ago
gnome.ghex
# Applications
discord
gimp
krita
inkscape
2 years ago
obs-studio
qbittorrent
2 years ago
(pkgs.callPackage ../pureref.nix { })
libreoffice
# Games
prismlauncher
];
};
programs.bash = {
enable = true;
shellAliases = {
g = "git";
ga = "g add";
gc = "g commit -m ";
gu = "ga . && gc";
gs = "g status";
gi = "g init";
gp = "g push";
gf = "g pull";
gC = "g clone";
goops = "g reset --soft HEAD^";
2 years ago
v = "nvim";
2 years ago
r = "ranger";
rm = "trash-put";
};
2 years ago
# Change to directory when exiting ranger with Q
# https://github.com/ranger/ranger/issues/1554#issuecomment-491650123
bashrcExtra = ''
2 years ago
function ranger {
local IFS=$'\t\n'
local tempfile="$(mktemp -t tmp.XXXXXX)"
local ranger_cmd=(
command
ranger
--cmd="map Q chain shell echo %d > "$tempfile"; quitall"
)
''${ranger_cmd[@]} "$@"
if [[ -f "$tempfile" ]] && [[ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]]; then
cd -- "$(cat "$tempfile")" || return
fi
command rm -f -- "$tempfile" 2>/dev/null
}
pfetch
while true; do
f=`fortune`
if [ ''${#f} -lt 128 ]; then
echo "''${f}"
break
fi
done
'';
};
}