mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2024-11-30 02:23:08 +01:00
370 lines
11 KiB
Nix
370 lines
11 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
inputs,
|
|
username,
|
|
host,
|
|
gtkThemeFromScheme,
|
|
...
|
|
}:
|
|
let
|
|
palette = config.colorScheme.palette;
|
|
inherit (import ./variables.nix)
|
|
gitUsername
|
|
gitEmail
|
|
theme
|
|
browser
|
|
;
|
|
in
|
|
{
|
|
# Home Manager Settings
|
|
home.username = "${username}";
|
|
home.homeDirectory = "/home/${username}";
|
|
home.stateVersion = "23.11";
|
|
|
|
# Set The Colorscheme
|
|
colorScheme = inputs.nix-colors.colorSchemes."${theme}";
|
|
|
|
# Import Program Configurations
|
|
imports = [
|
|
inputs.nix-colors.homeManagerModules.default
|
|
inputs.hyprland.homeManagerModules.default
|
|
../../config/hyprland.nix
|
|
../../config/swaync.nix
|
|
../../config/waybar.nix
|
|
../../config/wlogout.nix
|
|
];
|
|
|
|
# Define Settings For Xresources
|
|
xresources.properties = {
|
|
"Xcursor.size" = 24;
|
|
};
|
|
|
|
# Place Files Inside Home Directory
|
|
home.file."Pictures/Wallpapers" = {
|
|
source = ../../config/wallpapers;
|
|
recursive = true;
|
|
};
|
|
home.file.".local/share/fonts" = {
|
|
source = ../../config/fonts;
|
|
recursive = true;
|
|
};
|
|
home.file.".config/starship.toml".source = ../../config/starship.toml;
|
|
home.file.".config/ascii-neofetch".source = ../../config/ascii-neofetch;
|
|
home.file.".base16-themes".source = ../../config/base16-themes;
|
|
home.file.".emoji".source = ../../config/emoji;
|
|
home.file.".face.icon".source = ../../config/face.jpg;
|
|
home.file.".config/neofetch/config.conf".text = ''
|
|
print_info() {
|
|
prin "$(color 6) ZaneyOS $ZANEYOS_VERSION"
|
|
info underline
|
|
info "$(color 7) VER" kernel
|
|
info "$(color 2) UP " uptime
|
|
info "$(color 4) PKG" packages
|
|
info "$(color 6) DE " de
|
|
info "$(color 5) TER" term
|
|
info "$(color 3) CPU" cpu
|
|
info "$(color 7) GPU" gpu
|
|
info "$(color 5) MEM" memory
|
|
prin " "
|
|
prin "$(color 1) $(color 2) $(color 3) $(color 4) $(color 5) $(color 6) $(color 7) $(color 8)"
|
|
}
|
|
distro_shorthand="on"
|
|
memory_unit="gib"
|
|
cpu_temp="C"
|
|
separator=" $(color 4)>"
|
|
stdout="off"
|
|
'';
|
|
|
|
# Install & Configure Git
|
|
programs.git = {
|
|
enable = true;
|
|
userName = "${gitUsername}";
|
|
userEmail = "${gitEmail}";
|
|
};
|
|
|
|
# Create XDG Dirs
|
|
xdg = {
|
|
userDirs = {
|
|
enable = true;
|
|
createDirectories = true;
|
|
};
|
|
};
|
|
|
|
dconf.settings = {
|
|
"org/virt-manager/virt-manager/connections" = {
|
|
autoconnect = [ "qemu:///system" ];
|
|
uris = [ "qemu:///system" ];
|
|
};
|
|
};
|
|
|
|
# Configure Cursor Theme
|
|
home.pointerCursor = {
|
|
gtk.enable = true;
|
|
x11.enable = true;
|
|
package = pkgs.bibata-cursors;
|
|
name = "Bibata-Modern-Ice";
|
|
size = 24;
|
|
};
|
|
|
|
# Theme GTK
|
|
gtk = {
|
|
enable = true;
|
|
font = {
|
|
name = "Ubuntu";
|
|
size = 12;
|
|
package = pkgs.ubuntu_font_family;
|
|
};
|
|
theme = {
|
|
name = "${config.colorScheme.slug}";
|
|
package = gtkThemeFromScheme { scheme = config.colorScheme; };
|
|
};
|
|
iconTheme = {
|
|
name = "Papirus-Dark";
|
|
package = pkgs.papirus-icon-theme;
|
|
};
|
|
gtk3.extraConfig = {
|
|
gtk-application-prefer-dark-theme = 1;
|
|
};
|
|
gtk4.extraConfig = {
|
|
gtk-application-prefer-dark-theme = 1;
|
|
};
|
|
};
|
|
|
|
# Theme QT -> GTK
|
|
qt = {
|
|
enable = true;
|
|
platformTheme = "gtk";
|
|
style = {
|
|
name = "adwaita-dark";
|
|
package = pkgs.adwaita-qt;
|
|
};
|
|
};
|
|
|
|
# Scripts
|
|
home.packages = with pkgs; [
|
|
(import ../../scripts/emopicker9000.nix { inherit pkgs; })
|
|
(import ../../scripts/task-waybar.nix { inherit pkgs; })
|
|
(import ../../scripts/squirtle.nix { inherit pkgs; })
|
|
(import ../../scripts/themechange.nix {
|
|
inherit pkgs;
|
|
inherit host;
|
|
inherit username;
|
|
})
|
|
(import ../../scripts/theme-selector.nix { inherit pkgs; })
|
|
(import ../../scripts/nvidia-offload.nix { inherit pkgs; })
|
|
(import ../../scripts/wallsetter.nix {
|
|
inherit pkgs;
|
|
inherit username;
|
|
})
|
|
(import ../../scripts/web-search.nix { inherit pkgs; })
|
|
(import ../../scripts/rofi-launcher.nix { inherit pkgs; })
|
|
(import ../../scripts/screenshootin.nix { inherit pkgs; })
|
|
(import ../../scripts/list-hypr-bindings.nix {
|
|
inherit pkgs;
|
|
inherit host;
|
|
})
|
|
];
|
|
|
|
programs = {
|
|
gh.enable = true;
|
|
neovim =
|
|
let
|
|
toLua = str: "lua << EOF\n${str}\nEOF\n";
|
|
toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n";
|
|
in
|
|
{
|
|
enable = true;
|
|
defaultEditor = true;
|
|
viAlias = true;
|
|
vimAlias = true;
|
|
vimdiffAlias = true;
|
|
extraPackages = with pkgs; [
|
|
lua-language-server
|
|
];
|
|
plugins = with pkgs.vimPlugins; [
|
|
nvim-treesitter.withAllGrammars
|
|
comment-nvim
|
|
{
|
|
plugin = dracula-nvim;
|
|
config = "colorscheme dracula";
|
|
}
|
|
plenary-nvim
|
|
neodev-nvim
|
|
{
|
|
plugin = nvim-cmp;
|
|
config = toLuaFile ../../config/nvim/plugins/cmp.lua;
|
|
}
|
|
{
|
|
plugin = telescope-nvim;
|
|
config = toLuaFile ../../config/nvim/plugins/telescope.lua;
|
|
}
|
|
vim-tmux-navigator
|
|
];
|
|
extraLuaConfig = ''
|
|
local opt = vim.opt
|
|
opt.number = true
|
|
opt.relativenumber = true
|
|
opt.tabstop = 2
|
|
opt.shiftwidth = 2
|
|
opt.expandtab = true
|
|
opt.autoindent = true
|
|
opt.wrap = false
|
|
opt.ignorecase = true
|
|
opt.smartcase = true
|
|
opt.termguicolors = true
|
|
opt.background = "dark"
|
|
opt.signcolumn = "yes"
|
|
opt.cursorline = true
|
|
opt.backspace = "indent,eol,start"
|
|
opt.clipboard:append("unnamedplus")
|
|
opt.splitright = true
|
|
opt.splitbelow = true
|
|
opt.swapfile = false
|
|
vim.g.mapleader = " "
|
|
local keymap = vim.keymap
|
|
-- use jk to exit insert mode
|
|
keymap.set("i", "jk", "<ESC>", { desc = "Exit insert mode with jk" })
|
|
-- clear search highlights
|
|
keymap.set("n", "<leader>nh", ":nohl<CR>", { desc = "Clear search highlights" })
|
|
-- window management
|
|
keymap.set("n", "<leader>sv", "<C-w>v", { desc = "Split window vertically" }) -- split window vertically
|
|
keymap.set("n", "<leader>sh", "<C-w>s", { desc = "Split window horizontally" }) -- split window horizontally
|
|
keymap.set("n", "<leader>se", "<C-w>=", { desc = "Make splits equal size" }) -- make split windows equal width & height
|
|
keymap.set("n", "<leader>sx", "<cmd>close<CR>", { desc = "Close current split" }) -- close current split window
|
|
keymap.set("n", "<leader>to", "<cmd>tabnew<CR>", { desc = "Open new tab" }) -- open new tab
|
|
keymap.set("n", "<leader>tx", "<cmd>tabclose<CR>", { desc = "Close current tab" }) -- close current tab
|
|
keymap.set("n", "<leader>tn", "<cmd>tabn<CR>", { desc = "Go to next tab" }) -- go to next tab
|
|
keymap.set("n", "<leader>tp", "<cmd>tabp<CR>", { desc = "Go to previous tab" }) -- go to previous tab
|
|
keymap.set("n", "<leader>tf", "<cmd>tabnew %<CR>", { desc = "Open current buffer in new tab" }) -- move current buffer to new tab
|
|
'';
|
|
};
|
|
kitty = {
|
|
enable = true;
|
|
package = pkgs.kitty;
|
|
font.name = "JetBrainsMono Nerd Font";
|
|
font.size = 16;
|
|
settings = {
|
|
scrollback_lines = 2000;
|
|
wheel_scroll_min_lines = 1;
|
|
window_padding_width = 4;
|
|
confirm_os_window_close = 0;
|
|
background_opacity = "0.9";
|
|
};
|
|
extraConfig = ''
|
|
foreground #${palette.base05}
|
|
background #${palette.base00}
|
|
color0 #${palette.base03}
|
|
color1 #${palette.base08}
|
|
color2 #${palette.base0B}
|
|
color3 #${palette.base09}
|
|
color4 #${palette.base0D}
|
|
color5 #${palette.base0E}
|
|
color6 #${palette.base0C}
|
|
color7 #${palette.base06}
|
|
color8 #${palette.base04}
|
|
color9 #${palette.base08}
|
|
color10 #${palette.base0B}
|
|
color11 #${palette.base0A}
|
|
color12 #${palette.base0C}
|
|
color13 #${palette.base0E}
|
|
color14 #${palette.base0C}
|
|
color15 #${palette.base07}
|
|
color16 #${palette.base00}
|
|
color17 #${palette.base0F}
|
|
color18 #${palette.base0B}
|
|
color19 #${palette.base09}
|
|
color20 #${palette.base0D}
|
|
color21 #${palette.base0E}
|
|
color22 #${palette.base0C}
|
|
color23 #${palette.base06}
|
|
cursor #${palette.base07}
|
|
cursor_text_color #${palette.base00}
|
|
selection_foreground #${palette.base01}
|
|
selection_background #${palette.base0D}
|
|
url_color #${palette.base0C}
|
|
active_border_color #${palette.base04}
|
|
inactive_border_color #${palette.base00}
|
|
bell_border_color #${palette.base03}
|
|
tab_bar_style fade
|
|
tab_fade 1
|
|
active_tab_foreground #${palette.base04}
|
|
active_tab_background #${palette.base00}
|
|
active_tab_font_style bold
|
|
inactive_tab_foreground #${palette.base07}
|
|
inactive_tab_background #${palette.base08}
|
|
inactive_tab_font_style bold
|
|
tab_bar_background #${palette.base00}
|
|
'';
|
|
};
|
|
starship = {
|
|
enable = true;
|
|
package = pkgs.starship;
|
|
};
|
|
bash = {
|
|
enable = true;
|
|
enableCompletion = true;
|
|
profileExtra = ''
|
|
#if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then
|
|
# exec Hyprland
|
|
#fi
|
|
'';
|
|
initExtra = ''
|
|
neofetch
|
|
if [ -f $HOME/.bashrc-personal ]; then
|
|
source $HOME/.bashrc-personal
|
|
fi
|
|
'';
|
|
sessionVariables = {
|
|
ZANEYOS = true;
|
|
};
|
|
shellAliases = {
|
|
sv = "sudo nvim";
|
|
flake-rebuild = "nh os switch --hostname ${host} /home/${username}/zaneyos";
|
|
flake-update = "nh os switch --hostname ${host} --update";
|
|
gcCleanup = "nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
|
|
v = "nvim";
|
|
ls = "lsd";
|
|
ll = "lsd -l";
|
|
la = "lsd -a";
|
|
lal = "lsd -al";
|
|
".." = "cd ..";
|
|
};
|
|
};
|
|
home-manager.enable = true;
|
|
hyprlock = {
|
|
enable = true;
|
|
settings = {
|
|
general = {
|
|
disable_loading_bar = true;
|
|
grace = 300;
|
|
hide_cursor = true;
|
|
no_fade_in = false;
|
|
};
|
|
background = [
|
|
{
|
|
path = "/home/${username}/.config/wallpapers/zaney-wallpaper.jpg";
|
|
blur_passes = 3;
|
|
blur_size = 8;
|
|
}
|
|
];
|
|
input-field = [
|
|
{
|
|
size = "200, 50";
|
|
position = "0, -80";
|
|
monitor = "";
|
|
dots_center = true;
|
|
fade_on_empty = false;
|
|
font_color = "rgb(202, 211, 245)";
|
|
inner_color = "rgb(91, 96, 120)";
|
|
outer_color = "rgb(24, 25, 38)";
|
|
outline_thickness = 5;
|
|
placeholder_text = "Password...";
|
|
shadow_passes = 2;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|