47 lines
1.2 KiB
Nix
47 lines
1.2 KiB
Nix
|
|
{
|
||
|
|
description = "Nixos config flake";
|
||
|
|
|
||
|
|
inputs = {
|
||
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||
|
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
||
|
|
|
||
|
|
home-manager = {
|
||
|
|
url = "github:nix-community/home-manager";
|
||
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
outputs = {
|
||
|
|
self, nixpkgs, ...
|
||
|
|
} @ inputs: let
|
||
|
|
systems = [
|
||
|
|
"aarch64-linux"
|
||
|
|
"i686-linux"
|
||
|
|
"x86_64-linux"
|
||
|
|
"aarch64-darwin"
|
||
|
|
"x86_64-darwin"
|
||
|
|
];
|
||
|
|
# This is a function that generates an attribute by calling a function you
|
||
|
|
# pass to it, with each system as an argument
|
||
|
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||
|
|
systemModules = import ./modules/system;
|
||
|
|
homeModules = import ./modules/home;
|
||
|
|
in {
|
||
|
|
nixosConfigurations = {
|
||
|
|
default = nixpkgs.lib.nixosSystem {
|
||
|
|
specialArgs = {inherit inputs systemModules homeModules;};
|
||
|
|
modules = [
|
||
|
|
./hosts/default/configuration.nix
|
||
|
|
];
|
||
|
|
};
|
||
|
|
|
||
|
|
remus = nixpkgs.lib.nixosSystem {
|
||
|
|
specialArgs = {inherit inputs systemModules homeModules;};
|
||
|
|
modules = [
|
||
|
|
./hosts/remus/configuration.nix
|
||
|
|
];
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
}
|