sequoia: Initialize
This is an x86_64 VM.
This commit is contained in:
parent
baaab510cb
commit
002dede89b
3 changed files with 103 additions and 9 deletions
18
flake.lock
generated
18
flake.lock
generated
|
@ -55,11 +55,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729459288,
|
"lastModified": 1729551526,
|
||||||
"narHash": "sha256-gBOVJv+q6Mx8jGvwX7cE6J8+sZmi1uxpRVsO7WxvVuQ=",
|
"narHash": "sha256-7LAGY32Xl14OVQp3y6M43/0AtHYYvV6pdyBcp3eoz0s=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "1e27f213d77fc842603628bcf2df6681d7d08f7e",
|
"rev": "5ec753a1fc4454df9285d8b3ec0809234defb975",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -90,11 +90,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729382845,
|
"lastModified": 1729579044,
|
||||||
"narHash": "sha256-REiWck1zIOnZIgGmmOWfwvkQw1f4UrBsxxOSKVSAG4w=",
|
"narHash": "sha256-0kEUVl5s8LHbK4/xEePflsdYVwG+RRFSIofSvITYmIU=",
|
||||||
"owner": "LnL7",
|
"owner": "LnL7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "a001f44cfc47164839eb61c6b1e7f4288813f7e8",
|
"rev": "64d9d1ae25215c274c37e3e4016977a6779cf0d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -105,11 +105,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729256560,
|
"lastModified": 1729413321,
|
||||||
"narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=",
|
"narHash": "sha256-I4tuhRpZFa6Fu6dcH9Dlo5LlH17peT79vx1y1SpeKt0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0",
|
"rev": "1997e4aa514312c1af7e2bda7fad1644e778ff26",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
18
flake.nix
18
flake.nix
|
@ -149,6 +149,24 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
darwinConfigurations."sequoia" = nix-darwin.lib.darwinSystem {
|
||||||
|
modules = [
|
||||||
|
# System-wide configuration
|
||||||
|
./hosts/darwin/sequoia/configuration.nix
|
||||||
|
# Our provided home-manager configuration
|
||||||
|
home-manager.darwinModules.home-manager
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = [ self.overlays.default ];
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
users.spot = import ./home/home.nix;
|
||||||
|
extraSpecialArgs = { desktop = true; gpg = true; };
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# Lastly, ensure a formatter is available for all systems.
|
# Lastly, ensure a formatter is available for all systems.
|
||||||
formatter = allSystems (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt);
|
formatter = allSystems (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt);
|
||||||
};
|
};
|
||||||
|
|
76
hosts/darwin/sequoia/configuration.nix
Normal file
76
hosts/darwin/sequoia/configuration.nix
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
{ lib, pkgs, system, ... }: {
|
||||||
|
environment = {
|
||||||
|
# We'll use Vim globally.
|
||||||
|
systemPackages = [
|
||||||
|
pkgs.vim
|
||||||
|
];
|
||||||
|
variables.EDITOR = "${pkgs.vim}/bin/vim";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Per https://github.com/LnL7/nix-darwin/issues/663,
|
||||||
|
# nix-darwin only supports a few specific named activation scripts.
|
||||||
|
# We'll leverage `extraActivation` to symlink our JDKs.
|
||||||
|
system.activationScripts.extraActivation.text = ''
|
||||||
|
##############
|
||||||
|
# Latest JDK #
|
||||||
|
##############
|
||||||
|
# Regardless of version, we'd like the latest JDK available.
|
||||||
|
|
||||||
|
# Remove the symlink if it doesn't already exist.
|
||||||
|
rm -f /Library/Java/JavaVirtualMachines/zulu-latest.jdk
|
||||||
|
|
||||||
|
# We should only have a single JDK present within our package,
|
||||||
|
# but let's limit `find` regardless.
|
||||||
|
JDK_LOCATION="$(find "${pkgs.jdk}" -name "*.jdk" | head -n1)"
|
||||||
|
|
||||||
|
# Symlink!
|
||||||
|
ln -sf "$JDK_LOCATION" "/Library/Java/JavaVirtualMachines/zulu-latest.jdk"
|
||||||
|
|
||||||
|
##########
|
||||||
|
# JDK 17 #
|
||||||
|
##########
|
||||||
|
# We'd also like JDK 17 available, for legacy purposes.
|
||||||
|
# (The author of this is as disappointed in this as the reader should be.)
|
||||||
|
rm -f /Library/Java/JavaVirtualMachines/zulu-17.jdk
|
||||||
|
ln -sf "${pkgs.jdk17}/zulu-17.jdk" "/Library/Java/JavaVirtualMachines/zulu-17.jdk"
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Auto upgrade nix package and the daemon service.
|
||||||
|
services.nix-daemon.enable = true;
|
||||||
|
nix = {
|
||||||
|
# Keep the latest version of Nix.
|
||||||
|
package = pkgs.nix;
|
||||||
|
settings = {
|
||||||
|
# Necessary for using flakes on this system.
|
||||||
|
experimental-features = "nix-command flakes";
|
||||||
|
|
||||||
|
# Include Garnix
|
||||||
|
substituters = [ "https://cache.garnix.io" ];
|
||||||
|
trusted-public-keys = [ "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
|
# Used for backwards compatibility, please read the changelog before changing.
|
||||||
|
# $ darwin-rebuild changelog
|
||||||
|
system.stateVersion = 4;
|
||||||
|
|
||||||
|
nixpkgs = {
|
||||||
|
hostPlatform = lib.mkDefault "x86_64-darwin";
|
||||||
|
|
||||||
|
# Regretfully, we use some non-free packages.
|
||||||
|
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||||
|
# Visual Studio Code
|
||||||
|
"vscode"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Our singular user!
|
||||||
|
users.users.spot = {
|
||||||
|
description = "Spotlight Deveaux";
|
||||||
|
home = "/Users/spot";
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue