162 lines
4.6 KiB
Nix
162 lines
4.6 KiB
Nix
{
|
|
description = "MarkusZoppelt's Nix configuration";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
|
|
darwin = {
|
|
url = "github:nix-darwin/nix-darwin/nix-darwin-26.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-26.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
lanzaboote = {
|
|
url = "github:nix-community/lanzaboote/v1.1.0";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
llm-agents.url = "github:numtide/llm-agents.nix";
|
|
apple-silicon = {
|
|
url = "github:nix-community/nixos-apple-silicon";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
handy.url = "github:cjpais/Handy";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
darwin,
|
|
home-manager,
|
|
lanzaboote,
|
|
llm-agents,
|
|
apple-silicon,
|
|
handy,
|
|
}:
|
|
let
|
|
user = "mz";
|
|
name' = "Markus Zoppelt";
|
|
email = "markus@zoppelt.net";
|
|
colors = import ./lib/colors.nix;
|
|
specialArgs = {
|
|
inherit
|
|
user
|
|
name'
|
|
email
|
|
colors
|
|
;
|
|
};
|
|
in
|
|
{
|
|
nixosConfigurations = {
|
|
Gordon = nixpkgs.lib.nixosSystem {
|
|
inherit specialArgs;
|
|
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
lanzaboote.nixosModules.lanzaboote
|
|
handy.nixosModules.default
|
|
./lib/nix-settings.nix
|
|
./nixos/common.nix
|
|
./hosts/NixOS/configuration.nix
|
|
{
|
|
nixpkgs.overlays = [
|
|
llm-agents.overlays.shared-nixpkgs
|
|
];
|
|
}
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.extraSpecialArgs = {
|
|
inherit name' email colors;
|
|
};
|
|
home-manager.users."${user}" = {
|
|
imports = [
|
|
./home.nix
|
|
./nixos/desktop
|
|
handy.homeManagerModules.default
|
|
];
|
|
};
|
|
}
|
|
];
|
|
};
|
|
|
|
Asahi = nixpkgs.lib.nixosSystem {
|
|
inherit specialArgs;
|
|
|
|
system = "aarch64-linux";
|
|
modules = [
|
|
apple-silicon.nixosModules.apple-silicon-support
|
|
./lib/nix-settings.nix
|
|
./nixos/common.nix
|
|
./hosts/Asahi/configuration.nix
|
|
{
|
|
nixpkgs.overlays = [
|
|
llm-agents.overlays.shared-nixpkgs
|
|
(import ./hosts/Asahi/overlay.nix)
|
|
];
|
|
}
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.extraSpecialArgs = {
|
|
inherit name' email colors;
|
|
};
|
|
home-manager.users."${user}" = {
|
|
imports = [
|
|
./home.nix
|
|
./nixos/desktop
|
|
./hosts/Asahi/desktop.nix
|
|
];
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
darwinConfigurations = {
|
|
Darwin = darwin.lib.darwinSystem {
|
|
inherit specialArgs;
|
|
|
|
system = "aarch64-darwin";
|
|
modules = [
|
|
./lib/nix-settings.nix
|
|
./darwin.nix
|
|
{
|
|
nixpkgs.overlays = [
|
|
(final: prev: {
|
|
direnv = prev.direnv.overrideAttrs (_: {
|
|
doCheck = false;
|
|
});
|
|
})
|
|
llm-agents.overlays.shared-nixpkgs
|
|
];
|
|
}
|
|
home-manager.darwinModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = false;
|
|
home-manager.extraSpecialArgs = {
|
|
inherit name' email colors;
|
|
};
|
|
home-manager.users."${user}" = {
|
|
imports = [
|
|
./home.nix
|
|
];
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
checks.aarch64-darwin.mac = self.darwinConfigurations.Darwin.system;
|
|
checks.x86_64-linux.gordon = self.nixosConfigurations.Gordon.config.system.build.toplevel;
|
|
checks.aarch64-linux.asahi = self.nixosConfigurations.Asahi.config.system.build.toplevel;
|
|
formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.nixfmt-tree;
|
|
formatter.aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.nixfmt-tree;
|
|
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-tree;
|
|
};
|
|
}
|