# Last stable generation 359 10/13/24 { inputs, outputs, lib, config, pkgs, systemSettings, userSettings, zen-browser, hyprland, nix-colors, ... }: let myAliases = { # Sysadmin ll = "ls -alF"; la = "ls -A"; l = "ls -CF"; ".." = "cd .."; version = "lsb_release -cs"; cpu-speed = "cat /proc/cpuinfo | grep 'cpu MHz'"; update = "sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y"; listServices = "systemctl list-units --all --type=service --no-pager"; listUserServices = "systemctl list-units --all --type=service --no-pager --user"; ls = "eza --icons -l -T -L=1"; cat = "bat"; htop = "btm"; fd = "fd -Lu"; w3m = "w3m -no-cookie -v"; neofetch = "disfetch"; fetch = "disfetch"; # NixOS pkgsList="nix-env -qaP \\'*\\' --description"; nixUpdate="nix-env -u \\'*\\'"; updateChannel="nix-channel --update nixos"; nixOptimize="nix-store --optimise"; mkhome="cd ~/Flakes && home-manager switch --flake ."; buildsys="cd ~/Flakes && sudo nixos-rebuild switch --flake '.#'"; # Zoxide # cd="z"; # Kitty icat="kitten icat"; s="kitten ssh"; init_0="sudo systemctl isolate emergency.target"; init_1="sudo systemctl isolate rescue.target"; init_3="sudo systemctl isolate multi-user.target"; init_5="sudo systemctl isolate graphical.target"; # history="history | fzf"; }; # URL of your dotfiles repository dotfilesRepo = "http://nas.local/git/wayne/dotfiles.git"; # Path where the dotfiles repository will be cloned dotfilesPath = "${config.home.homeDirectory}/.dotfiles"; # Path to the directory within the dotfiles repository that contains home directory dotfiles homeStowPath = "${dotfilesPath}/home"; # pip hack # system = "x86_64-linux"; # pkgs = pkgs.legacyPackages.${system}; # buildPythonPackage = pkgs.python311Packages.buildPythonPackage; # fetchPypi = pkgs.python311Packages.fetchPypi; # Mopidy-WebSettings = buildPythonPackage rec { # pname = "Mopidy-WebSettings"; # version = "0.2.3"; # format = "mopidyPlugin"; # src = fetchPypi { # inherit pname version; # sha256 = "6aa2284cd7af4a34cb10e60e721e92b98f06b2f064be2e1e2191f73374baa1ff"; # }; # doCheck = false; # propogateBuildInputs = with pkgs.python311Packages; []; # }; polycat = pkgs.callPackage ../derivations/polycat {}; in { nixpkgs = { # You can add overlays here # overlays = [ ]; # Configure your nixpkgs instance config = { # allowUnfree = true; }; }; # fix for some display managers not using ~/.profile systemd.user.sessionVariables = config.home.sessionVariables; home = { username = "${userSettings.username}"; homeDirectory = "/home/${userSettings.username}"; sessionVariables = { PYTHONPATH = "${pkgs.mopidy}/lib/python3.11/site-packages:${pkgs.mopidy-tidal}/lib/python3.11/site-packages:${pkgs.mopidy-musicbox-webclient}/lib/python3.11/site-packages"; }; }; nixpkgs.config.allowUnfree = true; fonts.fontconfig.enable = true; # colorScheme = nix-colors.colorSchemes.nord; # wayland.windowManager.hyprland.enable = true; # xdg = { # enable = true; # userDirs = { # enable = true; # createDirectories = true; # documents = "${config.home.homeDirectory}/Documents"; # music = "${config.home.homeDirectory}/Music"; # videos = "${config.home.homeDirectory}/Videos"; # desktop = "${config.home.homeDirectory}/Desktop"; # download = "${config.home.homeDirectory}/Downloads"; # pictures = "${config.home.homeDirectory}/Pictures"; # templates = "${config.home.homeDirectory}/Templates"; # publicShare = "${config.home.homeDirectory}/Public"; # }; # mimeApps.enable = true; # portal = { # enable = true; # configPackages = [ pkgs.xdg-desktop-portal-hyprland ]; # extraPortals = [ pkgs.xdg-desktop-portal-hyprland pkgs.kdePackages.xdg-desktop-portal-kde ]; # xdgOpenUsePortal = true; # # wlr.enable = true; # }; # configHome = "~/.config"; # dataHome = "~/.local/share"; # stateHome = "~/.local/state"; # cacheHome = "~/.cache"; # systemDirs = { # config = [ "/etc/xdg" ]; # data = [ "/usr/share" "/usr/local/share" ]; # }; # }; wayland.windowManager = { hyprland = { enable = true; # # systemd ={ # # enable = true; # # enableXdgAutostart = true; # # variables = [ "--all" ]; # # }; # package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; xwayland.enable = true; }; }; programs.hyprlock.enable = true; services.hypridle = { enable = true; settings = { # $lock_cmd = pidof hyprlock || hyprlock # $suspend_cmd = pidof steam || systemctl suspend || loginctl suspend # fuck nvidia general = { lock_cmd = "pidof hyprlock || hyprlock"; before_sleep_cmd = "loginctl lock-session"; }; listener = [ { timeout = 5400; on-timeout = "loginctl lock-session"; } { timeout = 7200; on-timeout = "hyprctl dispatch dpms off"; on-resume = "hyprctl dispatch dpms on"; } { timeout = 10800; on-timeout = "pidof steam || systemctl suspend || loginctl suspend"; } ]; }; }; home.packages = with pkgs; [ (python3.withPackages (ps: with ps; [ pip pynvim # mopidy-tidal # Mopidy-WebSettings ])) # mopidy mopidy-tidal mopidy-musicbox-webclient gst_all_1.gstreamer gst_all_1.gst-plugins-bad # Core zsh bash git stow tmux tmuxPlugins.tmux-fzf vim neovim lunarvim # vimPlugins.vim-kitty-navigator zoxide # vimPlugins.telescope-zoxide vimPlugins.zoxide-vim bottom htop jq # Lunarvim Dependencies gnumake42 nodejs_22 cargo ripgrep cmake starship yazi mapscii tidal-dl # IDE's sublime3 vscode # vscode.languages.web vscode.languages.python vscode.languages.nix vscode.languages.bash typora obsidian obsidian-export # vimPlugins.obsidian-nvim appimage-run # studio krita inkscape blender gimp-with-plugins reaper # System/Rescue ddrescue gparted nerdfonts ubuntu_font_family # openrgb-with-all-plugins # Cloud/Remote restic nextcloud-client keepassxc git-credential-keepassxc keybase-gui keybase kbfs remmina # Browsers firefox-devedition w3m ungoogled-chromium librewolf # https://github.com/MarceColl/zen-browser-flake/tree/master zen-browser.packages."${system}".default mailspring betterbird doublecmd # pentablet-flake libreoffice wdisplays waybar hyprpaper hyprlock hypridle wlogout rofi-wayland wev clipman cliphist wl-clip-persist wl-clipboard polycat qt5.qtwayland qt6.qtwayland qt5ct qt6ct hyprshot hyprpicker dconf wayland-utils wayland-protocols qalculate-qt blueman networkmanagerapplet swayosd base16-schemes base16-shell-preview # hyprcursor nordzy-icon-theme # LLM's # lmstudio ]; programs = { home-manager.enable = true; vscode.enable = true; ripgrep.enable = true; wlogout = { enable = true; layout = [ { label = "lock"; action = "loginctl lock-session"; text = "Lock"; keybind = "l"; circular = false; } { label = "hibernate"; action = "systemctl hibernate"; text = "Hibernate"; keybind = "h"; circular = false; } { label = "logout"; action = "hyprctl dispatch exit"; text = "Logout"; keybind = "e"; circular = false; } { label = "shutdown"; action = "systemctl poweroff"; text = "Shutdown"; keybind = "s"; circular = false; } { label = "suspend"; action = "systemctl suspend"; text = "Suspend"; keybind = "u"; circular = false; } { label = "reboot"; action = "systemctl reboot"; text = "Reboot"; keybind = "r"; circular = false; } ]; }; }; services = { # dunst.enable = false; mako.enable = true; blueman-applet.enable = true; keybase.enable = true; kbfs = { enable = true; mountPoint = "keybase"; extraFlags = [ "-label: kbfs" "-mount-type: normal" ]; }; nextcloud-client = { enable = false; startInBackground = false; }; udiskie = { enable = true; settings = { program_options = { tray = "auto"; notify = true; }; icon_names.media = [ "media-optical" ]; }; }; swayosd = { enable = true; display = "DP-4"; }; }; home.sessionVariables = { EDITOR = userSettings.editor; SPAWNEDITOR = userSettings.spawnEditor; TERM = userSettings.term; # BROWSER = userSettings.browser; }; imports = [ (import ../user/shell/stow.nix { pkgs = pkgs; lib = lib; config = config; }) (import ../user/shell/cli-collection.nix { pkgs = pkgs; }) (import ../user/shell/sh.nix { inherit myAliases; pkgs = pkgs;}) (import ../user/shell/zsh.nix { inherit myAliases; pkgs = pkgs;}) (import ../user/git/git.nix { inherit userSettings; pkgs = pkgs; }) (import ../user/app/terminal/tmux.nix { pkgs = pkgs; lib = lib; config = config; }) (import ../user/app/terminal/kitty.nix { pkgs = pkgs; lib = lib; nix-colors = nix-colors; config = config; }) # (import ../user/app/terminal/starship.nix { pkgs = pkgs; }) (import ../user/app/terminal/parrot-starship.nix { pkgs = pkgs; }) (import ../user/app/terminal/yazi.nix { pkgs = pkgs; }) (import ../user/lang/cc/cc.nix { pkgs = pkgs; }) # (import ../user/lang/python/python.nix { pkgs = pkgs; }) # (import ../user/lang/python/python-packages.nix { pkgs = pkgs; }) # (import ../user/app/editor/nvim.nix { pkgs = pkgs; }) # (import ../user/app/terminal/alacritty.nix { pkgs = pkgs; }) (import ../user/wm/hyprland/hyprland.nix { pkgs = pkgs; hyprland = hyprland; }) (import ../user/wm/waybar/waybar.nix { inherit config; pkgs = pkgs; }) # (import ../user/wm/dunst/dunst.nix { inherit config; pkgs = pkgs; lib=lib; }) (import ../user/wm/mako/mako.nix { config = config; pkgs = pkgs; lib=lib; }) # (import ../user/wm/decor/stylix.nix { pkgs = pkgs; }) (import ../user/app/audio/mopidy.nix { pkgs = pkgs; }) # nix-colors.homeManagerModules.default ]; news.display = "silent"; systemd.user.startServices = "sd-switch"; # systemd.user.services.keybase-kwallet = { # # Move the description inside `Unit` to make it more explicit # Unit = { # Description = "Keybase startup after kwallet is open"; # After = [ "graphical-session.target" ]; # }; # # Define how the service should behave # Service = { # ExecStart = '' # while ! dbus-send --session --type=method_call --dest=org.kde.KWallet /KWallet org.kde.KWallet.isOpen; do # sleep 2 # done # # Run Keybase and other related services # keybase unlock --no-prompt || keybase login # kbfsfuse & # keybase-gui & # ''; # Restart = "on-failure"; # }; # # Make the service start on login # Install = { # WantedBy = [ "default.target" ]; # }; # }; # systemd.user.services.input-remapper = { # Unit = { # description = "Custom Input Remapper Service"; # }; # serviceConfig = { # ExecStart = "${pkgs.input-remapper}/bin/input-remapper-control --config-dir /home/wayne/.config/input-remapper-2/ --device 'Hanvon Ugee Shortcut Remote' --preset 'Browsers' && ${pkgs.input-remapper}/bin/input-remapper-control --config-dir /home/wayne/.config/input-remapper-2/ --device 'MX MCHNCL Keyboard' --preset 'Layer_1' && ${pkgs.input-remapper}/bin/input-remapper-control --config-dir /home/wayne/.config/input-remapper-2/ --device 'SINO WEALTH Bluetooth Keyboard' --preset 'Layer_1'"; # Restart = "on-failure"; # }; # Install = { # wantedBy = [ "graphical.target" ]; # }; # }; # home.file.".config/hypr/autostart-input-remapper.sh" = { # text = '' # #!/bin/sh # sudo ${pkgs.input-remapper}/bin/input-remapper-service -d # ''; # executable = true; # }; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion home.stateVersion = "24.05"; }