blob: 2ba0c237e0d8a8da4e85e808316357eed3c423e8 [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";
hyprland.url = "github:hyprwm/Hyprland";
anyrun = {
url = "github:Kirottu/anyrun";
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 = let
system = "x86_64-linux";
in nixpkgs.lib.nixosSystem {
inherit system;
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 system; flakeRoot = ./.; };
};
nixosConfigurations.codedPI = let
system = "amd64-linux";
in nixpkgs.lib.nixosSystem {
inherit system;
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 system; flakeRoot = ./.; };
};
deploy.nodes.codedPI.profiles.system = {
user = "coded";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.codedPI;
};
};
}