nix/home/home.nix
2024-02-21 16:16:03 +11:00

220 lines
5 KiB
Nix

{
inputs,
outputs,
lib,
config,
pkgs,
...
}: let
palette-hex = pkgs.lib.nix-rice.palette.toRgbHex pkgs.rice.palette;
palette-shex = pkgs.lib.nix-rice.palette.toRGBShortHex pkgs.rice.palette;
in {
home.stateVersion = "22.11";
imports = [
./programs/helix.nix
./programs/firefox.nix
./programs/kitty.nix
./programs/zsh.nix
./util/ez.nix
./util/firefox-webapp.nix
inputs.plasma-manager.homeManagerModules.plasma-manager # TODO: set up manually, use rc2nix to convert
inputs.nix-flatpak.homeManagerModules.nix-flatpak
];
home.packages = with pkgs;
[
thunderbird
strawberry
inkscape
imv
zathura
btop
bat
ripgrep
fd
lazygit
fzf
zoxide
zellij
grim
slurp
libnotify
playerctl
kooha
onlyoffice-bin
croc
xorg.xrdb
culr
# kdeconnect
keepassxc
git-credential-keepassxc
direnv
mpv
gtk-engine-murrine
]
++ pkgs.rice.fonts.pkgs
++ pkgs.rice.icons.pkgs;
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = ["graphical-session-pre.target"];
};
};
fonts.fontconfig.enable = true;
services.syncthing = {
enable = true;
};
services.udiskie.enable = true; # TODO is this fixed now?
services.flatpak.packages = [
"com.logseq.Logseq"
# "com.github.IsmaelMartinez.teams_for_linux"
];
services.flatpak.overrides = {
global = {
Context.sockets = ["wayland" "!x11" "!fallback-x11"];
Environment."ELECTRON_OZONE_PLATFORM_HINT" = "auto";
};
};
programs.firefox.webapps = {
teams = {
url = "https://teams.microsoft.com";
id = 1;
extraSettings = config.programs.firefox.profiles.default.settings;
name = "Microsoft Teams";
icon = ./ms_teams.png;
};
};
programs.vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
rust-lang.rust-analyzer
serayuzgur.crates
jnoortheen.nix-ide
arrterian.nix-env-selector
mkhl.direnv
# silverquark.dancehelix
# gregoire.dance
];
mutableExtensionsDir = true;
userSettings = {
"window.titleBarStyle" = "custom";
"editor.fontFamily" = "${pkgs.rice.fonts.monospace.name}";
"editor.fontSize" = 12;
"workbench.colorTheme" = "KanagawaTheme";
"rust-analyzer.check.overrideCommand" = "clippy";
"rust-analyzer.debug.engine" = "vadimcn.vscode-lldb";
"rust-analyzer.inlayHints.chainingHints.enable" = false;
"rust-analyzer.inlayHints.parameterHints.enable" = false;
"rust-analyzer.inlayHints.typeHints.enable" = false;
};
};
systemd.user.startServices = "sd-switch";
# ezServices = with pkgs; {
# swaybg = "${lib.getExe swaybg} -i ${rice.bg.image} -m fill";
# # swayosd = "${lib.getExe' swayosd "swayosd"} --max-volume 100";
# };
xdg.enable = true;
xresources.properties = with palette-hex; {
"*.foreground" = util.fg;
"*.background" = util.bg;
"*.cursorColor" = util.cursor;
"*.selection_foreground" = util.fg_sel;
"*.selection_background" = util.bg_sel;
"*.color0" = normal.black;
"*.color1" = normal.red;
"*.color2" = normal.green;
"*.color3" = normal.yellow;
"*.color4" = normal.blue;
"*.color5" = normal.magenta;
"*.color6" = normal.cyan;
"*.color7" = normal.white;
"*.color8" = bright.black;
"*.color9" = bright.red;
"*.color10" = bright.green;
"*.color11" = bright.yellow;
"*.color12" = bright.blue;
"*.color13" = bright.magenta;
"*.color14" = bright.cyan;
"*.color15" = bright.white;
};
xdg.systemDirs.data = [
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
];
xdg.desktopEntries.logseq = {
name = "Logseq";
exec = "logseq --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto %u";
icon = "logseq";
type = "Application";
categories = ["Utility"];
mimeType = ["x-scheme-handler/logseq"];
terminal = false;
comment = "A privacy-first, open-source platform for knowledge management and collaboration.";
};
# gtk = with pkgs.rice; {
# enable = true;
# theme = with gtk-theme; {
# inherit package name;
# };
# iconTheme = with icons; {
# inherit package name;
# };
# font = with fonts.sans; {
# inherit name size package;
# };
# };
programs.direnv = {
enable = true;
nix-direnv = {
enable = true;
};
};
programs.git = {
enable = true;
userName = "atagen";
userEmail = "atagen@boss.co";
extraConfig = {
credential.helper = "keepassxc";
};
};
programs.fzf = {
enable = true;
enableZshIntegration = true;
colors = with palette-hex; {
fg = util.fg;
bg = util.bg;
hl = util.bg_sel;
"fg+" = util.fg_sel;
"bg+" = util.bg_sel;
"hl+" = bright.green;
};
};
}