2024-04-05 22:04:41 -04:00
|
|
|
{
|
|
|
|
description = "Chris's system configuration";
|
|
|
|
inputs = {
|
2024-05-30 20:39:54 -04:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
2024-08-19 21:54:43 -04:00
|
|
|
nixunstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2024-05-30 20:39:54 -04:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2024-05-10 19:26:16 -04:00
|
|
|
deploy-rs = {
|
2024-05-30 20:39:54 -04:00
|
|
|
url = "github:serokell/deploy-rs";
|
2024-05-10 19:26:16 -04:00
|
|
|
inputs.utils.follows = "flake-utils";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-04-05 22:04:41 -04:00
|
|
|
home-manager = {
|
2024-05-30 20:39:54 -04:00
|
|
|
url = "github:nix-community/home-manager/release-24.05";
|
2024-04-05 22:04:41 -04:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-04-26 14:14:50 -04:00
|
|
|
sops-nix = {
|
|
|
|
url = "github:Mic92/sops-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-08-20 12:09:51 -04:00
|
|
|
impermanence.url = "github:nix-community/impermanence/23c1f06316b67cb5dabdfe2973da3785cfe9c34a";
|
2024-05-27 21:02:31 -04:00
|
|
|
stylix = {
|
2024-06-12 11:23:30 -04:00
|
|
|
url = "github:danth/stylix/release-24.05";
|
2024-05-27 21:02:31 -04:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
home-manager.follows = "home-manager";
|
|
|
|
};
|
|
|
|
};
|
2024-07-29 22:13:52 -04:00
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
2024-04-05 22:04:41 -04:00
|
|
|
};
|
2024-05-30 20:39:54 -04:00
|
|
|
outputs = inputs@{ self, nixpkgs, flake-utils, home-manager, deploy-rs
|
2024-08-19 21:54:43 -04:00
|
|
|
, impermanence, stylix, nixos-hardware, nixunstable, ... }:
|
2024-05-30 20:39:54 -04:00
|
|
|
let
|
2024-08-20 12:25:27 -04:00
|
|
|
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
2024-05-30 20:39:54 -04:00
|
|
|
aarch64Pkgs = import nixpkgs { system = "aarch64-linux"; };
|
2024-08-19 21:54:43 -04:00
|
|
|
pkgs-unstable = import nixunstable { system = "x86_64-linux"; };
|
2024-05-30 20:39:54 -04:00
|
|
|
deployAarch64Pkgs = import nixpkgs {
|
|
|
|
system = "aarch64-linux";
|
|
|
|
overlays = [
|
|
|
|
deploy-rs.overlay
|
|
|
|
(self: super: {
|
|
|
|
deploy-rs = {
|
|
|
|
inherit (aarch64Pkgs) deploy-rs;
|
|
|
|
lib = super.deploy-rs.lib;
|
|
|
|
};
|
|
|
|
})
|
2024-04-13 16:30:55 -04:00
|
|
|
];
|
2024-04-13 14:13:38 -04:00
|
|
|
};
|
2024-05-30 20:39:54 -04:00
|
|
|
deployPkgs = import nixpkgs {
|
2024-04-25 20:43:33 -04:00
|
|
|
system = "x86_64-linux";
|
2024-05-30 20:39:54 -04:00
|
|
|
overlays = [
|
|
|
|
deploy-rs.overlay
|
|
|
|
(self: super: {
|
|
|
|
deploy-rs = {
|
|
|
|
inherit (pkgs) deploy-rs;
|
|
|
|
lib = super.deploy-rs.lib;
|
|
|
|
};
|
|
|
|
})
|
2024-05-11 11:44:00 -04:00
|
|
|
];
|
2024-04-05 22:04:41 -04:00
|
|
|
};
|
2024-05-30 20:39:54 -04:00
|
|
|
in {
|
|
|
|
nixosConfigurations = {
|
|
|
|
smolboi = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2024-08-19 21:54:43 -04:00
|
|
|
specialArgs = { inherit inputs; inherit pkgs-unstable; };
|
2024-05-30 20:39:54 -04:00
|
|
|
modules = [
|
|
|
|
stylix.nixosModules.stylix
|
|
|
|
impermanence.nixosModules.impermanence
|
|
|
|
./systems/smolboi/configuration.nix
|
2024-07-29 22:13:52 -04:00
|
|
|
nixos-hardware.nixosModules.common-cpu-amd
|
|
|
|
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
|
|
|
nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
|
|
|
nixos-hardware.nixosModules.common-gpu-amd
|
|
|
|
nixos-hardware.nixosModules.common-pc
|
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
|
|
nixos-hardware.nixosModules.gigabyte-b550
|
2024-05-30 20:39:54 -04:00
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.users.cdombroski = import ./systems/smolboi/home.nix;
|
|
|
|
}
|
|
|
|
];
|
2024-04-13 14:13:38 -04:00
|
|
|
};
|
2024-05-30 20:39:54 -04:00
|
|
|
zeus = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2024-08-19 21:54:43 -04:00
|
|
|
specialArgs = { inherit inputs; inherit pkgs-unstable; };
|
2024-05-31 20:51:33 -04:00
|
|
|
modules = [
|
2024-05-31 20:04:28 -04:00
|
|
|
impermanence.nixosModules.impermanence
|
2024-05-31 20:51:33 -04:00
|
|
|
./systems/zeus/configuration.nix
|
2024-07-29 22:13:52 -04:00
|
|
|
nixos-hardware.nixosModules.supermicro
|
|
|
|
nixos-hardware.nixosModules.common-cpu-amd
|
|
|
|
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
|
|
|
nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
|
|
|
nixos-hardware.nixosModules.common-pc
|
2024-05-31 20:04:28 -04:00
|
|
|
];
|
2024-04-25 20:43:33 -04:00
|
|
|
};
|
2024-05-30 20:39:54 -04:00
|
|
|
orangepihole = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "aarch64-linux";
|
2024-08-19 21:54:43 -04:00
|
|
|
specialArgs = { inherit inputs; inherit pkgs-unstable; };
|
2024-05-30 20:39:54 -04:00
|
|
|
modules = [
|
|
|
|
impermanence.nixosModules.impermanence
|
|
|
|
./systems/orangepihole/configuration.nix
|
|
|
|
];
|
2024-04-05 22:04:41 -04:00
|
|
|
};
|
|
|
|
};
|
2024-05-30 20:39:54 -04:00
|
|
|
deploy = {
|
|
|
|
sshUser = "root";
|
|
|
|
fastConnection = true;
|
|
|
|
nodes = {
|
|
|
|
smolboi = {
|
|
|
|
hostname = "smolboi";
|
|
|
|
profiles.system.path = deployPkgs.deploy-rs.lib.activate.nixos
|
|
|
|
self.nixosConfigurations.smolboi;
|
|
|
|
};
|
|
|
|
zeus = {
|
|
|
|
hostname = "zeus";
|
|
|
|
profiles.system.path = deployPkgs.deploy-rs.lib.activate.nixos
|
|
|
|
self.nixosConfigurations.zeus;
|
|
|
|
};
|
|
|
|
orangepihole = {
|
|
|
|
hostname = "orangepihole";
|
|
|
|
profiles.system.path =
|
|
|
|
deployAarch64Pkgs.deploy-rs.lib.activate.nixos
|
|
|
|
self.nixosConfigurations.orangepihole;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
} // flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
deployLib = deploy-rs.lib.${system};
|
|
|
|
in {
|
|
|
|
devShells.default =
|
|
|
|
pkgs.mkShell { buildInputs = [ pkgs.deploy-rs pkgs.sops ]; };
|
|
|
|
checks = deployLib.deployChecks self.deploy;
|
|
|
|
formatter = pkgs.nixfmt;
|
|
|
|
});
|
2024-04-05 22:04:41 -04:00
|
|
|
}
|