configuration.nix/system/default.nix

105 lines
2.1 KiB
Nix
Raw Normal View History

2023-03-16 23:35:56 +05:30
{ config, lib, pkgs, ... }: {
2023-03-15 22:11:59 +05:30
imports = [
./filesystem.nix
./gnome-keyring.nix
./gtk.nix
./hardware.nix
./packages.nix
./persistence.nix
./plymouth.nix
./secureboot.nix
./services.nix
./swaylock.nix
./virtualisation.nix
];
boot = {
initrd.systemd.enable = true;
kernel.sysctl = {
"vm.swappiness" = 0;
};
};
console.useXkbConfig = true;
i18n = {
defaultLocale = "en_US.UTF-8";
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";
LC_ALL = "en_US.UTF-8";
};
supportedLocales = [ "en_US.UTF-8/UTF-8" ];
};
networking = {
hostName = "Skipper";
2023-03-16 21:10:20 +05:30
networkmanager = {
enable = true;
2023-03-16 21:11:08 +05:30
dns = "systemd-resolved";
2023-03-16 21:10:20 +05:30
wifi = {
2023-03-16 21:10:49 +05:30
backend = "iwd";
2023-03-16 21:10:20 +05:30
powersave = false;
};
2023-03-21 21:27:40 +05:30
extraConfig = ''
[device]
wifi.iwd.autoconnect=yes
'';
2023-03-16 21:10:20 +05:30
};
2023-03-15 22:11:59 +05:30
useDHCP = lib.mkDefault false;
2023-03-16 21:10:49 +05:30
wireless.iwd.enable = true;
2023-03-15 22:11:59 +05:30
};
security = {
apparmor = {
enable = true;
enableCache = true;
};
audit.enable = true;
auditd.enable = true;
2023-03-23 23:37:53 +05:30
pam.services = {
login.u2fAuth = true;
sudo.u2fAuth = true;
};
2023-03-15 22:11:59 +05:30
polkit.enable = true;
rtkit.enable = true;
tpm2 = {
enable = true;
abrmd.enable = true;
pkcs11.enable = true;
tctiEnvironment.enable = true;
};
sudo = {
package = pkgs.sudo.override { withInsults = true; };
extraConfig = ''
Defaults lecture="never"
2023-03-16 23:35:56 +05:30
%wheel ALL=NOPASSWD: ${config.boot.kernelPackages.cpupower}/bin/cpupower
2023-03-15 22:11:59 +05:30
'';
wheelNeedsPassword = true;
};
};
sound.enable = true;
time.timeZone = "Asia/Kolkata";
xdg = {
portal = {
enable = true;
wlr.enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
};
system.stateVersion = "23.05";
}