404 lines
9.1 KiB
Nix
404 lines
9.1 KiB
Nix
{
|
|
inputs,
|
|
outputs,
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
nur,
|
|
...
|
|
}: let
|
|
palette-hex = pkgs.lib.nix-rice.palette.toRgbHex pkgs.rice.palette;
|
|
in {
|
|
imports = [
|
|
inputs.hyprland.homeManagerModules.default
|
|
./programs/eww/default.nix
|
|
];
|
|
|
|
home.stateVersion = "22.11";
|
|
|
|
home.packages = with pkgs; [
|
|
thunderbird
|
|
clementine
|
|
inkscape
|
|
|
|
btop
|
|
bat
|
|
xplr
|
|
ripgrep
|
|
fd
|
|
lazygit
|
|
fzf
|
|
zoxide
|
|
zellij
|
|
glib # for gsettings
|
|
grim
|
|
slurp
|
|
swaybg
|
|
wlogout
|
|
wf-recorder
|
|
libnotify
|
|
xorg.xrdb
|
|
swayidle
|
|
swaynotificationcenter
|
|
waylock
|
|
playerctl
|
|
|
|
culr
|
|
swayosd
|
|
fuzzel
|
|
|
|
kdeconnect
|
|
# syncthing
|
|
keepassxc
|
|
git-credential-keepassxc
|
|
|
|
direnv
|
|
|
|
mpv
|
|
|
|
meslo-lgs-nf
|
|
|
|
libsForQt5.qtstyleplugin-kvantum
|
|
|
|
gtk-engine-murrine
|
|
material-icons
|
|
material-design-icons
|
|
];
|
|
|
|
services.syncthing = {
|
|
enable = true;
|
|
};
|
|
|
|
wayland.windowManager.hyprland = {
|
|
enable = true;
|
|
systemdIntegration = true;
|
|
nvidiaPatches = true;
|
|
xwayland = {
|
|
enable = true;
|
|
hidpi = false;
|
|
};
|
|
recommendedEnvironment = true;
|
|
extraConfig = with pkgs.rice; (builtins.replaceStrings
|
|
["#BGIMAGE"
|
|
"#GTKTHEME"
|
|
"#FONT"
|
|
"#ICONTHEME"
|
|
"#ACTIVEBORDER"
|
|
"#BORDER"]
|
|
["${bg.image}"
|
|
gtk.name
|
|
fonts.sans.name
|
|
icons.name
|
|
palette-hex.util.fg
|
|
palette-hex.util.bg]
|
|
(builtins.readFile dots/hyprland/hyprland.conf));
|
|
};
|
|
|
|
|
|
programs.eww-hyprland = {
|
|
enable = true;
|
|
colors = with palette-hex;
|
|
(builtins.replaceStrings
|
|
["BLACK"
|
|
"BLCKA"
|
|
"RED"
|
|
"RDA"
|
|
"GREEN"
|
|
"GRNA"
|
|
"YELLOW"
|
|
"YLWA"
|
|
"BLUE"
|
|
"BLUA"
|
|
"MAGENTA"
|
|
"MGNA"
|
|
"CYAN"
|
|
"CYNA"
|
|
"WHITE"
|
|
"WHTA"
|
|
"FG"
|
|
"BG" ]
|
|
[normal.black
|
|
bright.black
|
|
normal.red
|
|
bright.red
|
|
normal.green
|
|
bright.green
|
|
normal.yellow
|
|
bright.yellow
|
|
normal.blue
|
|
bright.blue
|
|
normal.magenta
|
|
bright.magenta
|
|
normal.cyan
|
|
bright.cyan
|
|
normal.white
|
|
bright.white
|
|
util.fg
|
|
util.bg] (builtins.readFile dots/eww/colors.scss));
|
|
};
|
|
|
|
systemd.user.startServices = "sd-switch";
|
|
systemd.user.services."hyprland-system76" = {
|
|
Unit = {
|
|
Description = "the hyprland process scheduler hook";
|
|
Requires = ["dbus.service"];
|
|
};
|
|
Install = {
|
|
WantedBy = ["graphical-session.target" "default.target"];
|
|
};
|
|
Service = {
|
|
ExecStart = ''${pkgs.hyprland-system76-scheduler-integration}/bin/hyprland-system76-scheduler-hook.sh'';
|
|
};
|
|
};
|
|
|
|
xdg.enable = true;
|
|
xdg.configFile =
|
|
builtins.mapAttrs (name: value: {
|
|
enable = true;
|
|
text = builtins.readFile value;
|
|
})
|
|
{
|
|
"swaync/config.json" = dots/swaync/config.json;
|
|
"swaync/configSchema.json" = dots/swaync/configSchema.json;
|
|
} // {"swaync/style.css" = {
|
|
enable = true;
|
|
text = with palette-hex; (builtins.replaceStrings
|
|
["PANELBG"
|
|
"BORDER"
|
|
"NOTIBGNORM"
|
|
"NOTIBGHOVER"
|
|
"NOTIBGFOCUS"
|
|
"NOTIBGCLOSE"
|
|
"NOTIBGHOVERCLOSE"
|
|
"BGSELECTED"]
|
|
[util.bg
|
|
normal.black
|
|
util.bg
|
|
bright.black
|
|
bright.black
|
|
normal.black
|
|
bright.black
|
|
bright.black]
|
|
(builtins.readFile dots/swaync/style.css));
|
|
};
|
|
};
|
|
|
|
xdg.systemDirs.data = [
|
|
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
|
|
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
|
|
];
|
|
|
|
home.sessionVariables = {
|
|
GTK_THEME = pkgs.rice.gtk.name;
|
|
};
|
|
programs.wlogout = {
|
|
enable = true;
|
|
layout = (builtins.fromJSON (builtins.readFile dots/wlogout/layout));
|
|
style = with palette-hex; (builtins.replaceStrings
|
|
["/usr/share/wlogout"
|
|
"/etc/wlogout"
|
|
"WINBG"
|
|
"BTNCOL"
|
|
"BTNBG"
|
|
"BTNFOCUSBG"]
|
|
["${pkgs.wlogout}/share/wlogout"
|
|
"${pkgs.wlogout}/etc/wlogout"
|
|
util.bg
|
|
util.fg
|
|
util.bg_sel
|
|
normal.yellow]
|
|
(builtins.readFile dots/wlogout/style.css));
|
|
};
|
|
|
|
programs.fuzzel = with pkgs.rice; {
|
|
enable = true;
|
|
settings = {
|
|
main = {
|
|
dpi-aware = "no";
|
|
font = with fonts.sans; lib.strings.concatStrings [name ":size=" (builtins.toString size)];
|
|
icon-theme = icons.name;
|
|
terminal = "kitty";
|
|
};
|
|
dmenu = {
|
|
exit-immediately-if-empty = "yes";
|
|
};
|
|
border = with borders; {
|
|
width = thickness;
|
|
radius = rounding;
|
|
};
|
|
colors = {
|
|
background = lib.strings.concatStrings [palette-hex.util.bg "FF"];
|
|
text = lib.strings.concatStrings [palette-hex.util.fg "FF"];
|
|
selection = lib.strings.concatStrings [palette-hex.util.bg_sel "FF"];
|
|
selection-text = lib.strings.concatStrings [palette-hex.util.fg_sel "FF"];
|
|
selection-match = lib.strings.concatStrings [palette-hex.util.cursor "FF"];
|
|
match = lib.strings.concatStrings [palette-hex.util.fg_sel "FF"];
|
|
border = lib.strings.concatStrings [palette-hex.util.bg_sel "FF"];
|
|
};
|
|
};
|
|
};
|
|
|
|
gtk = {
|
|
enable = true;
|
|
theme = with pkgs.rice.gtk; {
|
|
package = package;
|
|
name = name;
|
|
};
|
|
iconTheme = with pkgs.rice.icons; {
|
|
package = package;
|
|
name = name;
|
|
};
|
|
};
|
|
|
|
programs.direnv = {
|
|
enable = true;
|
|
nix-direnv = {
|
|
enable = true;
|
|
};
|
|
};
|
|
|
|
programs.firefox = {
|
|
enable = true;
|
|
profiles.default = {
|
|
id = 0;
|
|
name = "Default";
|
|
settings = {
|
|
"browser.startup.homepage" = "about:blank";
|
|
};
|
|
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
vimium-c
|
|
darkreader
|
|
localcdn
|
|
ublock-origin
|
|
keepassxc-browser
|
|
user-agent-string-switcher
|
|
];
|
|
};
|
|
};
|
|
|
|
programs.helix = {
|
|
enable = true;
|
|
# package = inputs.helix.packages.${pkgs.hostPlatform.system}.default;
|
|
settings = {
|
|
theme = "gruvbox_dark";
|
|
editor.lsp.display-messages = true;
|
|
};
|
|
};
|
|
|
|
programs.kitty = with pkgs.rice; {
|
|
enable = true;
|
|
font = with fonts; {
|
|
name = monospace.name;
|
|
size = monospace.size;
|
|
};
|
|
settings = with palette-hex; {
|
|
foreground = util.fg;
|
|
background = util.bg;
|
|
cursor = util.cursor;
|
|
cursor_text = util.bg;
|
|
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;
|
|
};
|
|
};
|
|
|
|
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;
|
|
};
|
|
};
|
|
|
|
programs.zsh = {
|
|
enable = true;
|
|
enableAutosuggestions = true;
|
|
enableCompletion = true;
|
|
enableSyntaxHighlighting = true;
|
|
enableVteIntegration = true;
|
|
autocd = true;
|
|
defaultKeymap = "viins";
|
|
initExtra = builtins.readFile ./dots/zsh;
|
|
plugins = [
|
|
{
|
|
name = "powerlevel10k";
|
|
src = pkgs.zsh-powerlevel10k;
|
|
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
|
}
|
|
{
|
|
name = "zsh-vi-mode";
|
|
src = pkgs.zsh-vi-mode;
|
|
file = "share/zsh-vi-mode/zsh-vi-mode.zsh";
|
|
}
|
|
{
|
|
name = "zsh-autopair";
|
|
src = pkgs.zsh-autopair;
|
|
file = "share/zsh-autopair/zsh-autopair.zsh";
|
|
}
|
|
{
|
|
name = "zsh-completions";
|
|
src = pkgs.zsh-completions;
|
|
file = "share/zsh-completions/zsh-completions.zsh";
|
|
}
|
|
{
|
|
name = "zsh-command-time";
|
|
src = pkgs.zsh-command-time;
|
|
file = "share/zsh-completions/zsh-command-time.zsh";
|
|
}
|
|
{
|
|
name = "zsh-autocomplete";
|
|
src = pkgs.zsh-autocomplete;
|
|
file = "share/zsh-autocomplete/zsh-autocomplete.zsh";
|
|
}
|
|
{
|
|
name = "zsh-fast-syntax-highlighting";
|
|
src = pkgs.zsh-fast-syntax-highlighting;
|
|
file = "share/zsh-fast-syntax-highlighting/zsh-fast-syntax-highlighting.zsh";
|
|
}
|
|
{
|
|
name = "zsh-nix-shell";
|
|
src = pkgs.zsh-nix-shell;
|
|
file = "share/zsh-nix-shell/zsh-nix-shell.zsh";
|
|
}
|
|
{
|
|
name = "any-nix-shell";
|
|
src = pkgs.any-nix-shell;
|
|
file = "share/any-nix-shell/any-nix-shell.zsh";
|
|
}
|
|
{
|
|
name = "nix-zsh-completions";
|
|
src = pkgs.nix-zsh-completions;
|
|
file = "share/nix-zsh-completions/nix-zsh-completions.zsh";
|
|
}
|
|
];
|
|
};
|
|
}
|