blob: 99c098e4c4b38f67cab9f04d66ae85a366d1d544 [file] [log] [blame]
{
description = "Initialization flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
nix-vscode-extensions.inputs.nixpkgs.follows = "nixpkgs";
nix-vscode-extensions.inputs.flake-compat.follows = "lanzaboote/flake-compat";
nix-vscode-extensions.inputs.flake-utils.follows = "lanzaboote/flake-utils";
alacritty-themes.url = "github:rajasegar/alacritty-themes";
alacritty-themes.flake = false;
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
deploy-rs.url = "github:serokell/deploy-rs";
lanzaboote.url = "github:nix-community/lanzaboote";
lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager, deploy-rs, ... }@inputs: let
stateVersion = "23.11"; # Only change this number on a full config rewrite.
modulesFor = x: (nixpkgs.lib.pipe ./modules/${x} [
(import ./utils/nixFilesIn.nix nixpkgs.lib)
(map import)
]);
in {
nixosConfigurations.codedPC = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
inputs.lanzaboote.nixosModules.lanzaboote
{
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system = { inherit stateVersion; };
}
] ++ modulesFor "common" ++ modulesFor "codedPC";
specialArgs = { inherit inputs; flakeRoot = ./.; };
};
nixosConfigurations.codedPI = nixpkgs.lib.nixosSystem {
system = "amd64-linux";
modules = [
home-manager.nixosModules.home-manager
inputs.lanzaboote.nixosModules.lanzaboote
{
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system = { inherit stateVersion; };
}
] ++ modulesFor "common" ++ modulesFor "codedPI";
specialArgs = { inherit inputs; flakeRoot = ./.; };
};
deploy.nodes.codedPI.profiles.system = {
user = "coded";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.codedPI;
};
};
}