Guest User

Untitled

a guest
Jul 29th, 2025
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. {
  2. description = "Custom NixOS ISO flake";
  3. inputs = {
  4. nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  5. # nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
  6. nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
  7. flake-utils.url = "github:numtide/flake-utils";
  8. proxmox-nixos.url = "github:SaumonNet/proxmox-nixos";
  9. netsecrets.url = "github:SpiderUnderUrBed/net-secrets";
  10. };
  11. outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, proxmox-nixos, netsecrets, ... }:
  12. flake-utils.lib.eachDefaultSystem (system:
  13. let
  14. inputs = self.inputs;
  15. lib = nixpkgs.lib;
  16. pkgs = import nixpkgs {
  17. inherit system;
  18. overlays = [
  19. proxmox-nixos.overlays.${system}
  20. # Custom overlay for Tailscale using unstable nixpkgs
  21. (final: prev: {
  22. tailscale-custom = let
  23. pkgs-unstable = import nixpkgs-unstable { inherit system; };
  24. in pkgs-unstable.callPackage ./pkgs/tailscale.nix {};
  25. })
  26. ];
  27. };
  28. isoDerivation = lib.nixosSystem {
  29. inherit system;
  30. specialArgs = {
  31. inputs = inputs;
  32. # Pass the resolved package directly
  33. netsecrets = netsecrets.packages.${system}.default;
  34. pkgs = pkgs;
  35. };
  36. modules = [
  37. "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
  38. proxmox-nixos.nixosModules.proxmox-ve
  39. netsecrets.nixosModules.default
  40. ./configuration.nix
  41. ({ config, pkgs, ... }: {
  42. isoImage = {
  43. isoName = lib.mkForce "custom-nixos.iso";
  44. volumeID = "CUSTOMISO";
  45. #contents = [];
  46. };
  47. })
  48. ];
  49. };
  50. iso = isoDerivation.config.system.build.isoImage;
  51. in {
  52. packages = {
  53. iso = iso;
  54. default = iso;
  55. };
  56. }
  57. );
  58. }
  59.  
Add Comment
Please, Sign In to add comment