refactor
This commit is contained in:
parent
850a188f4b
commit
1405e7f020
26
flake.nix
26
flake.nix
|
@ -47,7 +47,12 @@
|
|||
"aarch64-linux"
|
||||
#"riscv64-linux"
|
||||
];
|
||||
forAllSystems = f: nixlib.genAttrs systems (system: f system);
|
||||
#forAllSystems = f: nixlib.genAttrs systems (system: f system);
|
||||
forAllSystems = f: nixlib.genAttrs systems (system: f {
|
||||
inherit system;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
lib = nixpkgs.legacyPackages.${system}.lib;
|
||||
});
|
||||
overlays = nixlib.mapAttrsToList (name: val: val) self.overlays;
|
||||
|
||||
# TODO: move unstable and nur here?
|
||||
|
@ -90,13 +95,8 @@
|
|||
|
||||
inherit inputs;
|
||||
|
||||
overlays.remote-exec = (final: prev: {
|
||||
remote-exec = prev.python3Packages.callPackage "${inputs.pr-remote-exec}/pkgs/tools/misc/remote-exec" {};
|
||||
});
|
||||
|
||||
packages = forAllSystems(system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system}; in {
|
||||
inherit (self.overlays.remote-exec null pkgs) remote-exec;
|
||||
packages = forAllSystems({ pkgs, ... }: {
|
||||
remote-exec = pkgs.python3Packages.callPackage "${inputs.pr-remote-exec}/pkgs/tools/misc/remote-exec" {};
|
||||
});
|
||||
|
||||
nixosConfigurations = let nm = nixos-hardware.nixosModules; in {
|
||||
|
@ -107,19 +107,17 @@
|
|||
sopp = mkConfig "sopp" "x86_64-linux" (with nm; [ common-pc common-pc-ssd common-cpu-intel common-gpu-nvidia-nonprime ]);
|
||||
};
|
||||
|
||||
homeConfigurations = forAllSystems (system: let
|
||||
homeConfigurations = forAllSystems ({ pkgs, ... }: let
|
||||
mkHome = modules: home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
inherit modules;
|
||||
inherit pkgs modules;
|
||||
};
|
||||
in {
|
||||
pbsds = mkHome [ ./users/pbsds/home ];
|
||||
pbsds-gnome = mkHome [ ./users/pbsds/home/gnome.nix ];
|
||||
});
|
||||
|
||||
devShells = forAllSystems (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
remote-exec = pkgs.remote-exec or (self.overlays.remote-exec pkgs pkgs).remote-exec;
|
||||
devShells = forAllSystems ({ system, pkgs, ... }: let
|
||||
inherit (self.packages.${system}) remote-exec;
|
||||
nixos-rebuild-nom = pkgs.writeScriptBin "nixos-rebuild" ''
|
||||
exec ${pkgs.nixos-rebuild}/bin/nixos-rebuild "$@" |& ${pkgs.nix-output-monitor}/bin/nom
|
||||
'';
|
||||
|
|
Loading…
Reference in New Issue