pluto-flake/hosts/generic.nix

167 lines
4.2 KiB
Nix

{ config, pkgs, lib, inputs, ...}:
{
imports = [
../pkgs
inputs.mangowc.nixosModules.mango
];
nix.settings.experimental-features = "nix-command flakes";
networking.networkmanager = {
enable = true;
};
networking.hostName = config.var.hostname;
time.timeZone = config.var.timezone;
i18n.defaultLocale = config.var.locale;
i18n.extraLocaleSettings = {
LC_ADDRESS = config.var.locale;
LC_IDENTIFICATION = config.var.locale;
LC_MEASUREMENT = config.var.locale;
LC_MONETARY = config.var.locale;
LC_NAME = config.var.locale;
LC_NUMERIC = config.var.locale;
LC_PAPER = config.var.locale;
LC_TELEPHONE = config.var.locale;
LC_TIME = config.var.locale;
};
services.gnome.gnome-keyring.enable = true;
security.pam.services.greetd.enableGnomeKeyring = true;
security.pam.services.greetd.gnupg.enable = true;
security.pam.services.login = {
enableGnomeKeyring = true;
gnupg.enable = true;
};
programs.sway.enable = (if config.var.class == "desktop" then true else false);
programs.mango.enable = (if config.var.class == "desktop" then true else false);
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
nix.settings.substituters = [
"https://nix-community.cachix.org"
"https://nixpkgs-wayland.cachix.org"
"https://cache.garnix.io"
];
nix.settings.trusted-substituters = [
"https://nix-community.cachix.org"
"https://nixpkgs-wayalnd.cachix.org"
"https://cache.garnix.io"
];
nix.settings.trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
];
systemd.user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
security.polkit.enable = true;
boot.loader.systemd-boot.enable = false;
boot.loader.limine = {
enable = true;
style.wallpapers = [];
additionalFiles = {
"efi/memtest86/memtest86.efi" = "${pkgs.memtest86-efi}/BOOTX64.efi";
"efi/shell.efi" = "${pkgs.edk2-uefi-shell}/shell.efi";
};
extraEntries = ''
/memtest86
protocol: efi
path: boot():/limine/efi/memtest86/memtest86.efi
/shell
protocol: efi
path: boot():/limine/efi/shell.efi
'';
};
boot.loader.efi.canTouchEfiVariables = true;
powerManagement.cpuFreqGovernor = "performance";
services.gvfs.enable = true;
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [mesa.opencl libvdpau-va-gl libva-vdpau-driver vulkan-validation-layers];
extraPackages32 = with pkgs; [driversi686Linux.mesa.opencl];
};
services.xserver.enable = true;
programs.dconf.enable = true;
services.xserver.xkb = {
layout = "us";
variant = "";
};
environment.sessionVariables = {
QT_STYLE_OVERRIDE="Kvantum";
QT_QPA_PLATFORMTHEME="qt5ct";
};
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
services.udisks2.enable = true;
users.users.${config.var.username} = {
isNormalUser = true;
};
services.libinput.enable = true;
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
mypackages.cyberhack
catppuccin-cursors.mochaMauve
gsettings-desktop-schemas
adwaita-icon-theme
lact
neovim
libsecret
wget
pciutils
unzip
p7zip
];
fonts.packages = with pkgs; [
jetbrains-mono
nerd-fonts.iosevka
nerd-fonts.departure-mono
noto-fonts
noto-fonts-cjk-sans
noto-fonts-color-emoji
];
system.stateVersion = "26.05";
}