nixos-config/flake.nix

74 lines
1.8 KiB
Nix
Raw Normal View History

2021-11-20 04:08:18 +00:00
{
inputs = {
2021-12-01 00:35:26 +00:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11";
2022-03-09 17:51:27 +00:00
nixpkgs-unstable.url = "github:nixos/nixpkgs/staging-next";
2021-11-20 04:08:18 +00:00
home-manager = {
2021-11-29 04:20:42 +00:00
url = "github:nix-community/home-manager/release-21.11";
2021-11-20 04:08:18 +00:00
inputs.nixpkgs.follows = "nixpkgs";
};
rustybar = {
url = "github:mildlyfunctionalgays/rustybar";
inputs.nixpkgs.follows = "nixpkgs";
};
private.url = "git+ssh://git@github.com/artemist/nixos-config-private?ref=unified";
wip-pinebook-pro = {
url = "github:samueldr/wip-pinebook-pro";
flake = false;
};
};
2021-12-08 02:26:59 +00:00
outputs = { self, nixpkgs, home-manager, rustybar, private, wip-pinebook-pro, nixpkgs-unstable, ... } @ inputs:
2021-11-20 04:08:18 +00:00
let
2021-11-21 19:35:25 +00:00
makeSystem = conf: nixpkgs.lib.nixosSystem (nixpkgs.lib.recursiveUpdate conf
rec {
2021-11-20 04:08:18 +00:00
specialArgs = {
2021-11-21 18:53:51 +00:00
inherit inputs;
2021-12-08 02:26:59 +00:00
pkgs-unstable = nixpkgs-unstable.legacyPackages."${conf.system}";
2021-11-20 04:08:18 +00:00
};
2021-11-21 19:35:25 +00:00
modules = [
private.nixosModules.base
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = specialArgs;
}
] ++ (conf.modules or [ ]);
});
2021-11-20 04:08:18 +00:00
in
{
nixosConfigurations.starlight = makeSystem {
system = "x86_64-linux";
2021-11-21 19:35:25 +00:00
modules = [
2021-11-20 04:08:18 +00:00
./system/starlight
private.nixosModules.starlight
];
};
nixosConfigurations.rainbowdash = makeSystem {
system = "x86_64-linux";
2021-11-21 19:35:25 +00:00
modules = [
2021-11-20 04:08:18 +00:00
./system/rainbowdash
];
};
nixosConfigurations.spike = makeSystem {
system = "x86_64-linux";
2021-11-21 19:35:25 +00:00
modules = [
2021-11-20 04:08:18 +00:00
./system/spike
];
};
nixosConfigurations.mistmane = makeSystem {
system = "aarch64-linux";
2021-11-21 19:35:25 +00:00
modules = [
2021-11-20 04:08:18 +00:00
./system/mistmane
];
};
};
}