extract desktop environment

This commit is contained in:
2026-09-23 17:49:58 -04:00
parent a21f35a83b
commit bab3cf7a5d
5 changed files with 106 additions and 170 deletions
+14 -48
View File
@@ -1,60 +1,17 @@
{ config, lib, pkgs, modulesPath, ... }:
{ config, lib, pkgs, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
../modules/backup-server.nix
../modules/desktop.nix
../modules/ssh.nix
../lilac.nix
];
networking.hostName = "backup";
time.timeZone = "America/Winnipeg";
systemd.sleep.settings.Sleep = {
AllowSuspend = "no";
AllowHibernation = "no";
AllowHybridSleep = "no";
AllowSuspendThenHibernate = "no";
};
i18n.defaultLocale = "en_US.UTF-8";
i18n.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";
};
services.xserver.enable = true;
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
services.xserver.xkb = {
layout = "us";
variant = "";
};
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
networking.wireless.enable = true;
networking.networkmanager.enable = true;
networking = {
hostName = "backup";
networkmanager.enable = true;
firewall = {
enable = true;
allowedUDPPorts = [ 51820 ];
@@ -74,6 +31,15 @@
};
};
time.timeZone = "America/Winnipeg";
systemd.sleep.settings.Sleep = {
AllowSuspend = "no";
AllowHibernation = "no";
AllowHybridSleep = "no";
AllowSuspendThenHibernate = "no";
};
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system.stateVersion = "26.05";
+31 -62
View File
@@ -1,55 +1,51 @@
{ config, lib, pkgs, modulesPath, ... }:
{ config, lib, pkgs, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
../modules/backup.nix
../modules/blog.nix
../modules/code.nix
../modules/desktop.nix
../modules/mail.nix
../modules/music.nix
../modules/photo.nix
../modules/ssh.nix
../modules/vault.nix
../lilac.nix
];
networking.hostName = "desktop";
environment.systemPackages = with pkgs; [
whipper
restic
];
networking = {
hostName = "desktop";
firewall = {
enable = true;
allowedUDPPorts = [ 51820 ];
trustedInterfaces = [ "wg0" ];
};
wireguard.interfaces."wg0" = {
ips = [ "10.0.0.2/32" ];
generatePrivateKeyFile = true;
privateKeyFile = "/var/lib/wireguard/wg0.key";
peers = [{
publicKey = "Tst6SiqoGLSoOAF9l5vT2vvR2RGJ/mFcoBL3BL5n90k=";
allowedIPs = [ "10.0.0.0/24" ];
endpoint = "216.128.177.13:51820";
persistentKeepalive = 25;
}];
};
};
programs.steam.enable = true;
time.timeZone = "America/Toronto";
i18n.defaultLocale = "en_US.UTF-8";
i18n.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";
};
services.xserver.enable = true;
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
services.xserver.xkb = {
layout = "us";
variant = "";
};
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "lilac";
@@ -78,33 +74,6 @@
};
};
environment.systemPackages = with pkgs; [
whipper
restic
];
programs.steam.enable = true;
networking = {
firewall = {
enable = true;
allowedUDPPorts = [ 51820 ];
trustedInterfaces = [ "wg0" ];
};
wireguard.interfaces."wg0" = {
ips = [ "10.0.0.2/32" ];
generatePrivateKeyFile = true;
privateKeyFile = "/var/lib/wireguard/wg0.key";
peers = [{
publicKey = "Tst6SiqoGLSoOAF9l5vT2vvR2RGJ/mFcoBL3BL5n90k=";
allowedIPs = [ "10.0.0.0/24" ];
endpoint = "216.128.177.13:51820";
persistentKeepalive = 25;
}];
};
};
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system.stateVersion = "26.05";
+12 -46
View File
@@ -1,55 +1,11 @@
{ config, lib, pkgs, modulesPath, ... }:
{ config, lib, pkgs, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
../modules/desktop.nix
../lilac.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
networking.hostName = "laptop";
networking.networkmanager.enable = true;
time.timeZone = "America/Toronto";
i18n.defaultLocale = "en_US.UTF-8";
i18n.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";
};
services.xserver.enable = true;
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
services.xserver.xkb = {
layout = "us";
variant = "";
};
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
hardware.graphics.enable = true;
hardware.graphics.enable32Bit = true;
hardware.enableRedistributableFirmware = true;
environment.systemPackages = with pkgs; [
mullvad-browser
signal-desktop
@@ -60,6 +16,9 @@
];
networking = {
hostName = "laptop";
networkmanager.enable = true;
firewall = {
enable = true;
allowedUDPPorts = [ 51820 ];
@@ -79,8 +38,13 @@
};
};
time.timeZone = "America/Toronto";
services.openssh.enable = true;
hardware.graphics.enable = true;
hardware.graphics.enable32Bit = true;
hardware.enableRedistributableFirmware = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
system.stateVersion = "26.05";
@@ -88,6 +52,8 @@
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
fileSystems."/" = {
device = "/dev/disk/by-uuid/379e6dd2-af45-4abc-8ff0-802791f76636";
+16 -14
View File
@@ -3,14 +3,12 @@
{
imports = [
../modules/ssh.nix
../lilac.nix
];
networking.hostName = "vps";
# forwarding inbound network traffic over wireguard
networking = {
hostName = "vps";
firewall = {
enable = true;
allowedTCPPorts = [ 80 443 ];
@@ -64,17 +62,21 @@
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system.stateVersion = "26.05";
boot = {
initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
kernelModules = [ ];
extraModulePackages = [ ];
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
loader.efi.efiSysMountPoint = "/boot/efi";
};
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
fileSystems."/" = { device = "/dev/vda2"; fsType = "ext4"; };
fileSystems."/boot/efi" = { device = "/dev/vda1"; fsType = "vfat"; };
fileSystems."/" = {
device = "/dev/vda2";
fsType = "ext4";
};
fileSystems."/boot/efi" = {
device = "/dev/vda1";
fsType = "vfat";
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";