{ inputs.nixpkgs-stable.url = "github:NixOS/nixpkgs/25.05"; inputs.nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; inputs.disko.url = "github:nix-community/disko"; inputs.disko.inputs.nixpkgs.follows = "nixpkgs-stable"; inputs.nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; inputs.sops-nix.url = "github:Mic92/sops-nix"; inputs.sops-nix.inputs.nixpkgs.follows = "nixpkgs-stable"; inputs.nixos-anywhere.url = "github:nix-community/nixos-anywhere"; inputs.nixos-anywhere.inputs.nixpkgs.follows = "nixpkgs-stable"; outputs = { nixpkgs-stable, nixpkgs-unstable, disko, nixos-facter-modules, sops-nix, nixos-anywhere, ... }: let systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; in { nixosConfigurations.kj-laptop01 = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; modules = [ disko.nixosModules.disko ./kj-laptop01/configuration.nix nixos-facter-modules.nixosModules.facter sops-nix.nixosModules.sops { config.facter.reportPath = ./kj-laptop01/facter.json; } ]; }; formatter = nixpkgs-stable.lib.genAttrs systems ( system: nixpkgs-stable.legacyPackages.${system}.nixfmt-tree ); apps = nixpkgs-stable.lib.genAttrs systems (system: let pkgs = nixpkgs-stable.legacyPackages.${system}; nixos-update = pkgs.writers.writeRubyBin "nixos-update" { libraries = [ pkgs.rubyPackages.tty-command ]; runtimeInputs = [ pkgs.sops pkgs.nixos-anywhere pkgs.nixos-rebuild ]; } (builtins.readFile ./nixos-update.rb); in { nixos-update = { type = "app"; program = "${nixos-update}/bin/nixos-update"; }; }); }; }