{ pkgs, config, inputs, lib, ... }: let cfg = config.my.cachyosKernel; in { services = { openssh = { enable = true; # Enable SSH settings = { PermitRootLogin = "no"; # Prevent root from SSH login PasswordAuthentication = true; #Users can SSH using kb and password KbdInteractiveAuthentication = true; }; ports = [22]; }; blueman.enable = true; # Bluetooth Support }; nix = { settings = { download-buffer-size = 200000000; auto-optimise-store = true; substituters = [ "https://hyprland.cachix.org" "https://attic.xuyh0120.win/lantian" "https://nix-community.cachix.org" "https://ezkea.cachix.org" ]; trusted-substituters = [ "https://hyprland.cachix.org" ]; trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI=" ]; experimental-features = [ "nix-command" "flakes" "pipe-operators" ]; }; }; nixpkgs.overlays = lib.mkIf cfg.enable [ inputs.nix-cachyos-kernel.overlays.pinned ]; # Allow unfree packages nixpkgs.config.allowUnfree = true; # Boot/Kernel Stuff boot = { kernelPackages = ( if cfg.enable then pkgs.cachyosKernels.linuxPackages-cachyos-latest-zen4 else pkgs.linuxPackages_latest ); kernelModules = ["v4l2loopback" "kvm-amd"]; extraModulePackages = [config.boot.kernelPackages.v4l2loopback]; kernel.sysctl = {"vm.max_map_count" = 2147483642;}; loader.systemd-boot.enable = true; loader.efi.canTouchEfiVariables = true; initrd = { systemd.enable = true; }; # 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; }; # Set your time zone. time.timeZone = "Europe/Berlin"; # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; i18n.extraLocaleSettings = { LC_ADDRESS = "en_US.UTF-8"; LC_IDENTIFICATION = "en_US.UTF-8"; LC_MEASUREMENT = "en_US.UTF-8"; LC_MONETARY = "en_US.UTF-8"; LC_NAME = "en_US.UTF-8"; LC_NUMERIC = "en_US.UTF-8"; LC_PAPER = "en_US.UTF-8"; LC_TELEPHONE = "en_US.UTF-8"; LC_TIME = "en_US.UTF-8"; }; # Configure keymap in X11 services.xserver.xkb = { layout = "us"; variant = "euro"; }; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; # 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 = "25.11"; # Did you read the comment? }