mirror of
https://github.com/srid/nixos-config.git
synced 2026-05-11 17:36:07 +08:00
macos: use hostname automatically
This commit is contained in:
parent
294a7c5ac7
commit
c1425fdda0
3 changed files with 7 additions and 5 deletions
|
|
@ -18,10 +18,11 @@ To use this repository as base configuration for your new machine running:
|
|||
|
||||
### macOS
|
||||
|
||||
- [Install Nix](https://nixos.org/download.html#nix-install-macos) (must be multi-user)
|
||||
- [Install Nix](https://haskell.flake.page/nix)
|
||||
- Install [nix-darwin](https://github.com/LnL7/nix-darwin)
|
||||
- This will create a `~/.nixpkgs/darwin-configuration.nix`, but we do not need that.
|
||||
- Clone this repo anywhere
|
||||
- Edit `flake.nix` to use your system hostname in the `darwinConfigurations` set
|
||||
- Edit `users/config.nix` to contain your users
|
||||
- Run `nix run .#activate`.[^cleanup] That's it. Re-open your terminal.
|
||||
|
||||
|
|
|
|||
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -457,11 +457,11 @@
|
|||
},
|
||||
"nixos-flake": {
|
||||
"locked": {
|
||||
"lastModified": 1679069823,
|
||||
"narHash": "sha256-/U+drC6YoSMTj7xqaGaB/CD2NRhiCxuoNDzKLtDC0g0=",
|
||||
"lastModified": 1679070374,
|
||||
"narHash": "sha256-249YWmYfUjmUoG0C77ljJe2oEYpRTfeEYYJR6EYwlrY=",
|
||||
"owner": "srid",
|
||||
"repo": "nixos-flake",
|
||||
"rev": "e6990befad71e9864fc4f1725429c408ccfc54d2",
|
||||
"rev": "190ba3480793a8441a79bca827d8fede1d99ce6f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
agenix.url = "github:ryantm/agenix";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
nixos-flake.url = "github:srid/nixos-flake";
|
||||
# nixos-flake.url = "path:/Users/srid/code/nixos-flake";
|
||||
|
||||
# CI server
|
||||
hci.url = "github:hercules-ci/hercules-ci-agent";
|
||||
|
|
@ -68,7 +69,7 @@
|
|||
|
||||
# Configurations for my (only) macOS machine (using nix-darwin)
|
||||
darwinConfigurations = {
|
||||
default = self.lib.mkARMMacosSystem {
|
||||
appreciate = self.lib.mkARMMacosSystem {
|
||||
imports = [
|
||||
self.darwinModules.default # Defined in nix-darwin/default.nix
|
||||
./nixos/hercules.nix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue