diff --git a/flake.nix b/flake.nix index 08e52f5..a4d459b 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,27 @@ { description = "Felix's NixOS configurations"; + outputs = inputs @ { + nixpkgs, + home-manager, + ... + }: { + nixosConfigurations = { + wildfire = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;}; + modules = [ + ./hosts/wildfire/configuration.nix + ]; + }; + hurricane = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;}; + modules = [ + ./hosts/hurricane/configuration.nix + ]; + }; + }; + }; + inputs = { # NixOS nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; @@ -56,39 +77,4 @@ }; }; }; - - outputs = inputs @ { - nixpkgs, - home-manager, - ... - }: { - nixosConfigurations = { - wildfire = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; - modules = [ - ./hosts/wildfire/configuration.nix - home-manager.nixosModules.home-manager - { - home-manager.backupFileExtension = "backupHM"; - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.schulze = import ./modules/home/schulze.nix; - } - ]; - }; - hurricane = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; - modules = [ - ./hosts/hurricane/configuration.nix - home-manager.nixosModules.home-manager - { - home-manager.backupFileExtension = "backupHM"; - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.schulze = import ./modules/home/schulze.nix; - } - ]; - }; - }; - }; } diff --git a/hosts/hurricane/configuration.nix b/hosts/hurricane/configuration.nix index 164a240..e444dd5 100644 --- a/hosts/hurricane/configuration.nix +++ b/hosts/hurricane/configuration.nix @@ -1,6 +1,6 @@ { - config, pkgs, + inputs, ... }: { imports = [ @@ -9,6 +9,8 @@ ../../modules/desktops/hyprland-desktop.nix ../../modules/programs.nix ]; + # Extend home-manager configuration with host-specific monitor settings + home-manager.users.schulze.imports = [./hyprland-monitors.nix]; networking.hostName = "hurricane"; diff --git a/hosts/hurricane/hyprland-monitors.nix b/hosts/hurricane/hyprland-monitors.nix new file mode 100644 index 0000000..30b07d5 --- /dev/null +++ b/hosts/hurricane/hyprland-monitors.nix @@ -0,0 +1,7 @@ +{...}: { + # Home Manager Hyprland monitors + wayland.windowManager.hyprland.extraConfig = '' + #monitor = DP-3, 2560x1440@143.97, 1920x-360, auto; + #monitor = HDMI-A-1, 1920x1080@60, 0x0, auto; + ''; +} diff --git a/hosts/wildfire/configuration.nix b/hosts/wildfire/configuration.nix index e1510e8..786ae00 100644 --- a/hosts/wildfire/configuration.nix +++ b/hosts/wildfire/configuration.nix @@ -1,10 +1,16 @@ -{pkgs, ...}: { +{ + pkgs, + inputs, + ... +}: { imports = [ ./hardware-configuration.nix ../../modules/common.nix ../../modules/desktops/hyprland-desktop.nix ../../modules/programs.nix ]; + # Extend home-manager configuration with host-specific monitor settings + home-manager.users.schulze.imports = [./hyprland-monitors.nix]; # Encrypted drive boot.initrd.luks.devices."luks-1728f038-43a6-4e0d-b7dd-19a4c1083605".device = "/dev/disk/by-uuid/1728f038-43a6-4e0d-b7dd-19a4c1083605"; diff --git a/hosts/wildfire/hyprland-monitors.nix b/hosts/wildfire/hyprland-monitors.nix new file mode 100644 index 0000000..ef0549d --- /dev/null +++ b/hosts/wildfire/hyprland-monitors.nix @@ -0,0 +1,7 @@ +{...}: { + # Home Manager Hyprland monitors + wayland.windowManager.hyprland.extraConfig = '' + monitor = DP-3, 2560x1440@143.97, 1920x-360, auto; + monitor = HDMI-A-1, 1920x1080@60, 0x0, auto; + ''; +} diff --git a/modules/common.nix b/modules/common.nix index e0171dc..b68eb45 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -3,6 +3,21 @@ inputs, ... }: { + imports = [ + inputs.home-manager.nixosModules.home-manager + ]; + + # Home Manager configuration + home-manager = { + backupFileExtension = "backupHM"; + useGlobalPkgs = true; + useUserPackages = true; + users.schulze.imports = [ + ./home/hyprland.nix + ./home/home-manager.nix + ]; + }; + # Define the main user account users = { users.schulze = { diff --git a/modules/home/home-manager.nix b/modules/home/home-manager.nix new file mode 100644 index 0000000..da72256 --- /dev/null +++ b/modules/home/home-manager.nix @@ -0,0 +1,3 @@ +{ + home.stateVersion = "25.05"; # Dont change +} diff --git a/modules/home/schulze.nix b/modules/home/hyprland.nix similarity index 84% rename from modules/home/schulze.nix rename to modules/home/hyprland.nix index d6d1a2f..d0f4f6e 100644 --- a/modules/home/schulze.nix +++ b/modules/home/hyprland.nix @@ -1,10 +1,4 @@ { - config, - pkgs, - ... -}: { - home.stateVersion = "25.05"; # Dont change - # Hyprland settings wayland.windowManager.hyprland.enable = true; wayland.windowManager.hyprland.settings = { @@ -57,8 +51,4 @@ 9) ); }; - wayland.windowManager.hyprland.extraConfig = '' - monitor = DP-3, 2560x1440@143.97, 1920x-360, auto; - monitor = HDMI-A-1, 1920x1080@60, 0x0, auto; - ''; }