enable plasma6 on shodan so it can be used as the desktop session

This commit is contained in:
Lillian Violet 2026-03-13 01:36:05 +01:00
parent 2d7e7bee3c
commit 40d928eb87
8 changed files with 346 additions and 321 deletions

View file

@ -1,5 +1,10 @@
{ lib, config, ...}: {
let cfg = config.preservationSetup; in { lib,
config,
...
}: let
cfg = config.preservationSetup;
in {
options = { options = {
preservationSetup.enable = lib.mkEnableOption "Enable setup of preservation of files in /persistent"; preservationSetup.enable = lib.mkEnableOption "Enable setup of preservation of files in /persistent";
global.desktop = lib.mkOption { global.desktop = lib.mkOption {
@ -15,14 +20,14 @@ let cfg = config.preservationSetup; in {
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
preservation = { preservation = {
# the module doesn't do anything unless it is enabled # the module doesn't do anything unless it is enabled
enable = true; enable = true;
preserveAt."/persistent" = { preserveAt."/persistent" = {
# preserve system directories # preserve system directories
directories = [ directories =
[
#Shared #Shared
"/var/lib/sbctl" "/var/lib/sbctl"
"/var/lib/bluetooth" "/var/lib/bluetooth"
@ -44,11 +49,13 @@ let cfg = config.preservationSetup; in {
directory = "/var/secrets"; directory = "/var/secrets";
inInitrd = true; inInitrd = true;
} }
] ++ lib.mkIf (cfg.desktop == true) [ ]
++ lib.mkIf (cfg.desktop == true) [
#Desktop #Desktop
"/var/lib/decky-loader" "/var/lib/decky-loader"
"/var/lib/flatpak" "/var/lib/flatpak"
] ++ lib.mkIf (cfg.server == true) [ ]
++ lib.mkIf (cfg.server == true) [
#Server #Server
"/var/lib/continuwuity" "/var/lib/continuwuity"
"/var/lib/dhcpcd" "/var/lib/dhcpcd"
@ -108,12 +115,14 @@ let cfg = config.preservationSetup; in {
commonMountOptions = [ commonMountOptions = [
"x-gvfs-hide" "x-gvfs-hide"
]; ];
directories = [ directories =
[
{ {
directory = ".ssh"; directory = ".ssh";
mode = "0700"; mode = "0700";
} }
] ++ lib.mkIf (cfg.desktop == true) [ ]
++ lib.mkIf (cfg.desktop == true) [
#Desktop #Desktop
".local/state/wireplumber" ".local/state/wireplumber"
".local/share/direnv" ".local/share/direnv"
@ -152,6 +161,7 @@ let cfg = config.preservationSetup; in {
".config/sops" ".config/sops"
".config/vesktop" ".config/vesktop"
".config/kde.org" ".config/kde.org"
".config/heroic"
]; ];
#Shared #Shared
files = [ files = [

View file

@ -1,5 +1,10 @@
{ lib, config, ...}: {
let cfg = config.sopsSetup; in { lib,
config,
...
}: let
cfg = config.sopsSetup;
in {
options = { options = {
sopsSetup.enable = lib.mkEnableOption "Enable Module"; sopsSetup.enable = lib.mkEnableOption "Enable Module";
global.desktop = lib.mkOption { global.desktop = lib.mkOption {

View file

@ -1,5 +1,11 @@
{ lib, config, pkgs, ...}: {
let cfg = config.stylixSetup; in { lib,
config,
pkgs,
...
}: let
cfg = config.stylixSetup;
in {
options = { options = {
stylixSetup.enable = lib.mkEnableOption "Enable Module"; stylixSetup.enable = lib.mkEnableOption "Enable Module";
}; };

View file

@ -173,8 +173,6 @@
# enable = true; # enable = true;
# wayland.enable = true; # wayland.enable = true;
# }; # };
displayManager.defaultSession = lib.mkDefault "plasma";
desktopManager.plasma6.enable = true;
desktopManager.plasma6.notoPackage = pkgs.atkinson-hyperlegible; desktopManager.plasma6.notoPackage = pkgs.atkinson-hyperlegible;
# Enable flatpak support # Enable flatpak support

View file

@ -41,15 +41,15 @@
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
virtualisation.spiceUSBRedirection.enable = true; virtualisation.spiceUSBRedirection.enable = true;
services = {
services.displayManager.plasma-login-manager = { displayManager.plasma-login-manager = {
enable = true; enable = true;
}; };
services.displayManager.defaultSession = "plasma"; displayManager.defaultSession = "plasma";
services.desktopManager.plasma6.enable = true; desktopManager.plasma6.enable = true;
services.samba = { samba = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
settings = { settings = {
@ -69,11 +69,12 @@
}; };
}; };
}; };
users.groups.samba.members = ["lillian"];
services.vpn-ip = { vpn-ip = {
ip = "3"; ip = "3";
}; };
};
users.groups.samba.members = ["lillian"];
networking = { networking = {
hostName = "EDI"; hostName = "EDI";

View file

@ -4,6 +4,7 @@
inputs, inputs,
outputs, outputs,
pkgs, pkgs,
lib,
... ...
}: { }: {
# You can import other NixOS modules here # You can import other NixOS modules here
@ -30,21 +31,22 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gparted gparted
]; ];
services = {
services.displayManager.plasma-login-manager = { displayManager.plasma-login-manager = {
enable = true; enable = true;
}; };
services.displayManager.defaultSession = "plasma"; displayManager.defaultSession = "plasma";
services.desktopManager.plasma6.enable = true; desktopManager.plasma6.enable = true;
services.vpn-ip = { vpn-ip = {
ip = "2"; ip = "2";
}; };
networking.hostName = "GLaDOS"; xserver.videoDrivers = ["amdgpu"];
};
services.xserver.videoDrivers = ["amdgpu"]; networking.hostName = "GLaDOS";
programs = { programs = {
steam = { steam = {
enable = true; enable = true;

View file

@ -52,11 +52,37 @@
kernelParams = ["quiet" "udev.log_priority=0" "fbcon=vc:2-6" "console=tty0"]; kernelParams = ["quiet" "udev.log_priority=0" "fbcon=vc:2-6" "console=tty0"];
plymouth.enable = true; plymouth.enable = true;
}; };
services.udev.extraRules = '' services = {
udev.extraRules = ''
KERNEL=="hidraw*", ATTRS{idVendor}=="2dc8", MODE="0660", TAG+="uaccess" KERNEL=="hidraw*", ATTRS{idVendor}=="2dc8", MODE="0660", TAG+="uaccess"
KERNEL=="hidraw*", KERNELS=="*2DC8:*", MODE="0660", TAG+="uaccess" KERNEL=="hidraw*", KERNELS=="*2DC8:*", MODE="0660", TAG+="uaccess"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2dc8", MODE="0666" SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2dc8", MODE="0666"
''; '';
vpn-ip = {
ip = "4";
};
openssh = {
enable = true;
settings = {
# require public key authentication for better security
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
};
};
desktopManager.plasma6.enable = true;
displayManager = {
# defaultSession = "plasma";
sddm.wayland.enable = lib.mkForce true;
sddm.settings = {
Autologin = {
Session = "plasma.desktop";
User = "lillian";
};
};
};
};
zramSwap.enable = false; zramSwap.enable = false;
networking = { networking = {
domain = ""; domain = "";
@ -72,32 +98,8 @@
hostName = "shodan"; hostName = "shodan";
}; };
services.vpn-ip = {
ip = "4";
};
xdg.portal.extraPortals = [pkgs.kdePackages.xdg-desktop-portal-kde]; xdg.portal.extraPortals = [pkgs.kdePackages.xdg-desktop-portal-kde];
services = {
openssh = {
enable = true;
settings = {
# require public key authentication for better security
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
};
};
displayManager = {
# defaultSession = "plasma";
sddm.wayland.enable = lib.mkForce true;
sddm.settings = {
Autologin = {
Session = "plasma.desktop";
User = "lillian";
};
};
};
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# Custom tools # Custom tools

View file

@ -132,6 +132,7 @@
".config/sops" ".config/sops"
".config/vesktop" ".config/vesktop"
".config/kde.org" ".config/kde.org"
".config/heroic"
]; ];
#Shared #Shared
files = [ files = [