Restructure home-manager
This commit is contained in:
parent
34eb186509
commit
4e38e27271
11 changed files with 249 additions and 334 deletions
42
users/desktops/common/home.nix
Normal file
42
users/desktops/common/home.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
home = {
|
||||
pointerCursor = {
|
||||
size = 24;
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
name = "breeze_cursors";
|
||||
package = pkgs.breeze-icons;
|
||||
};
|
||||
packages = with pkgs; [
|
||||
syncthingtray
|
||||
];
|
||||
file = {
|
||||
# Dotfiles that can't be managed via home-manager
|
||||
".local/share/color-schemes/BreezeDarkNeutral.colors".source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/baduhai/dotfiles/master/color-schemes/BreezeDarkNeutral.colors";
|
||||
sha256 = "Fw5knhpV47HlgYvbHFzfi6M6Tk2DTlAuFUYc2WDDBc8=";
|
||||
};
|
||||
".config/MangoHud/MangoHud.conf".source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/baduhai/dotfiles/master/MangoHud/MangoHud.conf";
|
||||
sha256 = "WCRsS6njtU4aR7tMiX8oWa2itJyy04Zp7wfwV20SLZs=";
|
||||
};
|
||||
".config/kitty/search.py".source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/baduhai/dotfiles/master/kitty/search.py";
|
||||
sha256 = "mi5GB8CmWafAdp3GYnsQM4VHpXhuaVYX7YDT+9426Jc=";
|
||||
};
|
||||
".config/kitty/scroll_mark.py".source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/baduhai/dotfiles/master/kitty/scroll_mark.py";
|
||||
sha256 = "Abif6LIOCiXyDdQMZ4pQnLK++It0VYIM+WE7Oydwkfo=";
|
||||
};
|
||||
# Autostart programs
|
||||
".config/autostart/org.kde.yakuake.desktop".source = config.lib.file.mkOutOfStoreSymlink "/var/run/current-system/sw/share/applications/org.kde.yakuake.desktop";
|
||||
".config/autostart/megasync.desktop".source = config.lib.file.mkOutOfStoreSymlink "/var/run/current-system/sw/share/applications/megasync.desktop";
|
||||
".config/autostart/koi.desktop".source = config.lib.file.mkOutOfStoreSymlink "/var/run/current-system/sw/share/applications/koi.desktop";
|
||||
# Fix flatpak fonts, themes, icons and cursor
|
||||
".icons/breeze_cursors".source = config.lib.file.mkOutOfStoreSymlink "/run/current-system/sw/share/icons/breeze_cursors";
|
||||
".local/share/flatpak/overrides/global".text = "[Context]\nfilesystems=/run/current-system/sw/share/X11/fonts:ro;~/.local/share/color-schemes:ro;xdg-config/gtk-3.0:ro;/nix/store:ro;~/.icons:ro";
|
||||
};
|
||||
};
|
||||
}
|
||||
83
users/desktops/common/programs.nix
Normal file
83
users/desktops/common/programs.nix
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
font = { name = "Inter"; size = 10; };
|
||||
theme = { package = pkgs.breeze-gtk; name = "Breeze"; };
|
||||
iconTheme = { package = pkgs.breeze-icons; name = "Breeze"; };
|
||||
};
|
||||
|
||||
programs = {
|
||||
password-store.package = pkgs.pass-wayland;
|
||||
mangohud = {
|
||||
enable = true;
|
||||
enableSessionWide = true;
|
||||
};
|
||||
git = {
|
||||
enable = true;
|
||||
diff-so-fancy.enable = true;
|
||||
userName = "William";
|
||||
userEmail = "williamhai@hotmail.com";
|
||||
};
|
||||
fish = {
|
||||
shellAliases.ssh = "kitty +kitten ssh";
|
||||
functions = {
|
||||
rebuild = "rm ~/.gtkrc-2.0; sudo nixos-rebuild switch --flake '/home/user/Projects/nix-config#'";
|
||||
rebuild-boot = "rm ~/.gtkrc-2.0; sudo nixos-rebuild boot --flake '/home/user/Projects/nix-config#'";
|
||||
upgrade = "rm ~/.gtkrc-2.0; nix flake update --commit-lock-file /home/user/Projects/nix-config; sudo nixos-rebuild switch --upgrade --flake '/home/user/Projects/nix-config#'";
|
||||
upgrade-boot = "rm ~/.gtkrc-2.0; nix flake update --commit-lock-file /home/user/Projects/nix-config; sudo nixos-rebuild boot --upgrade --flake '/home/user/Projects/nix-config#'";
|
||||
};
|
||||
}
|
||||
micro = {
|
||||
enable = true;
|
||||
settings = {
|
||||
clipboard = "terminal";
|
||||
mkparents = true;
|
||||
scrollbar = true;
|
||||
tabstospaces = true;
|
||||
tabsize = 2;
|
||||
};
|
||||
};
|
||||
btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color_theme = "gruvbox_dark.theme";
|
||||
theme_background = false;
|
||||
proc_sorting = "cpu direct";
|
||||
update_ms = 500;
|
||||
};
|
||||
};
|
||||
kitty = {
|
||||
enable = true;
|
||||
theme = "Afterglow";
|
||||
font = {
|
||||
name = "Hack Nerd Font";
|
||||
size = 10;
|
||||
};
|
||||
keybindings = {
|
||||
"kitty_mod+f" = "launch --location=hsplit --allow-remote-control kitty +kitten search.py @active-kitty-window-id";
|
||||
};
|
||||
settings = {
|
||||
clipboard_control = "write-clipboard read-clipboard write-primary read-primary";
|
||||
confirm_os_window_close = "-2";
|
||||
cursor_shape = "block";
|
||||
initial_window_height = "570";
|
||||
initial_window_width = "120c";
|
||||
remember_window_size = "no";
|
||||
tab_bar_background = "#3b3b3b";
|
||||
tab_bar_margin_color = "#3b3b3b";
|
||||
tab_bar_margin_height = "3 3";
|
||||
tab_bar_margin_width = 2;
|
||||
tab_bar_min_tabs = 1;
|
||||
tab_bar_style = "fade";
|
||||
tab_fade = 0;
|
||||
tab_switch_strategy = "left";
|
||||
tab_title_template = "{fmt.bg._3b3b3b}{fmt.fg._202020}{fmt.fg.default}{fmt.bg._202020}{fmt.fg._c6c6c6} {title} {fmt.fg.default}{fmt.bg.default}{fmt.fg._202020}{fmt.fg.default}";
|
||||
active_tab_title_template = "{fmt.bg._3b3b3b}{fmt.fg._fcfcfc}{fmt.fg.default}{fmt.bg._fcfcfc}{fmt.fg._3b3b3b} {title} {fmt.fg.default}{fmt.bg.default}{fmt.fg._fcfcfc}{fmt.fg.default}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
users/desktops/common/services.nix
Normal file
14
users/desktops/common/services.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
services = {
|
||||
kdeconnect.enable = true;
|
||||
syncthing = {
|
||||
enable = true;
|
||||
tray = {
|
||||
enable = true;
|
||||
package = pkgs.writeShellScriptBin "syncthingtray" "exec ${pkgs.syncthingtray}/bin/syncthingtray --wait" // { pname = "syncthingtray"; }; # Override synctray so it waits for a system tray
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue