nixos-config/flake.nix

75 lines
1.9 KiB
Nix
Raw Normal View History

2021-11-20 04:08:18 +00:00
{
inputs = {
2023-06-06 00:51:11 +00:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
2022-05-10 20:44:45 +00:00
nixos-hardware.url = "github:nixos/nixos-hardware";
2021-11-20 04:08:18 +00:00
home-manager = {
2023-06-06 00:51:11 +00:00
url = "github:nix-community/home-manager/release-23.05";
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;
2022-03-09 17:51:47 +00:00
pkgs-unstable = import nixpkgs-unstable { config.allowUnfree = true; system = 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
];
};
};
}