diff options
Diffstat (limited to 'hostnix/mojo/flake.nix')
| -rw-r--r-- | hostnix/mojo/flake.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/hostnix/mojo/flake.nix b/hostnix/mojo/flake.nix new file mode 100644 index 0000000..9bffbfa --- /dev/null +++ b/hostnix/mojo/flake.nix @@ -0,0 +1,53 @@ +{ + description = "nix-darwin system flake"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-26.05-darwin"; + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nix-darwin.url = "github:nix-darwin/nix-darwin/nix-darwin-26.05"; + nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = + inputs@{ + self, + nix-darwin, + nixpkgs, + nixpkgs-unstable, + }: + let + configuration = + { pkgs, pkgsUnstable, ... }: + { + nix.settings.experimental-features = "nix-command flakes"; + + # Set Git commit hash for darwin-version. + system.configurationRevision = self.rev or self.dirtyRev or null; + + # Used for backwards compatibility, please read the changelog before changing. + # $ darwin-rebuild changelog + system.stateVersion = 6; + + # The platform the configuration will be used on. + nixpkgs.hostPlatform = "aarch64-darwin"; + }; + + in + { + darwinConfigurations.mojo = nix-darwin.lib.darwinSystem { + specialArgs = { + pkgsUnstable = import nixpkgs-unstable { + system = "aarch64-darwin"; + config.allowUnfree = true; + }; + }; + modules = [ + configuration + ./modules/apps.nix + ./modules/obsidian.nix + ./modules/sunshine.nix + ./modules/system.nix + ]; + }; + }; +} |
