mirror of
https://github.com/EdenQwQ/nixos.git
synced 2025-12-26 18:34:56 +08:00
104 lines
2.3 KiB
Nix
104 lines
2.3 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
user,
|
|
config,
|
|
...
|
|
}:
|
|
{
|
|
imports = [
|
|
./lib
|
|
./programs
|
|
./tweaks
|
|
];
|
|
|
|
home = {
|
|
username = user;
|
|
homeDirectory = "/home/${user}";
|
|
|
|
packages = with pkgs; [
|
|
# files
|
|
zip
|
|
xz
|
|
unzip
|
|
|
|
# utils
|
|
ripgrep
|
|
zoxide
|
|
fzf
|
|
eza
|
|
fd
|
|
];
|
|
|
|
activation = {
|
|
niri-transition =
|
|
lib.hm.dag.entryAfter [ "writeBoundary" ]
|
|
# bash
|
|
''
|
|
run ${pkgs.niri-unstable}/bin/niri msg action do-screen-transition
|
|
'';
|
|
reload-swhkd =
|
|
lib.hm.dag.entryAfter [ "niri-transition" ]
|
|
# bash
|
|
''
|
|
run --quiet ${pkgs.procps}/bin/pkill -HUP swhkd
|
|
'';
|
|
reload-shell =
|
|
lib.hm.dag.entryAfter [ "reload-swhkd" ]
|
|
# bash
|
|
''
|
|
# only run stop if the service is active
|
|
if ${pkgs.systemd}/bin/systemctl --user is-active waybar.service; then
|
|
run --silence ${pkgs.systemd}/bin/systemctl --user stop waybar.service
|
|
fi
|
|
if ${pkgs.systemd}/bin/systemctl --user is-active quickshell.service; then
|
|
run --silence ${pkgs.systemd}/bin/systemctl --user stop quickshell.service
|
|
fi
|
|
if ${pkgs.systemd}/bin/systemctl --user is-active caelestia.service; then
|
|
run --silence ${pkgs.systemd}/bin/systemctl --user stop caelestia.service
|
|
fi
|
|
run --silence ${pkgs.systemd}/bin/systemctl --user start ${
|
|
if config.desktopShell == "dms" then "quickshell" else config.desktopShell
|
|
}.service
|
|
'';
|
|
};
|
|
};
|
|
|
|
i18n.inputMethod = {
|
|
enable = true;
|
|
type = "fcitx5";
|
|
fcitx5 = {
|
|
addons = with pkgs; [
|
|
fcitx5-gtk
|
|
libsForQt5.fcitx5-qt
|
|
fcitx5-chinese-addons
|
|
fcitx5-rime
|
|
fcitx5-pinyin-moegirl
|
|
fcitx5-pinyin-zhwiki
|
|
];
|
|
waylandFrontend = true;
|
|
};
|
|
};
|
|
|
|
programs = {
|
|
git = {
|
|
enable = true;
|
|
userName = "EdenQwQ";
|
|
userEmail = "lsahlm1eden@gmail.com";
|
|
extraConfig = {
|
|
safe = {
|
|
directory = "*";
|
|
};
|
|
};
|
|
};
|
|
|
|
nix-index = {
|
|
enable = true;
|
|
enableFishIntegration = true;
|
|
enableBashIntegration = false;
|
|
enableZshIntegration = false;
|
|
};
|
|
|
|
home-manager.enable = true;
|
|
};
|
|
}
|