From ef6b1a72e4af7b62b34743c79951c64669430b95 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Mon, 15 Jan 2024 19:56:37 +0100 Subject: [PATCH] Clean up systms --- flake.lock | 13 -------- flake.nix | 6 ---- modules/default.nix | 1 + modules/keyboard/default.nix | 26 +++++++++++++++ modules/nix/default.nix | 1 - packages/default.nix | 1 - systems/{tuny => benzaiten}/default.nix | 2 -- .../hardware-configuration.nix | 1 - systems/default.nix | 26 +++++++++------ systems/ebisu/default.nix | 21 ++++++++++++ systems/ebisu/hardware-configuration.nix | 32 +++++++++++++++++++ systems/{yokai => jurojin}/default.nix | 6 ---- systems/{yokai => jurojin}/hardware.nix | 1 - systems/{installer => kamimusubi}/default.nix | 8 ----- systems/{kami => kuraokami}/default.nix | 16 +++------- systems/{kami => kuraokami}/hardware.nix | 0 .../{inugami => sukuna-biko-na}/default.nix | 5 --- 17 files changed, 101 insertions(+), 65 deletions(-) create mode 100644 modules/keyboard/default.nix rename systems/{tuny => benzaiten}/default.nix (93%) rename systems/{tuny => benzaiten}/hardware-configuration.nix (93%) create mode 100644 systems/ebisu/default.nix create mode 100644 systems/ebisu/hardware-configuration.nix rename systems/{yokai => jurojin}/default.nix (90%) rename systems/{yokai => jurojin}/hardware.nix (95%) rename systems/{installer => kamimusubi}/default.nix (87%) rename systems/{kami => kuraokami}/default.nix (90%) rename systems/{kami => kuraokami}/hardware.nix (100%) rename systems/{inugami => sukuna-biko-na}/default.nix (89%) diff --git a/flake.lock b/flake.lock index 91893e9..da3a10f 100644 --- a/flake.lock +++ b/flake.lock @@ -466,18 +466,6 @@ "type": "github" } }, - "prism-game-options-patch": { - "flake": false, - "locked": { - "narHash": "sha256-Susj3gS7Xa0dTZh9g6NPzlTE6gi0ncI2m84HCrBP3gQ=", - "type": "file", - "url": "https://patch-diff.githubusercontent.com/raw/PrismLauncher/PrismLauncher/pull/907.patch" - }, - "original": { - "type": "file", - "url": "https://patch-diff.githubusercontent.com/raw/PrismLauncher/PrismLauncher/pull/907.patch" - } - }, "prismlauncher": { "inputs": { "flake-compat": [ @@ -532,7 +520,6 @@ "nixpkgs-lib": "nixpkgs-lib", "openrgb": "openrgb", "pre-commit-hooks": "pre-commit-hooks_2", - "prism-game-options-patch": "prism-game-options-patch", "prismlauncher": "prismlauncher", "tela-icon-theme": "tela-icon-theme" } diff --git a/flake.nix b/flake.nix index 76a7747..9e8d121 100644 --- a/flake.nix +++ b/flake.nix @@ -73,12 +73,6 @@ }; nix-systems.url = "github:nix-systems/default"; nix-filter.url = "github:numtide/nix-filter"; - - # Patches - prism-game-options-patch = { - url = "https://patch-diff.githubusercontent.com/raw/PrismLauncher/PrismLauncher/pull/907.patch"; - flake = false; - }; }; outputs = inputs@{ self, nixpkgs, ... }: { diff --git a/modules/default.nix b/modules/default.nix index 2127bdb..e4e6b6b 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -9,6 +9,7 @@ ./boot ./events ./kodi + ./keyboard ./local ./minecraft-server ./moodle-dl diff --git a/modules/keyboard/default.nix b/modules/keyboard/default.nix new file mode 100644 index 0000000..053a8a8 --- /dev/null +++ b/modules/keyboard/default.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, ... }: + +let cfg = config.jopejoe1.keyboard; +in { + options.jopejoe1.keyboard = { + enable = lib.mkEnableOption "Enable Keyboard"; + layout = lib.mkOption { + type = lib.types.str; + default = "us"; + description = lib.mdDoc "Keyboard Layout."; + }; + }; + + config = lib.mkIf cfg.enable { + services = { + xserver = { + layout = cfg.layout; + }; + }; + console = { + enable = true; + keyMap = "de"; + }; + }; +} + diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 0b16498..7ff0174 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -66,7 +66,6 @@ in { ]; }; - system.stateVersion = "24.05"; systemd.services.nix-daemon.serviceConfig.LimitNOFILE = lib.mkForce 1048576000; }; } diff --git a/packages/default.nix b/packages/default.nix index fb76a15..d29735e 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -16,7 +16,6 @@ prismlauncher-withExtraStuff = inputs.prismlauncher.packages.${system}.prismlauncher.overrideAttrs (old: { patches = (old.patches or [ ]) ++ [ - inputs.prism-game-options-patch ./prism-ftb.patch ]; }); diff --git a/systems/tuny/default.nix b/systems/benzaiten/default.nix similarity index 93% rename from systems/tuny/default.nix rename to systems/benzaiten/default.nix index db98f55..4646a8e 100644 --- a/systems/tuny/default.nix +++ b/systems/benzaiten/default.nix @@ -22,8 +22,6 @@ ssh.enable = true; }; - networking = { hostName = "tuny"; }; - environment.systemPackages = with pkgs; [ mixxx ]; time.timeZone = "Europe/Berlin"; diff --git a/systems/tuny/hardware-configuration.nix b/systems/benzaiten/hardware-configuration.nix similarity index 93% rename from systems/tuny/hardware-configuration.nix rename to systems/benzaiten/hardware-configuration.nix index f563227..e8e4bdc 100644 --- a/systems/tuny/hardware-configuration.nix +++ b/systems/benzaiten/hardware-configuration.nix @@ -27,7 +27,6 @@ networking.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/systems/default.nix b/systems/default.nix index 393d8ec..f4a2d6a 100644 --- a/systems/default.nix +++ b/systems/default.nix @@ -1,20 +1,28 @@ { self, nixpkgs, inputs }: let - mkSystem = system: name: nixpkgs.lib.nixosSystem { - inherit system; + mkSystem = systemConfig: name: nixpkgs.lib.nixosSystem rec { + system = builtins.replaceStrings ["-unknown-" "-gnu"] ["-" ""] systemConfig; specialArgs = inputs; modules = [ - name + ./${name} self.outputs.nixosModules.default + { + system.stateVersion = "24.05"; + nixpkgs.hostPlatform = { + system = system; + config = systemConfig; + }; + networking.hostName = name; + } ]; }; in { - kami = mkSystem "x86_64-linux" ./kami; - yokai = mkSystem "aarch64-linux" ./yokai; - inugami = mkSystem "aarch64-linux" ./inugami; - tuny = mkSystem "x86_64-linux" ./tuny; - installer = mkSystem "x86_64-linux" ./installer; - steamdeck = mkSystem "x86_64-linux" ./steamdeck; + kuraokami = mkSystem "x86_64-unknown-linux-gnu" "kuraokami"; + jurojin = mkSystem "aarch64-unknown-linux-gnu" "jurojin"; + sukuna-biko-na = mkSystem "aarch64-unknown-linux-gnu" "sukuna-biko-na"; + benzaiten = mkSystem "x86_64-unknown-linux-gnu" "benzaiten"; + kamimusubi = mkSystem "x86_64-unknown-linux-gnu" "kamimusubi"; + ebisu = mkSystem "x86_64-unknown-linux-gnu" "ebisu"; } diff --git a/systems/ebisu/default.nix b/systems/ebisu/default.nix new file mode 100644 index 0000000..0aa76e6 --- /dev/null +++ b/systems/ebisu/default.nix @@ -0,0 +1,21 @@ +{ pkgs }: + +{ + + jopejoe1 = { + audio = { enable = true; }; + bluetooth.enable = true; + local.enable = true; + nix.enable = true; + user = { + jopejoe1.enable = true; + root.enable = true; + }; + boot.systemd.enable = true; + }; + + + environment.systemPackages = with pkgs; [ moonlight-qt ]; + + time.timeZone = "Europe/Berlin"; +} diff --git a/systems/ebisu/hardware-configuration.nix b/systems/ebisu/hardware-configuration.nix new file mode 100644 index 0000000..e8e4bdc --- /dev/null +++ b/systems/ebisu/hardware-configuration.nix @@ -0,0 +1,32 @@ +{ config, lib, modulesPath, ... }: + +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ehci_pci" + "ahci" + "usb_storage" + "sd_mod" + "sr_mod" + "sdhci_pci" + "rtsx_pci_sdmmc" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/1cae8f88-5db6-4c97-88e4-350c35275d5c"; + fsType = "ext4"; + }; + + swapDevices = + [{ device = "/dev/disk/by-uuid/8569ee66-b939-4ce8-a94a-dca7df5e301b"; }]; + + networking.useDHCP = lib.mkDefault true; + + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/systems/yokai/default.nix b/systems/jurojin/default.nix similarity index 90% rename from systems/yokai/default.nix rename to systems/jurojin/default.nix index 28fd290..bd0555b 100644 --- a/systems/yokai/default.nix +++ b/systems/jurojin/default.nix @@ -21,7 +21,6 @@ }; networking = { - hostName = "yokai"; hostId = "af13bbec"; }; @@ -50,11 +49,6 @@ }; services.xserver = { layout = "us"; }; - nixpkgs.hostPlatform = { - system = "aarch64-linux"; - config = "aarch64-unknown-linux-gnu"; - }; - boot = { supportedFilesystems = [ "ntfs" "btrfs" "zfs" ]; kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; diff --git a/systems/yokai/hardware.nix b/systems/jurojin/hardware.nix similarity index 95% rename from systems/yokai/hardware.nix rename to systems/jurojin/hardware.nix index ce7af5a..b234944 100644 --- a/systems/yokai/hardware.nix +++ b/systems/jurojin/hardware.nix @@ -32,7 +32,6 @@ # networking.interfaces.enp6s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; - #nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.enableRedistributableFirmware = true; } diff --git a/systems/installer/default.nix b/systems/kamimusubi/default.nix similarity index 87% rename from systems/installer/default.nix rename to systems/kamimusubi/default.nix index 3144c2d..c51fa9c 100644 --- a/systems/installer/default.nix +++ b/systems/kamimusubi/default.nix @@ -17,17 +17,9 @@ }; networking = { - hostName = "installer"; wireless.enable = lib.mkForce false; }; - nixpkgs = { - hostPlatform = { - system = "x86_64-linux"; - config = "x86_64-unknown-linux-gnu"; - }; - }; - time.timeZone = "Europe/Berlin"; diff --git a/systems/kami/default.nix b/systems/kuraokami/default.nix similarity index 90% rename from systems/kami/default.nix rename to systems/kuraokami/default.nix index 05fa814..9320ba1 100644 --- a/systems/kami/default.nix +++ b/systems/kuraokami/default.nix @@ -27,6 +27,10 @@ sway.enable = true; minecraft-server.enable = true; repo-sync.enable = true; + keyboard = { + enable = true; + layout = "de"; + }; user = { jopejoe1.enable = true; root.enable = true; @@ -35,7 +39,6 @@ }; networking = { - hostName = "kami"; hostId = "16c22faf"; }; @@ -44,11 +47,6 @@ enable = true; motherboard = "intel"; }; - fwupd.enable = true; - xserver = { - videoDrivers = [ "nvidia" ]; - layout = "de"; - }; }; nixpkgs = { @@ -57,8 +55,6 @@ cudaCapabilities = [ "8.6" ]; }; hostPlatform = { - system = "x86_64-linux"; - config = "x86_64-unknown-linux-gnu"; # gcc.arch = "alderlake"; }; }; @@ -105,10 +101,6 @@ kdeconnect.enable = true; gamemode.enable = true; }; - console = { - enable = true; - keyMap = "de"; - }; nix.settings.system-features = [ "gccarch-alderlake" "benchmark" "big-parallel" "kvm" "nixos-test" ]; } diff --git a/systems/kami/hardware.nix b/systems/kuraokami/hardware.nix similarity index 100% rename from systems/kami/hardware.nix rename to systems/kuraokami/hardware.nix diff --git a/systems/inugami/default.nix b/systems/sukuna-biko-na/default.nix similarity index 89% rename from systems/inugami/default.nix rename to systems/sukuna-biko-na/default.nix index 3e4f60e..ed2b052 100644 --- a/systems/inugami/default.nix +++ b/systems/sukuna-biko-na/default.nix @@ -37,10 +37,5 @@ useDHCP = lib.mkDefault true; }; - nixpkgs.hostPlatform = { - system = "aarch64-linux"; - config = "aarch64-unknown-linux-gnu"; - }; - powerManagement.cpuFreqGovernor = "ondemand"; }