From e30250fd23c9713644b4a5bb0710082a8d36d8e6 Mon Sep 17 00:00:00 2001 From: roxwize Date: Sun, 9 Mar 2025 15:19:18 -0400 Subject: [PATCH] ~ --- TODO | 2 + nixos/flake.nix | 1 - nixos/hosts/desktop.nix | 130 -------------------- nixos/hosts/ioides/configuration.nix | 128 +++++++++++++++++-- nixos/{ => hosts/ioides}/packages.nix | 5 +- nixos/hosts/qemu/configuration.nix | 20 --- nixos/hosts/qemu/hardware-configuration.nix | 33 ----- nixos/pkgs/wxwabbitemu/default.nix | 2 +- 8 files changed, 125 insertions(+), 196 deletions(-) delete mode 100644 nixos/hosts/desktop.nix rename nixos/{ => hosts/ioides}/packages.nix (98%) delete mode 100644 nixos/hosts/qemu/configuration.nix delete mode 100644 nixos/hosts/qemu/hardware-configuration.nix diff --git a/TODO b/TODO index 89b1d82..0e82c39 100644 --- a/TODO +++ b/TODO @@ -42,6 +42,8 @@ [ ] Should you be using both libretro easyrpg and standalone easyrpg at the same time like you are now ???????? [ ] FUN IDEA::: Do you see ? https://github.com/nix-community/raspberry-pi-nix/blob/master/rpi/default.nix ??? see if it might be worth trying to make an options set across your config for very non granular at a glance configurations ... (see also https://github.com/nanzhong/env/blob/master/machines/devpi/configuration.nix) [ ] FUN IDEA 2::: Hey Whats Up what if you did the same thing but built your regular host (ioides) as an ISO so that like. hoooly shit. you could like share it to the woRLD VIA AN ISO AND SHTUFF. Fucking massive bro +[x] IMPORTANT!!!!: consolidate most system configurations since there seems to be the assumption that Everything Is Ioides (i.e. move packages.nix to ioides/) + +- [ ] Make things consolidated wherever possible, only generalize them/widen their scope once it becomes necessary (like when you turned part of base.nix into desktop.nix) (e.g. when you need to manage something identically across hosts, put it in an import file, otherwise put it in an attrset that both hosts import and configure it from there) [x] Get PulseAudio sound controls on polybar to work [x] Add desktop switching to windows (context menu?) diff --git a/nixos/flake.nix b/nixos/flake.nix index a4362c4..5e1d2a4 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -36,7 +36,6 @@ }; in builtins.listToAttrs [ (mkSystem "ioides" "x86_64") # main pc - (mkSystem "qemu" "x86_64") # emulatr........... (mkSystem "near" "aarch64") # raspberry pi 5 home server ]; diff --git a/nixos/hosts/desktop.nix b/nixos/hosts/desktop.nix deleted file mode 100644 index ce37e07..0000000 --- a/nixos/hosts/desktop.nix +++ /dev/null @@ -1,130 +0,0 @@ -{ config, pkgs, inputs, ... }: { - imports = [ - inputs.nix-flatpak.nixosModules.nix-flatpak - ./base.nix - ../packages.nix - ]; - - boot = { - extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; - extraModprobeConfig = '' - options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 - ''; - supportedFilesystems = [ "ntfs" ]; - }; - - security.polkit.enable = true; - - networking.networkmanager.enable = true; - - programs = { - dconf.enable = true; - firefox.enable = true; - fish.enable = true; - gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; - nix-ld.enable = true; - steam = { - enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; - localNetworkGameTransfers.openFirewall = true; - }; - thunderbird = { - enable = true; - policies.DisableTelemetry = true; - }; - }; - - services = { - # Xorg - xserver = { - enable = true; - xkb.layout = "us"; - windowManager = { - cwm.enable = true; - openbox.enable = true; - twm.enable = true; - }; - }; - displayManager = { - sddm = { - enable = true; - settings = { - Autologin = { - User = "rae"; - Session = "none+openbox"; - }; - }; - theme = "catppuccin-mocha"; - }; - }; - - # Touchpad support - libinput.enable = true; - # Sound - pipewire = { - enable = true; - alsa.enable = true; - pulse.enable = true; - jack.enable = true; - }; - # CUPS printing - # Can be configured at http://127.0.0.1:631/ - # Local printers are host-specific (see `hardware.printers`) - # Avahi enables IPP Everywhere - printing.enable = true; - avahi = { - enable = true; - nssmdns4 = true; - openFirewall = true; - }; - # misc - blueman.enable = true; - flatpak.enable = true; - }; - - hardware = { - bluetooth = { - enable = true; - powerOnBoot = true; - }; - opentabletdriver.enable = true; - }; - - xdg.portal = { - enable = true; - config = { - common = { - default = [ "gtk" ]; - }; - }; - extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; - }; - - fonts = { - enableDefaultPackages = true; - fontconfig = { - enable = true; - defaultFonts = { - emoji = [ "Twitter Color Emoji" "Noto Color Emoji" ]; - monospace = [ "Fira Code Light" ]; - }; - }; - packages = with pkgs; [ - fira-code - gohufont - nasin-nanpa - noto-fonts - noto-fonts-cjk-sans - noto-fonts-emoji - twemoji-color-font - ]; - }; - - users.users.rae.shell = pkgs.fish; - - virtualisation.docker.enable = true; -} diff --git a/nixos/hosts/ioides/configuration.nix b/nixos/hosts/ioides/configuration.nix index b4b2c12..d1361a4 100644 --- a/nixos/hosts/ioides/configuration.nix +++ b/nixos/hosts/ioides/configuration.nix @@ -1,12 +1,17 @@ -{ config, lib, pkgs, ... }: +{ inputs, config, lib, pkgs, ... }: { imports = [ + inputs.nix-flatpak.nixosModules.nix-flatpak ./hardware-configuration.nix - ../desktop.nix + ./packages.nix ]; boot = { binfmt.emulatedSystems = [ "aarch64-linux" ]; + extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; + extraModprobeConfig = '' + options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 + ''; loader = { efi = { canTouchEfiVariables = false; @@ -19,6 +24,7 @@ devices = [ "nodev" ]; }; }; + supportedFilesystems = [ "ntfs" ]; }; # Music pendrive @@ -39,12 +45,14 @@ hosts = { "10.0.0.2" = [ "near" "near.local" ]; }; + networkmanager.enable = true; }; - services = { - xserver.videoDrivers = [ "nvidia" ]; - }; hardware = { + bluetooth = { + enable = true; + powerOnBoot = true; + }; graphics = { enable = true; extraPackages = with pkgs; [ @@ -61,11 +69,117 @@ nvidiaSettings = true; package = config.boot.kernelPackages.nvidiaPackages.stable; }; + opentabletdriver.enable = true; }; - fonts.fontconfig.subpixel.rgba = "rgb"; + + fonts = { + enableDefaultPackages = true; + fontconfig = { + enable = true; + defaultFonts = { + emoji = [ "Twitter Color Emoji" "Noto Color Emoji" ]; + monospace = [ "Fira Code Light" ]; + }; + subpixel.rgba = "rgb"; + }; + packages = with pkgs; [ + fira-code + gohufont + nasin-nanpa + noto-fonts + noto-fonts-cjk-sans + noto-fonts-emoji + twemoji-color-font + ]; + }; + + programs = { + dconf.enable = true; + firefox.enable = true; + fish.enable = true; + gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + nix-ld.enable = true; + steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + localNetworkGameTransfers.openFirewall = true; + }; + thunderbird = { + enable = true; + policies.DisableTelemetry = true; + }; + }; + + services = { + # Xorg + xserver = { + enable = true; + xkb.layout = "us"; + videoDrivers = [ "nvidia" ]; + windowManager = { + cwm.enable = true; + openbox.enable = true; + twm.enable = true; + }; + }; + displayManager = { + sddm = { + enable = true; + settings = { + Autologin = { + User = "rae"; + Session = "none+openbox"; + }; + }; + theme = "catppuccin-mocha"; + }; + }; + + # Touchpad support + libinput.enable = true; + # Sound + pipewire = { + enable = true; + alsa.enable = true; + pulse.enable = true; + jack.enable = true; + }; + # CUPS printing + # Can be configured at http://127.0.0.1:631/ + # Local printers are host-specific (see `hardware.printers`) + # Avahi enables IPP Everywhere + printing.enable = true; + avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + # misc + blueman.enable = true; + flatpak.enable = true; + }; + + security.polkit.enable = true; + + xdg.portal = { + enable = true; + config = { + common = { + default = [ "gtk" ]; + }; + }; + extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; + }; + + users.users.rae.shell = pkgs.fish; + + virtualisation.docker.enable = true; time.timeZone = "America/New_York"; system.stateVersion = "24.11"; } - diff --git a/nixos/packages.nix b/nixos/hosts/ioides/packages.nix similarity index 98% rename from nixos/packages.nix rename to nixos/hosts/ioides/packages.nix index 7ed6c6d..181dc50 100644 --- a/nixos/packages.nix +++ b/nixos/hosts/ioides/packages.nix @@ -1,8 +1,4 @@ { pkgs, ... }: { - # I'm not sure if you actually need stuff like GTK4 to be - # in here when it's really only used with nix-shell and the - # amount of time it saves during installation is probably - # only like a few seconds environment.systemPackages = with pkgs; [ # development bun # Incredibly fast JavaScript runtime, bundler, transpiler and package manager – all in one @@ -23,6 +19,7 @@ pnpm # Fast, disk space efficient package manager for JavaScript python313 # High-level dynamically-typed programming language vala # Compiler for GObject type system + wxwabbitemu #!Cross-platform TI-8x emulator based on Wabbitemu ## language servers mesonlsp # Meson nil # Nix diff --git a/nixos/hosts/qemu/configuration.nix b/nixos/hosts/qemu/configuration.nix deleted file mode 100644 index 2c3d866..0000000 --- a/nixos/hosts/qemu/configuration.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ ... }: -{ - imports = [ - ./hardware-configuration.nix - ../desktop.nix - ]; - - boot.loader = { - grub = { - enable = true; - device = "/dev/sda"; - }; - }; - - networking.hostName = "qemu"; - - time.timeZone = "America/New_York"; - - system.stateVersion = "24.11"; -} diff --git a/nixos/hosts/qemu/hardware-configuration.nix b/nixos/hosts/qemu/hardware-configuration.nix deleted file mode 100644 index eae39cf..0000000 --- a/nixos/hosts/qemu/hardware-configuration.nix +++ /dev/null @@ -1,33 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; - - boot.initrd.availableKernelModules = [ "ata_piix" "floppy" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/2812e740-47e5-4246-b9ef-9cf9900665fa"; - fsType = "ext4"; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/efc2c587-0227-4c85-a49d-0e508f1b75a6"; } - ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.ens3.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/nixos/pkgs/wxwabbitemu/default.nix b/nixos/pkgs/wxwabbitemu/default.nix index e597977..59b46e8 100644 --- a/nixos/pkgs/wxwabbitemu/default.nix +++ b/nixos/pkgs/wxwabbitemu/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, cmake, wxGTK32 }: stdenv.mkDerivation { +{ stdenv, fetchFromGitHub, cmake, wxGTK32, lib }: stdenv.mkDerivation { pname = "wxwabbitemu"; version = "0.1.0";