114 lines
2.5 KiB
Nix
114 lines
2.5 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
boot.kernelParams = [ "hibernate.compressor=lz4" ];
|
|
environment.systemPackages = with pkgs; [
|
|
android-tools
|
|
binutils
|
|
binwalk
|
|
exfat
|
|
nixfmt-tree
|
|
qemu
|
|
qrencode
|
|
];
|
|
hardware = {
|
|
bluetooth.enable = true;
|
|
steam-hardware.enable = lib.mkForce false;
|
|
};
|
|
imports = [
|
|
../mods/host.nix
|
|
./hardware.nix
|
|
./mods/pxeboot.nix
|
|
];
|
|
networking = {
|
|
firewall.allowedTCPPorts = [ 8000 ];
|
|
hostName = "nixos-desktop";
|
|
networkmanager.ensureProfiles.profiles.phone-wifi = {
|
|
connection = {
|
|
id = "phone-wifi";
|
|
type = "wifi";
|
|
};
|
|
wifi-security = {
|
|
key-mgmt = "sae";
|
|
psk = "$HELLO_WORLD_PSK";
|
|
};
|
|
wifi.ssid = "Hello world";
|
|
};
|
|
wg-quick.interfaces.awg0.configFile = config.sops.templates.awg2-conf.path;
|
|
};
|
|
nixpkgs.config.allowUnfreePredicate =
|
|
pkg:
|
|
builtins.elem (lib.getName pkg) [
|
|
"steam"
|
|
"steam-unwrapped"
|
|
];
|
|
programs = {
|
|
niri.enable = true;
|
|
steam.enable = true;
|
|
virt-manager.enable = true;
|
|
};
|
|
services = {
|
|
displayManager.noctalia-greeter = {
|
|
cursorTheme = {
|
|
name = "Bibata-Modern-Amber";
|
|
package = pkgs.bibata-cursors;
|
|
};
|
|
enable = true;
|
|
passwordlessSyncUsers = [ "bogale" ];
|
|
settings.cursor.size = 24;
|
|
};
|
|
logind.settings.Login.HandleLidSwitch = "suspend-then-hibernate";
|
|
pipewire = {
|
|
enable = true;
|
|
pulse.enable = true;
|
|
};
|
|
tuned.enable = true;
|
|
upower = {
|
|
allowRiskyCriticalPowerAction = true;
|
|
criticalPowerAction = "Suspend";
|
|
enable = true;
|
|
percentageCritical = 10;
|
|
};
|
|
};
|
|
sops = {
|
|
secrets = {
|
|
awg2-spec.restartUnits = [ "wg-quick-awg0.service" ];
|
|
awg3-spec = { };
|
|
bogale-passwd.neededForUsers = true;
|
|
};
|
|
templates = {
|
|
awg2-conf.content = ''
|
|
${config.sops.placeholder.awg-obf}
|
|
${config.sops.placeholder.awg2-spec}
|
|
'';
|
|
awg3-conf.content = ''
|
|
${config.sops.placeholder.awg-obf}
|
|
${config.sops.placeholder.awg3-spec}
|
|
'';
|
|
};
|
|
};
|
|
users.users.bogale = {
|
|
extraGroups = [
|
|
"libvirtd"
|
|
"networkmanager"
|
|
"wheel"
|
|
];
|
|
hashedPasswordFile = config.sops.secrets.bogale-passwd.path;
|
|
isNormalUser = true;
|
|
};
|
|
virtualisation = {
|
|
libvirtd = {
|
|
enable = true;
|
|
qemu = {
|
|
swtpm.enable = true;
|
|
vhostUserPackages = [ pkgs.virtiofsd ];
|
|
};
|
|
};
|
|
spiceUSBRedirection.enable = true;
|
|
waydroid.enable = true;
|
|
};
|
|
}
|