flake.nix 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. "thomas@odin" = lib.mkHome {
  40. system = "x86_64-linux";
  41. modules = [ ./home/odin.nix ];
  42. };
  43. };
  44. nixosConfigurations = {
  45. # modgud = lib.mkSystem {
  46. # system = "x86_64-linux";
  47. # modules = [ ./hosts/modgud ];
  48. # };
  49. odin = lib.mkSystem {
  50. system = "x86_64-linux";
  51. modules = [ ./hosts/odin ];
  52. };
  53. };
  54. darwinConfigurations = {
  55. meili = lib.mkDarwin {
  56. system = "aarch64-darwin";
  57. modules = [ ./hosts/meili ];
  58. };
  59. };
  60. devShells = lib.mkDevenvShell {
  61. default = import ./devenv.nix;
  62. };
  63. modules = import ./modules;
  64. overlays = import ./overlays { inherit inputs; };
  65. packages = lib.eachSystem (system: {
  66. devenv-up = self.devShells.${system}.default.config.procfileScript;
  67. devenv-test = self.devShells.${system}.default.config.test;
  68. } // import ./packages { });
  69. templates = {
  70. devenv = {
  71. path = ./templates/devenv;
  72. description = "A template for a devenv environment";
  73. };
  74. };
  75. };
  76. }