start work on darwin non-theoretical shenanigans
This commit is contained in:
parent
6cc648c012
commit
f19ce93b91
20
MACMINI_SETUP_GUIDE.md
Normal file
20
MACMINI_SETUP_GUIDE.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Mac Mini Setup Guide
|
||||
|
||||
## First Install
|
||||
### macOS installer
|
||||
Country/Region: United Kingdom
|
||||
Cognitive: Dark Theme
|
||||
Turn On Hover Text
|
||||
|
||||
### Install Nix
|
||||
```
|
||||
sh <(curl -L https://nixos.org/nix/install) --daemon
|
||||
```
|
||||
### Clone Nixfiles
|
||||
```
|
||||
mkdir ~/Projects
|
||||
cd ~/Projects
|
||||
nix-shell -p git --run "git clone https://gitlab.com/ChaotiCryptidz/nixfiles"
|
||||
|
||||
### Bootstrap
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# Mac VM Setup Guide
|
||||
|
||||
## First Install
|
||||
### Install Nix
|
||||
```
|
||||
sh <(curl -L https://nixos.org/nix/install) --no-daemon
|
||||
```
|
||||
### Bootstrap
|
||||
|
45
flake.lock
45
flake.lock
|
@ -54,27 +54,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs-darwin"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1643933536,
|
||||
"narHash": "sha256-yRmsWAG4DnLxLIUtlaZsl0kH7rN5xSoyNRlf0YZrcH4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "2860d7e3bb350f18f7477858f3513f9798896831",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-21.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager-unstable": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -117,10 +96,10 @@
|
|||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"nix-darwin-unstable": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs-darwin"
|
||||
"nixpkgs-unstable"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
|
@ -138,22 +117,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-darwin": {
|
||||
"locked": {
|
||||
"lastModified": 1646044487,
|
||||
"narHash": "sha256-2BN9xRr3NeLL9x9X66DiSATzm4nA/G0inc5D0+FtHTA=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "321b67a7448c79a110af2b9eceb0ad4b28f9db8c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-21.11-darwin",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1646159311,
|
||||
|
@ -173,11 +136,9 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"deploy-rs": "deploy-rs",
|
||||
"home-manager-darwin": "home-manager-darwin",
|
||||
"home-manager-unstable": "home-manager-unstable",
|
||||
"musicutil": "musicutil",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nixpkgs-darwin": "nixpkgs-darwin",
|
||||
"nix-darwin-unstable": "nix-darwin-unstable",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -6,13 +6,8 @@
|
|||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager-unstable.url = "github:nix-community/home-manager";
|
||||
home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
|
||||
# for darwin
|
||||
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-21.11-darwin";
|
||||
home-manager-darwin.url = "github:nix-community/home-manager/release-21.11";
|
||||
home-manager-darwin.inputs.nixpkgs.follows = "nixpkgs-darwin";
|
||||
nix-darwin.url = "github:lnl7/nix-darwin/master";
|
||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs-darwin";
|
||||
nix-darwin-unstable.url = "github:lnl7/nix-darwin/master";
|
||||
nix-darwin-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
|
||||
deploy-rs.url = "github:serokell/deploy-rs";
|
||||
deploy-rs.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
|
|
6
home/apps/aegisub.nix
Normal file
6
home/apps/aegisub.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
# NOINLINE
|
||||
aegisub
|
||||
];
|
||||
}
|
|
@ -3,7 +3,16 @@
|
|||
enable = true;
|
||||
settings = {
|
||||
enable-dht = true;
|
||||
enable-dht6 = true;
|
||||
seed-ratio = 5.0;
|
||||
max-overall-download-limit = 0;
|
||||
listen-port = "50101-50109";
|
||||
dht-entry-point = "dht.transmissionbt.com:6881";
|
||||
dht-entry-point6 = "dht.transmissionbt.com:6881";
|
||||
enable-peer-exchange = true;
|
||||
bt-tracker =
|
||||
"udp://tracker.coppersurfer.tk:6969/announce,udp://tracker.leechers-paradise.org:6969/announce,udp://tracker.opentrackr.org:1337/announce,udp://9.rarbg.to:2710/announce,udp://exodus.desync.com:6969/announce,udp://tracker.openbittorrent.com:80/announce,udp://tracker.tiny-vps.com:6969/announce,udp://retracker.lanta-net.ru:2710/announce,udp://tracker.torrent.eu.org:451/announce,udp://tracker.cyberia.is:6969/announce,udp://torrentclub.tech:6969/announce,udp://open.stealth.si:80/announce,udp://denis.stalker.upeer.me:6969/announce,udp://tracker.moeking.me:6969/announce,udp://open.demonii.si:1337/announce,udp://ipv4.tracker.harry.lu:80/announce,udp://tracker3.itzmx.com:6961/announce,udp://explodie.org:6969/announce,udp://valakas.rollo.dnsabr.com:2710/announce,udp://tracker.nyaa.uk:6969/announce,udp://tracker.iamhansen.xyz:2000/announce,udp://tracker.filepit.to:6969/announce,udp://tracker-udp.gbitt.info:80/announce,udp://retracker.netbynet.ru:2710/announce,udp://retracker.akado-ural.ru:80/announce,udp://opentor.org:2710/announce,udp://tracker.yoshi210.com:6969/announce,udp://tracker.filemail.com:6969/announce,udp://tracker.ds.is:6969/announce,udp://newtoncity.org:6969/announce,udp://bt2.archive.org:6969/announce,udp://bt1.archive.org:6969/announce,https://tracker.fastdownload.xyz:443/announce,https://opentracker.xyz:443/announce,https://opentracker.co:443/announce,http://tracker.bt4g.com:2095/announce,http://opentracker.xyz:80/announce,http://open.trackerlist.xyz:80/announce,http://h4.trakx.nibba.trade:80/announce,udp://xxxtor.com:2710/announce,udp://tracker.uw0.xyz:6969/announce,udp://tracker.tvunderground.org.ru:3218/announce,udp://tracker.nextrp.ru:6969/announce,udp://tracker.msm8916.com:6969/announce,udp://tracker.lelux.fi:6969/announce,udp://retracker.sevstar.net:2710/announce,udp://npserver.intranet.pw:4201/announce,https://tracker.nanoha.org:443/announce,https://tracker.hama3.net:443/announce,http://www.proxmox.com:6969/announce,http://tracker.tvunderground.org.ru:3218/announce,http://tracker.opentrackr.org:1337/announce,http://tracker.bz:80/announce,http://torrentclub.tech:6969/announce,http://t.nyaatracker.com:80/announce,http://retracker.sevstar.net:2710/announce,http://open.acgtracker.com:1096/announce,http://explodie.org:6969/announce,udp://tracker4.itzmx.com:2710/announce,udp://tracker2.itzmx.com:6961/announce,udp://tracker.swateam.org.uk:2710/announce,udp://tr.bangumi.moe:6969/announce,udp://qg.lorzl.gq:2710/announce,udp://chihaya.toss.li:9696/announce,https://tracker.vectahosting.eu:2053/announce,https://tracker.lelux.fi:443/announce,https://tracker.gbitt.info:443/announce,https://opentracker.acgnx.se:443/announce,http://www.loushao.net:8080/announce,http://vps02.net.orel.ru:80/announce,http://tracker4.itzmx.com:2710/announce,http://tracker3.itzmx.com:6961/announce,http://tracker2.itzmx.com:6961/announce,http://tracker1.itzmx.com:8080/announce,http://tracker01.loveapp.com:6789/announce,http://tracker.yoshi210.com:6969/announce,http://tracker.torrentyorg.pl:80/announce,http://tracker.lelux.fi:80/announce,http://tracker.gbitt.info:80/announce,http://tracker.frozen-layer.net:6969/announce,http://sukebei.tracker.wf:8888/announce,http://pow7.com:80/announce,http://opentracker.acgnx.se:80/announce,http://open.acgnxtracker.com:80/announce,http://newtoncity.org:6969/announce,http://mail2.zelenaya.net:80/announce,http://bt-tracker.gamexp.ru:2710/announce,http://acg.rip:6699/announce";
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
27
hosts/darwin.nix
Normal file
27
hosts/darwin.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ self, nixpkgs-unstable, nixos-darwin-unstable, tree, ... }@inputs:
|
||||
let
|
||||
|
||||
defaults = import ./defaults.nix inputs;
|
||||
|
||||
defaultSpecialArgs = defaults.defaultSpecialArgs // {
|
||||
inputs = inputs // {
|
||||
# set these to the correct versions from inputs
|
||||
nixpkgs = inputs.nixpkgs-unstable;
|
||||
home-manager = inputs.home-manager-unstable;
|
||||
nix-darwin = inputs.nix-darwin-unstable;
|
||||
};
|
||||
};
|
||||
|
||||
defaultModules = defaults.defaultModules ++ [
|
||||
# NO_INLINE
|
||||
inputs.home-manager-unstable.nixosModules.home-manager
|
||||
];
|
||||
|
||||
darwinSystem = nixos-darwin-unstable.lib.darwinSystem;
|
||||
in {
|
||||
"MacMini" = darwinSystem {
|
||||
specialArgs = defaultSpecialArgs;
|
||||
system = "aarch64-darwin";
|
||||
modules = defaultModules ++ [ ./macmini/default.nix ];
|
||||
};
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
{...}@inputs: {
|
||||
nixosConfigurations = import ./nixos.nix inputs;
|
||||
darwinConfigurations = import ./darwin inputs;
|
||||
}
|
|
@ -76,6 +76,7 @@ in {
|
|||
home.apps.pavucontrol
|
||||
home.apps.mullvad
|
||||
home.apps.aria2
|
||||
home.apps.aegisub
|
||||
|
||||
home.programming.editors.vscode
|
||||
home.programming.languages.go
|
||||
|
@ -99,11 +100,25 @@ in {
|
|||
networking.firewall.allowedTCPPorts = [ 22 2235 ];
|
||||
networking.firewall.allowedTCPPortRanges = [
|
||||
# Allow aria2 to work
|
||||
{ from = 6881; to = 6999; }
|
||||
{
|
||||
from = 6881;
|
||||
to = 6999;
|
||||
}
|
||||
{
|
||||
from = 50101;
|
||||
to = 50109;
|
||||
}
|
||||
];
|
||||
networking.firewall.allowedUDPPortRanges = [
|
||||
# Allow aria2 to work
|
||||
{ from = 6881; to = 6999; }
|
||||
{
|
||||
from = 6881;
|
||||
to = 6999;
|
||||
}
|
||||
{
|
||||
from = 50101;
|
||||
to = 50109;
|
||||
}
|
||||
];
|
||||
|
||||
# let vscode, vivaldi, etc work.
|
||||
|
|
4
hosts/macmini/default.nix
Normal file
4
hosts/macmini/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ pkgs, ... }: {
|
||||
# a
|
||||
|
||||
}
|
|
@ -3,7 +3,6 @@ let
|
|||
|
||||
defaults = import ./defaults.nix inputs;
|
||||
|
||||
|
||||
defaultSpecialArgs = defaults.defaultSpecialArgs // {
|
||||
inputs = inputs // {
|
||||
# set these to the correct versions from inputs
|
||||
|
@ -22,15 +21,13 @@ in {
|
|||
lappy = nixosUnstableSystem {
|
||||
specialArgs = defaultSpecialArgs;
|
||||
system = "x86_64-linux";
|
||||
modules = defaultModules
|
||||
++ [ ./lappy/lappy.nix ./lappy/hardware.nix ];
|
||||
modules = defaultModules ++ [ ./lappy/lappy.nix ./lappy/hardware.nix ];
|
||||
};
|
||||
|
||||
lappy-vm = nixosUnstableSystem {
|
||||
specialArgs = defaultSpecialArgs;
|
||||
system = "x86_64-linux";
|
||||
modules = defaultModules
|
||||
++ [ ./lappy/lappy.nix ./lappy/vm.nix ];
|
||||
modules = defaultModules ++ [ ./lappy/lappy.nix ./lappy/vm.nix ];
|
||||
};
|
||||
|
||||
rescue-x86_64 = nixosUnstableSystem {
|
||||
|
|
|
@ -7,6 +7,7 @@ let
|
|||
hosts = import ./hosts ({ inherit tree; } // inputs);
|
||||
in {
|
||||
nixosConfigurations = hosts.nixosConfigurations;
|
||||
darwinConfigurations = hosts.darwinConfigurations;
|
||||
|
||||
deploy.nodes = (import ./deployNodes.nix {
|
||||
nixosConfigurations = self.nixosConfigurations;
|
||||
|
|
Loading…
Reference in a new issue