nix-system/flake.nix
ant bb2d34b58b
Some checks failed
/ build-all (push) Failing after 31s
add os config for ks
2025-09-02 14:47:23 +02:00

124 lines
3.5 KiB
Nix

{
description = "Home Manager configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nixgl = {
url = "github:nix-community/nixGL";
inputs.nixpkgs.follows = "nixpkgs";
};
st-flexipatch.url = "https://git.antoinevaure.fr/ant/st-flexipatch/archive/master.zip";
};
outputs =
{ self, nixpkgs, ... }@inputs:
let
system = "x86_64-linux";
pkgs = inputs.nixpkgs.legacyPackages.${system};
pkgs-unstable = inputs.unstable.legacyPackages.${system};
nixgl = inputs.nixgl.packages.${system};
osConfig = name: nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./os/${name}/configuration.nix
];
};
in
{
homeConfigurations."anvaure@Allegro23-12" = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit pkgs-unstable;
variant = "allegro";
};
modules = [
{ home.username = "anvaure"; }
./home/home.nix
{ home.packages = [ nixgl.nixGLIntel ]; }
{ targets.genericLinux.enable = true; }
{ home.packages = [ inputs.st-flexipatch.packages.${system}.st ]; }
./home/syncthing.nix
];
};
homeConfigurations."ant@hs" = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit pkgs-unstable;
variant = "hs";
};
modules = [
{ home.username = "ant"; }
./home/home.nix
];
};
homeConfigurations."ant@basado" = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit pkgs-unstable;
variant = "default";
inherit inputs;
};
modules = [
{ home.username = "ant"; }
./home/home.nix
{ home.packages = [ inputs.st-flexipatch.packages.${system}.st ]; }
./home/syncthing.nix
];
};
homeConfigurations."ant@moon" = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit pkgs-unstable;
variant = "moon";
inherit inputs;
};
modules = [
{ home.username = "ant"; }
./home/home.nix
{ home.packages = [ inputs.st-flexipatch.packages.${system}.st ]; }
./home/syncthing.nix
];
};
nixosConfigurations.basado = osConfig "basado";
nixosConfigurations.moon = osConfig "moon";
nixosConfigurations.hs = osConfig "hs";
nixosConfigurations.ks = osConfig "ks";
build-all = pkgs.runCommandNoCC "build-all" {
buildInputs =
let osDerivation = name: self.nixosConfigurations.${name}.config.system.build.toplevel; in
let homeDerivation = name: self.homeConfigurations.${name}.activationPackage; in
[
(osDerivation "basado")
(osDerivation "moon")
(osDerivation "hs")
(osDerivation "ks")
(homeDerivation "anvaure@Allegro23-12")
(homeDerivation "ant@hs")
(homeDerivation "ant@basado")
(homeDerivation "ant@moon")
];
} ''
echo Build all derivations
mkdir -p $out
'';
};
}