refactoring for iServer and isWorkstation: part 1

This commit is contained in:
William 2025-03-13 13:17:31 -03:00
parent 94f540b2d0
commit af1d9ac368
37 changed files with 663 additions and 508 deletions

View file

@ -1,26 +0,0 @@
{ pkgs, ... }:
{
boot = {
plymouth.enable = true;
initrd.systemd.enable = true;
loader.efi.efiSysMountPoint = "/boot/efi";
kernelPackages = pkgs.linuxPackages_xanmod_latest;
extraModprobeConfig = ''
options bluetooth disable_ertm=1
'';
kernel.sysctl = {
"net.ipv4.tcp_mtu_probing" = 1;
};
kernelParams = [
"quiet"
"splash"
"i2c-dev"
"i2c-piix4"
"loglevel=3"
"udev.log_priority=3"
"rd.udev.log_level=3"
"rd.systemd.show_status=false"
];
};
}

View file

@ -2,15 +2,8 @@
{
imports = [
./boot.nix
./hardware.nix
./home-manager.nix
./impermanence.nix
./nix.nix
./packages.nix
./services.nix
./stylix.nix
./users.nix
./virtualisation.nix
];
}

View file

@ -1,13 +0,0 @@
{ ... }:
{
hardware = {
xpadneo.enable = true;
bluetooth.enable = true;
steam-hardware.enable = true; # Allow steam client to manage controllers
graphics.enable32Bit = true; # For OpenGL games
i2c.enable = true;
};
security.rtkit.enable = true; # Needed for pipewire to acquire realtime priority
}

View file

@ -1,13 +0,0 @@
{ inputs, ... }:
{
environment.etc."channels/nixpkgs".source = inputs.nixpkgs.outPath;
nix = {
registry.nixpkgs.flake = inputs.nixpkgs;
nixPath = [
"nixpkgs=${inputs.nixpkgs}"
"/nix/var/nix/profiles/per-user/root/channels"
];
};
}

View file

@ -1,137 +0,0 @@
{ inputs, pkgs, ... }:
let
kdepkgs = with pkgs.kdePackages; [
ark
dolphin-plugins
kolourpaint
];
kwrite = pkgs.symlinkJoin {
name = "kwrite";
paths = [ pkgs.kdePackages.kate ];
postBuild = ''
rm -rf $out/bin/kate \
$out/bin/.kate-wrapped \
$out/share/applications/org.kde.kate.desktop \
$out/share/man \
$out/share/icons/hicolor/*/apps/kate.png \
$out/share/icons/hicolor/scalable/apps/kate.svg \
$out/share/appdata/org.kde.kate.appdata.xml
'';
};
in
{
environment.systemPackages =
with pkgs;
[
adwaita-icon-theme
aspell
aspellDicts.de
aspellDicts.en
aspellDicts.en-computers
aspellDicts.pt_BR
bat
bitwarden-desktop
clonehero
deploy-rs
distrobox
fd
firefox
freecad-wayland
fzf
gimp
heroic
inkscape
junction
kara
kde-rounded-corners
kwrite
libfido2
libreoffice-qt
# lilipod BROKEN
mangohud
microsoft-edge
mission-center
mpv
nextcloud-client
nixfmt-rfc-style
nixos-firewall-tool
nix-init
nix-output-monitor
obsidian
obs-studio
onlyoffice-desktopeditors
orca-slicer
p7zip
plasma-panel-colorizer
prismlauncher
protonup
quickemu
quickgui
qview
qbittorrent
ripgrep
rnote
steam-run
tor-browser
ungoogled-chromium
unrar
ventoy
vesktop
]
++ kdepkgs;
services.flatpak = {
enable = true;
packages = [
"com.github.k4zmu2a.spacecadetpinball"
"com.github.tchx84.Flatseal"
"com.steamgriddb.SGDBoop"
"app.zen_browser.zen"
"io.github.Foldex.AdwSteamGtk"
"io.itch.itch"
"org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/24.08"
];
uninstallUnmanaged = true;
update.auto.enable = true;
};
programs = {
adb.enable = true;
steam.enable = true;
dconf.enable = true;
nix-ld.enable = true;
kdeconnect.enable = true;
partition-manager.enable = true;
gamemode.enable = true;
nix-index-database.comma.enable = true;
appimage = {
enable = true;
binfmt = true;
};
nh = {
enable = true;
flake = "/home/user/Projects/personal/nix-config";
};
};
fonts = {
fontDir.enable = true;
packages = with pkgs; [
corefonts
noto-fonts-cjk-sans
roboto
];
};
environment.plasma6.excludePackages = (
with pkgs.kdePackages;
[
discover
elisa
gwenview
kate
khelpcenter
oxygen
]
);
}

View file

@ -1,67 +0,0 @@
{
inputs,
pkgs,
...
}:
{
services = {
printing.enable = true;
udev.packages = with pkgs; [ yubikey-personalization ];
displayManager.sddm = {
enable = true;
wayland = {
enable = true;
compositor = "kwin";
};
};
desktopManager.plasma6.enable = true;
tailscale.useRoutingFeatures = "client";
nginx = {
enable = true;
virtualHosts."localhost".root = inputs.homepage;
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
wireplumber.enable = true;
};
# greetd = {
# enable = true;
# settings = {
# default_session.command =
# let
# xSessions = "${config.services.displayManager.sessionData.desktops}/share/xsessions";
# wlSessions = "${config.services.displayManager.sessionData.desktops}/share/wayland-sessions";
# in
# ''
# ${pkgs.greetd.tuigreet}/bin/tuigreet \
# --remember \
# --asterisks \
# --time \
# --greeting "NixOS" \
# --sessions ${xSessions}:${wlSessions}
# '';
# initial_session = {
# command = ''
# ${pkgs.kdePackages.plasma-workspace}/bin/startplasma-wayland &> /dev/null
# '';
# user = "user";
# };
# };
# };
};
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = with pkgs; [
xdg-desktop-portal-kde
xdg-desktop-portal-gtk
xdg-desktop-portal-gnome
];
};
}

View file

@ -1,29 +0,0 @@
{ ... }:
{
environment.sessionVariables = rec {
KDEHOME = "$XDG_CONFIG_HOME/kde4"; # Stops kde from placing a .kde4 folder in the home dir
NIXOS_OZONE_WL = "1"; # Forces chromium and most electron apps to run in wayland
};
users.users = {
user = {
description = "William";
uid = 1000;
extraGroups = [
"uaccess" # Needed for HID dev
"dialout" # Needed for arduino dev
"libvirt"
"libvirtd"
"adbusers"
"i2c"
];
};
ewans = {
description = "Ewans";
isNormalUser = true;
uid = 1001;
hashedPassword = "$y$j9T$yHLUDvj6bDIP19dchU.aA/$OY4qeFNtx/GvI.VUYx4LapHiiVwi0MEvs8AT0HN7j58";
};
};
}

View file

@ -1,8 +0,0 @@
{ ... }:
{
virtualisation = {
libvirtd.enable = true;
lxd.enable = true;
};
}

View file

@ -31,7 +31,7 @@ in
{
imports = [
# Host-common imports
../common
../modules
# Desktop-common imports
./common
# Host-specific imports