basic gui setup for desktop

This commit is contained in:
bogale 2026-10-08 18:28:20 +09:00
commit d0c1518df6
10 changed files with 228 additions and 114 deletions

View file

@ -1,32 +1,16 @@
{ config, lib, pkgs, ... }:
{
time.timeZone = "Asia/Chita";
system.stateVersion = "26.05";
system.stateVersion = "26.11";
imports = [ ./mods/pxeboot.nix ];
i18n.defaultLocale = "ru_RU.UTF-8";
swapDevices = [ { device = "/var/swapfile"; } ];
users.users.root.hashedPasswordFile = "/secrets/user/root-pw";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
console = {
font = "cyr-sun16";
keyMap = "ruwin_alt_sh-UTF-8";
};
environment.systemPackages = with pkgs; [
jq _7zz sbctl
openssl grub2_efi
];
fileSystems = let
noatime.options = [ "noatime" ];
in {
"/" = noatime;
"/boot" = noatime;
};
services = {
logind.settings.Login.HandleLidSwitch = "ignore";
openssh = {
enable = true;
settings.PasswordAuthentication = false;
};
environment.systemPackages = with pkgs; [ jq _7zz sbctl openssl ];
fileSystems = {
"/".options = [ "noatime" ];
"/boot".options = [ "noatime" ];
};
systemd.tmpfiles.rules = [
"d /root/backup"
@ -45,16 +29,26 @@
panicOnChecksumMismatch = true;
};
};
networking = {
firewall = {
allowedTCPPorts = [ 53 80 2049 ];
allowedUDPPorts = [ 53 67 69 547 ];
};
nat = {
services = {
logind.settings.Login.HandleLidSwitch = "ignore";
openssh = {
enable = true;
enableIPv6 = true;
internalInterfaces = [ "enp1s0" ];
settings.PasswordAuthentication = false;
};
dnsmasq = {
enable = true;
settings = {
enable-ra = true;
no-resolv = true;
cache-size = 4096;
bogus-priv = true;
domain-needed = true;
server = [ "1.1.1.2" "2606:4700:4700::1112"
"1.0.0.2" "2606:4700:4700::1002" ];
};
};
};
networking = {
wg-quick.interfaces.awg0 = {
type = "amneziawg";
peers = [ {
@ -66,35 +60,19 @@
enable = true;
ensureProfiles = {
environmentFiles = [ "/secrets/wifi.env" ];
profiles = {
ethernet = {
ipv6 = {
method = "manual";
addresses = "fc02::1/64";
};
ipv4 = {
method = "manual";
addresses = "10.2.0.1/16";
};
connection = {
id = "ethernet";
type = "802-3-ethernet";
};
profiles.wifi = {
wifi-security.key-mgmt = "sae";
ipv6 = {
method = "manual";
gateway = "fc01::1";
};
wifi = {
wifi-security.key-mgmt = "sae";
ipv6 = {
method = "manual";
gateway = "fc01::1";
};
ipv4 = {
method = "manual";
gateway = "10.1.0.1";
};
connection = {
id = "wifi";
type = "802-11-wireless";
};
ipv4 = {
method = "manual";
gateway = "10.1.0.1";
};
connection = {
id = "wifi";
type = "802-11-wireless";
};
};
};