clean up flake.nix

This commit is contained in:
Daniel Lundin 2024-10-18 10:38:31 +02:00
parent 62f93b8d54
commit ad64ae1ecc
Signed by: dln
SSH key fingerprint: SHA256:dQy1Xj3UiqJYpKR5ggQ2bxgz4jCH8IF+k3AB8o0kmdI

View file

@ -18,72 +18,52 @@
}; };
outputs = outputs =
{ inputs@{
self, self,
nixpkgs, nixpkgs,
ghostty,
ghostty-hm, ghostty-hm,
home-manager, home-manager,
... ...
}@inputs: }:
let let
inherit (self) outputs; inherit (self) outputs;
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
mkHome = mkHome =
modules: modules:
home-manager.lib.homeManagerConfiguration { home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs outputs;
};
modules = [ modules = [
ghostty-hm.homeModules.default ghostty-hm.homeModules.default
./home/common ./home/common
] ++ modules; ] ++ modules;
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
}; };
mkHost = mkHost =
modules: modules:
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { specialArgs = {
inherit inputs outputs; inherit inputs outputs;
}; };
system = "x86_64-linux";
modules = [ ./common ] ++ modules; modules = [ ./common ] ++ modules;
}; };
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
];
forEachSystem =
f:
builtins.listToAttrs (
map (system: {
name = system;
value = f system;
}) supportedSystems
);
systemBits = forEachSystem (system: rec {
inherit system;
pkgs = import nixpkgs {
localSystem = system;
overlays = [ ];
};
});
forEachSystem' = f: forEachSystem (system: (f systemBits.${system}));
inherit (nixpkgs) lib;
in in
{ {
overlays = import ./overlays { inherit inputs outputs; }; overlays = import ./overlays { inherit inputs outputs; };
devShells = forEachSystem' ( devShell.${system} = pkgs.mkShell {
{ system, pkgs, ... }: packages = with pkgs; [
{ just
default = pkgs.mkShell { packages = [ ]; }; nh
} ];
); };
homeConfigurations = { homeConfigurations = {
"dln@dinky" = mkHome [ ./home/dln/dinky.nix ]; "dln@dinky" = mkHome [ ./home/dln/dinky.nix ];