flake.nix 2.5 KB

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