{ 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; oxalica.url = github:oxalica/rust-overlay; }; outputs = args@{ home-manager, nixpkgs, agenix, nixos-hardware, oxalica, ... }: 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"); home-manager.extraSpecialArgs = args; home-manager.useGlobalPkgs = true; }; }; 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 ./system/lime/core.nix ./shared/core ./shared/secrets.nix ]; specialArgs = args; }; # Raspberry Pi hosting my website "cherry" = lib.nixosSystem { system = "aarch64-linux"; modules = [ ./system/cherry/core.nix ]; }; }; # Configurations for non-NixOS machines. homeConfigurations = with home-manager.lib; { "dev-lt-63" = homeManagerConfiguration { extraSpecialArgs = args; pkgs = import nixpkgs { system = "x86_64-linux"; }; modules = [ ./system/dev-lt-63/home.nix ./shared/home ]; }; }; overlays = { default = (import ./shared/overlay.nix); }; }; }