From 94e0c053b6f1947cbfbfd83f03ee057e9c0067a9 Mon Sep 17 00:00:00 2001 From: Whovian9369 Date: Wed, 4 Sep 2024 00:15:51 -0400 Subject: [PATCH] Properly add GUI bits to `my_nixos_vm`. --- flake.nix | 5 ++- system/my_nixos_vm/configuration.nix | 2 + system/my_nixos_vm/gui-kde6.nix | 67 ++++++++++++++++++++++++++++ system/my_nixos_vm/packages.nix | 18 +++----- system/my_nixos_vm/vmware.nix | 10 +++++ 5 files changed, 89 insertions(+), 13 deletions(-) create mode 100644 system/my_nixos_vm/gui-kde6.nix create mode 100644 system/my_nixos_vm/vmware.nix diff --git a/flake.nix b/flake.nix index de5afa4..6733983 100644 --- a/flake.nix +++ b/flake.nix @@ -135,9 +135,9 @@ How to use config in an install: Mount partitions. - $ sudo nixos-install -v --root /mnt --flake "git+https://git.n2.pm/whovian/nixos_config#CONFIG_NAME" + $ sudo nixos-install -v --root /mnt --flake "github:Whovian9369/whovian_nixos_config#CONFIG_NAME" Example for nixosConfigurations.my_nixos_vm: - $ sudo nixos-install -v --root /mnt --flake "git+https://git.n2.pm/whovian/nixos_config#my_nixos_vm" + $ sudo nixos-install -v --root /mnt --flake "github:Whovian9369/whovian_nixos_config#my_nixos_vm" */ nixosConfigurations = { @@ -311,6 +311,7 @@ my_nixos_vm = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; + specialArgs = { inherit rom-properties; }; modules = [ ./system/my_nixos_vm/configuration.nix # ./system/dotnet_os_codename-workaround.nix diff --git a/system/my_nixos_vm/configuration.nix b/system/my_nixos_vm/configuration.nix index 911a285..36aa51e 100644 --- a/system/my_nixos_vm/configuration.nix +++ b/system/my_nixos_vm/configuration.nix @@ -10,6 +10,8 @@ imports = [ ./packages.nix ./hardware-configuration.nix # Include the results of the hardware scan. + ./gui-kde6.nix # GUI Stuff (DE + WM) + ./vmware.nix # VMWAre Guest Stuff ]; networking.hostName = "my_nixos_vm"; diff --git a/system/my_nixos_vm/gui-kde6.nix b/system/my_nixos_vm/gui-kde6.nix new file mode 100644 index 0000000..c796349 --- /dev/null +++ b/system/my_nixos_vm/gui-kde6.nix @@ -0,0 +1,67 @@ +{ + lib, + pkgs, + rom-properties, + ... +}: +{ + # Use PipeWire + security.rtkit.enable = true; + + services = { + # Use PipeWire + pipewire = { + enable = true; + alsa.enable = true; + pulse.enable = true; + jack.enable = true; + }; + # Enable the X11 windowing system. + xserver = { + enable = true; + xkb.layout = "us"; + }; + # Enable the KDE Desktop Environment. + displayManager.sddm.enable = true; + desktopManager.plasma6.enable = true; + }; + + # Fonts + fonts.enableDefaultPackages = false; + fonts.packages = [ + # fonts.enableDefaultPackages + pkgs.dejavu_fonts + pkgs.freefont_ttf + pkgs.gyre-fonts # TrueType substitutes for standard PostScript fonts + pkgs.liberation_ttf + pkgs.unifont + pkgs.noto-fonts-color-emoji + # fonts.enableDefaultPackages + pkgs.unifont_upper + pkgs.noto-fonts + pkgs.noto-fonts-cjk-sans + pkgs.corefonts + ]; + fonts.fontconfig.cache32Bit = true; + # dconf + programs.dconf.enable = true; + # KDE6 + # Enable the KDE Desktop Environment. + xdg.icons.enable = true; + environment.sessionVariables.NIXOS_OZONE_WL = "1"; + environment.systemPackages = [ + pkgs.kdePackages.sddm-kcm + pkgs.kdePackages.audiocd-kio + pkgs.kdePackages.skanpage + pkgs.kdePackages.isoimagewriter + pkgs.kdePackages.krdc # RDP + # pkgs.kdePackages.neochat # Matrix + pkgs.kdePackages.breeze-icons + pkgs.kdePackages.discover # "KDE and Plasma resources management GUI" + pkgs.kdePackages.partitionmanager # Partition Manager + pkgs.exfatprogs + pkgs.sublime4 + rom-properties.packages.x86_64-linux.rp_kde6 + # (rom-properties.packages.x86_64-linux.rp_kde6.overrideAttrs (oldAttrs: { patches = oldAttrs.patches ++ [ ../files/rp_larger_icons.diff ]; })) + ]; +} diff --git a/system/my_nixos_vm/packages.nix b/system/my_nixos_vm/packages.nix index 0c45268..35e8570 100644 --- a/system/my_nixos_vm/packages.nix +++ b/system/my_nixos_vm/packages.nix @@ -11,20 +11,16 @@ nixpkgs = { config = { allowUnfree = true; + permittedInsecurePackages = [ + "openssl-1.1.1w" + ]; }; }; programs = { - zsh = { - enable = true; - }; - nano = { - enable = true; - }; - - screen = { - enable = true; - }; - + firefox.enable = true; + nano.enable = true; + screen.enable = true; + zsh.enable = true; }; } diff --git a/system/my_nixos_vm/vmware.nix b/system/my_nixos_vm/vmware.nix new file mode 100644 index 0000000..cd5b7b0 --- /dev/null +++ b/system/my_nixos_vm/vmware.nix @@ -0,0 +1,10 @@ +{ + lib, + options, + pkgs, + ... +}: +{ + virtualisation.vmware.guest.enable = true; + services.xserver.videoDrivers = [ "vmware" ]; +}