├── modules ├── tgpt │ └── tgpt.nix ├── cava │ └── cava.nix ├── java │ └── java.nix ├── weylus │ └── weylus.nix ├── discord │ └── discord.nix ├── btop │ └── btop.nix ├── pywalfox │ └── pywalfox.nix ├── git │ └── git.nix ├── wofi │ └── wofi.nix ├── mako │ └── mako.nix ├── seahorse │ └── seahorse.nix ├── spicetify │ └── spicetify.nix ├── alacritty │ └── alacritty.nix ├── rofi │ └── rofi.nix ├── foot │ └── foot.nix ├── wallust │ └── wallust.nix ├── modules.nix ├── gtk │ └── gtk.nix ├── emacs │ └── emacs.nix ├── fastfetch │ └── fastfetch.nix ├── xdg │ └── xdg.nix ├── bash │ └── bash.nix ├── tmux │ └── tmux.nix ├── hyprlock │ └── hyprlock.nix ├── sway │ └── sway.nix ├── firefox │ └── firefox.nix ├── pywal │ └── pywal.nix ├── hellwal │ └── hellwal.nix ├── vim │ └── vim.nix ├── neovim │ └── neovim.nix ├── waybar │ └── waybar.nix ├── scripts │ └── scripts.nix └── hyprland │ └── hyprland.nix ├── home ├── dh-home.nix └── ven-home.nix ├── README.md ├── hosts ├── t430 │ ├── hardware-configuration.nix │ └── configuration.nix ├── z690 │ ├── hardware-configuration.nix │ └── configuration.nix └── shared.nix ├── flake.nix └── flake.lock /modules/tgpt/tgpt.nix: -------------------------------------------------------------------------------- 1 | { lib, config, pkgs, ... }: 2 | 3 | { 4 | home.packages = with pkgs; [ 5 | tgpt 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /modules/cava/cava.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | programs.cava = { 5 | enable = true; 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /modules/java/java.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | programs.java = { 5 | enable = true; 6 | package = pkgs.jdk22; 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /modules/weylus/weylus.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | programs.weylus = { 5 | enable = true; 6 | users = [ "dh" ]; 7 | openFirewall = true; 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /modules/discord/discord.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | nixpkgs.config.allowUnfree = true; 5 | 6 | home.packages = [ 7 | #pkgs.discord 8 | (pkgs.discord.override { 9 | withOpenASAR = true; 10 | withVencord = true; 11 | }) 12 | ]; 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /modules/btop/btop.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | programs = { 5 | btop = { 6 | enable = true; 7 | package = pkgs.btop.overrideAttrs (oldAttrs: rec { 8 | cmakeFlags = (oldAttrs.cmakeFlags or [ ]) ++ [ 9 | "-DBTOP_GPU=ON" 10 | ]; 11 | }); 12 | }; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /modules/pywalfox/pywalfox.nix: -------------------------------------------------------------------------------- 1 | { lib, config, pkgs, ... }: 2 | 3 | { 4 | home.packages = with pkgs; [ 5 | pywalfox-native 6 | ]; 7 | 8 | home.activation.installPywalfox = lib.hm.dag.entryAfter ["writeBoundary"] 9 | '' 10 | #!/usr/bin/env bash 11 | ${pkgs.pywalfox-native}/bin/pywalfox install 12 | ''; 13 | } 14 | -------------------------------------------------------------------------------- /modules/git/git.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | programs.git = { 5 | enable = true; 6 | userName = "danihek"; 7 | userEmail = "danihek07@gmail.com"; 8 | 9 | extraConfig = { 10 | init.defaultBranch = "main"; 11 | credential.helper = "libsecret"; 12 | }; 13 | 14 | aliases = { 15 | pu = "push"; 16 | ch = "checkout"; 17 | co = "commit"; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/wofi/wofi.nix: -------------------------------------------------------------------------------- 1 | { 2 | programs.wofi = { 3 | enable = true; 4 | settings = { 5 | allow_images = true; 6 | insensitiv = true; 7 | columns = "5"; 8 | width = "600"; 9 | height = "400"; 10 | filter_rate = "100"; 11 | allow_markup = true; 12 | no_actions = true; 13 | halign = "fill"; 14 | orientation = "vertical"; 15 | content_halign = "fill"; 16 | drun-display_generic = true; 17 | }; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/mako/mako.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | #services.mako = { 5 | # enable = true; 6 | # layer = "overlay"; 7 | # font = "Hack"; 8 | # width = 500; 9 | # height = 160; 10 | # defaultTimeout = 10000; 11 | # maxVisible = 10; 12 | # backgroundColor = "#241b1a"; 13 | # textColor = "#baa09e"; 14 | # borderColor = "#CDfBff"; 15 | # progressColor = "over #612821"; 16 | # #iconPath = "${pkgs.breeze-icons}/share/icons/breeze-dark"; 17 | # maxIconSize = 24; 18 | #}; 19 | } 20 | -------------------------------------------------------------------------------- /home/dh-home.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, USERNAME, ... }: 2 | 3 | { 4 | imports = [ 5 | ../modules/modules.nix 6 | ]; 7 | 8 | home.username = "${USERNAME}"; 9 | home.homeDirectory = "/home/${USERNAME}"; 10 | home.stateVersion = "24.05"; 11 | 12 | home.packages = [ 13 | pkgs.alacritty 14 | pkgs.nodejs_22 15 | pkgs.pywal 16 | ]; 17 | 18 | programs.alacritty.enable = true; 19 | programs.zoxide.enable = true; 20 | programs.fzf.enable = true; 21 | 22 | programs.home-manager.enable = true; 23 | } 24 | -------------------------------------------------------------------------------- /home/ven-home.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, USERNAME, ... }: 2 | 3 | { 4 | imports = [ 5 | ../modules/modules.nix 6 | ]; 7 | 8 | home.username = "${USERNAME}"; 9 | home.homeDirectory = "/home/${USERNAME}"; 10 | home.stateVersion = "24.05"; 11 | 12 | home.packages = [ 13 | pkgs.alacritty 14 | pkgs.nodejs_22 15 | pkgs.pywal 16 | ]; 17 | 18 | programs.alacritty.enable = true; 19 | programs.zoxide.enable = true; 20 | programs.fzf.enable = true; 21 | 22 | programs.home-manager.enable = true; 23 | } 24 | -------------------------------------------------------------------------------- /modules/seahorse/seahorse.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, lib, ... }: 2 | 3 | { 4 | options = { 5 | programs.seahorse = { 6 | enable = lib.mkEnableOption "Seahorse, a GNOME application for managing encryption keys and passwords in the GNOME Keyring"; 7 | }; 8 | }; 9 | 10 | config = lib.mkIf config.programs.seahorse.enable { 11 | programs.ssh.askPassword = lib.mkDefault "${pkgs.seahorse}/libexec/seahorse/ssh-askpass"; 12 | environment.systemPackages = [ 13 | pkgs.seahorse 14 | ]; 15 | services.dbus.packages = [ 16 | pkgs.seahorse 17 | ]; 18 | 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/spicetify/spicetify.nix: -------------------------------------------------------------------------------- 1 | { pkgs, lib, inputs, ...}: 2 | let 3 | spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; 4 | in 5 | { 6 | nixpkgs.config.allowUnfreePredicate = pkg: 7 | builtins.elem (lib.getName pkg) [ 8 | "spotify" 9 | ]; 10 | 11 | imports = [inputs.spicetify-nix.homeManagerModules.default]; 12 | 13 | programs.spicetify = { 14 | enable = true; 15 | enabledExtensions = with spicePkgs.extensions; [ 16 | adblock 17 | hidePodcasts 18 | shuffle # shuffle+ (special characters are sanitized out of extension names) 19 | ]; 20 | theme = spicePkgs.themes.defaultDynamic; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /modules/alacritty/alacritty.nix: -------------------------------------------------------------------------------- 1 | { 2 | programs.alacritty = { 3 | settings = { 4 | window = { 5 | padding.x = 1; 6 | padding.y = 1; 7 | decorations = "none"; 8 | dynamic_title = true; 9 | opacity = 0.6; 10 | }; 11 | 12 | cursor = { 13 | blink_interval = 350; 14 | style = { 15 | shape = "Block"; 16 | #blinking = "Always"; 17 | }; 18 | vi_mode_style = { 19 | shape = "Block"; 20 | #blinking = "Always"; 21 | }; 22 | }; 23 | 24 | mouse = { 25 | hide_when_typing = true; 26 | }; 27 | 28 | font = { 29 | normal = { 30 | family = "JetBrains Mono Medium"; 31 | }; 32 | }; 33 | }; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /modules/rofi/rofi.nix: -------------------------------------------------------------------------------- 1 | { pkgs, config, ... }: 2 | 3 | { 4 | programs.rofi = let 5 | inherit (config.lib.formats.rasi) mkLiteral; 6 | in 7 | { 8 | enable = true; 9 | cycle = true; 10 | # Install the wayland variant of rofi 11 | package = pkgs.rofi-wayland; 12 | # Set terminal to foot 13 | terminal = "${pkgs.foot}/bin/foot"; 14 | 15 | # Custom font for better aesthetics 16 | font = "MesloLGS Nerd Font Mono 12"; # Larger font for better readability 17 | #theme = "${config.xdg.cacheHome}/hellwal/rofi-colors.rasi"; 18 | 19 | extraConfig = { 20 | show-icons = true; 21 | icon-theme = "Papirus-Apps"; 22 | terminal = "foot"; 23 | cycle = false; 24 | hide-scrollbar = true; 25 | disable-history = false; 26 | opacity = "0.5"; 27 | }; 28 | 29 | plugins = with pkgs; [ 30 | rofi-emoji # Emoji support in Rofi 31 | ]; 32 | }; 33 | } 34 | 35 | -------------------------------------------------------------------------------- /modules/foot/foot.nix: -------------------------------------------------------------------------------- 1 | { pkgs, lib, config, USERNAME, ...}: 2 | 3 | { 4 | programs.foot = { 5 | enable = true; 6 | server.enable = true; 7 | 8 | settings = { 9 | main = { 10 | include= "/home/${USERNAME}/.cache/wal/colors-foot.ini"; 11 | term = "screen-256color"; 12 | 13 | #font = "JetBrainsMono Nerd Font:size=11"; 14 | font = "JetBrains Mono Medium:size=11"; 15 | 16 | #dpi-aware = "yes"; 17 | pad = "0x0"; 18 | }; 19 | 20 | url = { 21 | protocols = "http, https, ftp, ftps, file, gemini, gopher"; 22 | }; 23 | 24 | colors = { 25 | alpha = ".75"; 26 | }; 27 | 28 | cursor = { 29 | style = "block"; 30 | }; 31 | 32 | key-bindings = { 33 | }; 34 | 35 | mouse = { 36 | hide-when-typing = "yes"; 37 | }; 38 | 39 | tweak = { 40 | sixel = "yes"; 41 | }; 42 | }; 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /modules/wallust/wallust.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, lib, ... }: 2 | 3 | { 4 | home.packages = [ pkgs.wallust ]; 5 | 6 | home.file.".config/wallust/wallust.toml".text = '' 7 | [templates] 8 | themecord.template = "colors-discord.css" 9 | themecord.target = '~/.cache/wallust/colors-discord.css' 10 | colorsjson.template = "colors.json" 11 | colorsjson.target = '~/.cache/wallust/colors.json' 12 | ''; 13 | 14 | home.file.".config/wallust/templates/colors-discord.css" .text = '' 15 | --color0: {{ color0 }}; 16 | --color1: {{ color1 }}; 17 | --color2: {{ color2 }}; 18 | --color3: {{ color3 }}; 19 | --color4: {{ color4 }}; 20 | --color5: {{ color5 }}; 21 | --color6: {{ color6 }}; 22 | --color7: {{ color7 }}; 23 | --color8: {{ color8 }}; 24 | --color9: {{ color9 }}; 25 | --color10: {{ color10 }}; 26 | --color11: {{ color11 }}; 27 | --color12: {{ color12 }}; 28 | --color13: {{ color13 }}; 29 | --color14: {{ color14 }}; 30 | --color15: {{ color15 }}; 31 | ''; 32 | } 33 | -------------------------------------------------------------------------------- /modules/modules.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, config, inputs, ... }: 2 | 3 | { 4 | imports = [ 5 | # Enabled 6 | ./gtk/gtk.nix 7 | ./git/git.nix 8 | ./vim/vim.nix 9 | ./bash/bash.nix 10 | ./btop/btop.nix 11 | ./foot/foot.nix 12 | ./tmux/tmux.nix 13 | ./wofi/wofi.nix 14 | ./mako/mako.nix 15 | ./tgpt/tgpt.nix 16 | #./cava/cava.nix 17 | ./rofi/rofi.nix 18 | ./emacs/emacs.nix 19 | ./pywal/pywal.nix 20 | ./neovim/neovim.nix 21 | ./waybar/waybar.nix 22 | ./wallust/wallust.nix 23 | #./firefox/firefox.nix 24 | ./discord/discord.nix 25 | ./pywalfox/pywalfox.nix 26 | ./hyprland/hyprland.nix 27 | ./hyprlock/hyprlock.nix 28 | ./spicetify/spicetify.nix 29 | ./fastfetch/fastfetch.nix 30 | ./alacritty/alacritty.nix 31 | 32 | # Disabled 33 | #./java/java.nix 34 | #./sway/sway.nix 35 | #./starship/starship.nix 36 | #./omp/omp.nix i dot have time to configure it 37 | 38 | # Scripts 39 | ./scripts/scripts.nix 40 | ]; 41 | } 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | My NixOS configuration! 2 | 3 | > [!IMPORTANT] 4 | > It is not longer used nor uppdated! Info bellow 5 | 6 | NixOS, nix and all of the things that NixOS Fundation have to offer, are amazing and well built, but for a specific purpose. I am a REAL tinkerer and system breaking fella myself so it's hard for me to do it if I have to keep everything declarative, also a lot of ancient and not popular software is available. 7 | 8 | After using it daily sine **Aug 3, 2024**, I can say that I know more or less how it functions internally, Vimjoyer's videos were very helpful in that topic, thank you for that :). I was even able to deploy software for [nixpkgs](https://github.com/NixOS/nixpkgs) called [hellwal](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/he/hellwal/package.nix). 9 | 10 | It was wonderful ride and good learning experience, but it comes to an end. I'll leave this repo, maybe some people will find this useful. This is **THE** last commit here. Thank you NixOS. 11 | 12 | > I'll still use NixOS for servers it seems to be OP in this field. 13 | 14 | Last screenshots before the wipe: 15 | ![swappy-20250506_214503](https://github.com/user-attachments/assets/d55f3a0b-ff2c-4ce1-873b-acee20f99a45) 16 | -------------------------------------------------------------------------------- /modules/gtk/gtk.nix: -------------------------------------------------------------------------------- 1 | { pkgs, config, ... }: 2 | 3 | { 4 | gtk = { 5 | enable = true; 6 | 7 | theme = { 8 | name = "Nordic"; 9 | package = pkgs.nordic; 10 | }; 11 | iconTheme = { 12 | name = "Nordzy"; 13 | package = pkgs.nordzy-icon-theme; 14 | }; 15 | gtk3.extraConfig = { 16 | gtk-application-prefer-dark-theme=1; 17 | }; 18 | gtk4.extraConfig = { 19 | gtk-application-prefer-dark-theme=1; 20 | }; 21 | }; 22 | 23 | qt = { 24 | enable = true; 25 | platformTheme.name = "gtk"; 26 | style = { 27 | name = "adwaita-dark"; 28 | package = pkgs.adwaita-qt; 29 | }; 30 | }; 31 | 32 | dconf.settings = { 33 | "org/gnome/desktop/interface" = { 34 | color-scheme = "prefer-dark"; 35 | cursor-size = 24; 36 | }; 37 | "org/gnome/shell/extensions/user-theme" = { 38 | name = "Nordic"; 39 | }; 40 | }; 41 | 42 | home.pointerCursor = { 43 | # package = pkgs.oreo-cursors-plus; 44 | # name = "oreo_spark_red_cursors"; 45 | package = pkgs.posy-cursors; 46 | name = "Posy_Cursor_Black"; 47 | size = 24; 48 | gtk.enable = true; 49 | x11.enable = true; 50 | }; 51 | 52 | home.sessionVariables.GTK_THEME = "Nordic"; 53 | } 54 | -------------------------------------------------------------------------------- /modules/emacs/emacs.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | #programs.emacs = { 5 | # enable = true; 6 | # extraPackages = ( 7 | # epkgs: 8 | # [ 9 | # epkgs.melpaPackages.use-package 10 | 11 | # epkgs.melpaPackages.cargo 12 | # epkgs.melpaPackages.flycheck 13 | # epkgs.melpaPackages.flymake-cursor 14 | # epkgs.melpaPackages.magit 15 | # epkgs.melpaPackages.smex 16 | # epkgs.melpaPackages.rainbow-delimiters 17 | 18 | # epkgs.melpaPackages.gruber-darker-theme 19 | 20 | # epkgs.melpaPackages.markdown-mode 21 | # epkgs.melpaPackages.rust-mode 22 | # epkgs.melpaPackages.toml-mode 23 | # epkgs.melpaPackages.web-mode 24 | # epkgs.melpaPackages.yaml-mode 25 | # ] 26 | # ); 27 | #}; 28 | 29 | #home.file.".emacs.d/init.el".text = '' 30 | # (use-package gruber-darker-theme 31 | # :ensure t) 32 | # (load-theme 'gruber-darker t) 33 | # 34 | # (scroll-bar-mode -1) 35 | # (menu-bar-mode -1) 36 | # (tool-bar-mode -1) 37 | # (global-display-line-numbers-mode) 38 | 39 | # ;; No fucking ringbell sound 40 | # (setq visible-bell t) 41 | # (setq ring-bell-function 'ignore) 42 | 43 | # (ido-mode 1) 44 | # (ido-everywhere 1) 45 | # 46 | # (custom-set-variables 47 | # '(display-line-numbers-type (quote relative))) 48 | # ''; 49 | } 50 | -------------------------------------------------------------------------------- /modules/fastfetch/fastfetch.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | programs.fastfetch = { 5 | enable = true; 6 | settings = { 7 | logo = { 8 | source = "nixos"; 9 | padding = { 10 | right = 1; 11 | }; 12 | }; 13 | display = { 14 | size.binaryPrefix = "si"; 15 | color = "blue"; 16 | separator = "  "; 17 | }; 18 | modules = [ 19 | "break" 20 | "break" 21 | "break" 22 | "break" 23 | "break" 24 | { 25 | type = "custom"; 26 | key = "who?"; 27 | format = " {#1}ダニシェク"; 28 | } 29 | "break" 30 | { 31 | type = "host"; 32 | key = "󰌢 PC"; 33 | keyColor = "blue"; 34 | } 35 | { 36 | type = "os"; 37 | key = "├─┬"; 38 | keyColor = "blue"; 39 | } 40 | { 41 | type = "packages"; 42 | key = "│ ├󰏖"; 43 | keyColor = "blue"; 44 | } 45 | { 46 | type = "wm"; 47 | key = "│ ├"; 48 | keyColor = "blue"; 49 | } 50 | { 51 | type = "terminal"; 52 | key = "│ ├"; 53 | keyColor = "blue"; 54 | } 55 | { 56 | type = "shell"; 57 | key = "│ ├"; 58 | keyColor = "blue"; 59 | } 60 | { 61 | type = "datetime"; 62 | key = "└─┴🗓"; 63 | format = "{1}-{3}-{11}"; 64 | } 65 | ]; 66 | }; 67 | }; 68 | } 69 | -------------------------------------------------------------------------------- /modules/xdg/xdg.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | xdg.mimeApps = { 5 | enable = true; 6 | defaultApplications = { 7 | "image/*" = [ "sxiv.desktop" ]; 8 | "video/*" = [ "mpv.desktop" ]; 9 | "text/*" = [ "neovide.desktop" ]; 10 | 11 | "application/pdf" = ["firefox.desktop"]; 12 | "text/html" = [ "firefox.desktop" ]; 13 | "default-web-browser" = [ "firefox.desktop" ]; 14 | "x-scheme-handler/http" = [ "firefox.desktop" ]; 15 | "x-scheme-handler/https" = [ "firefox.desktop" ]; 16 | "x-scheme-handler/about" = [ "firefox.desktop" ]; 17 | "x-scheme-handler/unknown" = [ "firefox.desktop" ]; 18 | "x-scheme-handler/mailto" = [ "thunderbird.desktop" ]; 19 | 20 | "inode/directory" = [ "thunar.desktop" ]; 21 | "application/zip" = [ "thunar.desktop" ]; 22 | "application/rar" = [ "thunar.desktop" ]; 23 | "application/7z" = [ "thunar.desktop" ]; 24 | "application/*tar" = [ "thunar.desktop" ]; 25 | }; 26 | }; 27 | 28 | xdg.portal = { 29 | enable = true; 30 | xdgOpenUsePortal = true; 31 | wlr.enable = true; 32 | config.common.default = "*"; 33 | extraPortals = with pkgs; [ 34 | xdg-desktop-portal-gtk 35 | xdg-desktop-portal-wlr 36 | #xdg-desktop-portal-hyprland 37 | ]; 38 | }; 39 | home.sessionVariables.MOZ_ENABLE_WAYLAND = "1"; 40 | home.sessionVariables.NIXOS_OZONE_WL = "1"; 41 | } 42 | -------------------------------------------------------------------------------- /hosts/t430/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ (modulesPath + "/installer/scan/not-detected.nix") 9 | ]; 10 | 11 | boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" ]; 12 | boot.initrd.kernelModules = [ ]; 13 | boot.kernelModules = [ "kvm-intel" ]; 14 | boot.extraModulePackages = [ ]; 15 | 16 | fileSystems."/" = 17 | { device = "/dev/disk/by-uuid/38788db7-57ae-4567-97f4-dc45820aa3a7"; 18 | fsType = "ext4"; 19 | }; 20 | 21 | fileSystems."/boot" = 22 | { device = "/dev/disk/by-uuid/08B5-D672"; 23 | fsType = "vfat"; 24 | options = [ "fmask=0022" "dmask=0022" ]; 25 | }; 26 | 27 | swapDevices = [ { 28 | device = "/var/lib/swapfile"; 29 | size = 8 * 1024; 30 | } ]; 31 | 32 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 33 | # (the default) this is the recommended approach. When using systemd-networkd it's 34 | # still possible to use this option, but it's recommended to use it in conjunction 35 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 36 | networking.useDHCP = lib.mkDefault true; 37 | # networking.interfaces.enp0s25.useDHCP = lib.mkDefault true; 38 | # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; 39 | 40 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 41 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 42 | } 43 | -------------------------------------------------------------------------------- /modules/bash/bash.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | programs.bash = { 5 | enable = true; 6 | enableCompletion = true; 7 | 8 | shellAliases = { 9 | g = "git"; 10 | sl = "ls"; 11 | nd= "nix develop"; 12 | ls = "eza"; 13 | lf = "yazi"; #xd - only for image support 14 | tm = "tmux"; 15 | l = "lsd -l"; 16 | tree = "tree"; 17 | ll = "ls -lh"; 18 | nv = "neovide"; 19 | la = "ls -alh"; 20 | lla = "ls -alh"; 21 | cl = "clear ; l"; 22 | fucking = "sudo"; 23 | mkcl = "make clean"; 24 | nrun = "nix-shell -p"; 25 | TODO = "vim ~/.TODO.md"; 26 | cpl = "make clean ; clear; make"; 27 | }; 28 | 29 | initExtra = '' 30 | # fzf - Completion & Keybindings 31 | if command -v fzf-share >/dev/null; then 32 | if [ -f $(fzf-share)/key-bindings.bash ]; then 33 | source "$(fzf-share)/key-bindings.bash" 34 | fi 35 | 36 | if [ -f $(fzf-share)/completion.bash ]; then 37 | source "$(fzf-share)/completion.bash" 38 | fi 39 | fi 40 | 41 | # Pywal colors 42 | #[ -d "$HOME/.cache/wal" ] && eval "$(cat $HOME/.cache/wal/colors.sh)" 43 | 44 | # Hellwal colors 45 | #[ -d "$HOME/.cache/hellwal" ] && eval "$(cat $HOME/.cache/hellwal/terminal.sh)" 46 | 47 | # Prompt 48 | # dh@nix:~ » neofetch 49 | PS1='\[\033[36m\]\u\[\033[35m\]@\[\033[31m\]\h:\[\033[32m\]\w \[\033[33m\]>\[\033[37m\] ' 50 | 51 | # ~ dh » 52 | #PS1='\[\033[36m\]\u \[\033[33m\]»\[\033[37m\] ' 53 | 54 | # Keybindings 55 | bind '"\e[1;5A": history-search-backward' 56 | bind '"\e[1;5B": history-search-forward' 57 | 58 | source ~/.cache/hellwal/variables.sh 59 | sh ~/.cache/hellwal/terminal.sh 60 | ''; 61 | 62 | sessionVariables = { 63 | FZF_DEFAULT_OPTS="--color=16"; 64 | }; 65 | }; 66 | } 67 | -------------------------------------------------------------------------------- /hosts/z690/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ (modulesPath + "/installer/scan/not-detected.nix") 9 | ]; 10 | 11 | boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "v4l2loopback" ]; 12 | boot.initrd.kernelModules = [ ]; 13 | boot.kernelModules = [ "kvm-intel" ]; 14 | boot.extraModulePackages = with config.boot.kernelPackages; 15 | [ v4l2loopback.out ]; 16 | 17 | fileSystems."/" = 18 | { device = "/dev/disk/by-uuid/c94058d7-8018-4714-ab86-51fcc221e2e0"; 19 | fsType = "ext4"; 20 | }; 21 | 22 | fileSystems."/boot" = 23 | { device = "/dev/disk/by-uuid/C7B2-78D0"; 24 | fsType = "vfat"; 25 | options = [ "fmask=0022" "dmask=0022" ]; 26 | }; 27 | 28 | swapDevices = [ ]; 29 | 30 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 31 | # (the default) this is the recommended approach. When using systemd-networkd it's 32 | # still possible to use this option, but it's recommended to use it in conjunction 33 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 34 | networking.useDHCP = lib.mkDefault true; 35 | # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; 36 | # networking.interfaces.enp5s0f0.useDHCP = lib.mkDefault true; 37 | # networking.interfaces.enp5s0f1.useDHCP = lib.mkDefault true; 38 | # networking.interfaces.enp5s0f2.useDHCP = lib.mkDefault true; 39 | # networking.interfaces.enp5s0f3.useDHCP = lib.mkDefault true; 40 | # networking.interfaces.enp6s0.useDHCP = lib.mkDefault true; 41 | 42 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 43 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 44 | } 45 | -------------------------------------------------------------------------------- /modules/tmux/tmux.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | programs.tmux = { 5 | enable = true; 6 | extraConfig = '' 7 | set-option -g status-style bg=colour235,fg=colour136,default 8 | set-option -g pane-border-style fg=colour235 9 | set-option -g pane-active-border-style fg=colour240 10 | set-option -g message-style bg=colour235,fg=colour166 11 | 12 | set-option -g display-panes-active-colour colour33 13 | set-option -g display-panes-colour colour166 14 | set-option -g default-shell /run/current-system/sw/bin/bash 15 | 16 | set-window-option -g clock-mode-colour green 17 | set-window-option -g window-status-style fg=colour244,bg=default,dim 18 | set-window-option -g window-status-current-style fg=colour166,bg=default,bright 19 | 20 | set -g status-interval 1 21 | set -g status-justify centre 22 | set -g status-left-length 20 23 | set -g status-right-length 140 24 | set -g status-left '#[fg=green,bright]#(whoami)@#[fg=cyan]#H #[fg=red]•#[fg=yellow]  #[default]' 25 | set -g status-right '#[fg=green,bg=default,bright]#(tmux-mem-cpu-load) #[fg=red,dim,bg=default]#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=white,bg=default]%l:%M:%S %p#[default] #[fg=blue]%Y-%m-%d' 26 | 27 | set -g base-index 1 28 | set -s escape-time 50 29 | set -g visual-activity on 30 | set-window-option -g mode-keys vi 31 | set-window-option -g automatic-rename 32 | 33 | 34 | # Fix tmux-neovim error 35 | # https://www.reddit.com/r/NixOS/comments/13iqrj8/tmux_resurrect_doesnt_resurrect_nvim_sessions/ 36 | resurrect_dir="$HOME/.tmux/resurrect" 37 | set -g @resurrect-dir $resurrect_dir 38 | set -g @resurrect-hook-post-save-all 'target=$(readlink -f $resurrect_dir/last); sed "s| --cmd .*-vim-pack-dir||g; s|/etc/profiles/per-user/$USER/bin/||g; s|/home/$USER/.nix-profile/bin/||g" $target | sponge $target' 39 | 40 | setw -g aggressive-resize on 41 | setw -g monitor-activity on 42 | 43 | bind l display-popup "dpcs" 44 | ''; 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | 2 | { 3 | description = "danihek's NixOS config"; 4 | 5 | inputs = { 6 | nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 7 | #nixpkgs-small.url = "github:nixos/nixpkgs/nixos-unstable-small"; 8 | 9 | dpcs = { 10 | url = "github:danihek/dpcs"; 11 | inputs.nixpkgs.follows = "nixpkgs"; 12 | }; 13 | 14 | home-manager = { 15 | url = "github:nix-community/home-manager"; 16 | inputs.nixpkgs.follows = "nixpkgs"; 17 | }; 18 | 19 | themecord = { 20 | url = "github:danihek/Themecord/"; 21 | inputs.nixpkgs.follows = "nixpkgs"; 22 | }; 23 | 24 | spicetify-nix = { 25 | url = "github:Gerg-L/spicetify-nix"; 26 | inputs.nixpkgs.follows = "nixpkgs"; 27 | }; 28 | }; 29 | 30 | outputs = 31 | { 32 | self, 33 | dpcs, 34 | nixpkgs, 35 | themecord, 36 | home-manager, 37 | ... 38 | } 39 | @inputs: 40 | let 41 | system = "x86_64-linux"; 42 | pkgs = nixpkgs.legacyPackages.${system}; 43 | in 44 | { 45 | nixosConfigurations.laptop = nixpkgs.lib.nixosSystem { 46 | specialArgs = {inherit inputs;}; 47 | modules = [ 48 | ./hosts/shared.nix 49 | ./hosts/t430/configuration.nix 50 | inputs.home-manager.nixosModules.default 51 | 52 | ({ config, pkgs, ... }: { 53 | environment.systemPackages = with pkgs; [ 54 | themecord.packages.x86_64-linux.default 55 | ]; 56 | }) 57 | 58 | ({ config, pkgs, ... }: { 59 | environment.systemPackages = with pkgs; [ 60 | dpcs.packages.x86_64-linux.default 61 | ]; 62 | }) 63 | 64 | ]; 65 | }; 66 | 67 | nixosConfigurations.mainpc = nixpkgs.lib.nixosSystem { 68 | specialArgs = {inherit inputs;}; 69 | modules = [ 70 | ./hosts/shared.nix 71 | ./hosts/z690/configuration.nix 72 | inputs.home-manager.nixosModules.default 73 | 74 | ({ config, pkgs, ... }: { 75 | environment.systemPackages = with pkgs; [ 76 | themecord.packages.x86_64-linux.default 77 | ]; 78 | }) 79 | 80 | ({ config, pkgs, ... }: { 81 | environment.systemPackages = with pkgs; [ 82 | dpcs.packages.x86_64-linux.default 83 | ]; 84 | }) 85 | 86 | ]; 87 | }; 88 | }; 89 | } 90 | -------------------------------------------------------------------------------- /hosts/t430/configuration.nix: -------------------------------------------------------------------------------- 1 | # configuration.nix 2 | 3 | { inputs, config, pkgs, ... }: 4 | 5 | let 6 | USERNAME = "ven"; 7 | in 8 | { 9 | imports = 10 | [ 11 | ../shared.nix 12 | ./hardware-configuration.nix 13 | inputs.home-manager.nixosModules.home-manager 14 | ]; 15 | 16 | home-manager = { 17 | extraSpecialArgs = { inherit inputs; USERNAME = USERNAME; }; 18 | users = { 19 | ${USERNAME} = import ../../home/ven-home.nix; 20 | }; 21 | }; 22 | 23 | # User settings 24 | users.users.${USERNAME} = { 25 | shell = pkgs.bash; 26 | isNormalUser = true; 27 | description = "${USERNAME}"; 28 | extraGroups = [ "networkmanager" "wheel" "dialout" "plugdev" "video" ]; 29 | packages = with pkgs; []; 30 | }; 31 | 32 | services.udev.extraRules = '' 33 | SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev" 34 | ''; 35 | 36 | # Bootloader. 37 | boot.loader.grub.enable = true; 38 | boot.loader.grub.device = "/dev/sda"; 39 | boot.loader.grub.useOSProber = true; 40 | 41 | # Power management 42 | powerManagement.enable = false; 43 | services.thermald.enable = false; 44 | powerManagement.powertop.enable = false; 45 | 46 | services.tlp = { 47 | enable = false; 48 | settings = { 49 | CPU_SCALING_GOVERNOR_ON_AC = "performance"; 50 | CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; 51 | 52 | CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; 53 | CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; 54 | 55 | CPU_MIN_PERF_ON_AC = 0; 56 | CPU_MAX_PERF_ON_AC = 100; 57 | CPU_MIN_PERF_ON_BAT = 0; 58 | CPU_MAX_PERF_ON_BAT = 10; 59 | }; 60 | }; 61 | 62 | networking = { 63 | hostName = "nix"; 64 | defaultGateway = "192.168.1.1"; 65 | nameservers = [ "1.1.1.1" ]; 66 | networkmanager.enable = true; 67 | 68 | interfaces.wlp3s0.ipv4.addresses = [ { 69 | address = "192.168.1.190"; 70 | prefixLength = 24; 71 | } ]; 72 | 73 | firewall = { 74 | enable = false; 75 | }; 76 | }; 77 | 78 | environment.variables = { 79 | NIX_FLAKE_CURRENT_CONFIG = "laptop"; 80 | }; 81 | 82 | # Bluetooth 83 | hardware.bluetooth = { 84 | enable = true; 85 | powerOnBoot = false; # powers up the default Bluetooth controller on boot 86 | 87 | settings = { 88 | Input = { 89 | UserspaceHID = true; 90 | }; 91 | General = { 92 | Experimental = true; 93 | }; 94 | }; 95 | }; 96 | 97 | hardware.bluetooth.settings = { 98 | }; 99 | } 100 | -------------------------------------------------------------------------------- /modules/hyprlock/hyprlock.nix: -------------------------------------------------------------------------------- 1 | { lib, config, pkgs, ... }: 2 | 3 | { 4 | programs.hyprlock = { 5 | enable = true; 6 | sourceFirst = true; 7 | 8 | settings = { 9 | general = { 10 | grace = 5; 11 | hide_cursor = true; 12 | }; 13 | 14 | background = [ 15 | { 16 | path = "$HOME/.cache/current_wall.jpg"; 17 | color = "rgba(25, 20, 20, 1.0)"; 18 | 19 | blur_passes = "0"; 20 | blur_size = "7"; 21 | noise = "0.0117"; 22 | contrast = "0.8916"; 23 | brightness = "0.8172"; 24 | vibrancy = "0.1696"; 25 | vibrancy_darkness = "0.0"; 26 | } 27 | ]; 28 | 29 | image = [ 30 | { 31 | path = "$HOME/pics/avatar.png"; 32 | size = "150"; 33 | rounding = "-1"; 34 | border_size = "4"; 35 | border_color = "$color6"; 36 | rotate = "0"; 37 | reload_time = "-1"; 38 | 39 | position = "0, 150"; 40 | halign = "center"; 41 | valign = "center"; 42 | } 43 | ]; 44 | 45 | label = [ 46 | { 47 | text = "ヤッホー, ダニシェク"; 48 | text_align = "center"; 49 | color = "$foreground"; 50 | font_size = "30"; 51 | font_family = "Hack"; 52 | 53 | position = "0, 50"; 54 | halign = "center"; 55 | valign = "center"; 56 | } 57 | ]; 58 | 59 | input-field = [ 60 | { 61 | size = "200, 60"; 62 | outline_thickness = "2"; 63 | dots_size = "0.13"; 64 | dots_spacing = "0.15"; 65 | dots_center = "true"; 66 | dots_rounding = "-1"; 67 | outer_color = "$color2"; 68 | inner_color = "$color14"; 69 | font_color = "rgb(10, 10, 10)"; 70 | fade_on_empty = "true"; 71 | fade_timeout = "1000"; 72 | placeholder_text = ""; 73 | hide_input = "false"; 74 | rounding = "-1"; 75 | check_color = "rgb(204, 136, 34)"; 76 | fail_color = "rgb(20, 18, 18)"; 77 | fail_text = "$FAIL ($ATTEMPTS)"; 78 | fail_timeout = "1000"; 79 | fail_transition = "300"; 80 | capslock_color = "-1"; 81 | numlock_color = "-1"; 82 | bothlock_color = "-1"; 83 | invert_numlock = "false"; 84 | swap_font_color = "false"; 85 | 86 | position = "0, -20"; 87 | halign = "center"; 88 | valign = "center"; 89 | } 90 | ]; 91 | }; 92 | 93 | extraConfig = '' 94 | source = $HOME/.cache/wal/colors-hyprland.conf 95 | ''; 96 | }; 97 | } 98 | -------------------------------------------------------------------------------- /modules/sway/sway.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | 5 | imports = [ 6 | ./waybar.nix 7 | ]; 8 | 9 | home.packages = with pkgs; [ 10 | alacritty 11 | slurp 12 | grim 13 | waypipe 14 | ]; 15 | 16 | services.mako = 17 | let 18 | in 19 | { 20 | enable = true; 21 | backgroundColor = "#0A0E14"; 22 | borderColor = "#53BDFA"; 23 | defaultTimeout = 30 * 1000; # millis 24 | font = "monospace 10"; 25 | icons = true; 26 | maxIconSize = 96; 27 | maxVisible = 3; 28 | sort = "-time"; 29 | textColor = "#B3B1AD"; 30 | width = 500; 31 | }; 32 | 33 | wayland.windowManager.sway = { 34 | enable = true; 35 | systemd.enable = true; 36 | checkConfig = false; 37 | extraSessionCommands = '' 38 | . "${config.home.profileDirectory}/etc/profile.d/hm-session-vars.sh" 39 | ''; 40 | config = rec { 41 | bars = [ ]; 42 | modifier = "Mod1"; 43 | menu = "${pkgs.wofi}/bin/wofi --show run"; 44 | terminal = "${pkgs.alacritty}/bin/alacritty"; 45 | keybindings = 46 | let 47 | pactl = "${pkgs.pulseaudio}/bin/pactl"; 48 | playerctl = "${pkgs.playerctl}/bin/playerctl"; 49 | in 50 | lib.mkOptionDefault { 51 | "${modifier}+Shift+s" = "exec slurp | grim -g -"; 52 | "${modifier}+Pause" = "mode passthrough"; 53 | 54 | # audio keys 55 | XF86AudioMute = "exec ${pactl} set-sink-mute 0 toggle"; 56 | XF86AudioLowerVolume = "exec ${pactl} set-sink-volume 0 -5%"; 57 | XF86AudioRaiseVolume = "exec ${pactl} set-sink-volume 0 +5%"; 58 | XF86AudioMicMute = "exec ${pactl} set-source-mute 0 toggle"; 59 | 60 | # media keys 61 | XF86AudioPlay = "exec ${playerctl} play-pause"; 62 | XF86AudioPause = "exec ${playerctl} play-pause"; 63 | XF86AudioNext = "exec ${playerctl} next"; 64 | XF86AudioPrev = "exec ${playerctl} previous"; 65 | }; 66 | input = { 67 | "*" = { 68 | xkb_layout = "pl"; 69 | xkb_options = "caps:escape"; 70 | repeat_rate = "50"; 71 | repeat_delay = "200"; 72 | }; 73 | }; 74 | output = { 75 | "LVDS-1" = { mode = "1600x900@60.000Hz"; }; 76 | }; 77 | modes = { 78 | passthrough = { 79 | "Mod1+Pause" = "mode default"; 80 | }; 81 | resize = { 82 | "h" = "resize shrink width 10 px"; 83 | "j" = "resize grow height 10 px"; 84 | "k" = "resize shrink height 10 px"; 85 | "l" = "resize grow width 10 px"; 86 | "Left" = "resize shrink width 10 px"; 87 | "Down" = "resize grow height 10 px"; 88 | "Up" = "resize shrink height 10 px"; 89 | "Right" = "resize grow width 10 px"; 90 | "Escape" = "mode default"; 91 | "Return" = "mode default"; 92 | }; 93 | }; 94 | }; 95 | extraConfig = '' 96 | # Styling 97 | default_border none 98 | 99 | # lock inhibitors 100 | for_window [app_id="firefox"] inhibit_idle fullscreen 101 | for_window [app_id="Firefox"] inhibit_idle fullscreen 102 | for_window [class="dota2"] inhibit_idle fullscreen 103 | ''; 104 | }; 105 | } 106 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "dpcs": { 4 | "inputs": { 5 | "nixpkgs": [ 6 | "nixpkgs" 7 | ] 8 | }, 9 | "locked": { 10 | "lastModified": 1724602029, 11 | "narHash": "sha256-fvEKqi8DZI5Bo8W4L5FV2DvaBK9uVlZ6nXjzSRcpENk=", 12 | "owner": "danihek", 13 | "repo": "dpcs", 14 | "rev": "9b204c7c23fa271dfc6a6a0bddfeb8d22d0b7b60", 15 | "type": "github" 16 | }, 17 | "original": { 18 | "owner": "danihek", 19 | "repo": "dpcs", 20 | "type": "github" 21 | } 22 | }, 23 | "home-manager": { 24 | "inputs": { 25 | "nixpkgs": [ 26 | "nixpkgs" 27 | ] 28 | }, 29 | "locked": { 30 | "lastModified": 1745627989, 31 | "narHash": "sha256-mOCdFmxocBPae7wg7RYWOtJzWMJk34u9493ItY0dVqw=", 32 | "owner": "nix-community", 33 | "repo": "home-manager", 34 | "rev": "4d2d32231797bfa7213ae5e8ac89d25f8caaae82", 35 | "type": "github" 36 | }, 37 | "original": { 38 | "owner": "nix-community", 39 | "repo": "home-manager", 40 | "type": "github" 41 | } 42 | }, 43 | "nixpkgs": { 44 | "locked": { 45 | "lastModified": 1745526057, 46 | "narHash": "sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA=", 47 | "owner": "nixos", 48 | "repo": "nixpkgs", 49 | "rev": "f771eb401a46846c1aebd20552521b233dd7e18b", 50 | "type": "github" 51 | }, 52 | "original": { 53 | "owner": "nixos", 54 | "ref": "nixos-unstable", 55 | "repo": "nixpkgs", 56 | "type": "github" 57 | } 58 | }, 59 | "root": { 60 | "inputs": { 61 | "dpcs": "dpcs", 62 | "home-manager": "home-manager", 63 | "nixpkgs": "nixpkgs", 64 | "spicetify-nix": "spicetify-nix", 65 | "themecord": "themecord" 66 | } 67 | }, 68 | "spicetify-nix": { 69 | "inputs": { 70 | "nixpkgs": [ 71 | "nixpkgs" 72 | ], 73 | "systems": "systems" 74 | }, 75 | "locked": { 76 | "lastModified": 1745151211, 77 | "narHash": "sha256-qFXfTdO1yvW6DmUPfVLIJgDHfkSd5yimZWvBMrlP/ow=", 78 | "owner": "Gerg-L", 79 | "repo": "spicetify-nix", 80 | "rev": "1dd4328f82115887901a685ecd9fa6e1d1db2d0c", 81 | "type": "github" 82 | }, 83 | "original": { 84 | "owner": "Gerg-L", 85 | "repo": "spicetify-nix", 86 | "type": "github" 87 | } 88 | }, 89 | "systems": { 90 | "locked": { 91 | "lastModified": 1681028828, 92 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 93 | "owner": "nix-systems", 94 | "repo": "default", 95 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 96 | "type": "github" 97 | }, 98 | "original": { 99 | "owner": "nix-systems", 100 | "repo": "default", 101 | "type": "github" 102 | } 103 | }, 104 | "themecord": { 105 | "inputs": { 106 | "nixpkgs": [ 107 | "nixpkgs" 108 | ] 109 | }, 110 | "locked": { 111 | "lastModified": 1743970059, 112 | "narHash": "sha256-vwrIULP9VmYqhNtHcNaPat6OjKqbDgwf3qSypOusG9c=", 113 | "owner": "danihek", 114 | "repo": "Themecord", 115 | "rev": "2117717f830c4847eafc450319de26ae09ac9277", 116 | "type": "github" 117 | }, 118 | "original": { 119 | "owner": "danihek", 120 | "repo": "Themecord", 121 | "type": "github" 122 | } 123 | } 124 | }, 125 | "root": "root", 126 | "version": 7 127 | } 128 | -------------------------------------------------------------------------------- /modules/firefox/firefox.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, USERNAME, ... }: 2 | 3 | let 4 | lock-false = { 5 | Value = false; 6 | Status = "locked"; 7 | }; 8 | lock-true = { 9 | Value = true; 10 | Status = "locked"; 11 | }; 12 | shyFox = pkgs.fetchFromGitHub { 13 | owner = "danihek"; 14 | repo = "ShyFox"; 15 | rev = "master"; 16 | hash = "sha256-3OEAuNqqUimhWA04qA19InCSsDFWoVWX5A48pF2mNEY="; 17 | }; 18 | in 19 | { 20 | home.file."~/.mozilla/firefox/${USERNAME}/user.js".source = "${shyFox}/user.js"; 21 | home.file."~/.mozilla/firefox/${USERNAME}/chrome".source = "${shyFox}/chrome"; 22 | 23 | programs = { 24 | firefox = { 25 | enable = true; 26 | languagePacks = [ "en-US" ]; 27 | 28 | /* PROFILE */ 29 | profiles.${USERNAME} = { 30 | id = 0; 31 | name = "${USERNAME}"; 32 | isDefault = true; 33 | settings = { 34 | "browser.search.defaultenginename" = "Google"; 35 | "browser.search.order.1" = "Google"; 36 | }; 37 | search = { 38 | default = "Google"; 39 | order = [ "Google" "DuckDuckGo" "Searx" ]; 40 | }; 41 | 42 | extensions = with pkgs.nur.repos.rycee.firefox-addons; [ 43 | darkreader 44 | octotree 45 | refined-github 46 | ublock-origin 47 | ]; 48 | #extensions = with pkgs.nur.repos.rycee.firefox-addons; [ 49 | # userchrome_toggle_extended 50 | # adblocker_ultimate 51 | # antitestportal 52 | # privacy-badger 53 | # ublock-origin 54 | # sponsorblock 55 | # betterviewer 56 | # darkreader 57 | # sidebery 58 | # pywalfox 59 | #]; 60 | }; 61 | 62 | /* ---- POLICIES ---- */ 63 | policies = { 64 | DisableTelemetry = true; 65 | DisableFirefoxStudies = true; 66 | EnableTrackingProtection = { 67 | Value = true; 68 | Locked = true; 69 | Cryptomining = true; 70 | Fingerprinting = true; 71 | }; 72 | DisablePocket = true; 73 | DisableFirefoxAccounts = true; 74 | DisableAccounts = true; 75 | DisableFirefoxScreenshots = true; 76 | OverrideFirstRunPage = ""; 77 | OverridePostUpdatePage = ""; 78 | DontCheckDefaultBrowser = true; 79 | DisplayBookmarksToolbar = "never"; # alternatives: "always" or "newtab" 80 | DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on" 81 | SearchBar = "unified"; # alternative: "separate" 82 | 83 | /* ---- PREFERENCES ---- */ 84 | Preferences = { 85 | "browser.contentblocking.category" = { Value = "strict"; Status = "locked"; }; 86 | "extensions.pocket.enabled" = lock-false; 87 | "browser.formfill.enable" = lock-false; 88 | "browser.search.suggest.enabled" = lock-false; 89 | "browser.search.suggest.enabled.private" = lock-false; 90 | "browser.urlbar.suggest.searches" = lock-false; 91 | "browser.urlbar.showSearchSuggestionsFirst" = lock-false; 92 | "browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false; 93 | "browser.newtabpage.activity-stream.feeds.snippets" = lock-false; 94 | "browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false; 95 | "browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = lock-false; 96 | "browser.newtabpage.activity-stream.section.highlights.includeDownloads" = lock-false; 97 | "browser.newtabpage.activity-stream.section.highlights.includeVisited" = lock-false; 98 | "browser.newtabpage.activity-stream.showSponsored" = lock-false; 99 | "browser.newtabpage.activity-stream.system.showSponsored" = lock-false; 100 | "browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false; 101 | }; 102 | }; 103 | }; 104 | }; 105 | } 106 | -------------------------------------------------------------------------------- /modules/pywal/pywal.nix: -------------------------------------------------------------------------------- 1 | 2 | { pkgs, ... }: 3 | let 4 | hypr-colors = '' 5 | $background = rgb({background.strip}) 6 | $foreground = rgb({foreground.strip}) 7 | $color0 = rgb({color0.strip}) 8 | $color1 = rgb({color1.strip}) 9 | $color2 = rgb({color2.strip}) 10 | $color3 = rgb({color3.strip}) 11 | $color4 = rgb({color4.strip}) 12 | $color5 = rgb({color5.strip}) 13 | $color6 = rgb({color6.strip}) 14 | $color7 = rgb({color7.strip}) 15 | $color8 = rgb({color8.strip}) 16 | $color9 = rgb({color9.strip}) 17 | $color10 = rgb({color10.strip}) 18 | $color11 = rgb({color11.strip}) 19 | $color12 = rgb({color12.strip}) 20 | $color13 = rgb({color13.strip}) 21 | $color14 = rgb({color14.strip}) 22 | $color15 = rgb({color15.strip}) 23 | ''; 24 | waybar-colors = '' 25 | @define-color foreground {foreground}; 26 | @define-color background {background}; 27 | @define-color cursor {cursor}; 28 | @define-color color0 {color0}; 29 | @define-color color1 {color1}; 30 | @define-color color2 {color2}; 31 | @define-color color3 {color3}; 32 | @define-color color4 {color4}; 33 | @define-color color5 {color5}; 34 | @define-color color6 {color6}; 35 | @define-color color7 {color7}; 36 | @define-color color8 {color8}; 37 | @define-color color9 {color9}; 38 | @define-color color10 {color10}; 39 | @define-color color11 {color11}; 40 | @define-color color12 {color12}; 41 | @define-color color13 {color13}; 42 | @define-color color14 {color14}; 43 | @define-color color15 {color15}; 44 | ''; 45 | discord-colors = '' 46 | --color0: {color0}; 47 | --color1: {color1}; 48 | --color2: {color2}; 49 | --color3: {color3}; 50 | --color4: {color4}; 51 | --color5: {color5}; 52 | --color6: {color6}; 53 | --color7: {color7}; 54 | --color8: {color8}; 55 | --color9: {color9}; 56 | --color10: {color10}; 57 | --color11: {color11}; 58 | --color12: {color12}; 59 | --color13: {color13}; 60 | --color14: {color14}; 61 | --color15: {color15}; 62 | ''; 63 | foot-colors = '' 64 | [colors] 65 | background={background.strip} 66 | foreground={foreground.strip} 67 | regular0={color0.strip} 68 | regular1={color1.strip} 69 | regular2={color2.strip} 70 | regular3={color3.strip} 71 | regular4={color4.strip} 72 | regular5={color5.strip} 73 | regular6={color6.strip} 74 | regular7={color7.strip} 75 | bright0={color8.strip} 76 | bright1={color9.strip} 77 | bright2={color10.strip} 78 | bright3={color11.strip} 79 | bright4={color12.strip} 80 | bright5={color13.strip} 81 | bright6={color14.strip} 82 | bright7={color15.strip} 83 | ''; 84 | wofi-colors = '' 85 | window { 86 | margin: 0px; 87 | border: 1px solid {foreground.strip}; 88 | background-color: {background.strip}; 89 | } 90 | 91 | #input { 92 | margin: 5px; 93 | border: none; 94 | background-color: {color8.strip}; 95 | } 96 | 97 | #inner-box { 98 | margin: 5px; 99 | border: none; 100 | background-color: {background.strip}; 101 | } 102 | 103 | #outer-box { 104 | margin: 5px; 105 | border: none; 106 | background-color: {background.strip}; 107 | } 108 | 109 | #scroll { 110 | margin: 0px; 111 | border: none; 112 | } 113 | 114 | #text { 115 | margin: 5px; 116 | border: none; 117 | color: #ffffff; 118 | } 119 | 120 | #entry:selected { 121 | background-color: {color8.strip}; 122 | } 123 | ''; 124 | in { 125 | home.file = { 126 | ".config/wal/templates/colors-foot.ini".text = ''${foot-colors}''; 127 | #".config/wal/templates/colors-wofi.css".text = ''${wofi-colors}''; #somehow broken 128 | ".config/wal/templates/colors-waybar.css".text = ''${waybar-colors}''; 129 | ".config/wal/templates/colors-hyprland.conf".text = ''${hypr-colors}''; 130 | ".config/wal/templates/colors-discord.css".text = ''${discord-colors}''; 131 | }; 132 | } 133 | -------------------------------------------------------------------------------- /modules/hellwal/hellwal.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | let 3 | hypr-colors = '' 4 | $background = rgb(%%background.rgb%%) 5 | $foreground = rgb(%%foreground.rgb%%) 6 | $color0 = rgb(%%color0.rgb%%) 7 | $color1 = rgb(%%color1.rgb%%) 8 | $color2 = rgb(%%color2.rgb%%) 9 | $color3 = rgb(%%color3.rgb%%) 10 | $color4 = rgb(%%color4.rgb%%) 11 | $color5 = rgb(%%color5.rgb%%) 12 | $color6 = rgb(%%color6.rgb%%) 13 | $color7 = rgb(%%color7.rgb%%) 14 | $color8 = rgb(%%color8.rgb%%) 15 | $color9 = rgb(%%color9.rgb%%) 16 | $color10 = rgb(%%color10.rgb%%) 17 | $color11 = rgb(%%color11.rgb%%) 18 | $color12 = rgb(%%color12.rgb%%) 19 | $color13 = rgb(%%color13.rgb%%) 20 | $color14 = rgb(%%color14.rgb%%) 21 | $color15 = rgb(%%color15.rgb%%) 22 | ''; 23 | waybar-colors = '' 24 | @define-color foreground %%foreground%%; 25 | @define-color background %%background%%; 26 | @define-color cursor %%cursor%%; 27 | @define-color color0 %%color0%%; 28 | @define-color color1 %%color1%%; 29 | @define-color color2 %%color2%%; 30 | @define-color color3 %%color3%%; 31 | @define-color color4 %%color4%%; 32 | @define-color color5 %%color5%%; 33 | @define-color color6 %%color6%%; 34 | @define-color color7 %%color7%%; 35 | @define-color color8 %%color8%%; 36 | @define-color color9 %%color9%%; 37 | @define-color color10 %%color10%%; 38 | @define-color color11 %%color11%%; 39 | @define-color color12 %%color12%%; 40 | @define-color color13 %%color13%%; 41 | @define-color color14 %%color14%%; 42 | @define-color color15 %%color15%%; 43 | ''; 44 | discord-colors = '' 45 | --background: #%% background.hex %%; 46 | --foreground: #%% foreground.hex %%; 47 | --cursor: #%% cursor.hex %%; 48 | --border: #%% border.hex %%; 49 | 50 | --color0: #%% color0.hex %%; 51 | --color1: #%% color1.hex %%; 52 | --color2: #%% color2.hex %%; 53 | --color3: #%% color3.hex %%; 54 | --color4: #%% color4.hex %%; 55 | --color5: #%% color5.hex %%; 56 | --color6: #%% color6.hex %%; 57 | --color7: #%% color7.hex %%; 58 | --color8: #%% color8.hex %%; 59 | --color9: #%% color9.hex %%; 60 | --color10: #%% color10.hex %%; 61 | --color11: #%% color11.hex %%; 62 | --color12: #%% color12.hex %%; 63 | --color13: #%% color13.hex %%; 64 | --color14: #%% color14.hex %%; 65 | --color15: #%% color15.hex %%; 66 | ''; 67 | foot-colors = '' 68 | [colors] 69 | background=%%background.rgb%% 70 | foreground=%%foreground.rgb%% 71 | regular0=%%color0.rgb%% 72 | regular1=%%color1.rgb%% 73 | regular2=%%color2.rgb%% 74 | regular3=%%color3.rgb%% 75 | regular4=%%color4.rgb%% 76 | regular5=%%color5.rgb%% 77 | regular6=%%color6.rgb%% 78 | regular7=%%color7.rgb%% 79 | bright0=%%color8.rgb%% 80 | bright1=%%color9.rgb%% 81 | bright2=%%color10.rgb%% 82 | bright3=%%color11.rgb%% 83 | bright4=%%color12.rgb%% 84 | bright5=%%color13.rgb%% 85 | bright6=%%color14.rgb%% 86 | bright7=%%color15.rgb%% 87 | ''; 88 | wofi-colors = '' 89 | window { 90 | margin: 0px; 91 | border: 1px solid #%%foreground.rgb%%; 92 | background-color: #%%background.rgb%%; 93 | } 94 | 95 | #input { 96 | margin: 5px; 97 | border: none; 98 | background-color: #%%color8.rgb%%; 99 | } 100 | 101 | #inner-box { 102 | margin: 5px; 103 | border: none; 104 | background-color: #%%background.rgb%%; 105 | } 106 | 107 | #outer-box { 108 | margin: 5px; 109 | border: none; 110 | background-color: #%%background.rgb%%; 111 | } 112 | 113 | #scroll { 114 | margin: 0px; 115 | border: none; 116 | } 117 | 118 | #text { 119 | margin: 5px; 120 | border: none; 121 | color: #ffffff; 122 | } 123 | 124 | #entry:selected { 125 | background-color: #%%color8.rgb%%; 126 | } 127 | ''; 128 | in { 129 | home.file = { 130 | #".config/wal/templates/colors-foot.ini".text = ''${foot-colors}''; 131 | ##".config/wal/templates/colors-wofi.css".text = ''${wofi-colors}''; #somehow broken 132 | #".config/wal/templates/colors-waybar.css".text = ''${waybar-colors}''; 133 | #".config/wal/templates/colors-hyprland.conf".text = ''${hypr-colors}''; 134 | #".config/wal/templates/colors-discord.css".text = ''${discord-colors}''; 135 | }; 136 | } 137 | -------------------------------------------------------------------------------- /modules/vim/vim.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | #let 4 | # hellwal-vim = pkgs.vimUtils.buildVimPlugin { 5 | # name = "hellwal-vim"; 6 | # src = pkgs.fetchFromGitHub { 7 | # owner = "danihek"; 8 | # repo = "hellwal-vim"; 9 | # rev = "main"; 10 | # sha256 = "sha256-Zl+psyKXfIPzVSBXrxvEBFlce4adN/KzhfnH0fN4GbA="; 11 | # }; 12 | # }; 13 | #in 14 | { 15 | programs.vim = { 16 | enable = true; 17 | defaultEditor = false; 18 | 19 | plugins = with pkgs.vimPlugins; [ 20 | #hellwal-vim 21 | 22 | sonokai 23 | pywal-nvim 24 | dracula-vim 25 | iceberg-vim 26 | tokyonight-nvim 27 | papercolor-theme 28 | gruvbox-material gruvbox 29 | 30 | coc-nvim 31 | mini-nvim 32 | coc-clangd 33 | vim-polyglot 34 | vim-dispatch 35 | vim-css-color 36 | nvim-autopairs 37 | nvim-lspconfig 38 | vim-unimpaired 39 | (nvim-treesitter.withPlugins (_: nvim-treesitter.allGrammars ++ [ 40 | (pkgs.tree-sitter.buildGrammar { 41 | language = "c3"; 42 | version = "0.2.1"; 43 | src = pkgs.fetchFromGitHub { 44 | owner = "c3lang"; 45 | repo = "tree-sitter-c3"; 46 | rev = "aacd11f4f8ff77b73506627cf0f52042b1a1bc69"; 47 | sha256 = "sha256-fZ3lKWptjCY9DANE2QDm9Se+z1mG1Z9wj+ufpeAFmZQ="; 48 | }; 49 | }) 50 | ])) 51 | ]; 52 | 53 | extraConfig = '' 54 | syntax on 55 | filetype plugin indent on 56 | set ts=3 sts=2 sw=2 et ai si 57 | set incsearch 58 | set ignorecase 59 | set number relativenumber 60 | set nu rnu 61 | set tabstop=4 62 | set shiftwidth=4 63 | set expandtab 64 | set cursorline 65 | set wildmode=longest:full,full "replacement for glourius ido mode 66 | 67 | let g:vim_markdown_folding_disabled = 1 68 | let g:gruvbox_invert_selection = 0 69 | 70 | "colorscheme pywal 71 | "colorscheme peachpuff 72 | "colorscheme gruvbox 73 | colorscheme gruvbox-material 74 | 75 | set list 76 | set listchars=space:·,tab:→\ ,trail:· 77 | 78 | "While searching and go C-d C-u its centred 79 | nnoremap n nzz 80 | nnoremap N Nzz 81 | nnoremap zz 82 | nnoremap zz 83 | 84 | "Compile Mode | Something like emacs has I guess??? It's useful for me 85 | nnoremap :Make 86 | 87 | " Status Line 88 | set laststatus=2 89 | 90 | if has('termguicolors') 91 | set termguicolors 92 | endif 93 | 94 | function! JapaneseDate() 95 | return strftime("%H:%M | %d日%m月%Y年") 96 | endfunction 97 | 98 | set statusline= 99 | set statusline+=%#GruvboxGreen# 100 | set statusline+=\ %y " File type 101 | set statusline+=%#GruvboxBlue# 102 | set statusline+=\ [ 103 | set statusline+=%#GruvboxYellow# 104 | set statusline+=\ %f 105 | set statusline+=%#GruvboxBlue# 106 | set statusline+=\ ] 107 | 108 | set statusline+=%#GruvboxFg4# 109 | set statusline+=%m 110 | set statusline+=%r 111 | 112 | set statusline+=%#GruvboxAqua# 113 | set statusline+=\ (%l:%c) 114 | set statusline+=%#GruvboxYellow# 115 | set statusline+=\ %p%% " Percentage through file 116 | 117 | set statusline+=%= " Right-align section starts here 118 | set statusline+=\ vimacs69 119 | set statusline+=%#GruvboxAqua# 120 | set statusline+=\ %{JapaneseDate()} 121 | 122 | "Conquer of Completion 123 | inoremap coc#pum#visible() ? coc#pum#next(1) : "\" 124 | inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" 125 | inoremap coc#pum#visible() ? coc#pum#next(0) : "\" 126 | inoremap coc#pum#visible() ? coc#pum#prev(0) : "\" 127 | 128 | inoremap coc#pum#visible() ? coc#pum#scroll(1) : "\" 129 | inoremap coc#pum#visible() ? coc#pum#scroll(0) : "\" 130 | 131 | inoremap coc#pum#visible() ? coc#pum#cancel() : "\" 132 | inoremap coc#pum#visible() ? coc#pum#confirm() : "\" 133 | 134 | inoremap "\u\\=coc#on_enter()\" 135 | inoremap coc#pum#visible() ? coc#pum#confirm() : "\u\" 136 | ''; 137 | }; 138 | 139 | xdg.configFile."nvim/coc-settings.json".text = '' 140 | { 141 | "inlayHint.enable": false, 142 | } 143 | ''; 144 | } 145 | -------------------------------------------------------------------------------- /hosts/z690/configuration.nix: -------------------------------------------------------------------------------- 1 | # configuration.nix 2 | 3 | { inputs, config, pkgs, ... }: 4 | 5 | let 6 | USERNAME = "dh"; 7 | in 8 | { 9 | imports = 10 | [ 11 | ../shared.nix 12 | ./hardware-configuration.nix 13 | inputs.home-manager.nixosModules.home-manager 14 | inputs.spicetify-nix.nixosModules.default 15 | ]; 16 | 17 | home-manager = { 18 | extraSpecialArgs = { inherit inputs; USERNAME = USERNAME; }; 19 | users = { 20 | ${USERNAME} = import ../../home/dh-home.nix; 21 | }; 22 | }; 23 | 24 | # User settings 25 | users.users.${USERNAME} = { 26 | shell = pkgs.bash; 27 | isNormalUser = true; 28 | description = "${USERNAME}"; 29 | extraGroups = [ "networkmanager" "wheel" "dialout" "plugdev" "video" ]; 30 | packages = with pkgs; []; 31 | }; 32 | 33 | services.udev.extraRules = '' 34 | SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev" 35 | ''; 36 | 37 | # Bootloader. 38 | boot.tmp.cleanOnBoot = true; 39 | boot.loader.systemd-boot.enable = true; 40 | boot.loader.efi.canTouchEfiVariables = true; 41 | 42 | networking = { 43 | hostName = "nix"; 44 | defaultGateway = "192.168.1.1"; 45 | nameservers = [ "1.1.1.1" ]; 46 | networkmanager.enable = true; 47 | 48 | interfaces.enp4s0.ipv4.addresses = [ { 49 | address = "192.168.1.195"; 50 | prefixLength = 24; 51 | } ]; 52 | 53 | firewall = { 54 | enable = false; 55 | #checkReversePath = "loose"; 56 | #allowedTCPPorts = [ 443 80 4070 8080 25565 8999 57621 5353 ]; 57 | #allowedUDPPorts = [ 443 80 4070 8080 25565 8999 57621 5353 ]; 58 | 59 | #allowedTCPPortRanges = [ 60 | # { from = 1700; to = 1764; } # KDE Connect and Weylus 61 | #]; 62 | #allowedUDPPortRanges = [ 63 | # { from = 1700; to = 1764; } # KDE Connect and Weylus 64 | #]; 65 | }; 66 | }; 67 | 68 | environment.variables = { 69 | NIX_FLAKE_CURRENT_CONFIG = "mainpc"; 70 | }; 71 | 72 | environment.systemPackages = with pkgs; [ 73 | nemo 74 | ckb-next 75 | amdvlk 76 | rpcs3 77 | lact 78 | ]; 79 | 80 | powerManagement.cpuFreqGovernor = "performance"; 81 | systemd.packages = with pkgs; [ lact ]; 82 | systemd.services.lactd.wantedBy = ["multi-user.target"]; 83 | hardware.graphics = { 84 | enable = true; 85 | enable32Bit = true; 86 | }; 87 | services.xserver.videoDrivers = [ "amdgpu" ]; 88 | hardware.graphics.extraPackages = with pkgs; [ 89 | amdvlk 90 | #rocmPackages.clr.icd 91 | ]; 92 | 93 | 94 | # Virtualization etc 95 | programs.virt-manager.enable = true; 96 | virtualisation.docker.enable = true; 97 | virtualisation.libvirtd.enable = true; 98 | virtualisation.waydroid.enable = true; 99 | 100 | # Bluetooth 101 | #services.blueman.enable = true; 102 | hardware.bluetooth.enable = true; 103 | hardware.bluetooth.powerOnBoot = true; 104 | 105 | # Corsair Keyboard 106 | hardware.ckb-next.enable = true; 107 | 108 | services.hardware.openrgb.enable = true; 109 | 110 | # Services 111 | services.minecraft-server = { 112 | enable = false; 113 | eula = true; 114 | declarative = true; 115 | 116 | dataDir = "/var/lib/minecraft-server"; 117 | 118 | serverProperties = { 119 | gamemode = "survival"; 120 | difficulty = "hard"; 121 | online-mode = "false"; 122 | simulation-distance = 10; 123 | level-seed = "4"; 124 | }; 125 | 126 | whitelist = { 127 | wlosek1_11 = "1fd54f6c-4d3a-3a2b-8789-ec46ee40ac5b"; 128 | leoooo = "e3aa69e2-91e9-39c2-bb47-1a8a2e193afe"; 129 | kotomiki = "b39381fc-a261-394e-9432-0f9f64e306f6"; 130 | sigma_edgar = "1a701200-4e46-3cfb-9aa4-2f303c1aae33"; 131 | }; 132 | 133 | jvmOpts = "-Xms4092M -Xmx4092M -XX:+UseG1GC"; 134 | }; 135 | 136 | services.samba = { 137 | enable = true; 138 | securityType = "user"; 139 | openFirewall = true; 140 | settings = { 141 | "public" = { 142 | "path" = "/home/dh/dox/tata/"; 143 | "valid user" = "dh"; 144 | "browseable" = "yes"; 145 | "read only" = "no"; 146 | "guest ok" = "yes"; 147 | "create mask" = "0660"; 148 | "directory mask" = "0770"; 149 | }; 150 | }; 151 | }; 152 | 153 | services.mpd = { 154 | enable = true; 155 | extraConfig = '' 156 | audio_output { 157 | type "httpd" 158 | name "My HTTP Stream" 159 | encoder "vorbis" 160 | port "8000" 161 | bind_to_address "0.0.0.0" 162 | quality "5.0" 163 | format "44100:16:2" 164 | } 165 | ''; 166 | }; 167 | } 168 | -------------------------------------------------------------------------------- /modules/neovim/neovim.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | let 3 | hellwal-vim = pkgs.vimUtils.buildVimPlugin { 4 | name = "hellwal-vim"; 5 | src = pkgs.fetchFromGitHub { 6 | owner = "danihek"; 7 | repo = "hellwal-vim"; 8 | rev = "main"; 9 | sha256 = "sha256-bT3pSCrJKQPwkyx2dENizQ0c7nN86mh6iOzu+doQpWk="; 10 | }; 11 | }; 12 | in 13 | { 14 | programs.neovim = { 15 | enable = true; 16 | viAlias = false; 17 | vimAlias = false; 18 | vimdiffAlias = false; 19 | defaultEditor = true; 20 | 21 | plugins = with pkgs.vimPlugins; [ 22 | hellwal-vim 23 | vim-visual-multi 24 | sonokai 25 | pywal-nvim 26 | dracula-vim 27 | iceberg-vim 28 | vim-table-mode 29 | tokyonight-nvim 30 | papercolor-theme 31 | gruvbox-material gruvbox 32 | 33 | nerdcommenter 34 | 35 | coc-nvim 36 | mini-nvim 37 | coc-clangd 38 | vim-polyglot 39 | vim-dispatch 40 | vim-css-color 41 | nvim-autopairs 42 | nvim-lspconfig 43 | vim-unimpaired 44 | 45 | (nvim-treesitter.withPlugins (_: nvim-treesitter.allGrammars ++ [ 46 | (pkgs.tree-sitter.buildGrammar { 47 | language = "c3"; 48 | version = "0.2.1"; 49 | src = pkgs.fetchFromGitHub { 50 | owner = "c3lang"; 51 | repo = "tree-sitter-c3"; 52 | rev = "aacd11f4f8ff77b73506627cf0f52042b1a1bc69"; 53 | sha256 = "sha256-fZ3lKWptjCY9DANE2QDm9Se+z1mG1Z9wj+ufpeAFmZQ="; 54 | }; 55 | }) 56 | ])) 57 | ]; 58 | 59 | extraLuaConfig = '' 60 | ''; 61 | 62 | extraConfig = '' 63 | syntax on 64 | filetype plugin indent on 65 | set ts=3 sts=2 sw=2 et ai si 66 | set incsearch 67 | set ignorecase 68 | set number relativenumber 69 | set nu rnu 70 | set tabstop=4 71 | set shiftwidth=4 72 | set expandtab 73 | set cursorline 74 | set wildmode=longest:full,full "replacement for glourius ido mode 75 | 76 | let g:vim_markdown_folding_disabled = 1 77 | let g:gruvbox_invert_selection = 0 78 | 79 | "colorscheme pywal 80 | "colorscheme peachpuff 81 | "colorscheme gruvbox 82 | "colorscheme gruvbox-material 83 | colorscheme hellwal 84 | 85 | set list 86 | set listchars=space:·,tab:→\ ,trail:· 87 | 88 | "While searching and go C-d C-u its centred 89 | nnoremap n nzz 90 | nnoremap N Nzz 91 | nnoremap zz 92 | nnoremap zz 93 | 94 | "Compile Mode | Something like emacs has I guess??? It's useful for me 95 | nnoremap :Make 96 | 97 | " Status Line 98 | set laststatus=2 99 | 100 | if has('termguicolors') 101 | set termguicolors 102 | endif 103 | 104 | function! JapaneseDate() 105 | return strftime("%H:%M | %d日%m月%Y年") 106 | endfunction 107 | 108 | set statusline= 109 | set statusline+=%#GruvboxGreen# 110 | set statusline+=\ %y " File type 111 | set statusline+=%#GruvboxBlue# 112 | set statusline+=\ [ 113 | set statusline+=%#GruvboxYellow# 114 | set statusline+=\ %f 115 | set statusline+=%#GruvboxBlue# 116 | set statusline+=\ ] 117 | 118 | set statusline+=%#GruvboxFg4# 119 | set statusline+=%m 120 | set statusline+=%r 121 | 122 | set statusline+=%#GruvboxAqua# 123 | set statusline+=\ (%l:%c) 124 | set statusline+=%#GruvboxYellow# 125 | set statusline+=\ %p%% " Percentage through file 126 | 127 | set statusline+=%= " Right-align section starts here 128 | set statusline+=\ vimacs69 129 | set statusline+=%#GruvboxAqua# 130 | set statusline+=\ %{JapaneseDate()} 131 | 132 | "Conquer of Completion 133 | inoremap coc#pum#visible() ? coc#pum#next(1) : "\" 134 | inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" 135 | inoremap coc#pum#visible() ? coc#pum#next(0) : "\" 136 | inoremap coc#pum#visible() ? coc#pum#prev(0) : "\" 137 | 138 | inoremap coc#pum#visible() ? coc#pum#scroll(1) : "\" 139 | inoremap coc#pum#visible() ? coc#pum#scroll(0) : "\" 140 | 141 | inoremap coc#pum#visible() ? coc#pum#cancel() : "\" 142 | inoremap coc#pum#visible() ? coc#pum#confirm() : "\" 143 | 144 | inoremap "\u\\=coc#on_enter()\" 145 | inoremap coc#pum#visible() ? coc#pum#confirm() : "\u\" 146 | ''; 147 | }; 148 | 149 | xdg.configFile."nvim/coc-settings.json".text = '' 150 | { 151 | "inlayHint.enable": false, 152 | } 153 | ''; 154 | } 155 | -------------------------------------------------------------------------------- /modules/waybar/waybar.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, lib, ... }: 2 | 3 | { 4 | programs.waybar = { 5 | enable = true; 6 | 7 | settings = [{ 8 | layer = "top"; 9 | position = "top"; 10 | spacing = 0; 11 | height = 0; 12 | margin-top = 8; 13 | margin-right = 8; 14 | margin-bottom = 0; 15 | margin-left = 8; 16 | 17 | modules-left = [ 18 | "custom/launcher" 19 | "hyprland/workspaces" 20 | ]; 21 | 22 | modules-center = [ "clock" ]; 23 | 24 | modules-right = [ 25 | "cpu_text" 26 | "cpu" 27 | "memory" 28 | "battery" 29 | "network" 30 | "pulseaudio" 31 | ]; 32 | 33 | "custom/launcher" = { 34 | format = " "; 35 | on-click = "rofi -show drun"; 36 | on-click-right = "killall rofi"; 37 | tooltip = false; 38 | }; 39 | 40 | #"hyprland/workspaces" = { 41 | # disable-scroll = true; 42 | # all-outputs = true; 43 | # tooltip = false; 44 | #}; 45 | 46 | "hyprland/workspaces" = { 47 | format = "{icon}"; 48 | active-only = true; 49 | all-outputs = false; 50 | format-icons = { 51 | "1" = "一"; 52 | "2" = "二"; 53 | "3" = "三"; 54 | "4" = "四"; 55 | "5" = "五"; 56 | "6" = "六"; 57 | "7" = "七"; 58 | "8" = "八"; 59 | "9" = "九"; 60 | "10"= "十"; 61 | }; 62 | }; 63 | 64 | tray = { 65 | spacing = 10; 66 | }; 67 | 68 | clock = { 69 | format = "{:%H:%M - %a, %d %b %Y}"; 70 | tooltip = false; 71 | }; 72 | 73 | cpu = { 74 | format = "cpu {usage}%"; 75 | interval = 2; 76 | states = { critical = 95; }; 77 | }; 78 | 79 | memory = { 80 | format = "mem {percentage}%"; 81 | interval = 2; 82 | states = { critical = 98; }; 83 | }; 84 | 85 | battery = { 86 | format = "bat {capacity}%"; 87 | interval = 5; 88 | states = { 89 | warning = 20; 90 | critical = 10; 91 | }; 92 | tooltip = false; 93 | }; 94 | 95 | network = { 96 | format-wifi = "wifi {bandwidthDownBits}"; 97 | format-ethernet = "enth {bandwidthDownBits}"; 98 | format-disconnected = "no network"; 99 | interval = 5; 100 | tooltip = false; 101 | }; 102 | 103 | pulseaudio = { 104 | scroll-step = 5; 105 | max-volume = 150; 106 | format = "vol {volume}%"; 107 | format-bluetooth = "vol {volume}%"; 108 | nospacing = 1; 109 | on-click = "pavucontrol"; 110 | tooltip = false; 111 | }; 112 | 113 | "custom/music" = { 114 | format = " 𝄞 {}"; 115 | escape = true; 116 | interval = 1; 117 | tooltip = false; 118 | exec = "playerctl metadata --format='{{ title }}'"; 119 | on-click = "playerctl play-pause"; 120 | max-length = 50; 121 | }; 122 | 123 | reload_on_style_change = true; 124 | }]; 125 | 126 | style = '' 127 | @import '/home/dh/.cache/wal/colors-waybar.css'; 128 | 129 | * { 130 | border: none; 131 | min-height: 0; 132 | font-family: "JetBrains Nerd Font Mono"; 133 | font-weight: 500; 134 | font-size: 14px; 135 | padding: 0; 136 | } 137 | 138 | window#waybar { 139 | background: @background; 140 | border: 2px solid @foreground; 141 | border-radius: 4px; 142 | } 143 | 144 | tooltip { 145 | background-color: @background; 146 | border: 2px solid @color14; 147 | font-size: 2px; 148 | } 149 | 150 | tooltip label { 151 | margin: 8px; 152 | } 153 | 154 | #clock, 155 | #tray, 156 | #cpu, 157 | #memory, 158 | #battery, 159 | #network, 160 | #pulseaudio, 161 | #language { 162 | margin: 6px 6px 6px 0px; 163 | padding: 2px 8px; 164 | border-radius: 4px; 165 | } 166 | 167 | #workspaces { 168 | margin: 6px 0px 6px 6px; 169 | border-radius: 4px; 170 | } 171 | 172 | #workspaces button { 173 | all: initial; 174 | min-width: 0; 175 | box-shadow: inset 0 -3px transparent; 176 | padding: 2px 4px; 177 | color: @color14; 178 | background-color: @background; 179 | border: 2px solid @color14; 180 | border-radius: 4px; 181 | margin-right: 2px; 182 | } 183 | 184 | #workspaces button.active { 185 | color: #000000; 186 | background-color: @color14; 187 | } 188 | 189 | #workspaces button.urgent { 190 | background-color: #a095f3; 191 | color: #000000; 192 | border: 2px solid #a095f3; 193 | } 194 | 195 | #clock { 196 | background-color: @color14; 197 | border: 2px solid @background; 198 | color: #000000; 199 | } 200 | 201 | #cpu, 202 | #memory, 203 | #network, 204 | #pulseaudio, 205 | #battery, 206 | #tray, 207 | #language { 208 | background-color: @background; 209 | border: 2px solid @color14; 210 | color: @color14; 211 | } 212 | 213 | #network { 214 | min-width: 100px; 215 | } 216 | 217 | #cpu, 218 | #memory, 219 | #battery, 220 | #pulseaudio { 221 | min-width: 60px; 222 | } 223 | 224 | #cpu.critical, 225 | #memory.critical { 226 | color: #a095f3; 227 | border: 2px solid #a095f3; 228 | } 229 | 230 | #battery.warning, 231 | #battery.critical, 232 | #battery.urgent { 233 | color: #a095f3; 234 | border: 2px solid #a095f3; 235 | } 236 | 237 | #custom-launcher { 238 | font-size: 20px; 239 | padding-left: 10px; 240 | padding-right: 5px; 241 | transition: none; 242 | color: @color14; 243 | } 244 | 245 | #custom-control { 246 | font-size: 20px; 247 | padding-left: 5px; 248 | padding-right: 5px; 249 | transition: none; 250 | color: @color14; 251 | } 252 | 253 | #language { 254 | min-width: 20px; 255 | } 256 | ''; 257 | }; 258 | } 259 | -------------------------------------------------------------------------------- /hosts/shared.nix: -------------------------------------------------------------------------------- 1 | { inputs, config, lib, pkgs, ... }: 2 | 3 | { 4 | fonts.packages = with pkgs; [ 5 | dina-font 6 | fira-code 7 | noto-fonts 8 | minecraftia 9 | proggyfonts 10 | font-awesome 11 | jetbrains-mono 12 | liberation_ttf 13 | noto-fonts-emoji 14 | fira-code-symbols 15 | noto-fonts-cjk-sans 16 | nerd-fonts.jetbrains-mono 17 | mplus-outline-fonts.githubRelease 18 | ]; 19 | 20 | # Packages 21 | environment.systemPackages = with pkgs; [ 22 | ## HELL 23 | #hellwal 24 | hellwal 25 | lmms 26 | audacity 27 | 28 | # Shell, Terminal, Text Editor etc. 29 | vim emacs 30 | foot 31 | neofetch 32 | kitty 33 | neovide 34 | obsidian 35 | alacritty #ueberzugpp # yazi support 36 | vimPlugins.vim-plug 37 | 38 | # Nix 39 | home-manager 40 | 41 | # Top's 42 | htop 43 | btop 44 | powertop 45 | 46 | # Browsers 47 | brave 48 | links2 lynx 49 | firefox 50 | qutebrowser 51 | librewolf 52 | 53 | # Mail 54 | thunderbird 55 | 56 | # Doc 57 | pkgs.man-pages 58 | pkgs.man-pages-posix 59 | 60 | # Dev 61 | gdb 62 | git 63 | lua lua51Packages.lua 64 | gcc 65 | udev 66 | sfml 67 | hplip 68 | csfml 69 | cmake 70 | clang clang-tools 71 | libGL 72 | seatd 73 | cargo 74 | rustup 75 | libgcc 76 | libGLU 77 | pixman 78 | python3 79 | godot_4 80 | glxinfo 81 | gnumake 82 | libllvm 83 | llvm_18 84 | wayland 85 | wlroots 86 | libclang 87 | libinput 88 | libsecret 89 | pkg-config 90 | clang-tools 91 | xorg.libxcb 92 | libxkbcommon 93 | xorg.xcbutilwm 94 | wayland-scanner 95 | wayland-protocols 96 | gitAndTools.gitFull 97 | git-credential-oauth 98 | wlroots_0_18 99 | 100 | # Utility 101 | bluez bluez-tools blueman 102 | (mpv.override {scripts = [mpvScripts.mpris];}) # mpv 103 | imv 104 | mako 105 | wofi rofi fuzzel 106 | mupdf zathura 107 | yt-dlp 108 | upower 109 | libnotify 110 | pavucontrol 111 | brightnessctl 112 | xfce.thunar xfce.thunar-archive-plugin 113 | 114 | # Polkit 115 | lxqt.lxqt-policykit 116 | 117 | # Media 118 | viber 119 | vesktop 120 | element-desktop 121 | 122 | # Music 123 | mpd 124 | moc 125 | cmus 126 | spotify spicetify-cli 127 | ncmpcpp 128 | rhythmbox 129 | 130 | # Tools 131 | lf 132 | jq 133 | lsd 134 | eza 135 | fzf 136 | bat 137 | wtf 138 | rar 139 | tor 140 | vimv 141 | tree 142 | tldr 143 | yazi 144 | wget 145 | curl 146 | entr 147 | tlrc 148 | file 149 | zola 150 | gimp pinta upscayl 151 | wine 152 | p7zip 153 | unzip 154 | kicad 155 | cobalt #mdbook mdbook-katex 156 | scrcpy 157 | reaper ffmpeg # audio, video 158 | pstree 159 | zoxide 160 | #weylus 161 | busybox 162 | arduino arduino-cli python312Packages.pyserial 163 | ani-cli manga-tui 164 | killall 165 | ripgrep 166 | unityhub 167 | openscad 168 | librecad 169 | vscodium 170 | libsForQt5.kdenlive 171 | obs-studio wf-recorder 172 | imagemagick 173 | android-tools #gradle sdkmanager flutter 174 | markdown-oxide 175 | linuxPackages.usbip 176 | libreoffice-qt6-still 177 | 178 | # Fun 179 | heroic 180 | prismlauncher 181 | osu-lazer-bin 182 | steam gamescope 183 | 184 | # PORTALS 185 | xdg-desktop-portal 186 | xdg-desktop-portal-wlr 187 | 188 | ## Flex 189 | cava 190 | wpgtk 191 | figlet 192 | cowsay 193 | cbonsai 194 | cmatrix 195 | fortune 196 | pipes-rs 197 | mission-center 198 | openrgb-with-all-plugins 199 | 200 | ## Rest.. 201 | glib 202 | xdg-utils 203 | gnome-keyring 204 | libsForQt5.qt5ct 205 | libsForQt5.qtstyleplugin-kvantum 206 | ]; 207 | 208 | # Env Variables 209 | environment.variables = { 210 | EDITOR = "nvim"; 211 | }; 212 | 213 | # Nix 214 | programs.nix-ld.enable = true; 215 | nix.settings.experimental-features = [ "nix-command" "flakes" ]; 216 | nixpkgs.config.allowUnfree = true; 217 | 218 | # TimeZone. 219 | time.timeZone = "Europe/Warsaw"; 220 | 221 | # Select internationalisation properties. 222 | i18n.defaultLocale = "en_US.UTF-8"; 223 | i18n.extraLocaleSettings = { 224 | LC_ADDRESS = "pl_PL.UTF-8"; 225 | LC_IDENTIFICATION = "pl_PL.UTF-8"; 226 | LC_MEASUREMENT = "pl_PL.UTF-8"; 227 | LC_MONETARY = "pl_PL.UTF-8"; 228 | LC_NAME = "pl_PL.UTF-8"; 229 | LC_NUMERIC = "pl_PL.UTF-8"; 230 | LC_PAPER = "pl_PL.UTF-8"; 231 | LC_TELEPHONE = "pl_PL.UTF-8"; 232 | LC_TIME = "pl_PL.UTF-8"; 233 | }; 234 | 235 | # Doc 236 | documentation.dev.enable = true; 237 | 238 | # Sec 239 | security.rtkit.enable = true; 240 | security.polkit.enable = true; 241 | security.pam.services.hyprlock = {}; 242 | 243 | # Pipewire 244 | services.pipewire = { 245 | enable = true; 246 | alsa.enable = true; 247 | alsa.support32Bit = true; 248 | pulse.enable = true; 249 | jack.enable = true; 250 | }; 251 | 252 | # Programs 253 | programs.dconf.enable = true; 254 | programs.zsh.enable = true; 255 | programs.mtr.enable = true; 256 | 257 | programs.gnupg.agent = { 258 | enable = true; 259 | enableSSHSupport = true; 260 | }; 261 | 262 | hardware.graphics.enable = true; 263 | 264 | # Services 265 | services.gvfs.enable = true; 266 | services.upower.enable = true; 267 | services.udisks2.enable = true; 268 | services.openssh.enable = true; 269 | services.printing.enable = true; 270 | services.gnome.gnome-keyring.enable = true; 271 | services.avahi = { enable = true; nssmdns4 = true; openFirewall = true; }; 272 | services.printing.drivers = [ pkgs.hplip ]; 273 | 274 | # For bt kbd 275 | boot.kernelModules = [ "hid" "hid_generic" "usbhid" ]; 276 | 277 | system.stateVersion = "24.05"; 278 | } 279 | -------------------------------------------------------------------------------- /modules/scripts/scripts.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | let 3 | wallpapers_path = "$HOME/pics/wallpapers"; 4 | 5 | setwall = pkgs.writeShellScriptBin "setwall" '' 6 | 7 | if [ "$1" != "" ] ; then 8 | # generate palette and templates from given image 9 | $HOME/code/c/helltheme/hellwal --image "$1" 10 | else 11 | # generate palette and templates from random image 12 | $HOME/code/c/helltheme/hellwal --image ~/pics/wallpapers --random --skip-luminance-sort 13 | fi 14 | 15 | # source variables so you have accesss to $colors and $wallpaper 16 | source ~/.cache/hellwal/variables.sh 17 | 18 | # update discord colors 19 | /home/dh/code/git/Themecord/themecord 20 | 21 | # apply wallpaper 22 | swww img "$wallpaper" -t random --transition-step 1 --transition-duration 0.4 --transition-fps 255 23 | 24 | # copy generated hellwal colors to pywal location, so pywalfox can understand it 25 | cp ~/.cache/hellwal/colors.json ~/.cache/wal/ 26 | 27 | # fuzzel 28 | cp ~/.cache/hellwal/fuzzel-colors.ini ~/.config/fuzzel/fuzzel.ini 29 | 30 | # mako 31 | cp ~/.cache/hellwal/mako-colors ~/.config/mako/config 32 | 33 | # update pywalfox 34 | pywalfox update 35 | 36 | # reload waybar with new colors 37 | wbar-reload 38 | ''; 39 | 40 | setwallp = pkgs.writeShellScriptBin "setwallp" '' 41 | 42 | if [ "$1" == "n" ] ; then 43 | # generate palette and templates from given image 44 | $HOME/code/c/helltheme/hellwal --image ~/pics/wallpapers --random --neon-mode 45 | else 46 | # generate palette and templates from random image 47 | $HOME/code/c/helltheme/hellwal --image ~/pics/wallpapers --random 48 | fi 49 | 50 | # source variables so you have accesss to $colors and $wallpaper 51 | source ~/.cache/hellwal/variables.sh 52 | 53 | # update discord colors 54 | themecord 55 | 56 | # apply wallpaper 57 | swww img "$wallpaper" -t random --transition-step 1 --transition-duration 0.4 --transition-fps 255 58 | 59 | # copy generated hellwal colors to pywal location, so pywalfox can understand it 60 | cp ~/.cache/hellwal/colors.json ~/.cache/wal/ 61 | 62 | # update pywalfox 63 | pywalfox update 64 | 65 | # reload waybar with new colors 66 | wbar-reload 67 | 68 | pkill imv 69 | [ "$2" == "n" ] && imv "$wallpaper" & 70 | ''; 71 | 72 | wbar-reload = pkgs.writeShellScriptBin "wbar-reload" '' 73 | #!/usr/bin/env bash 74 | waybarPID=$(pgrep waybar) 75 | kill $waybarPID 76 | nohup waybar > /dev/null 2>&1 & 77 | echo "waybar reloaded!" 78 | ''; 79 | 80 | sysconfupdate = pkgs.writeShellScriptBin "sysconfupdate" '' 81 | #!/usr/bin/env bash 82 | cd /etc/nixos/ 83 | git pull 84 | sudo nixos-rebuild switch --flake /etc/nixos#"$NIX_FLAKE_CURRENT_CONFIG" 85 | ''; 86 | 87 | sysconfrebuild = pkgs.writeShellScriptBin "sysconfrebuild" '' 88 | #!/usr/bin/env bash 89 | cd /etc/nixos/ 90 | git add . 91 | git commit -m "nix config auto-commit" 92 | sudo nixos-rebuild switch --flake /etc/nixos#"$NIX_FLAKE_CURRENT_CONFIG" 93 | ''; 94 | 95 | sysconfrebuildpush = pkgs.writeShellScriptBin "sysconfrebuildpush" '' 96 | #!/usr/bin/env bash 97 | cd /etc/nixos/ 98 | git add . 99 | git commit -m "config update" 100 | sudo nixos-rebuild switch --flake /etc/nixos#"$NIX_FLAKE_CURRENT_CONFIG" 101 | 102 | if [ ! $? -eq "0" ]; then 103 | echo "Failed to rebuild..." 104 | exit 105 | else 106 | echo "Build successful, pushing changes to github:" 107 | git push origin main 108 | fi 109 | ''; 110 | hyprviewtoggle = pkgs.writeShellScriptBin "hyprviewtoggle" '' 111 | #!/usr/bin/env sh 112 | MODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}') 113 | 114 | if [ "$MODE" = 0 ] ; then 115 | hyprctl --batch "\ 116 | keyword animations:enabled 1;\ 117 | keyword decoration:drop_shadow 5;\ 118 | keyword decoration:blur:enabled 1;\ 119 | keyword general:gaps_in 10;\ 120 | keyword general:gaps_out 10;\ 121 | keyword general:border_size 0;\ 122 | keyword decoration:rounding 20" 123 | exit 124 | else 125 | hyprctl --batch " \ 126 | keyword animations:enabled 0; \ 127 | keyword decoration:drop_shadow 0; \ 128 | keyword decoration:blur:enabled 1; \ 129 | keyword general:gaps_in 10; \ 130 | keyword general:gaps_out 10; \ 131 | keyword general:border_size 2; \ 132 | keyword decoration:rounding 0" 133 | fi 134 | ''; 135 | hyprupdategaps = pkgs.writeShellScriptBin "hyprupdategaps" '' 136 | #!/usr/bin/env sh 137 | 138 | gaps_in=$(hyprctl -j getoption general:gaps_in | jq '.custom' | awk '{print $1}' | cut -c 2-) 139 | gaps_out=$(hyprctl -j getoption general:gaps_out | jq '.custom' | awk '{print $1}' | cut -c 2-) 140 | 141 | function inc_gaps_in () { 142 | hyprctl keyword general:gaps_in $((gaps_in+5)) 143 | } 144 | 145 | function dec_gaps_in () { 146 | hyprctl keyword general:gaps_in $((gaps_in-5)) 147 | } 148 | 149 | function inc_gaps_out () { 150 | hyprctl keyword general:gaps_out $((gaps_out+5)) 151 | } 152 | 153 | function dec_gaps_out () { 154 | hyprctl keyword general:gaps_out $((gaps_out-5)) 155 | } 156 | 157 | while [[ $# -gt 0 ]]; do 158 | case $1 in 159 | --inc_gaps_in) inc_gaps_in; shift ;; 160 | --dec_gaps_in) dec_gaps_in; shift ;; 161 | --inc_gaps_out) inc_gaps_out; shift ;; 162 | --dec_gaps_out) dec_gaps_out; shift ;; 163 | *) printf "Error: Unknown option %s" "$1"; exit 1 ;; 164 | esac 165 | done 166 | ''; 167 | 168 | in { 169 | home = { 170 | packages = [ 171 | # Pywal & Sww 172 | setwall 173 | setwallp 174 | 175 | # Waybar 176 | wbar-reload 177 | 178 | # Hyprland 179 | hyprviewtoggle 180 | hyprupdategaps 181 | 182 | # NixOS 183 | sysconfupdate 184 | sysconfrebuild 185 | sysconfrebuildpush 186 | ]; 187 | }; 188 | } 189 | -------------------------------------------------------------------------------- /modules/hyprland/hyprland.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, config, USERNAME, ... }: 2 | 3 | { 4 | home.packages = with pkgs; [ 5 | grim 6 | swww 7 | slurp 8 | swappy 9 | playerctl 10 | wl-clipboard 11 | brightnessctl 12 | ]; 13 | 14 | xdg.portal = { 15 | enable = true; 16 | config.common.default = "*"; 17 | extraPortals = with pkgs; [ 18 | xdg-desktop-portal-gtk 19 | xdg-desktop-portal-wlr 20 | xdg-desktop-portal-hyprland 21 | ]; 22 | }; 23 | 24 | home.sessionVariables.MOZ_ENABLE_WAYLAND = "1"; 25 | home.sessionVariables.NIXOS_OZONE_WL = "1"; 26 | 27 | wayland.windowManager.hyprland = { 28 | enable = true; 29 | systemd.enable = true; 30 | xwayland.enable = true; 31 | 32 | extraConfig = '' 33 | #source = /home/${USERNAME}/.cache/hellwal/colors-hyprland.conf 34 | ''; 35 | 36 | settings = { 37 | monitor = [ 38 | "DP-2,2560x1440@165,1440x0,1" 39 | "DP-1,2560x1440@165,0x50,1,transform,1" 40 | "LVDS-1,1920x1080@60,0x0,1" # my T430 with fhd ips B) 41 | ]; 42 | 43 | #"$terminal" = ''footclient -o "include=/home/${USERNAME}/.cache/wal/colors-foot.ini"''; 44 | "$terminal" = "alacritty"; 45 | "$menu" = "fuzzel"; 46 | "$lock" = "hyprlock"; 47 | 48 | general = { 49 | gaps_in = 10; 50 | gaps_out = 20; 51 | border_size = 0; # from now on, it looks clean ig 52 | "col.active_border" = "rgb(bfc9f3)"; 53 | "col.inactive_border" = "rgb(242430)"; 54 | resize_on_border = false; 55 | allow_tearing = false; 56 | layout = "dwindle"; 57 | }; 58 | 59 | env = [ 60 | "XCURSOR_SIZE,24" 61 | "HYPRCURSOR_SIZE,24" 62 | 63 | "NIXOS_OZONE_WL,1" 64 | "MOZ_ENABLE_WAYLAND,1" 65 | "WLR_NO_HARDWARE_CURSORS,1" 66 | 67 | "XDG_SESSION_TYPE,wayland" 68 | "XDG_SESSION_DESKTOP,Hyprland" 69 | ]; 70 | 71 | decoration = lib.mkForce { 72 | rounding = 0; 73 | 74 | active_opacity = 1.0; 75 | inactive_opacity = 1.0; 76 | 77 | blur = { 78 | enabled = true; 79 | new_optimizations = "on"; 80 | size = 4; 81 | passes = 2; 82 | vibrancy = 0.1696; 83 | }; 84 | }; 85 | 86 | animations = { 87 | enabled = false; 88 | 89 | bezier = "myBezier, 0.3, 0, 0, 1"; 90 | animation = [ 91 | "windows, 1, 5, myBezier" 92 | "windowsOut, 1, 5, default, popin 80%" 93 | "border, 1, 10, default" 94 | "borderangle, 1, 8, default" 95 | "fade, 1, 7, default" 96 | "workspaces, 1, 6, default" 97 | ]; 98 | }; 99 | 100 | binds = { 101 | allow_workspace_cycles = true; 102 | }; 103 | 104 | dwindle = { 105 | pseudotile = "yes"; 106 | preserve_split = "yes"; 107 | # no_gaps_when_only = "yes"; 108 | }; 109 | 110 | gestures = { 111 | workspace_swipe = true; 112 | workspace_swipe_use_r = true; 113 | }; 114 | 115 | input = { 116 | kb_layout = "pl"; 117 | follow_mouse = 1; 118 | repeat_delay = 200; 119 | repeat_rate = 50; 120 | 121 | touchpad = { 122 | disable_while_typing = true; 123 | }; 124 | }; 125 | 126 | "$mod" = "SUPER"; 127 | bind = [ 128 | "$mod, RETURN, exec,$terminal" 129 | "$mod, Q, killactive," 130 | "$mod SHIFT, ESCAPE, exec, hyprctl dispatch exit" 131 | 132 | "$mod, E, exec, thunar" 133 | "$mod, O, exec, $menu" 134 | "$mod, R, exec, rofmoji" 135 | "$mod, B, exec, firefox" 136 | "$mod, P, exec, pavucontrol" 137 | "$mod CTRL SHIFT, L, exec, $lock" 138 | 139 | "$mod, U, exec, setwall" 140 | "$mod, W, exec, setwallp s n" 141 | "$mod SHIFT, W, exec, setwallp n n" 142 | "$mod SHIFT, U, exec, SEL=$(cd ~/pics/wallpapers/ ; for img in *; do echo -en \"$img\\0icon\\x1f$img\\n\" ; done | rofi -dmenu -show-icons) && setwall \"$SEL\"" 143 | 144 | "$mod, V, togglefloating" 145 | "$mod, N, togglesplit" 146 | "$mod, F, fullscreen" 147 | 148 | "$mod, h, movefocus, l" 149 | "$mod, l, movefocus, r" 150 | "$mod, k, movefocus, u" 151 | "$mod, j, movefocus, d" 152 | 153 | "$mod CTRL, h, movewindow, l" "$mod SHIFT, h, resizeactive, 100 0" 154 | "$mod CTRL, l, movewindow, r" "$mod SHIFT, l, resizeactive, -100 0" 155 | "$mod CTRL, k, movewindow, u" "$mod SHIFT, k, resizeactive, 0 -100" 156 | "$mod CTRL, j, movewindow, d" "$mod SHIFT, j, resizeactive, 0 100" 157 | 158 | "$mod SHIFT, D,movetoworkspace,special" 159 | "$mod, D, togglespecialworkspace" 160 | 161 | "$mod, 1, workspace, 1" "$mod SHIFT, 1, movetoworkspace, 1" 162 | "$mod, 2, workspace, 2" "$mod SHIFT, 2, movetoworkspace, 2" 163 | "$mod, 3, workspace, 3" "$mod SHIFT, 3, movetoworkspace, 3" 164 | "$mod, 4, workspace, 4" "$mod SHIFT, 4, movetoworkspace, 4" 165 | "$mod, 5, workspace, 5" "$mod SHIFT, 5, movetoworkspace, 5" 166 | "$mod, 6, workspace, 6" "$mod SHIFT, 6, movetoworkspace, 6" 167 | "$mod, 7, workspace, 7" "$mod SHIFT, 7, movetoworkspace, 7" 168 | "$mod, 8, workspace, 8" "$mod SHIFT, 8, movetoworkspace, 8" 169 | "$mod, 9, workspace, 9" "$mod SHIFT, 9, movetoworkspace, 9" 170 | "$mod, 0, workspace, 10" "$mod SHIFT, 0, movetoworkspace, 10" 171 | "$mod, /, workspace, 11" "$mod SHIFT, /, movetoworkspace, 11" 172 | 173 | "$mod, mouse_down, workspace, e+1" 174 | "$mod, mouse_up, workspace, e-1" 175 | 176 | # its just fdor fun 177 | "$mod SHIFT, mouse_down, exec, hyprupdategaps --inc_gaps_in ; hyprupdategaps --inc_gaps_out ; border_size=$(hyprctl -j getoption general:border_size | jq '.int') ; hyprctl keyword general:border_size $(($border_size + 1)) ; border_rounding=$(hyprctl -j getoption decoration:rounding | jq '.int') ; hyprctl keyword decoration:rounding $(($border_rounding + 1))" 178 | "$mod SHIFT, mouse_up, exec, hyprupdategaps --dec_gaps_in ; hyprupdategaps --dec_gaps_out ; border_size=$(hyprctl -j getoption general:border_size | jq '.int') ; hyprctl keyword general:border_size $(($border_size - 1)) ; border_rounding=$(hyprctl -j getoption decoration:rounding | jq '.int') ; hyprctl keyword decoration:rounding $(($border_rounding - 1))" 179 | 180 | "$mod, minus, splitratio, -0.15" 181 | "$mod, equal, splitratio, +0.15" 182 | 183 | "$mod, F1, exec, hyprviewtoggle" 184 | 185 | ",XF86AudioMute,exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" 186 | ",XF86AudioPlay,exec, playerctl play-pause" 187 | ",XF86AudioNext,exec, playerctl next" 188 | ",XF86AudioPrev,exec, playerctl previous" 189 | ",XF86AudioStop, exec, playerctl stop" 190 | 191 | "$mod SHIFT, S, exec, grim -g \"$(slurp -d)\" - | tee >(swappy -f - -o - | wl-copy) | wl-copy" 192 | ", code:107, exec, grim -g \"$(slurp -d)\" - | tee >(swappy -f - -o - | wl-copy) | wl-copy" 193 | 194 | # Rotating laptop screen 195 | "$mod ALT, DOWN, exec, hyprctl keyword monitor $(hyprctl activeworkspace | grep \"on monitor\" | cut -d' ' -f 7 | sed 's/://g'), $(hyprctl monitors | grep -A 1 hyprctl activeworkspace | grep \"on monitor\" | cut -d' ' -f 7 | sed 's/://g' | sed -n '2p' | cut -d' ' -f1 | cut -d$'\t' -f2),0x0,1,transform,2" 196 | "$mod ALT, UP, exec, hyprctl keyword monitor $(hyprctl activeworkspace | grep \"on monitor\" | cut -d' ' -f 7 | sed 's/://g'), $(hyprctl monitors | grep -A 1 hyprctl activeworkspace | grep \"on monitor\" | cut -d' ' -f 7 | sed 's/://g' | sed -n '2p' | cut -d' ' -f1 | cut -d$'\t' -f2),0x0,1,transform,0" 197 | "$mod ALT, LEFT, exec, hyprctl keyword monitor $(hyprctl activeworkspace | grep \"on monitor\" | cut -d' ' -f 7 | sed 's/://g'), $(hyprctl monitors | grep -A 1 hyprctl activeworkspace | grep \"on monitor\" | cut -d' ' -f 7 | sed 's/://g' | sed -n '2p' | cut -d' ' -f1 | cut -d$'\t' -f2),0x0,1,transform,3" 198 | "$mod ALT, RIGHT, exec, hyprctl keyword monitor $(hyprctl activeworkspace | grep \"on monitor\" | cut -d' ' -f 7 | sed 's/://g'), $(hyprctl monitors | grep -A 1 hyprctl activeworkspace | grep \"on monitor\" | cut -d' ' -f 7 | sed 's/://g' | sed -n '2p' | cut -d' ' -f1 | cut -d$'\t' -f2),0x0,1,transform,1" 199 | 200 | "$mod SHIFT, F9, exec, hyprctl reload" 201 | ]; 202 | 203 | binde = [ 204 | ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+" 205 | ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-" 206 | 207 | "ALT, XF86AudioRaiseVolume, exec, brightnessctl s +1%" 208 | "ALT, XF86AudioLowerVolume, exec, brightnessctl s 1%-" 209 | 210 | # Changing borders with keybinds 211 | "$mod, code:34, exec, hyprupdategaps --inc_gaps_in ; hyprupdategaps --inc_gaps_out" 212 | "$mod, code:35, exec, hyprupdategaps --dec_gaps_in ; hyprupdategaps --dec_gaps_out" 213 | 214 | "$mod SHIFT, code:34, exec, border_size=$(hyprctl -j getoption general:border_size | jq '.int') ; hyprctl keyword general:border_size $(($border_size + 1))" 215 | "$mod SHIFT, code:35, exec, border_size=$(hyprctl -j getoption general:border_size | jq '.int') ; hyprctl keyword general:border_size $(($border_size - 1))" 216 | 217 | "$mod CTRL SHIFT, code:34, exec, border_rounding=$(hyprctl -j getoption decoration:rounding | jq '.int') ; hyprctl keyword decoration:rounding $(($border_rounding + 1))" 218 | "$mod CTRL SHIFT, code:35, exec, border_rounding=$(hyprctl -j getoption decoration:rounding | jq '.int') ; hyprctl keyword decoration:rounding $(($border_rounding - 1))" 219 | ]; 220 | 221 | bindm = [ 222 | "$mod, mouse:272, movewindow" 223 | "$mod, mouse:273, resizewindow" 224 | ]; 225 | 226 | exec-once = [ 227 | "swww init ; sleep 1; setwall" 228 | #"pywalfox start" 229 | "lxqt-policykit-agent" 230 | "hyprctl setcursor Posy_Cursor_Black 24" 231 | "ckb-next -b" 232 | ]; 233 | 234 | windowrulev2 = [ 235 | "float, title:^(Picture in Picture)$" 236 | "float, title:^(Volume Control)$" 237 | "opacity 1.0 override 1.0 override, title:^(Picture in Picture)$" 238 | "pin, title:^(Picture in Picture)$" 239 | "idleinhibit fullscreen, class:^(google-chrome)$" 240 | "suppressevent maximize, class:.*" 241 | "float,class:^(file_progress)$" 242 | "float,class:^(confirm)$" 243 | "float,class:^(dialog)$" 244 | "float,class:^(download)$" 245 | "float,class:^(notification)$" 246 | "float,class:^(error)$" 247 | "float,class:^(confirmreset)$" 248 | "float,title:^(Open File)$" 249 | "float,title:^(branchdialog)$" 250 | "float,title:^(Confirm to replace files)$" 251 | "float,title:^(File Operation Progress)$" 252 | ]; 253 | 254 | misc = { 255 | disable_hyprland_logo = true; 256 | }; 257 | }; 258 | }; 259 | } 260 | --------------------------------------------------------------------------------