96 lines
2.7 KiB
Nix
96 lines
2.7 KiB
Nix
{ 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;
|
|
# 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";
|
|
};
|
|
} |