From d1e5130d3f5e21e79572ce2895e035299389a6c3 Mon Sep 17 00:00:00 2001 From: langedev Date: Sun, 19 Nov 2023 20:48:22 -0800 Subject: [PATCH] Add multihardware support --- configuration.nix | 14 ++++++-------- desktop.nix | 10 ++++++++++ hardware-configuration.nix => hardware/laptop.nix | 0 laptop.nix | 11 +++++++++++ modules/network/bluetooth/default.nix | 3 +++ modules/system/default.nix | 3 --- 6 files changed, 30 insertions(+), 11 deletions(-) create mode 100644 desktop.nix rename hardware-configuration.nix => hardware/laptop.nix (100%) create mode 100644 laptop.nix diff --git a/configuration.nix b/configuration.nix index 0f448f4..ff30656 100644 --- a/configuration.nix +++ b/configuration.nix @@ -4,12 +4,15 @@ { config, pkgs, ... }: -{ +let + systemType = "laptop"; + #systemType = "desktop"; +in { nix.package = pkgs.nixUnstable; imports = [ - # Hardware Settings (hardware scan) - ./hardware-configuration.nix + # Hardware Specific Configuration + ./${systemType}.nix # System essentials (boot, lang, hostname, ...) ./modules/system @@ -21,15 +24,10 @@ ./modules/audio/pipewire ./modules/shell/fish # This enables fish as the default shell - ./modules/network/browsers/librewolf - ./modules/network/networking ./modules/network/syncthing - ./modules/network/bluetooth ./modules/login/greetd - - # ./modules/graphics/nvidia ]; nixpkgs.config.allowUnfree = true; diff --git a/desktop.nix b/desktop.nix new file mode 100644 index 0000000..18573f3 --- /dev/null +++ b/desktop.nix @@ -0,0 +1,10 @@ +{ config, pkgs, lib, ... }: + +{ + networking.hostName = "onizuka"; + imports = [ + ./hardware/desktop.nix + + # ./modules/graphics/nvidia + ]; +} diff --git a/hardware-configuration.nix b/hardware/laptop.nix similarity index 100% rename from hardware-configuration.nix rename to hardware/laptop.nix diff --git a/laptop.nix b/laptop.nix new file mode 100644 index 0000000..0019c68 --- /dev/null +++ b/laptop.nix @@ -0,0 +1,11 @@ +{ config, pkgs, lib, ... }: + +{ + networking.hostName = "jibril"; + imports = [ + ./hardware/laptop.nix + + ./modules/network/networking + ./modules/network/bluetooth + ]; +} diff --git a/modules/network/bluetooth/default.nix b/modules/network/bluetooth/default.nix index 1e76c8f..739a9bd 100644 --- a/modules/network/bluetooth/default.nix +++ b/modules/network/bluetooth/default.nix @@ -4,4 +4,7 @@ hardware.bluetooth.enable = true; hardware.bluetooth.powerOnBoot = true; services.blueman.enable = true; + environment.systemPackages = with pkgs; [ + blueman + ]; } diff --git a/modules/system/default.nix b/modules/system/default.nix index 81eaf8b..b13e3d4 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -5,8 +5,6 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - networking.hostName = "jibril"; - time.timeZone = "America/Los_Angeles"; i18n.defaultLocale = "en_US.UTF-8"; @@ -17,7 +15,6 @@ neovim nnn xdg-user-dirs - blueman ]; # XDG Compliance