nixos/desktop/configuration.nix
2026-10-24 17:18:06 +09:00

100 lines
2.5 KiB
Nix

{ config, lib, pkgs, ... }:
{
imports = [ ../common.nix ./hardware.nix ];
boot.kernelParams = [ "hibernate.compressor=lz4" ];
environment.systemPackages = with pkgs; [ qemu binwalk android-tools ];
programs = {
niri.enable = true;
virt-manager.enable = true;
};
hardware = {
bluetooth.enable = true;
graphics.enable32Bit = true;
};
users.users.bogale = {
uid = 1551;
isNormalUser = true;
extraGroups = [ "wheel" "libvirtd" "networkmanager" ];
users.users.root.hashedPasswordFile = sops.secrets.bogale-passwd.path;
};
sops = {
secrets = {
awg2-spec = {};
bogale-passwd = {};
};
templates.awg2-conf.content = ''
${config.sops.placeholder.awg-obf}
${config.sops.placeholder.awg2-spec}
'';
};
virtualisation = {
spiceUSBRedirection.enable = true;
libvirtd = {
enable = true;
qemu = {
swtpm.enable = true;
vhostUserPackages = [ pkgs.virtiofsd ];
};
};
};
networking = {
hostName = "nixos-desktop";
firewall.allowedTCPPorts = [ 8000 ];
wg-quick.interfaces.awg0 = {
address = [ "10.0.0.3/32" "fc00::3/128" ];
configFile = config.sops.templates.awg2-conf.path;
};
networkmanager.ensureProfiles.profiles = {
dhcp-eth.connection = {
id = "dhcp-eth";
type = "ethernet";
};
home-wifi = {
wifi.ssid = "bogale_5";
ipv6.addresses = "fc01::3/64";
ipv4.addresses = "10.1.0.3/16";
wifi-security.psk = "$BOGALE_5_PSK";
};
phone-wifi = {
wifi.ssid = "Hello world";
connection = {
type = "wifi";
id = "phone-wifi";
};
wifi-security = {
key-mgmt = "sae";
psk = "$HELLO_WORLD_PSK";
};
};
};
};
services = {
tuned.enable = true;
pipewire = {
enable = true;
pulse.enable = true;
};
upower = {
enable = true;
percentageCritical = 10;
criticalPowerAction = "Suspend";
allowRiskyCriticalPowerAction = true;
};
greetd = {
enable = true;
settings.default_session = {
user = "greeter";
command = "${pkgs.noctalia-greeter}/bin/noctalia-greeter-session";
};
};
displayManager.noctalia-greeter = {
enable = true;
settings.cursor.size = 24;
passwordlessSyncUsers = [ "bogale" ];
cursorTheme = {
name = "Bibata-Modern-Amber";
package = pkgs.bibata-cursors;
};
};
};
}