nixfiles/flake.nix

95 lines
2.3 KiB
Nix
Raw Normal View History

2024-01-08 07:49:51 +03:00
{
description = "koi nixos";
nixConfig = {
experimental-features = [ "nix-command" "flakes" ];
extra-substituters = [
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.11";
2024-01-08 07:49:51 +03:00
vscode-server.url = "github:nix-community/nixos-vscode-server";
nil = {
url = "github:oxalica/nil";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.darwin.follows = "";
};
bootspec-secureboot = {
url = "github:vikanezrimaya/bootspec-secureboot";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-03-03 06:32:03 +03:00
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
2024-01-08 07:49:51 +03:00
};
outputs =
inputs@{ self
, nixpkgs
, nixpkgs-stable
2024-01-08 07:49:51 +03:00
, vscode-server
, agenix
, bootspec-secureboot
, home-manager
2024-03-03 06:32:03 +03:00
, nix-darwin
2024-01-08 07:49:51 +03:00
, ...
}:
let
2024-03-03 06:32:03 +03:00
specialArgs = {
inherit inputs;
abs = path: ./. + ("/" + path);
};
2024-01-08 07:49:51 +03:00
in
{
nixosConfigurations = {
2024-03-03 06:32:03 +03:00
koi = nixpkgs.lib.nixosSystem {
2024-01-08 07:49:51 +03:00
system = "x86_64-linux";
modules = [
agenix.nixosModules.default
bootspec-secureboot.nixosModules.bootspec-secureboot
home-manager.nixosModules.home-manager
2024-03-03 06:32:03 +03:00
{ home-manager.extraSpecialArgs = specialArgs; }
2024-01-08 07:49:51 +03:00
./hosts/koi/configuration.nix
];
specialArgs = specialArgs // {
pkgs-stable = import nixpkgs-stable {
system = "x86_64-linux";
config = { allowUnfree = true; };
};
};
2024-03-03 06:32:03 +03:00
};
};
darwinConfigurations = {
teidesu-osx = nix-darwin.lib.darwinSystem {
modules = [
agenix.darwinModules.default
home-manager.darwinModules.home-manager
{ home-manager.extraSpecialArgs = specialArgs; }
./hosts/teidesu-osx/configuration.nix
];
inherit specialArgs;
2024-01-08 07:49:51 +03:00
};
};
};
}