feat: Nix flake build for Darwin #23

Open
aniva wants to merge 1 commits from system/darwin into main
3 changed files with 84 additions and 0 deletions

19
configuration.nix Normal file
View File

@ -0,0 +1,19 @@
{ config, pkgs, ... }:
{
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = [
pkgs.vim
];
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
nix.package = pkgs.nix;
# Enable alternative shell support in nix-darwin.
programs.fish.enable = true;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 5;
}

48
flake.lock Normal file
View File

@ -0,0 +1,48 @@
{
"nodes": {
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs-darwin"
]
},
"locked": {
"lastModified": 1731642829,
"narHash": "sha256-vG+O2RZRzYZ8BUMNNJ+BLSj6PUoGW7taDQbp6QNJ3Xo=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "f86f158efd4bab8dce3e207e4621f1df3a760b7a",
"type": "github"
},
"original": {
"owner": "LnL7",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs-darwin": {
"locked": {
"lastModified": 1730891215,
"narHash": "sha256-i85DPrhDuvzgvIWCpJlbfM2UFtNYbapo20MtQXsvay4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c128e44a249d6180740d0a979b6480d5b795c013",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-24.05-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nix-darwin": "nix-darwin",
"nixpkgs-darwin": "nixpkgs-darwin"
}
}
},
"root": "root",
"version": 7
}

17
flake.nix Normal file
View File

@ -0,0 +1,17 @@
{
description = "Leni Aniva's Systems";
inputs = {
nixpkgs-darwin.url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin";
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs-darwin";
};
};
outputs = inputs@{ self, nixpkgs-darwin, nix-darwin }: {
darwinConfigurations."sphalerite" = nix-darwin.lib.darwinSystem {
modules = [ ./configuration.nix ];
};
};
}