Initial Commit

This commit is contained in:
wayne 2024-10-14 14:28:31 -07:00
commit 7aad0e3876
47 changed files with 3798 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
launchpad-system-flake.sublime-project
launchpad-system-flake.sublime-workspace

524
configuration.nix Normal file
View File

@ -0,0 +1,524 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ lib, config, pkgs, zen-browser, hyprland, inputs, ... }:
let
unstable = import <nixpkgs> {
overlays = pkgs.overlays;
};
# flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
# hyprland = (import flake-compat {
# src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/main.tar.gz";
# sha256 = "qY6zh8gdgioEgCDOgT+SnK9QZ3OtGi+eXqqzcsYWKe8=";
# }).defaultNix;
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "launchpad"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
networking.extraHosts = ''
192.168.12.20 router.local
192.168.12.21 switch.local
192.168.12.25 dhcpd.local
192.168.12.40 launchpad.local
192.168.12.41 xeon.local
192.168.12.80 robo.local
192.168.12.81 nas.local
192.168.12.83 homeassistant.local
192.168.12.60 toons.local
45.58.52.52 www
172.245.111.249 est
216.189.156.74 mail
'';
networking.interfaces.enp4s0.ipv4.addresses = [ {
address = "192.168.12.40";
prefixLength = 24;
} ];
networking.defaultGateway = "192.168.12.20";
networking.nameservers = [ "192.168.12.25" ];
networking.firewall = {
allowedTCPPortRanges = [ { from = 35000; to = 36000; } { from = 5000; to = 6000; } { from = 8000; to = 9000; } ];
extraCommands = ''iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns'';
};
# Enable networking
networking.networkmanager.enable = true;
fileSystems."/mnt/share/Music" = {
device = "//nas.local/Music";
fsType = "cifs";
options = let
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
in ["${automount_opts},credentials=/etc/nixos/smb-secrets,uid=1000,gid=100"];
};
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
services.xserver = {
enable = false;
xkb = {
layout = "us";
variant = "";
};
videoDrivers = [ "nvidia" ];
};
hardware.opengl = { # Renamed hardware.graphics
enable = true; # Renamed
package = pkgs.mesa.drivers; # Renamed
# 32bit Support
driSupport32Bit = true; # Renamed
# package32 = pkgsi686Linux.mesa.drivers;
};
# hardware.graphics = { # Only in unstable
# enable = true;
# package = pkgs.mesa.drivers;
# enable32Bit = true;
# };
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = true;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
# xdg.portal = {
# enable = false;
# xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
# extraPortals = [ inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland pkgs.kdePackages.xdg-desktop-portal-kde ];
# };
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm = {
enable = true;
autoNumlock = true;
enableHidpi = true;
settings = {
X11 = {
MinimumVT = 7;
DisplayCommand="/etc/sddm/Xsetup";
};
};
wayland = {
enable = true;
};
};
# services.pentablet.enable = true;
# environment.etc."ssdm.conf.d/10-wayland.conf".text = ''
# [General]
# DisplayServer=wayland
# GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell
# [Wayland]
# CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1
# '';
# environment.etc."sddm/Xsetup".text = ''
# #!/usr/bin/env bash
# xrandr --output DP-5 --auto --primary
# xrandr --output DP-4 --left-of DP-5 --noprimary
# xrandr --output DP-2 --right-of DP-5 --rotate left --noprimary
# '';
environment.sessionVariables.NIXOS_OZONE_WL = "1";
environment.sessionVariables.SDDM_INITIAL_VT = "VT 7";
services.desktopManager.plasma6.enable = true;
programs.hyprland = {
enable = true;
xwayland.enable = true;
# package = pkgs.hyprland;
# package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
# portalPackage = pkgs.xdg-desktop-portal-hyprland;
# portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
};
# programs.uwsm = {
# enable = true; # You must configure waylandCompositors suboptions
# waylandCompositors = {
# hyprland = {
# prettyName = "Hyprland";
# comment = "Hyprland compositor managed by UWSM";
# binPath = "/run/current-system/sw/bin/Hyprland";
# };
# };
# };
hardware.bluetooth.enable = true; # enables support for Bluetooth
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
security.polkit = {
enable = true;
extraConfig = ''
polkit.addRule(function (action, subject) {
if (
subject.isInGroup("users") &&
[
"org.freedesktop.login1.reboot",
"org.freedesktop.login1.reboot-multiple-sessions",
"org.freedesktop.login1.power-off",
"org.freedesktop.login1.power-off-multiple-sessions",
].indexOf(action.id) !== -1
) {
return polkit.Result.YES;
}
});
polkit.addRule(function(action, subject) {
var YES = polkit.Result.YES;
var permission = {
// required for udisks1:
"org.freedesktop.udisks.filesystem-mount": YES,
"org.freedesktop.udisks.luks-unlock": YES,
"org.freedesktop.udisks.drive-eject": YES,
"org.freedesktop.udisks.drive-detach": YES,
// required for udisks2:
"org.freedesktop.udisks2.filesystem-mount": YES,
"org.freedesktop.udisks2.encrypted-unlock": YES,
"org.freedesktop.udisks2.eject-media": YES,
"org.freedesktop.udisks2.power-off-drive": YES,
// required for udisks2 if using udiskie from another seat (e.g. systemd):
"org.freedesktop.udisks2.filesystem-mount-other-seat": YES,
"org.freedesktop.udisks2.filesystem-unmount-others": YES,
"org.freedesktop.udisks2.encrypted-unlock-other-seat": YES,
"org.freedesktop.udisks2.encrypted-unlock-system": YES,
"org.freedesktop.udisks2.eject-media-other-seat": YES,
"org.freedesktop.udisks2.power-off-drive-other-seat": YES
};
if (subject.isInGroup("storage")) {
return permission[action.id];
}
});
'';
};
# security.pam.services = {
# login.enableKwallet = false;
# login.kwallet = {
# enable = true;
# package = pkgs.plasma5Packages.kwallet-pam;
# };
# sddm = {
# enableKwallet = true;
# text = ''
# # Enable pam_kwallet5 for sddm
# auth optional pam_kwallet5.so
# session optional pam_kwallet5.so auto_start
# '';
# };
# };
# security.pam.services.wayne.kwallet.enable = true;
# security.pam.services.wayne.kwallet.package = pkgs.plasma5Packages.kwallet-pam;
# Redirect syslog to TTY12
systemd.services."systemd-journald-tty12" = {
description = "Forward syslog to TTY12";
serviceConfig = {
ExecStart = "/bin/sh -c 'journalctl -f > /dev/tty12'";
};
wantedBy = [ "multi-user.target" ];
};
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Enable Flakes
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
max-jobs = 12; # Adjust this to your CPU core count or slightly below
};
# Define a user account. Don't forget to set a password with passwd.
users = {
groups = {
wayne.gid = 1000;
vmail.gid = 2000;
storage.gid = 2010;
dialout = {};
plugdev = {};
uinput = {};
};
users = {
wayne = {
isNormalUser = true;
description = "Wayne Hayes";
extraGroups = [ "networkmanager" "wheel" "docker" "wayne" "vmail" "uinput" "storage" ];
openssh.authorizedKeys.keys = [];
packages = with pkgs; [
kdePackages.kate
];
shell = pkgs.zsh;
};
};
};
security.sudo = {
enable = true;
extraConfig = ''
%wheel ALL=(ALL) NOPASSWD: ${pkgs.input-remapper}/bin/input-remapper-service
%wheel ALL=(ALL) NOPASSWD: ${pkgs.input-remapper}/bin/input-remapper-control
'';
};
systemd.services.StartInputRemapperDaemonAtLogin = {
enable = false;
description = "Start input-remapper daemon after login";
unitConfig = {
Type = "simple";
};
script = lib.getExe(pkgs.writeShellApplication {
name = "start-input-mapper-daemon";
runtimeInputs = with pkgs; [input-remapper procps su];
text = ''
until pgrep -u wayne; do
sleep 1
done
sleep 2
until [ $(pgrep -c -u root "input-remapper") -eq 4 ]; do
input-remapper-service&
sleep 1
input-remapper-helper&
sleep 1
done
su wayne -c "input-remapper-control --command stop-all"
su wayne -c "input-remapper-control --command autoload"
sleep infinity
'';
});
wantedBy = [ "default.target" ];
};
# Possible weird bug
# systemd.services.ReloadInputRemapperAfterSleep = {
# enable = true;
# description = "Reload input-remapper config after sleep";
# after = [ "suspend.target" ];
# unitConfig = {
# Type = "forking";
# };
# serviceConfig.User = "wayne";
# script = lib.getExe(pkgs.writeShellApplication {
# name = "reload-input-mapper-config";
# runtimeInputs = with pkgs; [input-remapper ps gawk];
# text = ''
# until [[ $(ps aux | awk '$11~"input-remapper" && $12="<defunct>" {print $0}' | wc -l) -eq 0 ]]; do
# input-remapper-control --command stop-all
# input-remapper-control --command autoload
# sleep 1
# done
# '';
# });
# wantedBy = [ "suspend.target" ];
# };
# Install firefox.
programs.firefox.enable = true;
programs.zsh.enable = true;
# Allow unfree packages
nixpkgs.config = {
allowUnfree = true;
cudaSupport = true;
acceptedLicenses = [ "unfree" "unfreeRedistributable" ];
};
programs.nix-ld.enable = true;
# programs.nix-ld.libraries = with pkgs; [
# libusb
# kdePackages.qt5compat kdePackages.full
# libsForQt5.full
# libGL
# gcc glib xorg.libXext
# ];
nixpkgs.config.permittedInsecurePackages = [
"freeimage-unstable-2021-11-01"
];
virtualisation.docker = {
enable = true;
rootless = {
enable = true;
setSocketVariable = true;
};
daemon.settings = {
userland-proxy = false;
ipv6 = false;
};
};
services = {
printing.enable = true;
ollama = {
enable = true;
acceleration = "cuda";
models = "/var/lib/ollama/models";
environmentVariables = {};
};
input-remapper = {
enable = true;
enableUdevRules = true;
package = pkgs.input-remapper;
serviceWantedBy = [ "graphical.target" ];
};
# dbus.implementation = "dbus"; # The option `services.dbus.implementation' has conflicting definition values: - In `/nix/store/60sn02zhawl3kwn0r515zff3h6hg6ydz-source/nixos/modules/programs/wayland/uwsm.nix': "broker"
udisks2.enable = true;
logrotate.enable = true;
openssh = {
enable = true;
ports = [ 22 ];
settings = {
PasswordAuthentication = true;
AllowUsers = [ "wayne" ]; # Allows all users by default. Can be [ "user1" "user2" ]
UseDns = true;
X11Forwarding = false;
PermitRootLogin = "no"; # "yes", "without-password", "prohibit-password", "forced-commands-only", "no"
};
};
# kmonad = {
# enable = true;
# keyboards = {
# myKMonadOutput = {
# device = "/dev/input/by-id/usb-Hanvon_Ugee_Shortcut_Remote_000000000000000-event-kbd";
# config = builtins.readFile /home/wayne/.config/kmonad/hanvon-ugee.kbd;
# };
# };
# };
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget git sshfs
pciutils
zsh
cryptsetup
home-manager
wpa_supplicant
lynx
nix-index nix-prefetch-scripts nix-prefetch
docker_27 docker-compose
direnv nix-direnv
# xdg-desktop-portal-hyprland
clinfo glxinfo vulkan-tools wayland-utils wl-clipboard
kdePackages.kdeplasma-addons kdePackages.qtstyleplugin-kvantum kdePackages.full kdePackages.qtwebengine kdePackages.qtpositioning kdePackages.qtlocation
kdePackages.ark plasma5Packages.kwallet-pam kdePackages.dolphin kdePackages.kwallet kdePackages.kwalletmanager kdePackages.konsole
evtest input-remapper dbus uwsm # keyd
cudaPackages.cudatoolkit # cudaPackages.cuda-samples
cifs-utils mesa libGL udiskie
# steam-run
];
fonts.packages = with pkgs; [
nerdfonts
garamond-libre
liberation_ttf
ubuntu_font_family
libre-baskerville
libre-bodoni
];
fonts.fontDir.enable = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
nix.settings.auto-optimise-store = true;
nix.settings.access-tokens = "nas.local/git=PAT:glpat-bfbAJxv_4tmgySBZcPSZ";
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
}

113
flake.nix Normal file
View File

@ -0,0 +1,113 @@
{
description = "Launchpad flake";
inputs = {
# Switched to unstable 10/13/24 Generation 109 and below stable
nixpkgs-unstable.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
legacy.url = "github:NixOS/nixpkgs-channels";
# Home manager
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
base16.url = "github:SenchoPens/base16.nix";
nix-colors.url = "github:misterio77/nix-colors";
tt-schemes = {
url = "github:tinted-theming/schemes";
flake = false;
};
base16-vim = {
url = "github:tinted-theming/base16-vim";
flake = false;
};
# Zen Browser
# zen-browser.url = "github:MarceColl/zen-browser-flake";
zen-browser.url = "github:mastermines1/zen-browser-flake";
# hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
# hyprland.url = "github:hyprwm/Hyprland";
# GnuCobal.url="/home/wayne/Flakes/derivations/GnuCobal/";
# pentablet-flake.url = "/home/wayne/Flakes/derivations/xpen/"; # Replace with actual path or Git URL
# kmonad = {
# url = "git+https://github.com/kmonad/kmonad?submodules=1&dir=nix";
# inputs.nixpkgs.follows = "nixpkgs";
# };
};
outputs = { self, nixpkgs, legacy, home-manager, flake-utils, flake-compat, zen-browser, nix-colors, base16, ... } @ inputs:
let
inherit (self) outputs;
lib = nixpkgs.lib; # Import lib here explicitly from nixpkgs
systems = [
"aarch64-linux"
"i686-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
systemSettings = {
hostname = "launchpad";
profile = "Professional";
timezone = "America/Los_Angeles";
locale = "en_US.UTF-8";
gpuType = "nvidia";
version = "24.05";
};
userSettings = {
username = "wayne";
name = "wayne";
email = "...";
dotfilesDir = "~/.dotfiles";
term = "tmux";
font = "JetBrainsMono Nerd Font";
# fontPkg = pkgs.nerdfonts;
editor = "lvim"; # Default editor;
spawnEditor = if ((userSettings.editor == "vim") || (userSettings.editor == "nvim") || (userSettings.editor == "lvim") || (userSettings.editor == "nano"))
then "exec " + userSettings.term + " -e " + userSettings.editor
else userSettings.editor;
};
forAllSystems = nixpkgs.lib.genAttrs systems;
in {
packages = forAllSystems (system: nixpkgs.legacyPackages.${system});
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
nixosConfigurations = {
launchpad = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs systemSettings userSettings lib ;};
modules = [
# kmonad.nixosModules.default
./nixos/configuration.nix
# pentablet-flake.nixosModules.pentablet
];
};
};
homeConfigurations = {
wayne = home-manager.lib.homeManagerConfiguration {
# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs systemSettings userSettings zen-browser nix-colors ;};
modules = [
base16.nixosModule
# set system's scheme to nord by setting `config.scheme`
{ scheme = "${inputs.tt-schemes}/base16/nord.yaml"; }
# import `theming.nix`, we will write it in the next, final, step
# ./theming.nix
./home-manager/home.nix
];
};
};
};
}

View File

@ -0,0 +1,41 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/34b5e875-d066-49f9-9809-7a68d93406b3";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/A476-222E";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/9a2af991-81ca-4748-9190-e8a1cc2b3b95"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

416
hm/home.nix Normal file
View File

@ -0,0 +1,416 @@
# 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";
}

4
modules/display.nix Normal file
View File

@ -0,0 +1,4 @@
{ pkgs, ... }
{
}

4
modules/files.nix Normal file
View File

@ -0,0 +1,4 @@
{ pkgs, ... }
{
}

4
modules/fonts.nix Normal file
View File

@ -0,0 +1,4 @@
{ pkgs, ... }
{
}

4
modules/hypr.nix Normal file
View File

@ -0,0 +1,4 @@
{ pkgs, ... }
{
}

4
modules/network.nix Normal file
View File

@ -0,0 +1,4 @@
{ pkgs, ... }
{
}

4
modules/security.nix Normal file
View File

@ -0,0 +1,4 @@
{ pkgs, ... }
{
}

20
nix/nix.conf Normal file
View File

@ -0,0 +1,20 @@
# WARNING: this file is generated from the nix.* options in
# your NixOS configuration, typically
# /etc/nixos/configuration.nix. Do not edit it!
access-tokens = nas.local/git=PAT:glpat-bfbAJxv_4tmgySBZcPSZ
allowed-users = *
auto-optimise-store = true
builders =
cores = 0
experimental-features = nix-command flakes
max-jobs = 12
require-sigs = true
sandbox = true
sandbox-fallback = false
substituters = https://cache.nixos.org/
system-features = nixos-test benchmark big-parallel kvm
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
trusted-substituters =
trusted-users = root
extra-sandbox-paths =

86
pkgs/app/audio/mopidy.nix Normal file
View File

@ -0,0 +1,86 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
];
services.mopidy = {
enable = true;
# extensionPackages = [
# (pkgs.mopidy-tidal.overrideAttrs (old: rec {
# pname = "Mopidy-Tidal";
# version = "0.3.2";
# src = pkgs.python311Packages.fetchPypi {
# inherit pname version;
# sha256 = "7a4aa1ccac94d96a9339e451d5949903dc96dd45ec2c1b02d8193a159ad08267";
# };
# postPatch = ''
# substituteInPlace setup.py
# '';
# }))
# ];
settings = {
audio = {
output = "autoaudiosink";
mixer = "software";
mixer_volume = 100;
};
file = {
media_dirs = [ "/mnt/share/Music/" ];
metadata_timeout = 5000;
follow_symlinks = true;
show_dotfiles = false;
excluded_file_extensions = [ ".html" ".zip" ".nfo" ".txt" ".jpg" ".jpeg" ".png" ".pdf" ".log" ];
};
http = {
enabled = true;
hostname = "launchpad.local";
port = 6680;
default_app = "mopidy";
};
stream = {
enabled = true;
protocols = [ "http" "https" "mms" "rtmp" "rtmps" "rtsp" ];
timeout = 5000;
};
logging = {
verbosity = 1;
format = "%(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s";
color = true;
};
# autoplay = {
# enabled = true;
# save_interval = 10;
# tracklist.uris = "auto";
# tracklist.index = "auto";
# tracklist.consume = "auto";
# tracklist.random = "auto";
# tracklist.repeat = "auto";
# tracklist.single = "auto";
# playback.state = "auto";
# playback.time_position = "auto";
# mixer.volume = 100;
# mixer.mute = false;
# };
tidal = {
enabled = true;
quality = "HI_RES_LOSSLESS";
auth_method = "PKCE";
lazy = true;
login_method = "BLOCK"; # block auto hack
};
musicbox_webclient = {
enabled = true;
musicbox = true;
websocket_host = "launchpad.local";
websocket_port = 6680;
on_track_click = "ADD_THIS_BOTTOM";
};
};
};
}
# sudo python3 -m pip install Mopidy-Beets
# sudo python3 -m pip install Mopidy-Tidal
# sudo python3 -m pip install Mopidy-Iris
# sudo python3 -m pip install Mopidy-Autoplay

25
pkgs/app/editor/nvim.nix Normal file
View File

@ -0,0 +1,25 @@
{ pkgs, ... }:
{
home.file = {
# Link the main init.lua file
".config/nvim/init.lua".source = ../../../dotfiles/nvim/.config/nvim/init.lua;
# Link the lazy-lock.json file
".config/nvim/lazy-lock.json".source = ../../../dotfiles/nvim/.config/nvim/lazy-lock.json;
# Link the Lua directory
".config/nvim/lua" = {
source = ../../../dotfiles/nvim/.config/nvim/lua;
recursive = true;
};
# Link the plugins directory
".config/nvim/lua/plugins" = {
source = ../../../dotfiles/nvim/.config/nvim/lua/plugins;
recursive = true;
};
};
# Other home-manager configuration
}

View File

@ -0,0 +1,18 @@
{ ... }:
{
home.file = {
".config/alacritty" = {
source = ../../../dotfiles/alacritty/.config/alacritty;
recursive = true;
};
};
}
# home.packages = with pkgs; [
# alacritty
# ];
# programs.alacritty.enable = true;
# programs.alacritty.settings = {
# window.opacity = lib.mkForce 0.85;
# };
# }

View File

@ -0,0 +1,87 @@
# vim:fileencoding=utf-8:foldmethod=marker
{ pkgs, lib, nix-colors, config, ... }:
let
base16-scheme = config.scheme.withHashtag;
in
{
home.packages = with pkgs; [
kitty kitty-img kitty-themes
];
programs.kitty = {
enable = true;
package = pkgs.kitty;
# stylix.targets.kitty.enable = true;
font = {
name = "JetBrainsMono Nerd Font";
package = pkgs.nerdfonts;
};
settings = {
enable_audio_bell = true;
# foreground = "#${config.colorScheme.palette.base05}";
# background = "#${config.colorScheme.palette.base00}";
background_opacity = lib.mkForce "0.65";
background_blur = "5";
background_image = "../../Pictures/marvin.png";
background_image_layout = "cscaled";
background_tint = "0.95";
dynamic_background_opacity = "yes";
modify_font = "cell_width 90%";
scrollback_lines = 10000;
copy_on_select = "clipboard"; # Ensures text is copied when selected
clipboard_control = "write-clipboard write-primary read-clipboard-ask read-primary-ask";
allow_remote_control = "yes";
update_check_interval = 0;
shell = ".";
allow_hyperlinks = "yes";
};
shellIntegration = {
enableBashIntegration = true;
enableZshIntegration = true;
};
keybindings = {};
extraConfig = ''
wayland_titlebar_color ${base16-scheme.base13};
background ${base16-scheme.base00}
foreground ${base16-scheme.base07}
cursor ${base16-scheme.base07}
selection_background ${base16-scheme.base10}
selection_foreground ${base16-scheme.base07}
color0 ${base16-scheme.base00}
color1 ${base16-scheme.base08}
color2 ${base16-scheme.base0B}
color3 ${base16-scheme.base0A}
color4 ${base16-scheme.base0D}
color5 ${base16-scheme.base0E}
color6 ${base16-scheme.base0C}
color7 ${base16-scheme.base05}
color8 ${base16-scheme.base03}
color9 ${base16-scheme.base08}
color10 ${base16-scheme.base0B}
color11 ${base16-scheme.base0A}
color12 ${base16-scheme.base0D}
color13 ${base16-scheme.base0E}
color14 ${base16-scheme.base0C}
color15 ${base16-scheme.base07}
'';
};
}
# 0 #2E3440
# 1 #3B4252
# 2 #434C5E
# 3 #4C566A
# 4 #D8DEE9
# 5 #E5E9F0
# 6 #ECEFF4
# 7 #8FBCBB
# 8 #BF616A
# 9 #D08770
# 0 #EBCB8B
# 1 #A3BE8C
# 2 #88C0D0
# 3 #81A1C1
# 4 #B48EAD
# 5 #5E81AC

View File

@ -0,0 +1,194 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
starship
];
programs.starship = {
enable = true;
enableZshIntegration = true;
enableBashIntegration = true;
settings = {
format = ''
$status$username[@](fg:purple)$hostname$jobs$cmd_duration$directory$kubernetes$hg_branch$pijul_channel$docker_context$package$c$cmake$cobol$daml$dart$deno$dotnet$elixir$elm$erlang$fennel$gleam$golang$guix_shell$haskell$haxe$helm$java$julia$kotlin$gradle$lua$nim$nodejs$ocaml$opa$perl$php$pulumi$purescript$python$quarto$raku$rlang$red$ruby$rust$scala$solidity$swift$terraform$typst$vlang$vagrant$zig$buf$nix_shell$conda$meson$spack$memory_usage$aws$gcloud$openstack$azure$nats$direnv$env_var$crystal$custom$sudo$battery$time$container$fill$git_branch$git_status$git_metrics$line_break[](fg:red)$character
'';
add_newline = true;
aws = {
symbol = " ";
};
buf = {
symbol = " ";
};
c = {
symbol = " ";
};
dart = {
symbol = " ";
};
character = {
success_symbol = "[](bold bold bright-yellow)";
error_symbol = "[](bold bold bright-red)";
vimcmd_symbol = "[](italic dimmed green)";
};
cmd_duration = {
style = "fg:yellow";
min_time = 1;
show_milliseconds = true;
format = "[\\[](fg:red)[ $duration]($style)[\\]](fg:red)";
};
conda = {
symbol = " ";
};
continuation_prompt = "[ ](fg:red)";
crystal = {
symbol = " ";
};
directory = {
style = "fg:purple";
format = "[\\[](fg:red)[$path]($style)[\\]](fg:red)";
truncation_length = 4;
truncation_symbol = "/";
};
docker_context = {
symbol = " ";
};
elixir = {
symbol = " ";
};
elm = {
symbol = " ";
};
fennel = {
symbol = " ";
};
fill = {
symbol = " ";
};
fossil_branch = {
symbol = " ";
};
git_branch = {
symbol = "";
style = "fg:bright-black italic dimmed";
format = "[$symbol$branch]($style)";
truncation_symbol = "";
truncation_length = 14;
};
git_status = {
style = "fg:yellow";
format = "([$ahead_behind$staged$modified$untracked$renamed$deleted$conflicted$stashed]($style))";
conflicted = "[](italic bright-magenta)";
ahead = "[[\${count}](bold white)](italic green)";
behind = "[[\${count}](bold white)](italic red)";
diverged = "[ [\${ahead_count}](regular white)[\${behind_count}](regular white)](italic bright-magenta)";
untracked = "[](italic bright-yellow)";
stashed = "[](italic white)";
modified = "[](italic yellow)";
staged = "[[$count](bold white)](italic bright-cyan)";
renamed = "[](italic bright-blue)";
deleted = "[](italic red)";
};
git_metrics = {
format = "([$added]($added_style))([$deleted]($deleted_style))";
added_style = "italic dimmed green";
deleted_style = "italic dimmed red";
ignore_submodules = true;
disabled = false;
};
golang = {
symbol = " ";
};
gradle = {
format = "[$symbol$version ]($style)";
style = "fg:bright-black";
symbol = "[ 󰟆 ](fg:blue) ";
};
guix_shell = {
symbol = " ";
};
haskell = {
symbol = " ";
};
haxe = {
symbol = " ";
};
hg_branch = {
symbol = " ";
};
hostname = {
ssh_only = false;
style = "fg:cyan";
format = "[$ssh_symbol$hostname]($style)[\\]](fg:red)";
};
jobs = {
style = "fg:bright-black";
format = "[\\[](fg:red)[$symbol$number]($style)[\\]](fg:red)";
symbol = " ";
};
java = {
style = "fg:bright-black";
format = "[$symbol\${version}]($style)";
symbol = "[ ](fg:#d65d0e)";
};
julia = {
symbol = " ";
};
kotlin = {
symbol = " ";
};
lua = {
symbol = " ";
};
memory_usage = {
symbol = "󰍛 ";
};
meson = {
symbol = "󰔷 ";
};
nim = {
symbol = "󰆥 ";
};
nix_shell = {
format = "[$symbol$state·$name]($style)";
style = "fg:bright-black";
symbol = "[ ](fg:blue)";
};
nodejs = {
style = "fg:bright-black";
format = "[$symbol\${version} ]($style)";
symbol = "[ ](fg:green)";
};
ocaml = {
symbol = " ";
};
package = {
format = "[ ](fg:cyan) [$version](fg:bright-black) ";
};
python = {
style = "fg:bright-black";
format = "[$symbol$version·$virtualenv ]($style)";
version_format = "v\${major}.\${minor}";
symbol = "[ ](fg:cyan)";
};
rust = {
style = "fg:bright-black";
format = "[\${symbol}\${version}]($style)";
symbol = "[ ](fg:yellow)";
};
status = {
disabled = false;
symbol = "💥";
style = "fg:red";
format = "[$symbol]($style)";
success_symbol = "";
};
username = {
style_user = "fg:green";
style_root = "fg:red";
show_always = true;
format = "[\\[](fg:red)[$user]($style)";
};
};
};
}

View File

@ -0,0 +1,917 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
starship
];
programs.starship = {
enable = true;
enableZshIntegration = true;
enableBashIntegration = true;
settings = {
# "$schema" = "https://starship.rs/config-schema.json";
add_newline = true;
command_timeout = 500;
continuation_prompt = "[](bright-black) ";
# format = "[](0x9A348E)$username$hostname$localip$shlvl$singularity$kubernetes[](fg:0x9A348E bg:0xDA627D)$directory$vcsh[](fg:0xDA627D bg:0xFCA17D)$git_branch$git_commit$git_state$git_metrics$git_status$hg_branch[](fg:0x86BBD8 bg:0x06969A)$docker_context$package$buf[](fg:0xFCA17D bg:0x86BBD8)$c$cmake$cobol$container$daml$dart$deno$dotnet$elixir$elm$erlang$golang$haskell$helm$java$julia$kotlin$lua$nim$nodejs$ocaml$perl$php$pulumi$purescript$python$rlang$red$ruby$rust$scala$swift$terraform$vlang$vagrant$zig$nix_shell$conda$spack$memory_usage$aws$gcloud$openstack$azure$env_var$crystal$custom$sudo$cmd_duration$line_break$jobs$battery[](fg:0x06969A bg:0x33658A)$time$status$shell$character";
format = "[](#a3aed2)\(bg:#a3aed2 fg:#090c0c) \$username\[](bg:#769ff0 fg:#a3aed2)\$directory\[](fg:#769ff0 bg:#394260)\$git_branch\$git_status\[](fg:#394260 bg:#212736)\$nodejs\$rust\$golang\$php\[](fg:#212736 bg:#1d2230)\$time\[ ](fg:#1d2230)\
\n$character";
right_format = "";
scan_timeout = 30;
aws = {
format = "[$symbol($profile )(($region) )([$duration] )]($style)";
symbol = "🅰 ";
style = "bold yellow";
disabled = false;
expiration_symbol = "X";
force_display = false;
};
aws.region_aliases = {};
aws.profile_aliases = {};
azure = {
format = "[$symbol($subscription)([$duration])]($style) ";
symbol = " ";
style = "blue bold";
disabled = true;
};
battery = {
format = "[$symbol$percentage]($style) ";
charging_symbol = " ";
discharging_symbol = " ";
empty_symbol = " ";
full_symbol = " ";
unknown_symbol = " ";
disabled = false;
display = [
{
style = "red bold";
threshold = 10;
}
];
};
buf = {
format = "[$symbol ($version)]($style)";
version_format = "v$raw";
symbol = "";
style = "bold blue";
disabled = false;
detect_extensions = [];
detect_files = [
"buf.yaml"
"buf.gen.yaml"
"buf.work.yaml"
];
detect_folders = [];
};
c = {
format = "[$symbol($version(-$name) )]($style)";
version_format = "v$raw";
style = "fg:149 bold bg:0x86BBD8";
symbol = " ";
disabled = false;
detect_extensions = [
"c"
"h"
];
detect_files = [];
detect_folders = [];
# commands = [
# [
# "cc"
# "--version"
# ]
# [
# "gcc"
# "--version"
# ]
# [
# "clang"
# "--version"
# ]
# ];
};
character = {
format = "$symbol ";
vicmd_symbol = "[](bold green)";
disabled = false;
success_symbol = "[](bold green) ";
error_symbol = "[](bold red) ";
};
cmake = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = " ";
style = "bold blue";
disabled = false;
detect_extensions = [];
detect_files = [
"CMakeLists.txt"
"CMakeCache.txt"
];
detect_folders = [];
};
cmd_duration = {
min_time = 2000;
format = " [$duration]($style) ";
style = "yellow bold";
show_milliseconds = false;
disabled = false;
show_notifications = false;
min_time_to_notify = 45000;
};
cobol = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = " ";
style = "bold blue";
disabled = false;
detect_extensions = [
"cbl"
"cob"
"CBL"
"COB"
];
detect_files = [];
detect_folders = [];
};
conda = {
truncation_length = 1;
format = "[$symbol$environment]($style) ";
symbol = " ";
style = "green bold";
ignore_base = true;
disabled = false;
};
container = {
format = "[$symbol [$name]]($style) ";
symbol = "";
style = "red bold dimmed";
disabled = false;
};
crystal = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = "🔮 ";
style = "bold red";
disabled = false;
detect_extensions = ["cr"];
detect_files = ["shard.yml"];
detect_folders = [];
};
dart = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = "🎯 ";
style = "bold blue";
disabled = false;
detect_extensions = ["dart"];
detect_files = [
"pubspec.yaml"
"pubspec.yml"
"pubspec.lock"
];
detect_folders = [".dart_tool"];
};
deno = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = "🦕 ";
style = "green bold";
disabled = false;
detect_extensions = [];
detect_files = [
"deno.json"
"deno.jsonc"
"mod.ts"
"deps.ts"
"mod.js"
"deps.js"
];
detect_folders = [];
};
directory = {
disabled = false;
fish_style_pwd_dir_length = 0;
format = "[ $path ]($style)";
home_symbol = "~";
read_only = " ";
read_only_style = "red";
repo_root_format = "[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) ";
style = "fg:#e3e5e5 bg:#769ff0";
truncate_to_repo = true;
truncation_length = 3;
truncation_symbol = "/";
use_logical_path = true;
use_os_path_sep = true;
};
directory.substitutions = {
# Here is how you can shorten some long paths by text replacement;
# similar to mapped_locations in Oh My Posh:;
"Documents" = "󰈙 ";
"Downloads" = " ";
"Music" = " ";
"Pictures" = " ";
# Keep in mind that the order matters. For example:;
# "Important Documents" = "  ";
# will not be replaced, because "Documents" was already substituted before.;
# So either put "Important Documents" before "Documents" or use the substituted version:;
# "Important  " = "  ";
"Important " = " ";
};
docker_context = {
format = "[$symbol$context]($style) ";
style = "blue bold bg:0x06969A";
symbol = " ";
only_with_files = true;
disabled = false;
detect_extensions = [];
detect_files = [
"docker-compose.yml"
"docker-compose.yaml"
"Dockerfile"
];
detect_folders = [];
};
dotnet = {
format = "[$symbol($version )(🎯 $tfm )]($style)";
version_format = "v$raw";
symbol = "🥅 ";
style = "blue bold";
heuristic = true;
disabled = false;
detect_extensions = [
"csproj"
"fsproj"
"xproj"
];
detect_files = [
"global.json"
"project.json"
"Directory.Build.props"
"Directory.Build.targets"
"Packages.props"
];
detect_folders = [];
};
elixir = {
format = "[$symbol($version (OTP $otp_version) )]($style)";
version_format = "v$raw";
style = "bold purple bg:0x86BBD8";
symbol = " ";
disabled = false;
detect_extensions = [];
detect_files = ["mix.exs"];
detect_folders = [];
};
elm = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
style = "cyan bold bg:0x86BBD8";
symbol = " ";
disabled = false;
detect_extensions = ["elm"];
detect_files = [
"elm.json"
"elm-package.json"
".elm-version"
];
detect_folders = ["elm-stuff"];
};
env_var = {};
env_var.SHELL = {
format = "[$symbol($env_value )]($style)";
style = "grey bold italic dimmed";
symbol = "e:";
disabled = true;
variable = "SHELL";
default = "unknown shell";
};
env_var.USER = {
format = "[$symbol($env_value )]($style)";
style = "grey bold italic dimmed";
symbol = "e:";
disabled = true;
default = "unknown user";
};
erlang = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = " ";
style = "bold red";
disabled = false;
detect_extensions = [];
detect_files = [
"rebar.config"
"erlang.mk"
];
detect_folders = [];
};
fill = {
style = "bold black";
symbol = ".";
disabled = false;
};
gcloud = {
format = "[$symbol$account(@$domain)(($region))(($project))]($style) ";
symbol = " ";
style = "bold blue";
disabled = false;
};
gcloud.project_aliases = {};
gcloud.region_aliases = {};
git_branch = {
format = "[$symbol$branch(:$remote_branch)]($style) ";
symbol = " ";
style = "bold purple bg:0xFCA17D";
truncation_length = 9223372036854775807;
truncation_symbol = "";
only_attached = false;
always_show_remote = false;
ignore_branches = [];
disabled = false;
};
git_commit = {
commit_hash_length = 7;
format = "[($hash$tag)]($style) ";
style = "green bold";
only_detached = true;
disabled = false;
tag_symbol = " 🏷 ";
tag_disabled = true;
};
git_metrics = {
added_style = "bold green";
deleted_style = "bold red";
only_nonzero_diffs = true;
format = "([+$added]($added_style) )([-$deleted]($deleted_style) )";
disabled = false;
};
git_state = {
am = "AM";
am_or_rebase = "AM/REBASE";
bisect = "BISECTING";
cherry_pick = "🍒PICKING(bold red)";
disabled = false;
format = "([$state( $progress_current/$progress_total)]($style)) ";
merge = "MERGING";
rebase = "REBASING";
revert = "REVERTING";
style = "bold yellow";
};
git_status = {
ahead = "🏎💨$count";
behind = "😰$count";
conflicted = "🏳";
deleted = "🗑";
disabled = false;
diverged = "😵";
format = "([[$all_status$ahead_behind]]($style) )";
ignore_submodules = false;
modified = "📝";
renamed = "👅";
staged = "[++($count)](green)";
stashed = "📦";
style = "red bold bg:0xFCA17D";
untracked = "🤷";
up_to_date = "";
};
golang = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = " ";
style = "bold cyan bg:0x86BBD8";
disabled = false;
detect_extensions = ["go"];
detect_files = [
"go.mod"
"go.sum"
"glide.yaml"
"Gopkg.yml"
"Gopkg.lock"
".go-version"
];
detect_folders = ["Godeps"];
};
haskell = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = "λ ";
style = "bold purple bg:0x86BBD8";
disabled = false;
detect_extensions = [
"hs"
"cabal"
"hs-boot"
];
detect_files = [
"stack.yaml"
"cabal.project"
];
detect_folders = [];
};
helm = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = " ";
style = "bold white";
disabled = false;
detect_extensions = [];
detect_files = [
"helmfile.yaml"
"Chart.yaml"
];
detect_folders = [];
};
hg_branch = {
symbol = " ";
style = "bold purple";
format = "on [$symbol$branch]($style) ";
truncation_length = 9223372036854775807;
truncation_symbol = "";
disabled = true;
};
hostname = {
disabled = false;
format = "[$ssh_symbol](blue dimmed bold)[$hostname]($style) ";
ssh_only = false;
style = "green dimmed bold";
trim_at = ".";
};
java = {
disabled = false;
format = "[$symbol($version )]($style)";
style = "red dimmed bg:0x86BBD8";
symbol = " ";
version_format = "v$raw";
detect_extensions = [
"java"
"class"
"jar"
"gradle"
"clj"
"cljc"
];
detect_files = [
"pom.xml"
"build.gradle.kts"
"build.sbt"
".java-version"
"deps.edn"
"project.clj"
"build.boot"
];
detect_folders = [];
};
jobs = {
threshold = 1;
symbol_threshold = 0;
number_threshold = 2;
format = "[$symbol$number]($style) ";
symbol = "";
style = "bold blue";
disabled = false;
};
julia = {
disabled = false;
format = "[$symbol($version )]($style)";
style = "bold purple bg:0x86BBD8";
symbol = " ";
version_format = "v$raw";
detect_extensions = ["jl"];
detect_files = [
"Project.toml"
"Manifest.toml"
];
detect_folders = [];
};
kotlin = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = "🅺 ";
style = "bold blue";
kotlin_binary = "kotlin";
disabled = false;
detect_extensions = [
"kt"
"kts"
];
detect_files = [];
detect_folders = [];
};
kubernetes = {
disabled = false;
format = "[$symbol$context( ($namespace))]($style) in ";
style = "cyan bold";
symbol = " ";
};
kubernetes.context_aliases = {};
line_break = {
disabled = false;
};
localip = {
disabled = false;
format = "[@$localipv4]($style) ";
ssh_only = false;
style = "yellow bold";
};
lua = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = "🌙 ";
style = "bold blue";
lua_binary = "lua";
disabled = false;
detect_extensions = ["lua"];
detect_files = [".lua-version"];
detect_folders = ["lua"];
};
memory_usage = {
disabled = false;
format = "$symbol[$ram( | $swap)]($style) ";
style = "white bold dimmed";
symbol = " ";
# threshold = 75;
threshold = -1;
};
nim = {
format = "[$symbol($version )]($style)";
style = "yellow bold bg:0x86BBD8";
symbol = " ";
version_format = "v$raw";
disabled = false;
detect_extensions = [
"nim"
"nims"
"nimble"
];
detect_files = ["nim.cfg"];
detect_folders = [];
};
nix_shell = {
format = "[$symbol$state( ($name))]($style) ";
disabled = false;
impure_msg = "[impure](bold red)";
pure_msg = "[pure](bold green)";
style = "bold blue";
symbol = " ";
};
nodejs = {
format = "[$symbol($version )]($style)";
not_capable_style = "bold red";
style = "bold green bg:0x86BBD8";
symbol = " ";
version_format = "v$raw";
disabled = false;
detect_extensions = [
"js"
"mjs"
"cjs"
"ts"
"mts"
"cts"
];
detect_files = [
"package.json"
".node-version"
".nvmrc"
];
detect_folders = ["node_modules"];
};
ocaml = {
format = "[$symbol($version )(($switch_indicator$switch_name) )]($style)";
global_switch_indicator = "";
local_switch_indicator = "*";
style = "bold yellow";
symbol = "🐫 ";
version_format = "v$raw";
disabled = false;
detect_extensions = [
"opam"
"ml"
"mli"
"re"
"rei"
];
detect_files = [
"dune"
"dune-project"
"jbuild"
"jbuild-ignore"
".merlin"
];
detect_folders = [
"_opam"
"esy.lock"
];
};
openstack = {
format = "[$symbol$cloud(($project))]($style) ";
symbol = " ";
style = "bold yellow";
disabled = false;
};
package = {
format = "[$symbol$version]($style) ";
symbol = "📦 ";
style = "208 bold";
display_private = false;
disabled = false;
version_format = "v$raw";
};
perl = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = "🐪 ";
style = "149 bold";
disabled = false;
detect_extensions = [
"pl"
"pm"
"pod"
];
detect_files = [
"Makefile.PL"
"Build.PL"
"cpanfile"
"cpanfile.snapshot"
"META.json"
"META.yml"
".perl-version"
];
detect_folders = [];
};
php = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = "🐘 ";
style = "147 bold";
disabled = false;
detect_extensions = ["php"];
detect_files = [
"composer.json"
".php-version"
];
detect_folders = [];
};
pulumi = {
format = "[$symbol($username@)$stack]($style) ";
version_format = "v$raw";
symbol = " ";
style = "bold 5";
disabled = false;
};
purescript = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = "<=> ";
style = "bold white";
disabled = false;
detect_extensions = ["purs"];
detect_files = ["spago.dhall"];
detect_folders = [];
};
python = {
format = "[$symbol$pyenv_prefix($version )(($virtualenv) )]($style)";
python_binary = [
"python"
"python3"
"python2"
];
pyenv_prefix = "pyenv ";
pyenv_version_name = true;
style = "yellow bold";
symbol = "🐍 ";
version_format = "v$raw";
disabled = false;
detect_extensions = ["py"];
detect_files = [
"requirements.txt"
".python-version"
"pyproject.toml"
"Pipfile"
"tox.ini"
"setup.py"
"__init__.py"
];
detect_folders = [ ".venv" "venv" ];
};
red = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = "🔺 ";
style = "red bold";
disabled = false;
detect_extensions = [
"red"
"reds"
];
detect_files = [];
detect_folders = [];
};
rlang = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
style = "blue bold";
symbol = "📐 ";
disabled = false;
detect_extensions = [
"R"
"Rd"
"Rmd"
"Rproj"
"Rsx"
];
detect_files = [".Rprofile"];
detect_folders = [".Rproj.user"];
};
ruby = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = "💎 ";
style = "bold red";
disabled = false;
detect_extensions = ["rb"];
detect_files = [
"Gemfile"
".ruby-version"
];
detect_folders = [];
detect_variables = [
"RUBY_VERSION"
"RBENV_VERSION"
];
};
rust = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = "🦀 ";
style = "bold red bg:0x86BBD8";
disabled = false;
detect_extensions = ["rs"];
detect_files = ["Cargo.toml"];
detect_folders = [];
};
scala = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
disabled = false;
style = "red bold";
symbol = "🆂 ";
detect_extensions = [
"sbt"
"scala"
];
detect_files = [
".scalaenv"
".sbtenv"
"build.sbt"
];
detect_folders = [".metals"];
};
shell = {
format = "[$indicator]($style) ";
bash_indicator = "bsh";
cmd_indicator = "cmd";
elvish_indicator = "esh";
fish_indicator = "";
ion_indicator = "ion";
nu_indicator = "nu";
powershell_indicator = "_";
style = "white bold";
tcsh_indicator = "tsh";
unknown_indicator = "mystery shell";
xonsh_indicator = "xsh";
zsh_indicator = "zsh";
disabled = false;
};
shlvl = {
threshold = 2;
format = "[$symbol$shlvl]($style) ";
symbol = " ";
repeat = false;
style = "bold yellow";
disabled = true;
};
singularity = {
format = "[$symbol[$env]]($style) ";
style = "blue bold dimmed";
symbol = "📦 ";
disabled = false;
};
spack = {
truncation_length = 1;
format = "[$symbol$environment]($style) ";
symbol = "🅢 ";
style = "blue bold";
disabled = false;
};
status = {
format = "[$symbol$status]($style) ";
map_symbol = true;
not_executable_symbol = "🚫";
not_found_symbol = "🔍";
pipestatus = false;
pipestatus_format = "[$pipestatus] => [$symbol$common_meaning$signal_name$maybe_int]($style)";
pipestatus_separator = "|";
recognize_signal_code = true;
signal_symbol = "";
style = "bold red bg:blue";
success_symbol = "🟢 SUCCESS";
symbol = "🔴 ";
disabled = true;
};
sudo = {
format = "[as $symbol]($style)";
symbol = "🧙 ";
style = "bold blue";
allow_windows = false;
disabled = true;
};
swift = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = "🐦 ";
style = "bold 202";
disabled = false;
detect_extensions = ["swift"];
detect_files = ["Package.swift"];
detect_folders = [];
};
terraform = {
format = "[$symbol$workspace]($style) ";
version_format = "v$raw";
symbol = "💠 ";
style = "bold 105";
disabled = false;
detect_extensions = [
"tf"
"tfplan"
"tfstate"
];
detect_files = [];
detect_folders = [".terraform"];
};
time = {
format = "[[ $time ](fg:#a0a9cb bg:#1d2230)]($style)";
style = "bg:#1d2230";
use_12hr = true;
disabled = false;
utc_time_offset = "local";
# time_format = "%R"; # Hour:Minute Format;
time_format = "%r"; # Hour:Minute:Seconds Format;
time_range = "-";
};
username = {
format = "user: [$user]($style) ";
show_always = true;
style_root = "red bold bg:0x9A348E";
style_user = "white bold";
disabled = false;
};
vagrant = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = " ";
style = "cyan bold";
disabled = false;
detect_extensions = [];
detect_files = ["Vagrantfile"];
detect_folders = [];
};
vcsh = {
symbol = "";
style = "bold yellow";
format = "[$symbol$repo]($style) ";
disabled = false;
};
vlang = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = "V ";
style = "blue bold";
disabled = false;
detect_extensions = ["v"];
detect_files = [
"v.mod"
"vpkg.json"
".vpkg-lock.json"
];
detect_folders = [];
};
zig = {
format = "[$symbol($version )]($style)";
version_format = "v$raw";
symbol = " ";
style = "bold yellow";
disabled = false;
detect_extensions = ["zig"];
detect_files = [];
detect_folders = [];
};
custom = {
};
};
};
}

View File

@ -0,0 +1,36 @@
{ pkgs, lib, ... }:
{
home.packages = with pkgs; [
tmux
];
programs.tmux = {
enable = true;
shortcut = "a";
# aggressiveResize = true; -- Disabled to be iTerm-friendly
baseIndex = 1;
newSession = true;
# Stop tmux+escape craziness.
escapeTime = 0;
# Force tmux to use /tmp for sockets (WSL2 compat)
secureSocket = false;
plugins = with pkgs; [
tmuxPlugins.better-mouse-mode
];
extraConfig = ''
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set-environment -g COLORTERM "truecolor"
# Mouse works as expected
set-option -g mouse on
# easy-to-remember split pane commands
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
'';
};
}

View File

@ -0,0 +1,23 @@
{ pkgs, ... }:
{
programs.yazi = {
enable = true;
enableZshIntegration = true;
enableBashIntegration
= true;
settings = {
log = {
enabled = false;
};
manager = {
show_hidden = true;
sort_by = "alphabetical";
sort_dir_first = true;
sort_reverse = false;
sort_sensitive = true;
show_symlink = true;
mouse_events = [ "scroll" "click" ];
};
};
};
}

3
pkgs/default.nix Normal file
View File

@ -0,0 +1,3 @@
pkgs: {
# example = pkgs.callPackage ./example { };
}

13
pkgs/git/git.nix Normal file
View File

@ -0,0 +1,13 @@
{ pkgs, userSettings, ... }:
{
home.packages = [ pkgs.git ];
programs.git.enable = true;
programs.git.userName = userSettings.name;
programs.git.userEmail = userSettings.email;
programs.git.extraConfig = {
init.defaultBranch = "main";
safe.directory = [ ("/home/" + userSettings.username + "/.dotfiles")
("/home/" + userSettings.username + "/.dotfiles/.git") ];
};
}

13
pkgs/lang/cc/cc.nix Normal file
View File

@ -0,0 +1,13 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
# CC
gcc
# gnumake
# cmake
autoconf
automake
libtool
];
}

View File

@ -0,0 +1,80 @@
{ pkgs, ... }:
{
# Python packages
home.packages = with pkgs.python3Packages; [
cffi
dbus-python
wheel
pyyaml
zipp
xlib
libvirt
pybind11
pyatspi
attrs
autocommand
bcrypt
pycairo
certifi
chardet
click
cryptography
cssselect
python-dateutil
distro
dnspython
evdev
ewmh
fastjsonschema
fido2
python-gnupg
pygobject3
idna
importlib-metadata
inflect
isodate
jeepney
keyring
lxml
markdown
markupsafe
more-itertools
numpy
ordered-set
packaging
pillow
pip
platformdirs
ply
prettytable
proton-client
protonvpn-nm-lib
psutil
pulsectl
pycparser
pycups
pycurl
pydantic
pyinotify
pyopenssl
pyparsing
pyqt5
pyqt5_sip
pyscard
pythondialog
pyxdg
rdflib
requests
secretstorage
setproctitle
setuptools
six
systemd
tomli
urllib3
wcwidth
websockets
python-zbar
];
}

View File

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
# Python setup
python3Full
imath
pystring
];
}

View File

@ -0,0 +1,56 @@
{ pkgs, ... }:
{
# Collection of useful CLI apps
home.packages = with pkgs; [
# Command Line
disfetch lolcat cowsay fastfetch cmatrix sl kittysay
starfetch
# timer
cava
killall
libnotify
timer
# brightnessctl
gnugrep
bat eza fd bottom ripgrep fzf thefuck
rsync
unzip
w3m
pandoc
hwinfo
pciutils
numbat
vim neovim
stow
];
programs.fzf = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
# fuzzyCompletion = true;
# keybindings = true;
};
programs.thefuck = {
enable = false;
enableBashIntegration = true;
enableZshIntegration = true;
# alias = "fuck";
};
programs.zoxide = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
options = [
"--cmd cd"
];
};
programs.eza = {
enable = true;
enableZshIntegration = true;
enableBashIntegration = true;
};
}

95
pkgs/shell/devshell.nix Normal file
View File

@ -0,0 +1,95 @@
{ pkgs, systemSettings, userSettings, ... }:
{
# let
devPackages = with pkgs; [
bash
git
docker
docker-compose_1
python3
python312Packages.virtualenv
nodejs
tmux
neovim
openssh
zsh
starship
fortune
cowsay
sl
curl
wget
htop
bottom
nettools
iproute2
nmap
tcpdump
lsof
strace
jq
shellcheck
nodePackages.prettier
nodePackages.eslint
black
python312Packages.flake8
pylint
yamllint
markdownlint-cli
# Add other necessary linters/formatters
];
# nvimConfig = ''
# # call plug#begin('~/.vim/plugged')
# # Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
# Plug 'preservim/nerdtree'
# Plug 'tpope/vim-fugitive'
# Plug 'dense-analysis/ale'
# Plug 'scrooloose/syntastic'
# Plug 'vim-airline/vim-airline'
# Plug 'airblade/vim-gitgutter'
# # Plug 'neoclide/coc.nvim', {'branch': 'release'}
# # call plug#end()
# " Set up ALE linters/formatters
# let g:ale_linters = {
# \ 'python': ['flake8', 'pylint'],
# \ 'javascript': ['eslint'],
# \ 'yaml': ['yamllint'],
# \ 'markdown': ['markdownlint'],
# \ }
# let g:ale_fixers = {
# \ 'python': ['black', 'isort'],
# \ 'javascript': ['prettier'],
# \ 'yaml': ['prettier'],
# \ 'markdown': ['prettier'],
# \ }
# '';
# devEnv = pkgs.mkShell {
# name = "space-x-devshell";
# buildInputs = devPackages;
# shellHook = ''
# export PROJECT_NAME="Space-X DevOps"
# export SYSTEM_HOSTNAME="${systemSettings.hostname}"
# export USER_NAME="${userSettings.username}"
# # Configure starship prompt for bash and fish
# eval "$(starship init bash)"
# if [ -n "$FISH_VERSION" ]; then
# starship init fish | source
# fi
# # Set up neovim configuration
# mkdir -p ~/.config/nvim
# # echo "${nvimConfig}" > ~/.config/nvim/init.vim
# # Any other environment variables or shell configurations
# '';
# };
# in
# devEnv
}

56
pkgs/shell/sh.nix Normal file
View File

@ -0,0 +1,56 @@
{ pkgs, myAliases, ... }:
# with import <nixpkgs>{};
# let
# tracedSystemSettings = builtins.trace "systemSettings: ${builtins.toJSON systemSettings}" systemSettings;
# in
# with import ./profiles/Developer/home.nix;
{
# programs.zsh = {
# enable = true;
# # autosuggestion = true;
# syntaxHighlighting.enable = true;
# enableCompletion = true;
# shellAliases = myAliases;
# initExtra = ''
# PROMPT=" ◉ %U%F{magenta}%n%f%u@%U%F{blue}%m%f%u:%F{yellow}%~%f
# %F{green}→%f "
# RPROMPT="%F{red}▂%f%F{yellow}▄%f%F{green}▆%f%F{cyan}█%f%F{blue}▆%f%F{magenta}▄%f%F{white}▂%f"
# [ $TERM = "dumb" ] && unsetopt zle && PS1='$ '
# '';
# };
# programs.bash = {
# enable = true;
# enableCompletion = true;
# shellAliases = myAliases;
# };
programs.bat = {
config = {
map-syntax = [
"*.jenkinsfile:Groovy"
"*.props:Java Properties"
];
pager = "less -FR";
# theme = "TwoDark"; # managed by stylix
};
enable = true;
};
home.packages = with pkgs; [
disfetch lolcat cowsay onefetch
gnugrep gnused
bat eza bottom fd bc
direnv nix-direnv
];
programs.bottom.enable = true;
programs.direnv.enable = true;
programs.direnv.enableZshIntegration = true;
programs.direnv.nix-direnv.enable = true;
programs.nix-index.enable = true;
programs.nix-index.enableZshIntegration = true;
programs.nix-index.enableBashIntegration = true;
}

48
pkgs/shell/stow.nix Normal file
View File

@ -0,0 +1,48 @@
{ config, pkgs, lib, ... }:
let
# URL of your dotfiles repository
dotfilesRepo = "http://192.168.12.81/git/wayne/dotfiles";
# 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";
in
{
# Ensure that stow and git are installed
home.packages = with pkgs; [
stow
git
];
# Clone the dotfiles repository into the specified path
home.activation.cloneDotfiles = lib.mkAfter ''
echo "Running cloneDotfiles activation script"
echo "Dotfiles path: ${dotfilesPath}"
echo "Dotfiles repository: ${dotfilesRepo}"
export PATH=${pkgs.git}/bin:$PATH
if [ ! -d "${dotfilesPath}" ]; then
echo "Cloning dotfiles repository from ${dotfilesRepo} to ${dotfilesPath}"
git clone ${dotfilesRepo} ${dotfilesPath} || { echo "Failed to clone repository"; exit 1; }
else
echo "Dotfiles repository already exists at ${dotfilesPath}"
fi
'';
# Activation script to manage the symlinks for the home directory dotfiles using GNU Stow
home.activation.stowHome = lib.mkAfter ''
echo "Running stow to manage dotfiles"
export PATH=${pkgs.stow}/bin:$PATH
cd ${dotfilesPath}/home
stow --adopt -t ${config.home.homeDirectory} bash bin config profile screen ssh tmux zsh # Specify the packages to stow
'';
# if [ ! -d "${dotfilesPath}" ]; then
# git clone ${dotfilesRepo} ${dotfilesPath}
# else
# echo "Updating dotfiles repository at ${dotfilesPath}"
# cd ${dotfilesPath} && git pull
# fi
}

37
pkgs/shell/zsh.nix Normal file
View File

@ -0,0 +1,37 @@
{ pkgs, myAliases, ...}:
{
# To copy the Oh My Zsh configuration file to your home directory, run the following command:
# $ cp -v $(nix-env -q out-path oh-my-zsh | cut -d -f3)/share/oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
home.packages = with pkgs; [
zsh oh-my-zsh
];
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
autocd = true;
prezto.python = {
virtualenvInitialize = true;
virtualenvAutoSwitch = true;
};
shellAliases = myAliases;
history.size = 10000;
history.ignoreAllDups = true;
history.path = "$HOME/.zsh_history";
history.ignorePatterns = ["rm *" "pkill *" "cp *"];
oh-my-zsh = {
enable = false;
plugins = [ "git" "aliases" "ansible" "common-aliases" "direnv" "zoxide" "bgnotify" "starship" "eza" "thefuck" "docker" "fzf" "rsync" "sublime" "sudo" "systemd" "tmux" ];
theme = "";
};
};
}
#

91
pkgs/wm/decor/stylix.nix Normal file
View File

@ -0,0 +1,91 @@
{ pkgs, ... }:
{
stylix = {
enable = false;
image = /home/wayne/Pictures/bg.png;
imageScalingMode = "fill"; # stretch”, “fill”, “fit”, “center”, “tile”
polarity = "dark"; # “either”, “light”, “dark” ~/.config/stylix/palette.html
# base16Scheme =
# cursor.package = <derivation vanilla-dmz-0.4.5>;
# cursor.name = "Vanilla-DMZ";
# cursor.size = 32;
# fonts.packages
fonts = {
# emoji = {
# name = "Noto Color Emoji";
# package = "<derivation noto-fonts-color-emoji-2.042>";
# };
# monospace = {
# name = "DejaVu Sans Mono";
# package = "<derivation dejavu-fonts-2.37>";
# };
# sansSerif = {
# name = "DejaVu Sans";
# package = "<derivation dejavu-fonts-2.37>";
# };
# serif = {
# name = "DejaVu Serif";
# package = "<derivation dejavu-fonts-2.37>";
# };
sizes = {
applications = 12;
desktop = 10;
terminal = 12;
};
};
opacity = {
applications = 1.0;
desktop = 1.0;
terminal = 1.0;
};
# override = {};
targets = {
# chromium.enable = true;
# console.enable = true;
dunst.enable = true;
feh.enable = false;
fish.enable = false;
gnome.enable = false;
# grub.enable = true;
# grub.useImage = false;
gtk.enable = true;
hyprland.enable = true;
hyprpaper.enable = true;
kitty.enable = true;
# kmscon.enable = false;
# lightdm.enable = false;
# nixos-icons.enable = true;
neovim = {
enable = true;
transparentBackground = {
main = true;
signColumn = true;
};
};
nixvim = {
enable = true;
transparentBackground = {
main = true;
signColumn = true;
};
};
# plymouth = {
# enable = false;
# logo = ""; # path or package
# logoAnimated = true;
# };
rofi.enable = true;
tmux.enable = true;
vim.enable = true;
vscode.enable = true;
waybar = {
enable = true;
enableCenterBackColors = true;
enableLeftBackColors = true;
enableRightBackColors = true;
};
wofi.enable = true;
yazi.enable = true;
};
};
}

42
pkgs/wm/dunst/dunst.nix Normal file
View File

@ -0,0 +1,42 @@
{ pkgs, lib, config, ... }:
with lib;
let cfg = config.modules.dunst;
in {
options.modules.dunst = { enable = mkEnableOption "dunst"; };
config = mkIf cfg.enable {
home.packages = with pkgs; [
dunst
];
services.dunst = {
enable = true;
settings = {
global = {
origin = "top-left";
offset = "60x12";
separator_height = 2;
padding = 12;
horizontal_padding = 12;
text_icon_padding = 12;
frame_width = 4;
separator_color = "frame";
idle_threshold = 120;
font = "JetBrainsMono Nerdfont 12";
line_height = 0;
format = "<b>%s</b>\n%b";
alignment = "center";
icon_position = "off";
startup_notification = "false";
corner_radius = 12;
frame_color = "#44465c";
background = "#003200";
foreground = "#d9e0ee";
timeout = 2;
};
};
};
};
}

View File

@ -0,0 +1,337 @@
{ pkgs, ... }:
{
wayland.windowManager.hyprland = {
# enable = true;
# package = pkgs.hyprland;
# package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
# xwayland.enable = true;
# systemd.enable = true;
# systemd.variables = ["--all"];
# device {
# name = "hanvon-ugee-shortcut-remote key bindings"
# };
settings = {
"$mod" = "SUPER";
env = [
"XDG_SESSION_TYPE,wayland"
"XDG_SESSION_DESKTOP,Hyprland"
"XDG_CURRENT_DESKTOP,Hyprland"
"MOZ_ENABLE_WAYLAND,1"
# "ANKI_WAYLAND,1"
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
"QT_QPA_PLATFORM=wayland,xcb" # removed ,xcb CGPT
# "QT_QPA_PLATFORMTHEME,qt6ct"
"GDK_SCALE,1"
"GDK_BACKEND,wayland,x11,*"
"GTK_THEME,FlatColor:dark"
"GTK2_RC_FILES,/home/hadi/.local/share/themes/FlatColor/gtk-2.0/gtkrc"
"DISABLE_QT5_COMPAT,0"
# "XCURSOR_SIZE,24"
"NIXOS_OZONE_WL,1"
"ELECTRON_OZONE_PLATFORM_HINT,auto"
"__GL_GSYNC_ALLOWED,0"
"__GL_VRR_ALLOWED,0"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
"DIRENV_LOG_FORMAT,"
# "WLR_DRM_NO_ATOMIC,1"
# "WLR_BACKEND,vulkan"
# "WLR_RENDERER,vulkan"
# "WLR_NO_HARDWARE_CURSORS,1"
"APPIMAGELAUNCHER_DISABLE,1"
"OZONE_PLATFORM,wayland"
"SDL_VIDEODRIVER,wayland"
"CLUTTER_BACKEND,wayland"
"GBM_BACKEND,nvidia-drm"
"LIBVA_DRIVER_NAME,nvidia"
# "AQ_DRM_DEVICES,/dev/dri/card2/" # CHANGEME: Related to the GPU
# THEMING
# "HYPRCURSOR_THEME,~/.icons/Nordic-cursors"
# "HYPRCURSOR_SIZE,24x"
"HYPRLAND_TRACE=1"
];
input = {
kb_layout = "us";
# kb_variant =;
# kb_model =;
# kb_options = grp:alt_shift_toggle,caps:backspace;
# kb_rules =;
follow_mouse = 1;
touchpad = {
natural_scroll = "no";
tap_button_map = "lmr";
};
sensitivity = 0;
};
debug = { disable_logs = false; };
xwayland = { force_zero_scaling = true; };
binddevice = "hanvon-ugee-shortcut-remote-keyboard, CTRL+o, exec, hyprctl dispatch key Page_Down";
# hanvon-ugee-shortcut-remote key bindings
# bindl = [
# "DEVICE:hanvon-ugee-shortcut-remote-keyboard, CTRL, o, exec, firefox-pageup"
# "DEVICE:hanvon-ugee-shortcut-remote, , F5, exec, firefox-pagedown"
# ];
# Binding for remapping CTRL+o to PageDown on the remote
bindm = [
"$mod, mouse:272, movewindow"
"$mod, Control_L, movewindow"
"$mod, mouse:273, resizewindow"
"$mod, ALT_L, resizewindow"
"$mod, mouse_down, workspace, e+1" # Scroll workspaces
"$mod, mouse_up, workspace, e-1" # Scroll workspaces
",mouse:275,exec,wl-copy $(wl-paste -p)" # copy selected text
",mouse:276,exec,wtype -M ctrl -M shift v -m ctrl -m shift" # paste by Ctrl+Shift+
];
bind = [
"ALTSHIFT, H, movewindow, l"
"ALTSHIFT, L, movewindow, r"
"ALTSHIFT, K, movewindow, u"
"ALTSHIFT, J, movewindow, d"
"ALT,H,movefocus,l"
"ALT,L,movefocus,r"
"ALT,K,movefocus,u"
"ALT,J,movefocus,d"
"$mod, Q, killactive"
"ALT, T, togglefloating"
"ALT, F, fullscreen"
# Minimize window
"ALT, M, movetoworkspace, special:magic"
"ALT, M, togglespecialworkspace, magic"
"Control_R+Shift_R, B, exec, ~/bin/restore_minimized.sh Keybase"
"Control_R+Shift_R, X, exec, ~/bin/restore_minimized.sh org.kde.kwalletmanager5"
"Control_R+Shift_R, N, exec, ~/bin/restore_minimized.sh com.nextcloud.desktopclient.nextcloud"
"Control_R+Shift_R, Z, exec, ~/bin/restore_minimized.sh zen-alpha"
"Control_R+Shift_R, S, exec, ~/bin/restore_minimized.sh sublime_text"
# "$mod, R, exec, ~/bin/restore_minimized.sh org.kde.dolphin"
"$mod, F, exec, firefox"
"$mod, Z, exec, zen"
"$mod, k, exec, kitty"
"ALTSHIFT, K, exec, konsole"
"$mod, S, exec, subl"
# "CTRLSHIFT, K&B, exec, hyprctl dispatch exec keybase-gui %u"
# ",XF86Search, exec, wofi --show drun"
",XF86Explorer, exec, doublecmd"
",XF86Search, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window,ssh"
",XF86Calculator, exec, qalculate-qt"
"$mod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy"
"ALT, Tab, exec, hyprctl dispatch cyclenext"
"ALTSHIFT, Tab, exec, hyprctl dispatch cyclenext prev"
# "ALT, Tab, bringactivetotop"
# "CONTROL_ALT, L, exec, swaylock" # Need to config locker
", XF86AudioMute, exec, swayosd-client --output-volume mute-toggle"
", XF86AudioMicMute, exec ,swayosd-client --input-volume mute-toggle"
", XF86AudioRaiseVolume, exec, swayosd-client --output-volume 15"
", XF86AudioLowerVolume, exec, swayosd-client --output-volume -15"
"$mod, XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise --max-volume 120"
"$mod, XF86AudioLowerVolume, exec, swayosd-client --output-volume lower --max-volume 120"
"$mod, --release Caps_Lock ,exec, swayosd-client --caps-lock"
"$mod, --release Caps_Lock, exec, swayosd-client --caps-lock-led input19::capslock"
"$mod, XF86MonBrightnessUp, exec, swayosd-client --brightness raise"
"$mod, XF86MonBrightnessDown, exec, swayosd-client --brightness lower"
# "$mod, XF86MonBrightnessUp exec swayosd-client --brightness +10"
# "$mod, XF86MonBrightnessDown exec swayosd-client --brightness -10"
"$mod+SHIFT, S, exec, hyprshot -m region"
"$mod, code:10, workspace, 1"
"$mod, code:11, workspace, 2"
"$mod, code:12, workspace, 3"
"$mod, code:13, workspace, 4"
"$mod, code:14, workspace, 5"
"$mod, code:15, workspace, 6"
"$mod, code:16, workspace, 7"
"$mod, code:17, workspace, 8"
"$mod, code:18, workspace, 9"
"$mod, code:19, workspace, 10"
"ALTSHIFT, code:10, movetoworkspace, 1"
"ALTSHIFT, code:11, movetoworkspace, 2"
"ALTSHIFT, code:12, movetoworkspace, 3"
"ALTSHIFT, code:13, movetoworkspace, 4"
"ALTSHIFT, code:14, movetoworkspace, 5"
"ALTSHIFT, code:15, movetoworkspace, 6"
"ALTSHIFT, code:16, movetoworkspace, 7"
"ALTSHIFT, code:17, movetoworkspace, 8"
"ALTSHIFT, code:18, movetoworkspace, 9"
"ALTSHIFT, code:19, movetoworkspace, 10"
];
# ++ (
# builtins.concatLists (builtins.genList (i:
# let ws =i +1;
# in [
# "ALT code:1${toString i}, workspace, ${toString ws}"
# "ALTSHIFT, code:1$i{toString i}, movetoworkspace, ${toString ws}"
# ]
# )
# 9)
# );
cursor = {
# no_hardware_cursors = true;
default_monitor = "DP-4";
};
dwindle = {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true; # you probably want this
};
monitor = [
"DP-3, 1920x1080, 0x616, 1"
"DP-4, 3840x2160, 1920x0, 1"
"DP-1, 1080x1920, 5760x266, 1, transform, 3" # or 3
# "gravity,center"
];
workspace = [
"1,monitor:DP-4,default:true,decorate:true"
"2,monitor:DP-4,persistent:true"
"3,monitor:DP-4,persistent:true"
"4,monitor:DP-3,default:true"
"5,monitor:DP-3,persistent:true"
"6,monitor:DP-3,persistent:true"
"7,monitor:DP-1,default:true,gapsin:2"
"8,monitor:DP-1,persistent:true"
"9,monitor:DP-1,persistent:true"
];
exec-once = [
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus"
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"systemctl --user start plasma-polkit-agent"
"/nix/store/fj1n850329w79nfvqz22cm36vk4x1ypc-kwallet-pam-6.0.5/libexec/pam_kwallet_init --no-startup-id"
""
"waybar &"
"hyprpaper &"
"hypridle &"
"swayosd &"
"udiskie &"
"wl-paste --type text --watch cliphist store"
"wl-paste --type image --watch cliphist store"
"/home/wayne/.config/hypr/scripts/start-in-tray.sh"
"[workspace 4 silent] remmina -c rdp://wayne@xeon.local"
"[workspace 5 silent] keepassxc"
"[workspace 5 silent] /home/wayne/.nix-profile/bin/nextcloud --background"
"[workspace 5 silent] /nix/store/104jb5a21d1d338zkl1f07si6brsmrk2-keybase-gui-6.2.4/bin/keybase-gui %u &"
"[workspace 7 silent] subl"
"/home/wayne/.config/hypr/scripts/start-keybase-gui.sh"
];
general = {
border_part_of_window = true;
layout = "dwindle";
gaps_in = 5;
gaps_out = 10;
border_size = 2;
resize_on_border = true;
};
animations = {
enabled=1;
animation = [
"windows,1,4,default,slide"
"border,1,5,default"
"fadein,1,5,default"
"workspaces,1,3,default,vertslide"
];
};
decoration = {
rounding = 8;
drop_shadow = true;
shadow_range = 60;
col.shadow = "0x66000000";
blur = {
enabled = true;
size = 5;
passes = 1;
};
};
layerrule = [
"dimaround,rofi"
# "unset, rofi"
# "ignorezero, rofi"
"blurpopups, notifications"
];
windowrule = [
"opacity 0.9 override 0.5 override 0.8 override, ^(.*)$" # set opacity to 1.0 active, 0.5 inactive and 0.8 fullscreen for kitty
# "opacity 1.0 override 0.5 override 0.8 override, ^(kitty)$" # set opacity to 1.0 active, 0.5 inactive and 0.8 fullscreen for kitty
"move -50% -50%, float, ^(org.keepassxc.KeePassXC)$"
"move -50% -50%, float, ^(Nextcloud)$"
# common modals
"center,title:^(Open)$"
"center,title:^(Choose Files)$"
"center,title:^(Save As)$"
"center,title:^(Confirm to replace files)$"
"center,title:^(File Operation Progress)$"
];
windowrulev2 = [
"workspace 7,class:dropdown_menu_class"
"workspace 8,class:dropdown_menu_class"
"workspace 9,class:dropdown_menu_class"
# "move cursor 5px 15px, class:sublime_text"
"minsize 1 1, class:sublime_text"
# "float, class:REAPER"
# "move cursor 5px 15px, class:REAPER"
"minsize 1 1, class:REAPER"
# "stayfocused, class:REAPER"
# Apply stayfocused only to transient (temporary) windows in Reaper
# "stayfocused, title:^(.*)$, class:REAPER"
# "stayfocused, parent:REAPER"
# "noswallow, class:REAPER"
# "stayfocused, title:^(.*)$, class:REAPER"
# "float, title:^(Open|Choose Files|Save As|Confirm to replace files|File Operation Progress)$, class:REAPER"
# "stayfocused, title:^(Open|Choose Files|Save As|Confirm to replace files|File Operation Progress)$, class:REAPER"
# "nofocus, class:REAPER"
# "fullscreen, title:^(File|Edit|View|Options|Help)$, class:REAPER"
"float,class:^(google-chrome)$,title:^(Open Files)$"
"float,class:^(google-chrome)$,title:^(Open File)$"
"float,class:com.nextcloud.desktopclient.nextcloud"
"float,class:Keybase"
"float,class:org.kde.kwalletmanager5"
"float,class:org.keepassxc.KeePassXC"
"workspace special:magic, class:^my-app-class$"
];
input.numlock_by_default = true;
debug.suppress_errors = true;
};
# extraConfig = {};
# plugins = [];
};
}

View File

@ -0,0 +1,4 @@
# ~/restore_minimized.sh
target_class=$1
hyprctl dispatch focuswindow class:$target_class
hyprctl dispatch movetoworkspace $(hyprctl activeworkspace -j | jq '.id')

View File

@ -0,0 +1,36 @@
# start waybar and programs with tray icons after pause
waybar_loop() {
# restart waybar on crash (after suspend mode)
WAYBAR_RESTARTS=0
while [ $WAYBAR_RESTARTS != 6 ]; do # limited to 5 restars
pgrep Hyprland || break # exit if Hyprland is not running
waybar
let WAYBAR_RESTARTS++
notify-send -a "start-in-tray.sh" "Waybar crashed!"
sleep 1
done
}
# wait for xdg-desktop-portal-hyprland to start
until pgrep -f 'xdg-desktop-portal-hyprland'; do sleep 2; done
waybar_loop &
sleep 1 # wait for waybar
nm-applet --indicator &
blueman-applet &
dunst &
# /run/current-system/sw/bin/input-remapper-control --config-dir /home/wayne/.config/input-remapper-2/ --device 'Hanvon Ugee Shortcut Remote' --preset 'Browsers' &
# /run/current-system/sw/bin/input-remapper-control --config-dir /home/wayne/.config/input-remapper-2/ --device 'MX MCHNCL Keyboard' --preset 'Layer_1' &
# /run/current-system/sw/bin/input-remapper-control --config-dir /home/wayne/.config/input-remapper-2/ --device 'SINO WEALTH Bluetooth Keyboard' --preset 'Layer_1' &
/nix/store/104jb5a21d1d338zkl1f07si6brsmrk2-keybase-gui-6.2.4/bin/keybase-gui %u &
# hyprctl notify -1 10000 "rgb(ff1ea3)" "Launching NextCloud!"
# /home/wayne/.nix-profile/bin/nextcloud --background &
# hyprctl notify -1 10000 "rgb(ff1ea3)" "Launching KeyBase-GUI!"
# /home/wayne/.nix-profile/bin/keybase && /home/wayne/.nix-profile/bin/kbfsfuse &
hyprctl dispatch workspace 1

48
pkgs/wm/mako/mako.nix Normal file
View File

@ -0,0 +1,48 @@
{ pkgs, lib, config, ... }:
{
home.packages = with pkgs; [
mako
];
services.mako = {
enable = true;
font = "monospace 14";
sort = "-time";
width = 350;
height = 200;
output = "DP-4";
backgroundColor = "#00000080";
margin = "20";
# outerMargin = "10";
markup = true;
borderSize = 2;
borderColor = "#ffffff";
borderRadius = 15;
icons = true;
layer = "top";
maxIconSize = 64;
defaultTimeout = 5000;
ignoreTimeout = false;
padding = "20";
anchor = "top-center";
format = "<b>%s</b>\\n%b";
actions = true;
# textAlignment = "center";
extraConfig = ''
[urgency=low]
border-color=#cccccc
[urgency=normal]
border-color=#d08770
[urgency=high]
border-color=#bf616a
default-timeout=0
[category=mpd]
default-timeout=2000
group-by=category
'';
};
}

14
pkgs/wm/waybar/clock.nix Normal file
View File

@ -0,0 +1,14 @@
{
"clock" = {
"interval" = 60;
"timezone" = "America/Los_Angeles";
"format" = "{:%A, %B %d, %Y %r}";
"calander" = {
"mode" = "month";
"on-scroll" = 1;
"format" = {
"today" = "<b><u>{}</u></b>";
};
};
};
}

8
pkgs/wm/waybar/cpu.nix Normal file
View File

@ -0,0 +1,8 @@
{
"cpu" = {
"interval" = 5;
"format" = " {usage}%";
"max-length" = 10;
};
}

150
pkgs/wm/waybar/default.json Normal file
View File

@ -0,0 +1,150 @@
{
"clock": {
"interval": 60,
"timezone": "America/Los_Angeles",
"format": "{:%A, %B %d, %Y %r}",
"tooltip-format": "<tt><small>{calendar}</small></tt>",
"calander": {
"mode": "month",
"on-scroll": 1,
"format": {
"today": "<b><u>{}</u></b>",
},
},
},
// "cpu": {
// "interval": 5,
// "format": " {usage}%",
// "max-length": 10,
// },
"cpu": {
"format": "{usage}% 󰍛",
"interval": 1,
"format-alt-click": "click",
"format-alt": "{icon0}{icon1}{icon2}{icon3} {usage:>2}% 󰍛",
"format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
"on-click": "gnome-system-monitor",
},
"custom/exit": {
"format": "",
"tooltip-format": "Powermenu",
"on-click": "wlogout -b 3",
"tooltip": false
},
"disk": {
"interval": 30,
"format": "󰋊 {percentage_used}%",
"path": "/",
"tooltip": true,
"unit": "GB",
"tooltip-format": "Available {free} of {total}",
},
"memory": {
"interval": 10,
"format": " {percentage}%",
"max-length": 10,
"tooltip": true,
"tooltip-format": "RAM - {used:0.1f}GiB used",
},
"network": {
"format-wifi": " {icon}",
"format-ethernet": "  ",
"format-disconnected": "󰌙",
"format-icons": [
"󰤯 ",
"󰤟 ",
"󰤢 ",
"󰤢 ",
"󰤨 "
],
},
"wlr/taskbar": {
"format": "{icon}",
"icon-size": 28,
"spacing": 3,
"on-click-middle": "close",
"tooltip-format": "{title}",
"on-click": "activate",
"ignore-list": [],
"app_ids-mapping": {
"firefoxdeveloperedition": "firefox-developer-edition",
},
"rewrite": {
"Firefox Web Browser": "Firefox",
"Foot Server": "Terminal",
},
},
"temperature": {
"hwmon-path-abs": "/sys/devices/platform/coretemp.0/hwmon",
"input-filename": "temp2_input",
"critical-threshold": 75,
"tooltip": false,
"format-critical": "({temperatureC}°C)",
"format": "({temperatureC}°C)",
},
"hyprland/workspaces": {
"on-click": "activate",
"icon-size": 32,
"spacing": 16,
"on-scroll-up": "hyprctl dispatch workspace e+1",
"on-scroll-down": "hyprctl dispatch workspace e-1",
},
// "hyprland/workspaces": {
// "icon-size": 32,
// "spacing": 16,
// "on-scroll-up": "hyprctl dispatch workspace r+1",
// "on-scroll-down": "hyprctl dispatch workspace r-1",
// },
// ROMAN Numerals style
"hyprland/workspaces#roman": {
"active-only":false,
"all-outputs": true,
"format": "{icon}",
"show-special": false,
"on-click": "activate",
"on-scroll-up": "hyprctl dispatch workspace e+1",
"on-scroll-down": "hyprctl dispatch workspace e-1",
"persistent-workspaces":{
"1": [],
"2": [],
"3": [],
},
"format-icons": {
"1": "I",
"2": "II",
"3": "III",
"4": "IV",
"5": "V",
"6": "VI",
"7": "VII",
"8": "VIII",
"9": "IX",
"10": "X",
},
},
"custom/polycat": {
"execr": "/home/wayne/bin/polycat.sh",
"interval": 2,
"return-type": "json",
"on-click": "polycat --config-path /home/wayne/.config/polycat-config.json",
"format": "{}",
"format-icons": [
"",
"",
"",
"",
"",
]
}
}

10
pkgs/wm/waybar/disk.nix Normal file
View File

@ -0,0 +1,10 @@
{
"disk" = {
"interval" = 30;
"format" = "󰋊 {percentage_used}%";
"path" = "/";
"tooltip" = true;
"unit" = "GB";
"tooltip-format" = "Available {free} of {total}";
};
}

View File

@ -0,0 +1,9 @@
{
"memory" = {
"interval" = 10;
"format" = " {percentage}%";
"max-length" = 10;
"tooltip" = true;
"tooltip-format" = "RAM - {used:0.1f}GiB used";
};
}

View File

@ -0,0 +1,14 @@
{
"network" = {
"format-wifi" = " {icon}";
"format-ethernet" = " ";
"format-disconnected" = "󰌙";
"format-icons" = [
"󰤯 "
"󰤟 "
"󰤢 "
"󰤢 "
"󰤨 "
];
};
}

View File

@ -0,0 +1,18 @@
{
"wlr/taskbar" = {
"format" = "{icon}";
"icon-size" = 28;
"spacing" = 3;
"on-click-middle" = "close";
"tooltip-format" = "{title}";
"on-click" = "activate";
"ignore-list" = [];
"app_ids-mapping" = {
"firefoxdeveloperedition" = "firefox-developer-edition";
};
"rewrite" = {
"Firefox Web Browser" = "Firefox";
"Foot Server" = "Terminal";
};
};
}

View File

@ -0,0 +1,10 @@
{
"temperature" = {
"hwmon-path-abs" = "/sys/devices/platform/coretemp.0/hwmon";
"input-filename" = "temp2_input";
"critical-threshold" = 75;
"tooltip" = false;
"format-critical" = "({temperatureC}°C)";
"format" = "({temperatureC}°C)";
};
}

6
pkgs/wm/waybar/tray.nix Normal file
View File

@ -0,0 +1,6 @@
{
"tray" = {
"icon-size" = 18;
"spacing" = 3;
};
}

56
pkgs/wm/waybar/waybar.nix Normal file
View File

@ -0,0 +1,56 @@
{ pkgs, config, ... }:
{
programs.waybar = {
enable= true;
settings = {
mainBar = {
stylesheet = "${config.home.homeDirectory}/.config/waybar/style.css";
layer = "top";
position = "top";
height = 58;
spacing = 6;
fixed-center = true;
margin-left = 8;
margin-right = 8;
output = [
"DP-4"
];
include = "~/Flakes/user/wm/waybar/default.json";
modules-left = [ "custom/os_button" "hyprland/workspaces#roman" ];
modules-center = [ "hyprland/window" "custom/polycat" "wlr/taskbar" ]; # replace wlr/taskbar
modules-right = [ "cpu" "temperature" "disk" "tray" "clock" "custom/exit" ];
"custom/os_button" = {
"format" = "";
"on-click" = "rofi -show drun -modi drun,filebrowser,run,window,ssh";
"tooltip" = false;
};
};
leftBar = {
stylesheet = "${config.home.homeDirectory}/.config/waybar/style.css";
layer = "top";
position = "bottom";
height = 39;
output = "DP-3";
spacing = 6;
fixed-center = true;
margin-left = 8;
margin-right = 8;
include = "~/Flakes/user/wm/waybar/default.json";
modules-left = [ "memory" "hyprland/workspaces#roman" ];
modules-center = [ "wlr/taskbar" ];
modules-right = [ ];
};
rightBar = {
layer = "top";
position = "bottom";
height = 47;
output = "DP-1";
include = "~/Flakes/user/wm/waybar/default.json";
modules-left = [ ];
modules-center = [ "wlr/taskbar" ];
modules-right = [ "hyprland/workspaces#roman" "network" ];
};
};
};
}

View File

@ -0,0 +1,8 @@
{
"hyprland/workspaces" = {
"icon-size" = 33;
"spacing" = 16;
"on-scroll-up" = "hyprctl dispatch workspace e+1";
"on-scroll-down" = "hyprctl dispatch workspace e-1";
};
}