 31f5958614
			
		
	
	31f5958614
	
	
	
		
			
			- Usunięto przestarzałe lub zduplikowane bindy w `hyprland.nix` i `list-hypr-bindings.nix`. - Dodano nowe skróty z lepszym opisem funkcji i pełniejszym pokryciem aplikacji. - Zmieniono nazwę aplikacji z `gimp` na `gimp3` w konfiguracji pakietów. - Uporządkowano kolejność bindów, grupując je tematycznie (media, komunikacja, narzędzia). - Ułatwiono zrozumienie poprzez aktualizację listy klawiszy z opisem po polsku.
		
			
				
	
	
		
			589 lines
		
	
	
		
			13 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			589 lines
		
	
	
		
			13 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
| {
 | ||
|   inputs,
 | ||
|   config,
 | ||
|   pkgs,
 | ||
|   host,
 | ||
|   username,
 | ||
|   options,
 | ||
|   ...
 | ||
| }: let
 | ||
|   inherit (import ./variables.nix) keyboardLayout;
 | ||
| in {
 | ||
|   imports = [
 | ||
|     ./hardware.nix
 | ||
|     ./users.nix
 | ||
|     ../../modules/amd-drivers.nix
 | ||
|     ../../modules/nvidia-drivers.nix
 | ||
|     ../../modules/nvidia-prime-drivers.nix
 | ||
|     ../../modules/intel-drivers.nix
 | ||
|     ../../modules/vm-guest-services.nix
 | ||
|     ../../modules/local-hardware-clock.nix
 | ||
|   ];
 | ||
| 
 | ||
|   boot = {
 | ||
|     # Kernel
 | ||
|     kernelPackages = pkgs.linuxPackages_zen;
 | ||
|     # This is for OBS Virtual Cam Support
 | ||
|     kernelModules = ["v4l2loopback"];
 | ||
|     extraModulePackages = [config.boot.kernelPackages.v4l2loopback];
 | ||
|     # Needed For Some Steam Games
 | ||
|     kernel.sysctl = {
 | ||
|       "vm.max_map_count" = 2147483642;
 | ||
|     };
 | ||
|     # Bootloader.
 | ||
|     loader = {
 | ||
|       systemd-boot.enable = true;
 | ||
|       efi.canTouchEfiVariables = true;
 | ||
|     };
 | ||
|     # Make /tmp a tmpfs
 | ||
|     tmp = {
 | ||
|       useTmpfs = false;
 | ||
|       tmpfsSize = "30%";
 | ||
|     };
 | ||
|     # Appimage Support
 | ||
|     binfmt.registrations.appimage = {
 | ||
|       wrapInterpreterInShell = false;
 | ||
|       interpreter = "${pkgs.appimage-run}/bin/appimage-run";
 | ||
|       recognitionType = "magic";
 | ||
|       offset = 0;
 | ||
|       mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
 | ||
|       magicOrExtension = ''\x7fELF....AI\x02'';
 | ||
|     };
 | ||
|     plymouth.enable = true;
 | ||
|   };
 | ||
| 
 | ||
|   # Styling Options
 | ||
|   stylix = {
 | ||
|     enable = true;
 | ||
|     image = ../../config/wallpapers/attack-on-titan-mikasa-ackerman.jpg;
 | ||
|     # base16Scheme = {
 | ||
|     #   base00 = "232136";
 | ||
|     #   base01 = "2a273f";
 | ||
|     #   base02 = "393552";
 | ||
|     #   base03 = "6e6a86";
 | ||
|     #   base04 = "908caa";
 | ||
|     #   base05 = "e0def4";
 | ||
|     #   base06 = "e0def4";
 | ||
|     #   base07 = "56526e";
 | ||
|     #   base08 = "eb6f92";
 | ||
|     #   base09 = "f6c177";
 | ||
|     #   base0A = "ea9a97";
 | ||
|     #   base0B = "3e8fb0";
 | ||
|     #   base0C = "9ccfd8";
 | ||
|     #   base0D = "c4a7e7";
 | ||
|     #   base0E = "f6c177";
 | ||
|     #   base0F = "56526e";
 | ||
|     # };
 | ||
|     polarity = "dark";
 | ||
|     opacity.terminal = 0.8;
 | ||
|     cursor = {
 | ||
|       package = pkgs.bibata-cursors;
 | ||
|       name = "Bibata-Modern-Ice";
 | ||
|       size = 24;
 | ||
|     };
 | ||
|     fonts = {
 | ||
|       monospace = {
 | ||
|         package = pkgs.nerd-fonts.fira-mono;
 | ||
|         name = "FiraCode Nerd Fonts Mono";
 | ||
|       };
 | ||
|       sansSerif = {
 | ||
|         package = pkgs.nerd-fonts.fira-code;
 | ||
|         name = "FiraCode Nerd Fonts";
 | ||
|       };
 | ||
|       serif = {
 | ||
|         package = pkgs.nerd-fonts.fira-code;
 | ||
|         name = "FiraCode Nerd Fonts";
 | ||
|       };
 | ||
|       sizes = {
 | ||
|         applications = 12;
 | ||
|         terminal = 15;
 | ||
|         desktop = 11;
 | ||
|         popups = 12;
 | ||
|       };
 | ||
|     };
 | ||
|   };
 | ||
| 
 | ||
|   # Extra Module Options
 | ||
|   drivers = {
 | ||
|     amdgpu.enable = true;
 | ||
|     nvidia.enable = false;
 | ||
|     nvidia-prime = {
 | ||
|       enable = false;
 | ||
|       intelBusID = "";
 | ||
|       nvidiaBusID = "";
 | ||
|     };
 | ||
|     intel.enable = false;
 | ||
|   };
 | ||
|   vm.guest-services.enable = false;
 | ||
|   local.hardware-clock.enable = false;
 | ||
| 
 | ||
|   # Enable networking
 | ||
|   networking = {
 | ||
|     nameservers = ["176.9.1.117" "213.196.191.96" "2a01:4f8:151:34aa::198"];
 | ||
|     networkmanager.enable = true;
 | ||
|     hostName = host;
 | ||
|     timeServers = options.networking.timeServers.default ++ ["pool.ntp.org"];
 | ||
|   };
 | ||
| 
 | ||
|   # Set your time zone.
 | ||
|   time.timeZone = "Europe/Warsaw";
 | ||
| 
 | ||
|   i18n = {
 | ||
|     defaultLocale = "pl_PL.UTF-8";
 | ||
|     extraLocaleSettings = {
 | ||
|       LC_ADDRESS = "pl_PL.UTF-8";
 | ||
|       LC_IDENTIFICATION = "pl_PL.UTF-8";
 | ||
|       LC_MEASUREMENT = "pl_PL.UTF-8";
 | ||
|       LC_MONETARY = "pl_PL.UTF-8";
 | ||
|       LC_NAME = "pl_PL.UTF-8";
 | ||
|       LC_NUMERIC = "pl_PL.UTF-8";
 | ||
|       LC_PAPER = "pl_PL.UTF-8";
 | ||
|       LC_TELEPHONE = "pl_PL.UTF-8";
 | ||
|       LC_TIME = "pl_PL.UTF-8";
 | ||
|     };
 | ||
|   };
 | ||
| 
 | ||
|   programs = {
 | ||
|     firefox.enable = false;
 | ||
|     starship = {
 | ||
|       enable = true;
 | ||
|       settings = {
 | ||
|         add_newline = false;
 | ||
|         buf = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         c = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         directory = {
 | ||
|           read_only = " ";
 | ||
|         };
 | ||
|         docker_context = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         fossil_branch = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         git_branch = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         golang = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         hg_branch = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         hostname = {
 | ||
|           ssh_symbol = " ";
 | ||
|         };
 | ||
|         lua = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         memory_usage = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         meson = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         nim = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         nix_shell = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         nodejs = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         ocaml = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         package = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         python = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         rust = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         swift = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|         zig = {
 | ||
|           symbol = " ";
 | ||
|         };
 | ||
|       };
 | ||
|     };
 | ||
|     dconf.enable = true;
 | ||
|     seahorse.enable = true;
 | ||
|     fuse.userAllowOther = true;
 | ||
|     mtr.enable = true;
 | ||
|     gnupg.agent = {
 | ||
|       enable = true;
 | ||
|       enableSSHSupport = true;
 | ||
|     };
 | ||
|     virt-manager.enable = true;
 | ||
|     steam = {
 | ||
|       enable = true;
 | ||
|       gamescopeSession.enable = true;
 | ||
|       remotePlay.openFirewall = true;
 | ||
|       dedicatedServer.openFirewall = true;
 | ||
|     };
 | ||
|     auto-cpufreq = {
 | ||
|       enable = true;
 | ||
|       settings = {
 | ||
|         charger = {
 | ||
|           governor = "performance";
 | ||
|           turbo = "auto";
 | ||
|         };
 | ||
| 
 | ||
|         battery = {
 | ||
|           governor = "powersave";
 | ||
|           turbo = "auto";
 | ||
|         };
 | ||
|       };
 | ||
|     };
 | ||
|     thunar = {
 | ||
|       enable = true;
 | ||
|       plugins = with pkgs.xfce; [
 | ||
|         thunar-archive-plugin
 | ||
|         thunar-volman
 | ||
|       ];
 | ||
|     };
 | ||
|   };
 | ||
| 
 | ||
|   nixpkgs.config = {
 | ||
|     allowUnfree = true;
 | ||
|     pulseaudio = true;
 | ||
|   };
 | ||
| 
 | ||
|   users = {
 | ||
|     mutableUsers = true;
 | ||
|   };
 | ||
| 
 | ||
|   environment.systemPackages = with pkgs; [
 | ||
|     wget
 | ||
|     killall
 | ||
|     eza
 | ||
|     git
 | ||
|     cmatrix
 | ||
|     lolcat
 | ||
|     libvirt
 | ||
|     lxqt.lxqt-policykit
 | ||
|     lm_sensors
 | ||
|     unzip
 | ||
|     unrar
 | ||
|     libnotify
 | ||
|     v4l-utils
 | ||
|     ydotool
 | ||
|     duf
 | ||
|     ncdu
 | ||
|     wl-clipboard
 | ||
|     pciutils
 | ||
|     ffmpeg
 | ||
|     socat
 | ||
|     cowsay
 | ||
|     ripgrep
 | ||
|     lshw
 | ||
|     bat
 | ||
|     pkg-config
 | ||
|     meson
 | ||
|     hyprpicker
 | ||
|     ninja
 | ||
|     brightnessctl
 | ||
|     virt-viewer
 | ||
|     swappy
 | ||
|     appimage-run
 | ||
|     networkmanagerapplet
 | ||
|     yad
 | ||
|     inxi
 | ||
|     playerctl
 | ||
|     nh
 | ||
|     nixfmt-rfc-style
 | ||
|     discord
 | ||
|     libvirt
 | ||
|     swww
 | ||
|     grim
 | ||
|     slurp
 | ||
|     file-roller
 | ||
|     swaynotificationcenter
 | ||
|     imv
 | ||
|     mpv
 | ||
|     gimp3
 | ||
|     pavucontrol
 | ||
|     tree
 | ||
|     greetd.tuigreet
 | ||
|     librewolf
 | ||
|     protonup
 | ||
|     plex-media-player
 | ||
|     plexamp
 | ||
|     bitwarden-desktop
 | ||
|     vlc
 | ||
|     nixd
 | ||
|     ungoogled-chromium
 | ||
|     slack
 | ||
|     alejandra
 | ||
|     tutanota-desktop
 | ||
|     ookla-speedtest
 | ||
|     anydesk
 | ||
|     bun
 | ||
|     docker
 | ||
|     docker-compose
 | ||
|     docker-slim
 | ||
|     sl
 | ||
|     nodejs
 | ||
|     kdePackages.kdenlive
 | ||
|     obs-studio
 | ||
|     thefuck
 | ||
|     cifs-utils
 | ||
|     libreoffice
 | ||
|     bastet
 | ||
|     nsnake
 | ||
|     exiftool
 | ||
|     (vscode-with-extensions.override {
 | ||
|       vscode = vscodium;
 | ||
|       vscodeExtensions = with vscode-extensions;
 | ||
|         []
 | ||
|         ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
 | ||
|           # {
 | ||
|           #   name = "[nazwa rozszerzenia]";
 | ||
|           #   publisher = "[autor]";
 | ||
|           #   version = "[wersja]";
 | ||
|           #   hash = "[hash. przebuduj system bez odkomentowania tej opcji, a poda ci poprawny hash]";
 | ||
|           # }
 | ||
|         ];
 | ||
|     })
 | ||
|   ];
 | ||
| 
 | ||
|   fonts = {
 | ||
|     packages = with pkgs; [
 | ||
|       noto-fonts-emoji
 | ||
|       noto-fonts-cjk-sans
 | ||
|       font-awesome
 | ||
|       # Commenting Symbola out to fix install this will need to be fixed or an alternative found.
 | ||
|       # symbola
 | ||
|       material-icons
 | ||
|     ];
 | ||
|   };
 | ||
| 
 | ||
|   environment.variables = {
 | ||
|     ZANEYOS_VERSION = "2.2";
 | ||
|     ZANEYOS = "true";
 | ||
|   };
 | ||
| 
 | ||
|   # Extra Portal Configuration
 | ||
|   xdg.portal = {
 | ||
|     enable = true;
 | ||
|     wlr.enable = true;
 | ||
|     extraPortals = [
 | ||
|       pkgs.xdg-desktop-portal-gtk
 | ||
|       pkgs.xdg-desktop-portal
 | ||
|     ];
 | ||
|     configPackages = [
 | ||
|       pkgs.xdg-desktop-portal-gtk
 | ||
|       pkgs.xdg-desktop-portal-hyprland
 | ||
|       pkgs.xdg-desktop-portal
 | ||
|     ];
 | ||
|   };
 | ||
| 
 | ||
|   # Services to start
 | ||
|   services = {
 | ||
|     xserver = {
 | ||
|       enable = false;
 | ||
|       xkb = {
 | ||
|         layout = "${keyboardLayout}";
 | ||
|         variant = "";
 | ||
|       };
 | ||
|     };
 | ||
|     resolved = {
 | ||
|       enable = true;
 | ||
|       dnssec = "true";
 | ||
|       domains = ["~."]; # "use as default interface for all requests"
 | ||
|       # (see man resolved.conf)
 | ||
|       # let Avahi handle mDNS publication
 | ||
|       extraConfig = ''
 | ||
|         DNSOverTLS=opportunistic
 | ||
|         MulticastDNS=resolve
 | ||
|       '';
 | ||
|       llmnr = "true";
 | ||
|     };
 | ||
|     greetd = {
 | ||
|       enable = true;
 | ||
|       vt = 3;
 | ||
|       settings = {
 | ||
|         default_session = {
 | ||
|           # Wayland Desktop Manager is installed only for user ryan via home-manager!
 | ||
|           user = username;
 | ||
|           # .wayland-session is a script generated by home-manager, which links to the current wayland compositor(sway/hyprland or others).
 | ||
|           # with such a vendor-no-locking script, we can switch to another wayland compositor without modifying greetd's config here.
 | ||
|           # command = "$HOME/.wayland-session"; # start a wayland session directly without a login manager
 | ||
|           command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland"; # start Hyprland with a TUI login manager
 | ||
|         };
 | ||
|       };
 | ||
|     };
 | ||
|     smartd = {
 | ||
|       enable = false;
 | ||
|       autodetect = true;
 | ||
|     };
 | ||
|     libinput.enable = true;
 | ||
|     fstrim.enable = true;
 | ||
|     gvfs.enable = true;
 | ||
|     openssh.enable = true;
 | ||
|     flatpak.enable = false;
 | ||
|     printing = {
 | ||
|       enable = true;
 | ||
|       drivers = [
 | ||
|         # pkgs.hplipWithPlugin
 | ||
|       ];
 | ||
|     };
 | ||
|     # auto-cpufreq.enable = true;
 | ||
|     gnome.gnome-keyring.enable = true;
 | ||
|     avahi = {
 | ||
|       enable = true;
 | ||
|       nssmdns4 = true;
 | ||
|       openFirewall = true;
 | ||
|     };
 | ||
|     ipp-usb.enable = true;
 | ||
|     syncthing = {
 | ||
|       enable = false;
 | ||
|       user = "${username}";
 | ||
|       dataDir = "/home/${username}";
 | ||
|       configDir = "/home/${username}/.config/syncthing";
 | ||
|     };
 | ||
|     pipewire = {
 | ||
|       enable = true;
 | ||
|       alsa.enable = true;
 | ||
|       alsa.support32Bit = true;
 | ||
|       pulse.enable = true;
 | ||
|     };
 | ||
|     pulseaudio = {
 | ||
|       enable = false;
 | ||
|       extraConfig = "load-module module-combine-sink";
 | ||
|     };
 | ||
|     rpcbind.enable = false;
 | ||
|     nfs.server.enable = false;
 | ||
|   };
 | ||
|   systemd.services.flatpak-repo = {
 | ||
|     path = [pkgs.flatpak];
 | ||
|     script = ''
 | ||
|       flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
 | ||
|     '';
 | ||
|   };
 | ||
| 
 | ||
|   hardware = {
 | ||
|     sane = {
 | ||
|       enable = true;
 | ||
|       extraBackends = [pkgs.sane-airscan];
 | ||
|       disabledDefaultBackends = ["escl"];
 | ||
|     };
 | ||
|     logitech = {
 | ||
|       wireless = {
 | ||
|         enable = false;
 | ||
|         enableGraphical = false;
 | ||
|       };
 | ||
|     };
 | ||
|     bluetooth = {
 | ||
|       enable = true;
 | ||
|       powerOnBoot = true;
 | ||
|     };
 | ||
|     graphics = {
 | ||
|       enable = true;
 | ||
|       enable32Bit = true;
 | ||
|     };
 | ||
|   };
 | ||
|   services.blueman.enable = true;
 | ||
| 
 | ||
|   # Security / Polkit
 | ||
|   security = {
 | ||
|     rtkit.enable = true;
 | ||
|     polkit = {
 | ||
|       enable = true;
 | ||
|       extraConfig = ''
 | ||
|         polkit.addRule(function(action, subject) {
 | ||
|           if (
 | ||
|             subject.isInGroup("users")
 | ||
|               && (
 | ||
|                 action.id == "org.freedesktop.login1.reboot" ||
 | ||
|                 action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||
 | ||
|                 action.id == "org.freedesktop.login1.power-off" ||
 | ||
|                 action.id == "org.freedesktop.login1.power-off-multiple-sessions"
 | ||
|               )
 | ||
|             )
 | ||
|           {
 | ||
|             return polkit.Result.YES;
 | ||
|           }
 | ||
|         })
 | ||
|       '';
 | ||
|     };
 | ||
|     pam.services.swaylock = {
 | ||
|       text = ''
 | ||
|         auth include login
 | ||
|       '';
 | ||
|     };
 | ||
|     sudo = {
 | ||
|       enable = true;
 | ||
|       extraConfig = ''
 | ||
|         Defaults	pwfeedback
 | ||
|       '';
 | ||
|     };
 | ||
|   };
 | ||
| 
 | ||
|   # Optimization settings and garbage collection automation
 | ||
|   nix = {
 | ||
|     settings = {
 | ||
|       auto-optimise-store = true;
 | ||
|       experimental-features = [
 | ||
|         "nix-command"
 | ||
|         "flakes"
 | ||
|       ];
 | ||
|       substituters = ["https://hyprland.cachix.org"];
 | ||
|       trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
 | ||
|     };
 | ||
|     gc = {
 | ||
|       automatic = true;
 | ||
|       dates = "weekly";
 | ||
|       options = "--delete-older-than 7d";
 | ||
|     };
 | ||
|     nixPath = ["nixpkgs=${inputs.nixpkgs}"];
 | ||
|   };
 | ||
| 
 | ||
|   # Virtualization / Containers
 | ||
|   virtualisation = {
 | ||
|     libvirtd.enable = true;
 | ||
|     docker = {
 | ||
|       enable = true;
 | ||
|       package = pkgs.docker;
 | ||
|     };
 | ||
|     # podman = {
 | ||
|     #   enable = true;
 | ||
|     #   dockerCompat = true;
 | ||
|     #   defaultNetwork.settings.dns_enabled = true;
 | ||
|     # };
 | ||
|   };
 | ||
| 
 | ||
|   # services.openvpn.servers = {
 | ||
|   #   RO-P2P = {
 | ||
|   #     config = ''
 | ||
|   #       config /home/garand_plg/Documents/RO-ovpn-tcp.ovpn
 | ||
|   #     '';
 | ||
|   #     updateResolvConf = true;
 | ||
|   #   };
 | ||
|   # };
 | ||
| 
 | ||
|   console.keyMap = "${keyboardLayout}";
 | ||
| 
 | ||
|   # Open ports in the firewall.
 | ||
|   # networking.firewall.allowedTCPPorts = [ ... ];
 | ||
|   # networking.firewall.allowedUDPPorts = [ ... ];
 | ||
|   # Or disable the firewall altogether.
 | ||
|   # networking.firewall.enable = false;
 | ||
| 
 | ||
|   # 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. It‘s 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 = "23.11"; # Did you read the comment?
 | ||
| }
 |