145 lines
4.0 KiB
Nix
145 lines
4.0 KiB
Nix
# This is your home-manager configuration file
|
|
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
|
{
|
|
inputs,
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
# You can import other home-manager modules here
|
|
imports = [
|
|
# If you want to use modules your own flake exports (from modules/home-manager):
|
|
# inputs.self.homeManagerModules.example
|
|
|
|
# Or modules exported from other flakes (such as nix-colors):
|
|
# inputs.nix-colors.homeManagerModules.default
|
|
|
|
# You can also split up your configuration and import pieces of it here:
|
|
# ./nvim.nix
|
|
|
|
./common/features/niri/niri.nix
|
|
./common/features/spicetify.nix
|
|
./common/features/yazi/yazi.nix
|
|
./common/features/nvimConf.nix
|
|
./common/features/shell.nix
|
|
];
|
|
|
|
nixpkgs = {
|
|
# You can add overlays here
|
|
overlays = [
|
|
# Add overlays your own flake exports (from overlays and pkgs dir):
|
|
inputs.self.overlays.additions
|
|
inputs.self.overlays.modifications
|
|
inputs.self.overlays.unstable-packages
|
|
|
|
# You can also add overlays exported from other flakes:
|
|
# neovim-nightly-overlay.overlays.default
|
|
|
|
# Or define it inline, for example:
|
|
# (final: prev: {
|
|
# hi = final.hello.overrideAttrs (oldAttrs: {
|
|
# patches = [ ./change-hello-to-hi.patch ];
|
|
# });
|
|
# })
|
|
];
|
|
# Configure your nixpkgs instance
|
|
config = {
|
|
# Disable if you don't want unfree packages
|
|
allowUnfree = true;
|
|
};
|
|
};
|
|
|
|
home.packages = (
|
|
(with pkgs; [
|
|
# --- General utils ---
|
|
libreoffice # Microsoft replace
|
|
hunspell # auto spell for libre
|
|
hunspellDicts.en_US
|
|
matugen
|
|
frogmouth
|
|
])
|
|
++ (with pkgs.unstablePkgs; [
|
|
# --- General Utils ---
|
|
cine
|
|
gthumb
|
|
# --- Creative utils ---
|
|
obs-studio
|
|
shotcut
|
|
blockbench
|
|
libresprite # Pixel art
|
|
])
|
|
);
|
|
|
|
programs.home-manager.enable = true;
|
|
# --- General utils ---
|
|
programs.quickshell.enable = true;
|
|
programs.joplin-desktop.enable = true;
|
|
|
|
# --- xdg ---
|
|
xdg.configFile."mimeapps.list".force = true;
|
|
|
|
xdg.desktopEntries.yazi-wezterm =
|
|
let
|
|
yaziOpenFolder = pkgs.writeShellScript "yaziOpenFolder" ''
|
|
tmp=$(mktemp -t "yazi-cwd.XXXXXX")
|
|
yazi "$1" --cwd-file="$tmp"
|
|
cwd=$(cat "$tmp")
|
|
rm -f "$tmp"
|
|
[ -n "$cwd" ] && cd "$cwd"
|
|
exec "$SHELL"
|
|
'';
|
|
in {
|
|
name = "Yazi (WezTerm)";
|
|
genericName = "File Manager";
|
|
exec = "wezterm start -- ${yaziOpenFolder} %f";
|
|
icon = "system-file-manager";
|
|
terminal = false;
|
|
categories = [ "System" "FileManager" ];
|
|
mimeType = [ "inode/directory" ];
|
|
};
|
|
|
|
xdg.mimeApps = {
|
|
enable = true;
|
|
defaultApplications = {
|
|
# Use "nemo.desktop" for GUI, or "yazi-wezterm.desktop" for terminal
|
|
"inode/directory" = [ "yazi-wezterm.desktop" ];
|
|
"x-scheme-handler/file" = [ "yazi-wezterm.desktop" ];
|
|
|
|
# Images: gThumb
|
|
"image/jpeg" = [ "org.gnome.gthumb.desktop" ];
|
|
"image/png" = [ "org.gnome.gthumb.desktop" ];
|
|
"image/gif" = [ "org.gnome.gthumb.desktop" ];
|
|
"image/webp" = [ "org.gnome.gthumb.desktop" ];
|
|
"image/tiff" = [ "org.gnome.gthumb.desktop" ];
|
|
"image/bmp" = [ "org.gnome.gthumb.desktop" ];
|
|
|
|
# Documents: Okular
|
|
"application/pdf" = [ "org.kde.okular.desktop" ];
|
|
"application/epub+zip" = [ "org.kde.okular.desktop" ];
|
|
|
|
# Videos: Cine
|
|
"video/mp4" = [ "io.github.diegopvlk.Cine.desktop" ];
|
|
"video/x-matroska" = [ "io.github.diegopvlk.Cine.desktop" ];
|
|
"video/webm" = [ "io.github.diegopvlk.Cine.desktop" ];
|
|
"video/quicktime" = [ "io.github.diegopvlk.Cine.desktop" ];
|
|
"video/x-msvideo" = [ "io.github.diegopvlk.Cine.desktop" ];
|
|
};
|
|
associations.added = {
|
|
"inode/directory" = [ "yazi-wezterm.desktop" ];
|
|
};
|
|
};
|
|
|
|
dconf.settings = {
|
|
"org/cinnamon/desktop/applications/terminal" = {
|
|
exec = "wezterm";
|
|
exec-arg = "start --cwd";
|
|
};
|
|
};
|
|
|
|
|
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
|
home.stateVersion = "25.11";
|
|
}
|