flake.nix 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. {
  2. inputs = {
  3. nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05?shallow=true";
  4. nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-25.05-darwin?shallow=true";
  5. nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable?shallow=true";
  6. nixos-facter-modules.url = "github:nix-community/nixos-facter-modules?shallow=true";
  7. # nixos-facter-modules.inputs.nixpkgs.follows = "nixpkgs";
  8. darwin.url = "github:lnl7/nix-darwin/nix-darwin-25.05?shallow=true";
  9. darwin.inputs.nixpkgs.follows = "nixpkgs-darwin";
  10. devenv.url = "github:cachix/devenv?shallow=true";
  11. devenv.inputs.nixpkgs.follows = "nixpkgs-unstable";
  12. home-manager.url = "github:nix-community/home-manager/master?shallow=true";
  13. home-manager.inputs.nixpkgs.follows = "nixpkgs";
  14. nixvim.url = "github:nix-community/nixvim/nixos-25.05?shallow=true";
  15. nixvim.inputs.nixpkgs.follows = "nixpkgs";
  16. impermanence.url = "github:nix-community/impermanence?shallow=true";
  17. # impermanence.inputs.nixpkgs.follows = "nixpkgs";
  18. agenix.url = "github:ryantm/agenix?shallow=true";
  19. agenix.inputs.nixpkgs.follows = "nixpkgs";
  20. secrets.url = "git+ssh://[email protected]/control/secrets.git";
  21. # secrets.url = "path:/Users/thomas/workspace/control/secrets";
  22. disko.url = "github:nix-community/disko?shallow=true";
  23. disko.inputs.nixpkgs.follows = "nixpkgs";
  24. };
  25. outputs = { self, ... } @ inputs: rec {
  26. lib = import ./lib {
  27. inherit inputs;
  28. inherit (self) outputs;
  29. };
  30. homeConfigurations = {
  31. "thomas@meili" = lib.mkHome {
  32. system = "aarch64-darwin";
  33. modules = [ ./home/meili.nix ];
  34. };
  35. "thomas@modgud" = lib.mkHome {
  36. system = "x86_64-linux";
  37. modules = [ ./home/modgud.nix ];
  38. };
  39. "thomas@fedora" = lib.mkHome {
  40. system = "aarch64-linux";
  41. modules = [ ./home/fedora.nix ];
  42. };
  43. "thomas@odin" = lib.mkHome {
  44. system = "x86_64-linux";
  45. modules = [ ./home/odin.nix ];
  46. };
  47. };
  48. nixosConfigurations = {
  49. # modgud = lib.mkSystem {
  50. # system = "x86_64-linux";
  51. # modules = [ ./hosts/modgud ];
  52. # };
  53. odin = lib.mkSystem {
  54. system = "x86_64-linux";
  55. modules = [ ./hosts/odin ];
  56. };
  57. };
  58. darwinConfigurations = {
  59. meili = lib.mkDarwin {
  60. system = "aarch64-darwin";
  61. modules = [ ./hosts/meili ];
  62. };
  63. };
  64. devShells = lib.mkDevenvShell {
  65. default = import ./devenv.nix;
  66. };
  67. modules = import ./modules;
  68. overlays = import ./overlays { inherit inputs; };
  69. packages = lib.eachSystem (system: {
  70. devenv-up = self.devShells.${system}.default.config.procfileScript;
  71. devenv-test = self.devShells.${system}.default.config.test;
  72. } // import ./packages { });
  73. templates = {
  74. devenv = {
  75. path = ./templates/devenv;
  76. description = "A template for a devenv environment";
  77. };
  78. };
  79. };
  80. }