2023-05-21 21:15:04 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
|
|
|
|
home-manager.url = github:nix-community/home-manager;
|
|
|
|
pwnix = {
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
url = git+https://im.badat.dev/bad/pwnix.git;
|
|
|
|
};
|
2023-06-15 20:29:20 +02:00
|
|
|
agenix.url = github:ryantm/agenix;
|
2023-06-17 10:15:20 +02:00
|
|
|
nixos-hardware.url = github:NixOS/nixos-hardware;
|
2023-06-19 22:14:22 +02:00
|
|
|
oxalica.url = github:oxalica/rust-overlay;
|
2023-05-21 21:15:04 +02:00
|
|
|
};
|
|
|
|
|
2023-06-19 22:14:22 +02:00
|
|
|
outputs = args@{ home-manager, nixpkgs, agenix, nixos-hardware, oxalica, ... }: with nixpkgs; {
|
2023-05-21 21:15:04 +02:00
|
|
|
|
2023-05-23 10:04:47 +02:00
|
|
|
# Configurations for NixOS machines.
|
|
|
|
nixosConfigurations =
|
|
|
|
let mkUserConfig = path: {
|
|
|
|
imports = [ home-manager.nixosModules.home-manager ];
|
|
|
|
config = {
|
2023-06-17 20:48:22 +02:00
|
|
|
home-manager.users."riley" = (import "${path}/home.nix");
|
2023-06-19 22:14:22 +02:00
|
|
|
home-manager.extraSpecialArgs = args;
|
|
|
|
home-manager.useGlobalPkgs = true;
|
2023-05-23 10:04:47 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
|
|
|
|
# Desktop system
|
2023-06-06 15:38:06 +02:00
|
|
|
"strawberry" = lib.nixosSystem {
|
2023-05-23 10:04:47 +02:00
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
2023-06-06 15:38:06 +02:00
|
|
|
(mkUserConfig ./system/strawberry)
|
2023-06-15 20:29:20 +02:00
|
|
|
agenix.nixosModules.default
|
2023-06-06 15:38:06 +02:00
|
|
|
./system/strawberry/core.nix
|
2023-05-23 10:04:47 +02:00
|
|
|
./shared/core
|
2023-06-15 20:39:45 +02:00
|
|
|
./shared/secrets.nix
|
2023-05-23 10:04:47 +02:00
|
|
|
];
|
|
|
|
specialArgs = args;
|
|
|
|
};
|
|
|
|
|
2023-06-17 07:53:58 +02:00
|
|
|
# Thinkpad
|
|
|
|
"lime" = lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
(mkUserConfig ./system/lime)
|
|
|
|
agenix.nixosModules.default
|
|
|
|
./system/lime/core.nix
|
|
|
|
./shared/core
|
|
|
|
./shared/secrets.nix
|
|
|
|
];
|
|
|
|
specialArgs = args;
|
|
|
|
};
|
|
|
|
|
2023-06-17 23:46:16 +02:00
|
|
|
# Raspberry Pi hosting my website
|
|
|
|
"cherry" = lib.nixosSystem {
|
|
|
|
system = "aarch64-linux";
|
|
|
|
modules = [
|
|
|
|
./system/cherry/core.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-05-21 21:15:04 +02:00
|
|
|
};
|
|
|
|
|
2023-05-23 10:04:47 +02:00
|
|
|
# Configurations for non-NixOS machines.
|
|
|
|
homeConfigurations = with home-manager.lib; {
|
|
|
|
"dev-lt-63" = homeManagerConfiguration {
|
2023-06-28 13:29:23 +02:00
|
|
|
extraSpecialArgs = args;
|
|
|
|
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
2023-05-21 21:15:04 +02:00
|
|
|
modules = [
|
2023-05-23 10:04:47 +02:00
|
|
|
./system/dev-lt-63/home.nix
|
|
|
|
./shared/home
|
2023-05-21 21:15:04 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-05-23 10:04:47 +02:00
|
|
|
overlays = {
|
|
|
|
default = (import ./shared/overlay.nix);
|
2023-05-21 21:15:04 +02:00
|
|
|
};
|
2023-07-06 11:57:44 +02:00
|
|
|
|
|
|
|
devShells."x86_64-linux"."utils" = let
|
|
|
|
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
|
|
|
in pkgs.mkShell {
|
|
|
|
buildInputs = import ./shared/env.nix pkgs;
|
|
|
|
};
|
2023-05-21 21:15:04 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2023-06-17 10:15:20 +02:00
|
|
|
}
|