Riley Apeldoorn
75603bd327
- Move trivial modules to `services.nix` - Gather user-related config in `users.nix` - Move loading of shared home-manager config into `shared/core`
73 lines
2 KiB
Nix
73 lines
2 KiB
Nix
{
|
|
|
|
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;
|
|
};
|
|
agenix.url = github:ryantm/agenix;
|
|
nixos-hardware.url = github:NixOS/nixos-hardware;
|
|
};
|
|
|
|
outputs = args@{ home-manager, nixpkgs, agenix, nixos-hardware, ... }: with nixpkgs; {
|
|
|
|
# Configurations for NixOS machines.
|
|
nixosConfigurations =
|
|
let mkUserConfig = path: {
|
|
imports = [ home-manager.nixosModules.home-manager ];
|
|
config = {
|
|
home-manager.users."riley" = (import "${path}/home.nix");
|
|
};
|
|
};
|
|
in {
|
|
|
|
# Desktop system
|
|
"strawberry" = lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
(mkUserConfig ./system/strawberry)
|
|
agenix.nixosModules.default
|
|
./system/strawberry/core.nix
|
|
./shared/core
|
|
./shared/secrets.nix
|
|
];
|
|
specialArgs = args;
|
|
};
|
|
|
|
# Thinkpad
|
|
"lime" = lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
(mkUserConfig ./system/lime)
|
|
agenix.nixosModules.default
|
|
nixos-hardware.nixosModules.lenovo-thinkpad-x390
|
|
nixos-hardware.nixosModules.common-gpu-nvidia-disable
|
|
./system/lime/core.nix
|
|
./shared/core
|
|
./shared/secrets.nix
|
|
];
|
|
specialArgs = args;
|
|
};
|
|
|
|
};
|
|
|
|
# Configurations for non-NixOS machines.
|
|
homeConfigurations = with home-manager.lib; {
|
|
"dev-lt-63" = homeManagerConfiguration {
|
|
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
|
modules = [
|
|
./system/dev-lt-63/home.nix
|
|
./shared/home
|
|
];
|
|
};
|
|
};
|
|
|
|
overlays = {
|
|
default = (import ./shared/overlay.nix);
|
|
};
|
|
|
|
};
|
|
|
|
}
|