53 lines
1.9 KiB
Nix
53 lines
1.9 KiB
Nix
{
|
|
description = "pbsds' nix system/home profile flake";
|
|
|
|
# TODO: NUR
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11-small";
|
|
inputs.unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
|
inputs.home-manager.url = "github:nix-community/home-manager";
|
|
inputs.home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
# temp stuff
|
|
inputs.pbsds-polaris-pr = "github:pbsds/nixpkgs/polaris-14";
|
|
|
|
outputs = { self, nixpkgs, unstable, home-manager, ... }@inputs:
|
|
let
|
|
systems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
#"riscv64-linux"
|
|
];
|
|
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
|
nixosOverrides = {
|
|
disabledModules = [ "services/misc/polaris.nix" ];
|
|
imports = [ inputs.pbsds-polaris-14 + "/nixos/modules/services/misc/polaris.nix" ];
|
|
nixpkgs.overlays = [(final: prev: {
|
|
polaris = prev.callPackage (inputs.pbsds-polaris-14 + /pkgs/servers/polaris) { };
|
|
polaris-web = prev.callPackage (inputs.pbsds-polaris-14 + /pkgs/servers/polaris/web.nix) { };
|
|
})];
|
|
};
|
|
mkConfig = system: modules: nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = { inherit unstable inputs; };
|
|
modules = modules ++ [ ./base.nix nixosOverrides ({
|
|
# This makes commandline tools like 'nix run nixpkgs#hello'
|
|
# and 'nix-shell -p hello' use the same channel the system was built with
|
|
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
|
nix.registry.unstable.flake = inputs.unstable;
|
|
nix.nixPath = [
|
|
"nixpkgs=${inputs.nixpkgs}"
|
|
"unstable=${inputs.unstable}"
|
|
];
|
|
})];
|
|
};
|
|
in {
|
|
nixosConfigurations.noximilien = mkConfig "x86_64-linux" [ ./hosts/noximilien.nix ];
|
|
homeConfigurations = forAllSystems (system: {
|
|
pbsds = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
modules = [ ./users/pbsds/home ];
|
|
};
|
|
});
|
|
};
|
|
}
|