From d828b0a628d6ad8137b0f4d651075ed0134203bb Mon Sep 17 00:00:00 2001 From: neverness Date: Sun, 22 Dec 2024 11:09:51 +0900 Subject: [PATCH] ya v ahue, ono workaet --- jetpure/default.nix | 4 +- jetpure/home/parts/hyprland.nix | 2 +- libx/builder.nix | 99 ++++++++++++++++----------------- 3 files changed, 51 insertions(+), 54 deletions(-) diff --git a/jetpure/default.nix b/jetpure/default.nix index 73294a1..6dec741 100644 --- a/jetpure/default.nix +++ b/jetpure/default.nix @@ -1,7 +1,7 @@ { inputs, lib, ... }: let # CONFIGURATION - X = import ../libx/builder.nix { + flake = import ../libx/builder.nix { inherit inputs lib; disk = "/dev/disk/by-uuid/d8440438-2f95-4854-b139-bf0a3e91a81f"; # VARIABLES @@ -22,5 +22,5 @@ let }; in { - flake = X.flake; + inherit flake; } diff --git a/jetpure/home/parts/hyprland.nix b/jetpure/home/parts/hyprland.nix index ab8ee42..3dd69a8 100644 --- a/jetpure/home/parts/hyprland.nix +++ b/jetpure/home/parts/hyprland.nix @@ -1,5 +1,4 @@ { pkgs, ... }: -with pkgs; { module.wm.hyprland = { autostart = [ "mako" ]; @@ -8,6 +7,7 @@ with pkgs; c = "--class"; pic = "$(xdg-user-dir PICTURES)/$(date +'scr_%d-%m-%y|%H:%M:%S.png')"; in + with pkgs; [ # PROGRAMS "$m, $rt, exec, kitty" diff --git a/libx/builder.nix b/libx/builder.nix index 6ffc7c5..11ed4ce 100644 --- a/libx/builder.nix +++ b/libx/builder.nix @@ -14,56 +14,53 @@ dev, ... }: -{ - flake = - let - # OTHER - inherit (inputs.nixpkgs.lib) nixosSystem; - inherit (inputs.home-manager.lib) homeManagerConfiguration; - pkgs = inputs.nixpkgs.legacyPackages.${plfrm}; - # NEEDS - sec = import ./secrets.nix; - x = - import ./options.nix { - inherit - theme - inputs - pkgs - lib - ; - } - // { - inherit - disk - hostName - userName - flakeDir - is - plfrm - ver - dev - sec - ; - }; - # ARGS - args = { inherit x inputs; }; - in - { - # CONFIGURATION - nixosConfigurations.${hostName} = nixosSystem { - modules = [ - ../modules/nixos - ../${hostName}/host - ]; - specialArgs = args; - }; - homeConfigurations.${userName} = homeManagerConfiguration { - modules = [ - ../modules/home - ../${hostName}/home - ]; - extraSpecialArgs = args; - inherit pkgs; - }; +let + # OTHER + inherit (inputs.nixpkgs.lib) nixosSystem; + inherit (inputs.home-manager.lib) homeManagerConfiguration; + pkgs = inputs.nixpkgs.legacyPackages.${plfrm}; + # NEEDS + sec = import ./secrets.nix; + x = + import ./options.nix { + inherit + theme + inputs + pkgs + lib + ; + } + // { + inherit + disk + hostName + userName + flakeDir + is + plfrm + ver + dev + sec + ; }; + # ARGS + args = { inherit x inputs; }; +in +{ + # CONFIGURATION + nixosConfigurations.${hostName} = nixosSystem { + modules = [ + ../modules/nixos + ../${hostName}/host + ]; + specialArgs = args; + }; + homeConfigurations.${userName} = homeManagerConfiguration { + modules = [ + ../modules/home + ../${hostName}/home + ]; + extraSpecialArgs = args; + inherit pkgs; + }; }