{ config, lib, inputs, pkgs, self, ... }: let cfg = config.profiles.base; neotheme = config.neotheme; inherit (self.packages.x86_64-linux) neovim; in { imports = [ ../../modules/programs/nixpkgs ../../modules/programs/zshell #../../modules/programs/zellij ../../modules/misc/neotheme ]; options.profiles.base.enable = lib.mkEnableOption "The base profile, contains general configurations."; config = lib.mkIf cfg.enable { home.sessionVariables = rec { # NIXOS_OZONE_WL = 1; # FIXME: interface 'wl_output' has no event 4 EDITOR = "nvim"; VISUAL = "nvim"; GIT_EDITOR = EDITOR; }; gtk.enable = true; gtk.iconTheme.package = pkgs.papirus-icon-theme; gtk.iconTheme.name = "Papirus-Dark"; gtk.theme.package = (pkgs.orchis-theme.override { tweaks = [ "primary" "compact" ]; }); gtk.theme.name = "Orchis-dark-compact"; gtk.font.name = "Dina 10"; home.file.".icons/default".source = "${pkgs.vanilla-dmz}/share/icons/Vanilla-DMZ-AA"; # TODO: use limestone theme neotheme = { name = "Nightlamp Theme - Iceberg Variant"; identifier = "nightlamp-iceberg"; colors = { background = "151515"; foreground = "cbc0ab"; alt0 = "404147"; alt1 = "54555b"; color0 = "222329"; color1 = "b17f81"; color2 = "8aa387"; color3 = "d4ae80"; color4 = "84a0c6"; color5 = "a093c7"; color6 = "8fbfdc"; color7 = "d0d0c7"; bright0 = "36373d"; bright1 = "c59395"; bright2 = "9eb79b"; bright3 = "e8c294"; bright4 = "a2bee4"; bright5 = "beb1e5"; bright6 = "acd0e5"; bright7 = "e4e4db"; }; }; home.keyboard.layout = "us"; home.packages = [ # Sway pkgs.autotiling pkgs.swaylock-effects pkgs.swaybg pkgs.wayland-utils pkgs.wl-clipboard pkgs.grim pkgs.slurp pkgs.sway-contrib.grimshot pkgs.waybar pkgs.bemenu pkgs.qt5.qtwayland pkgs.xdg_utils # Nix Tools pkgs.nix-tree pkgs.nix-top pkgs.nix-update pkgs.hydra-check pkgs.bottom pkgs.fd # Fix gpg not recognizing foot terminfo pkgs.foot.terminfo pkgs.fzf pkgs.libnotify pkgs.pass pkgs.procs pkgs.sops pkgs.tree # Don't manage neovim neovim # Common build tools pkgs.cargo pkgs.go pkgs.gcc # pkgs.clang ]; wayland.windowManager.sway = { enable = true; wrapperFeatures = { base = true; gtk = true; }; config = { bars = [{ command = "${pkgs.waybar}/bin/waybar"; }]; keybindings = { }; }; extraConfig = import ./config/sway.nix { inherit pkgs neotheme; }; }; programs = { bat.enable = true; direnv.enable = true; direnv.nix-direnv.enable = true; exa.enable = true; exa.enableAliases = true; gpg.enable = true; gpg.settings.keyserver = "keys.openpgp.org"; home-manager.enable = true; htop.enable = true; foot = { enable = true; settings = import ./config/foot.nix { inherit neotheme; }; }; tmux = { enable = true; prefix = "C-f"; terminal = "xterm-256color"; shell = "${pkgs.zsh}/bin/zsh"; baseIndex = 1; keyMode = "vi"; escapeTime = 0; extraConfig = import ./config/tmux.nix; }; waybar = { enable = config.wayland.windowManager.sway.enable; settings = [ (import ./config/waybar/settings.nix { inherit neotheme; }) ]; style = import ./config/waybar/style.nix { inherit neotheme; }; }; zsh = { enable = true; enableCompletion = true; enableAutosuggestions = true; autocd = true; dotDir = ".config/zsh"; plugins = [ { name = "powerlevel10k"; src = pkgs.zsh-powerlevel10k; file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; } { name = "powerlevel10k-config"; src = lib.cleanSource ./p10k-config; file = "p10k.zsh"; } { name = "zsh-syntax-highlighting"; src = pkgs.fetchFromGitHub { owner = "zsh-users"; repo = "zsh-syntax-highlighting"; rev = "0.7.1"; sha256 = "03r6hpb5fy4yaakqm3lbf4xcvd408r44jgpv4lnzl9asp4sb9qc0"; }; } { name = "doas-zsh-plugin"; src = pkgs.fetchFromGitHub { owner = "anatolykopyl"; repo = "doas-zsh-plugin"; rev = "17d0b55ca2acd12f7acc9e38c4ecaf413725be18"; sha256 = "sha256-10rcF9cho9GuZCFQVIdFjvHCAlTLHNaLY4twxjT2jcE="; }; file = "doas.plugin.zsh"; } ]; shellAliases = config.programs.zshell.aliases; }; zshell.aliases = { e = "nvim"; ow = "nvim"; nvimdiff = "nvim -d"; }; zoxide = { enable = true; enableZshIntegration = true; }; # TODO: https://github.com/zellij-org/zellij/issues/1013 # zellij = { # enable = true; # # settings = { # default_mode = "normal"; # pane_frames = false; # simplified_ui = true; # bitmap fonts # # themes = { # default = { # # Industrial Jellybeans theme # bg = [ 21 21 21 ]; # fg = [ 136 136 136 ]; # black = [ 28 28 28 ]; # gray = [ 64 64 64 ]; # white = [ 232 232 211 ]; # red = [ 141 61 38 ]; # orange = [ 250 187 110 ]; # yellow = [ 250 208 122 ]; # green = [ 153 173 106 ]; # blue = [ 129 151 191 ]; # cyan = [ 143 191 220 ]; # magenta = [ 198 182 238 ]; # }; # }; # }; # }; }; services = { dunst = { enable = true; settings = import ./config/dunst.nix { inherit neotheme; }; }; gpg-agent = { enable = true; pinentryFlavor = "gtk2"; defaultCacheTtl = 3600; defaultCacheTtlSsh = 3600; maxCacheTtl = 86400; maxCacheTtlSsh = 86400; extraConfig = '' allow-preset-passphrase ''; }; swayidle = { enable = true; events = [ { event = "before-sleep"; command = "${pkgs.swaylock-effects}/bin/swaylock -fFc ${neotheme.colors.background} --indicator --grace 2 --fade-in 0.2"; } { event = "lock"; command = "${pkgs.swaylock-effects}/bin/swaylock -fFc ${neotheme.colors.background} --indicator --grace 2 --fade-in 0.2"; } ]; timeouts = [ { timeout = 230; command = "${pkgs.libnotify}/bin/notify-send -t 30000 'Locking screen in 30 seconds'"; } { timeout = 300; command = "${pkgs.swaylock-effects}/bin/swaylock -fFc ${neotheme.colors.background} --indicator --grace 2 --fade-in 0.2"; } { timeout = 600; command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'"; resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'"; } ]; }; wlsunset = { enable = true; latitude = "36.5"; longitude = "127.2"; }; }; home.file.".pam-gnupg".text = '' 77FE99210D6D1175076B284229CE8818A7112C9B ''; }; }