Added nix darwin

This commit is contained in:
Aleksandr Lebedev 2024-12-30 22:06:16 +01:00
parent 13c0c39daf
commit b720bcb09a
3 changed files with 58 additions and 1 deletions

23
flake.lock generated
View file

@ -732,6 +732,26 @@
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1735478292,
"narHash": "sha256-Ys9pSP9ch0SthhpbjnkCSJ9ZLfaNKnt/dcy7swjmS1A=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "71a3a075e3229a7518d76636bb762aef2bcb73ac",
"type": "github"
},
"original": {
"owner": "LnL7",
"repo": "nix-darwin",
"type": "github"
}
},
"nix-darwin_2": {
"inputs": {
"nixpkgs": [
"nixvim",
@ -918,7 +938,7 @@
"flake-parts": "flake-parts_2",
"git-hooks": "git-hooks",
"home-manager": "home-manager_2",
"nix-darwin": "nix-darwin",
"nix-darwin": "nix-darwin_2",
"nixpkgs": [
"nixpkgs"
],
@ -993,6 +1013,7 @@
"home-manager": "home-manager",
"hyprland": "hyprland",
"impermanence": "impermanence",
"nix-darwin": "nix-darwin",
"nix-gaming": "nix-gaming",
"nixos-facter-modules": "nixos-facter-modules",
"nixpkgs": "nixpkgs_4",

View file

@ -31,6 +31,11 @@
nix-gaming.url = "github:fufexan/nix-gaming";
impermanence.url = "github:nix-community/impermanence";
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, ... }@inputs:
@ -49,6 +54,12 @@
first-nixos-install = "1729112485"; #stat -c %W /
in
{
darwinConfigurations = {
"kylekrein-air" = inputs.nix-darwin.lib.darwinSystem {
specialArgs = { inherit self; };
modules = [ ./nixos/hosts/kylekrein-air ];
};
};
nixosConfigurations = {
"kylekrein-homepc" = nixpkgs.lib.nixosSystem {
specialArgs = {

View file

@ -0,0 +1,25 @@
{ self, pkgs, ... }: {
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs;[
neovim
kitty
yazi
];
# Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes";
# Enable alternative shell support in nix-darwin.
# programs.fish.enable = true;
# 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 = 5;
# The platform the configuration will be used on.
nixpkgs.hostPlatform = "aarch64-darwin";
}