-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Bendik Dyrli <[email protected]>
- Loading branch information
Bendik Dyrli
committed
Sep 6, 2024
1 parent
516262e
commit 0c1b714
Showing
8 changed files
with
153 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ pkgs, unstable, ...}: { | ||
#options: https://daiderd.com/nix-darwin/manual/index.html | ||
|
||
environment.systemPackages = with pkgs; [ | ||
git | ||
]; | ||
|
||
# TODO To make this work, homebrew need to be installed manually, see https://brew.sh | ||
homebrew = { | ||
enable = true; | ||
onActivation = { | ||
autoUpdate = false; | ||
# cleanup = "zap"; | ||
upgrade = false; | ||
}; | ||
brewPrefix = "/opt/homebrew/bin"; | ||
caskArgs = { | ||
no_quarantine = true; | ||
}; | ||
|
||
taps = [ | ||
"homebrew/services" | ||
]; | ||
|
||
# `brew install` | ||
brews = [ | ||
# "aria2" # download tool | ||
]; | ||
|
||
# `brew install --cask` | ||
casks = [ | ||
telegram | ||
libreoffice | ||
signal | ||
tailscale | ||
]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
{ ... }: | ||
{ | ||
networking.hostName = SpaceCruiser; | ||
networking.computerName = SpaceCruiser; | ||
system.defaults.smb.NetBIOSName = SpaceCruiser; | ||
|
||
users.users."hx"= { | ||
home = "/Users/hx"; | ||
description = hx; | ||
}; | ||
|
||
nix.settings.trusted-users = [ "hx" ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
{ pkgs, ... }: | ||
|
||
{ | ||
nix.settings = { | ||
# enable flakes globally | ||
experimental-features = ["nix-command" "flakes"]; | ||
max-jobs = "auto"; | ||
auto-optimise-store = true; | ||
|
||
# substituers that will be considered before the official ones(https://cache.nixos.org) | ||
substituters = [ | ||
"https://mirror.sjtu.edu.cn/nix-channels/store" | ||
"https://nix-community.cachix.org" | ||
]; | ||
trusted-public-keys = [ | ||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" | ||
]; | ||
builders-use-substitutes = true; | ||
}; | ||
|
||
# Auto upgrade nix package and the daemon service. | ||
services.nix-daemon.enable = true; | ||
nix.package = pkgs.nix; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ pkgs, ... }: | ||
|
||
# options: https://daiderd.com/nix-darwin/manual/index.html#sec-options | ||
{ | ||
|
||
system = { | ||
# activationScripts are executed every time you boot the system or run `nixos-rebuild` / `darwin-rebuild`. | ||
activationScripts.postUserActivation.text = '' | ||
# activateSettings -u will reload the settings from the database and apply them to the current session, | ||
# so we do not need to logout and login again to make the changes take effect. | ||
/System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u | ||
''; | ||
|
||
defaults = { | ||
menuExtraClock.Show24Hour = true; # show 24 hour clock | ||
}; | ||
}; | ||
|
||
security.pam.enableSudoTouchIdAuth = true; | ||
|
||
# Create /etc/zshrc that loads the nix-darwin environment. | ||
# this is required if you want to use darwin's default shell - zsh | ||
programs.zsh.enable = true; | ||
|
||
} |