From beaab5fddaadf62a0b2f540ed604147afa4c22c1 Mon Sep 17 00:00:00 2001 From: caandt Date: Thu, 24 Oct 2024 02:01:46 -0500 Subject: [PATCH] multi system support --- flake.nix | 4 ++-- system/{ => common}/audio.nix | 0 system/{ => common}/bash.nix | 0 system/{ => common}/boot.nix | 0 system/{ => common}/configuration.nix | 3 --- system/{ => common}/default.nix | 1 - system/{ => common}/display.nix | 2 -- system/{ => common}/locale.nix | 0 system/{ => common}/plasma.nix | 0 system/{ => common}/security.nix | 0 system/{ => common}/users.nix | 0 system/{ => common}/virt.nix | 0 system/hyuganatsu/default.nix | 15 +++++++++++++++ .../{ => hyuganatsu}/hardware-configuration.nix | 0 14 files changed, 17 insertions(+), 8 deletions(-) rename system/{ => common}/audio.nix (100%) rename system/{ => common}/bash.nix (100%) rename system/{ => common}/boot.nix (100%) rename system/{ => common}/configuration.nix (91%) rename system/{ => common}/default.nix (86%) rename system/{ => common}/display.nix (82%) rename system/{ => common}/locale.nix (100%) rename system/{ => common}/plasma.nix (100%) rename system/{ => common}/security.nix (100%) rename system/{ => common}/users.nix (100%) rename system/{ => common}/virt.nix (100%) create mode 100644 system/hyuganatsu/default.nix rename system/{ => hyuganatsu}/hardware-configuration.nix (100%) diff --git a/flake.nix b/flake.nix index 6c1cdf6..cee816e 100644 --- a/flake.nix +++ b/flake.nix @@ -20,13 +20,13 @@ pkgs = nixpkgs.legacyPackages.${system}; pkgs-stable = nixpkgs-stable.legacyPackages.${system}; in { - nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { + nixosConfigurations.hyuganatsu = nixpkgs.lib.nixosSystem { inherit system; specialArgs = { inherit pkgs-stable; inherit flake-programs-sqlite; }; - modules = [ ./system ]; + modules = [ system/hyuganatsu ]; }; homeConfigurations.ahnwuoa = home-manager.lib.homeManagerConfiguration { inherit pkgs; diff --git a/system/audio.nix b/system/common/audio.nix similarity index 100% rename from system/audio.nix rename to system/common/audio.nix diff --git a/system/bash.nix b/system/common/bash.nix similarity index 100% rename from system/bash.nix rename to system/common/bash.nix diff --git a/system/boot.nix b/system/common/boot.nix similarity index 100% rename from system/boot.nix rename to system/common/boot.nix diff --git a/system/configuration.nix b/system/common/configuration.nix similarity index 91% rename from system/configuration.nix rename to system/common/configuration.nix index c3f1489..89c9ace 100644 --- a/system/configuration.nix +++ b/system/common/configuration.nix @@ -11,11 +11,8 @@ boot.tmp.useTmpfs = true; - networking.hostName = "nixos"; networking.networkmanager.enable = true; - time.timeZone = "America/Chicago"; - environment.systemPackages = with pkgs; [ neovim wget diff --git a/system/default.nix b/system/common/default.nix similarity index 86% rename from system/default.nix rename to system/common/default.nix index f5fb311..57c359f 100644 --- a/system/default.nix +++ b/system/common/default.nix @@ -7,7 +7,6 @@ ./boot.nix ./configuration.nix ./display.nix - ./hardware-configuration.nix ./locale.nix ./plasma.nix ./security.nix diff --git a/system/display.nix b/system/common/display.nix similarity index 82% rename from system/display.nix rename to system/common/display.nix index 67b25ac..4c18d04 100644 --- a/system/display.nix +++ b/system/common/display.nix @@ -9,8 +9,6 @@ desktopManager.plasma5.enable = true; autoRepeatDelay = 200; autoRepeatInterval = 30; - videoDrivers = [ "amdgpu" ]; - deviceSection = ''Option "TearFree" "true"''; }; services.libinput = { enable = true; diff --git a/system/locale.nix b/system/common/locale.nix similarity index 100% rename from system/locale.nix rename to system/common/locale.nix diff --git a/system/plasma.nix b/system/common/plasma.nix similarity index 100% rename from system/plasma.nix rename to system/common/plasma.nix diff --git a/system/security.nix b/system/common/security.nix similarity index 100% rename from system/security.nix rename to system/common/security.nix diff --git a/system/users.nix b/system/common/users.nix similarity index 100% rename from system/users.nix rename to system/common/users.nix diff --git a/system/virt.nix b/system/common/virt.nix similarity index 100% rename from system/virt.nix rename to system/common/virt.nix diff --git a/system/hyuganatsu/default.nix b/system/hyuganatsu/default.nix new file mode 100644 index 0000000..d69f7b6 --- /dev/null +++ b/system/hyuganatsu/default.nix @@ -0,0 +1,15 @@ +{ ... }: + +{ + imports = [ + ../common + ./hardware-configuration.nix + ]; + + networking.hostName = "hyuganatsu"; + time.timeZone = "America/Chicago"; + services.xserver = { + videoDrivers = [ "amdgpu" ]; + deviceSection = ''Option "TearFree" "true"''; + }; +} diff --git a/system/hardware-configuration.nix b/system/hyuganatsu/hardware-configuration.nix similarity index 100% rename from system/hardware-configuration.nix rename to system/hyuganatsu/hardware-configuration.nix