From 8aacb14fcab1ef1efd0458fb4a97e81ec852f472 Mon Sep 17 00:00:00 2001 From: Devin Finlinson Date: Tue, 3 Oct 2023 03:29:21 -0600 Subject: i've gone mad with power / attempted config from misterio77 to fix inputs errors // this created the default.nix files and commented out block in flake.nix // didn't work, misterio is insane / but misterio's nix-colors github tells you to pass it as a special arg into home-manager // was confused for a bit but got it as an extraSpecialArg cause of module bullshit /// good thing i had that old note or i'd have been stuck / now the inputs pass into home-manager // hoping to find a more elegant passthrough format / oh also moved home-manager's modules to modules folder because misterio does // probably because they're crazy but also because they've gone so deep it's somehow necessary for anything to work /// idk how or why, should have something to do with replacing/following default nix format? //// thus the default.nix files to add/override defaults? this is my longest commit message ever --- flake.nix | 113 +++++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 89 insertions(+), 24 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index b492f96..e24d71d 100644 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,13 @@ }; # modern window compositor - hyprland.url = "github:hyprwm/Hyprland"; + # hyprland.url = "github:hyprwm/Hyprland"; + hyprland = { + url = "github:hyprwm/Hyprland"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + + nix-colors.url = "github:misterio77/nix-colors"; #community wayland nixpkgs # nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland"; @@ -126,10 +132,63 @@ }; - # outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, home-manager, hyprland, ... }: { - outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, home-manager, wallpapers, catppuccin-btop, catppuccin-bat, catppuccin-alacritty, catppuccin-starship, catppuccin-hyprland, ... }: { - # outputs = inputs@{ self, ...}: with inputs; { - + # outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, home-manager, nix-colors, ... }: { + # outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, home-manager, wallpapers, nix-colors, catppuccin-btop, catppuccin-bat, catppuccin-alacritty, catppuccin-starship, catppuccin-hyprland, ... }: { + outputs = inputs@{ self, ...}: with inputs; { + # outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs: + # let + # inherit (self) outputs; + # lib = nixpkgs.lib //home-manager.lib; + # systems = [ "x86_64-linux" ]; + # forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system}); + # pkgsFor = lib.genAttrs systems (system: import nixpkgs { + # inherit system; + # config.allowUnfreee = true; + # }); + # in { + # inherit lib; + # nixosModules = import ./modules/nixos; + # homeManagerModules = import ./modules/home-manager; + # # templates = import ./templates; + + # # overlays = import ./overlays { inherit inputs outputs; }; + # # hydraJobs = import ./hydra.nix { inherit inputs outputs; }; + + # packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; }); + # # devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; }); + # # formatter = forEachSystem (pkgs: pkgs.nixpkgs-fmt); + + # # wallpapers = inherit wallpapers; #NOTE broken + + # nixosConfigurations = { + # # Main desktop + # khad = lib.nixosSystem { + # modules = [ ./machines/khad ]; + # specialArgs = { inherit inputs outputs; }; + # }; + # # Personal laptop + # nixos-zenbook = lib.nixosSystem { + # modules = [ ./machines/khad ]; + # specialArgs = { inherit inputs outputs; }; + # }; + # }; + + # homeConfigurations = { + # # Desktop + # "defin@khad" = lib.homeManagerConfiguration { + # modules = [ ./home-manager/home.nix ]; + # pkgs = pkgsFor.x86_64-linux; + # extraSpecialArgs = { inherit inputs outputs; }; + # }; + # # Laptop + # "defin@nixos-zenbook" = lib.homeManagerConfiguration { + # modules = [ ./home-manager/home.nix ]; + # pkgs = pkgsFor.x86_64-linux; + # extraSpecialArgs = { inherit inputs outputs; }; + # }; + # }; + # }; + nixosConfigurations = { nixos-zenbook = nixpkgs.lib.nixosSystem { @@ -149,21 +208,24 @@ home-manager.useUserPackages = true; home-manager.users.defin = import ./home-manager/home.nix; + home-manager.extraSpecialArgs = { inherit nix-colors catppuccin-btop catppuccin-helix catppuccin-starship; }; + # home-manager.extraSpecialArgs = { inherit (self) outputs; }; + # Optionally, use home-manager.extraSpecialArgs to pass # arguments to home.nix } # hyprland.homeManagerModules.default {wayland.windowManager.hyprland.enable = true;} - ./modules/hyprland.nix + ./modules/nixos/hyprland.nix - ./modules/bluetooth.nix - ./modules/environment.nix - ./modules/kde-connect.nix - ./modules/nix-common.nix - ./modules/services.nix - ./modules/steam.nix - ./modules/sway.nix - ./modules/system-packages.nix + ./modules/nixos/bluetooth.nix + ./modules/nixos/environment.nix + ./modules/nixos/kde-connect.nix + ./modules/nixos/nix-common.nix + ./modules/nixos/services.nix + ./modules/nixos/steam.nix + ./modules/nixos/sway.nix + ./modules/nixos/system-packages.nix # ./home-manager/home.nix @@ -171,6 +233,7 @@ # system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; # nix.registry.nixpkgs.flake = nixpkgs; ]; + # specialArgs = { inherit inputs; }; }; khad = nixpkgs.lib.nixosSystem { @@ -185,17 +248,19 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.defin = import ./home-manager/home.nix; + home-manager.extraSpecialArgs = { inherit nix-colors catppuccin-btop catppuccin-helix catppuccin-starship; }; + # home-manager.extraSpecialArgs = { inherit (self) outputs; }; } - ./modules/hyprland.nix - - ./modules/bluetooth.nix - ./modules/environment.nix - ./modules/kde-connect.nix - ./modules/nix-common.nix - ./modules/services.nix - ./modules/steam.nix - ./modules/sway.nix - ./modules/system-packages.nix + ./modules/nixos/hyprland.nix + + ./modules/nixos/bluetooth.nix + ./modules/nixos/environment.nix + ./modules/nixos/kde-connect.nix + ./modules/nixos/nix-common.nix + ./modules/nixos/services.nix + ./modules/nixos/steam.nix + ./modules/nixos/sway.nix + ./modules/nixos/system-packages.nix ]; }; }; -- cgit v1.2.3