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-05-21 21:15:04 +02:00
|
|
|
};
|
|
|
|
|
2023-06-19 15:15:59 +02:00
|
|
|
outputs = args@{ self, home-manager, nixpkgs, agenix, nixos-hardware, ... }: with nixpkgs; {
|
2023-05-21 21:15:04 +02:00
|
|
|
|
2023-05-23 10:04:47 +02:00
|
|
|
# Configurations for NixOS machines.
|
2023-06-19 15:15:59 +02:00
|
|
|
nixosConfigurations = let
|
|
|
|
# Generate a user configuration for the given user, based on the given home manager
|
|
|
|
# configuration.
|
|
|
|
userConfig = user: home: [
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
({ config, ... }: {
|
|
|
|
home-manager.users."${user}" = (home // {
|
|
|
|
config.home = {
|
|
|
|
inherit (config.system) stateVersion;
|
|
|
|
username = user;
|
2023-05-23 10:04:47 +02:00
|
|
|
};
|
2023-06-19 15:15:59 +02:00
|
|
|
}).config;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
in {
|
|
|
|
# Desktop system
|
|
|
|
"strawberry" = lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./system/strawberry/core.nix
|
|
|
|
./shared/core
|
|
|
|
] ++ (userConfig "riley" self.homeConfigurations."strawberry");
|
|
|
|
specialArgs = args;
|
2023-05-21 21:15:04 +02:00
|
|
|
};
|
2023-06-19 15:15:59 +02:00
|
|
|
# Thinkpad
|
|
|
|
"lime" = lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./system/lime/core.nix
|
|
|
|
./shared/core
|
|
|
|
] ++ (userConfig "riley" self.homeConfigurations."lime");
|
|
|
|
specialArgs = args;
|
|
|
|
};
|
|
|
|
};
|
2023-05-21 21:15:04 +02:00
|
|
|
|
2023-05-23 10:04:47 +02:00
|
|
|
# Configurations for non-NixOS machines.
|
2023-06-19 15:15:59 +02:00
|
|
|
homeConfigurations = with home-manager.lib; let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
overlays = [ self.overlays.default ];
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
# riley @ dev-lt-63
|
2023-05-23 10:04:47 +02:00
|
|
|
"dev-lt-63" = homeManagerConfiguration {
|
2023-06-19 15:15:59 +02:00
|
|
|
inherit pkgs;
|
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-06-19 15:15:59 +02:00
|
|
|
# riley @ strawberry
|
|
|
|
"strawberry" = homeManagerConfiguration {
|
|
|
|
inherit pkgs;
|
|
|
|
modules = [
|
|
|
|
./system/strawberry/home.nix
|
|
|
|
./shared/home
|
|
|
|
];
|
|
|
|
};
|
|
|
|
# riley @ lime
|
|
|
|
"lime" = homeManagerConfiguration {
|
|
|
|
inherit pkgs;
|
|
|
|
modules = [
|
|
|
|
./system/lime/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-06-17 10:15:20 +02:00
|
|
|
}
|