Compare commits
22
Commits
2776098b8c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe86dce099 | ||
|
|
270feb3e85 | ||
|
|
90eac24b77 | ||
|
|
072dbfe689 | ||
|
|
35862426ae | ||
|
|
530edccdf5 | ||
|
|
22b8aedee4 | ||
|
|
075b1ff967 | ||
|
|
9fcb0cfad1 | ||
|
|
5e34efac9d | ||
|
|
30f97c74b5 | ||
|
|
2fb3f631d4 | ||
|
|
f8ab913941 | ||
|
|
684cf02eee | ||
|
|
e2a0b0bcde | ||
|
|
eac215ce10 | ||
|
|
e5d0e1dbf0 | ||
|
|
17fd651768 | ||
|
|
d6d923f422 | ||
|
|
41426c6874 | ||
|
|
1ec4a70c1c | ||
|
|
c99b72af18 |
@@ -11,17 +11,17 @@ MicroSD card as boot and OS.
|
|||||||
|
|
||||||
### Zeroth milestone
|
### Zeroth milestone
|
||||||
|
|
||||||
- [ ] SSH daemon
|
- [X] SSH daemon
|
||||||
- [ ] User who can act as a local admin
|
- [X] User who can act as a local admin
|
||||||
|
|
||||||
### First milestone
|
### First milestone
|
||||||
|
|
||||||
- [ ] ZFS set up on the HDDs
|
- [X] ZFS set up on the HDDs
|
||||||
- [ ] Plex media server
|
- [X] Plex media server
|
||||||
|
|
||||||
### Second milestone
|
### Second milestone
|
||||||
|
|
||||||
- [ ] Samba for easy file access from Windows
|
- [X] Samba for easy file access from Windows
|
||||||
- [ ] NFS for easy file access from Linux
|
- [ ] NFS for easy file access from Linux
|
||||||
|
|
||||||
### Third milestone
|
### Third milestone
|
||||||
@@ -29,18 +29,43 @@ MicroSD card as boot and OS.
|
|||||||
- [ ] Torrent client web control interface available over LAN
|
- [ ] Torrent client web control interface available over LAN
|
||||||
- [ ] Torrent client downloads over VPN
|
- [ ] Torrent client downloads over VPN
|
||||||
|
|
||||||
|
## Non-declarative things
|
||||||
|
|
||||||
|
You need to add accounts for the `samba`. It doesn't use the Linux passwords.
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo smbpasswd -a $username
|
||||||
|
```
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
To build the SD image:
|
To build the SD image:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# building the NixOS portions
|
||||||
nix build .#nixosConfigurations.chopper.config.system.build.sdImage
|
nix build .#nixosConfigurations.chopper.config.system.build.sdImage
|
||||||
|
cp result/sd-image/*.zst . # note it will be write-protected
|
||||||
|
nix-shell -p zstd --run "unzstd *.zst"
|
||||||
|
sudo dd if=$(echo -n *img) of=/dev/sda status=progress bs=4096
|
||||||
|
# build uboot
|
||||||
|
nix-build '<nixpkgs>' --argstr system aarch64-linux -A ubootRockPro64 --out-link ubootRockPro64
|
||||||
|
sudo dd if=ubootRockPro64/idbloader.img of=/dev/sda conv=fsync,notrunc bs=512 seek=64
|
||||||
|
sudo dd if=ubootRockPro64/u-boot.itb of=/dev/sda conv=fsync,notrunc bs=512 seek=16384
|
||||||
```
|
```
|
||||||
|
|
||||||
Further instructions can be found on these pages:
|
Further instructions can be found on these pages:
|
||||||
|
|
||||||
[NixOS Wiki/NixOS on ARM/PINE64 RockPro64](https://wiki.nixos.org/wiki/NixOS_on_ARM/PINE64_ROCKPro64)
|
[NixOS Wiki/NixOS on ARM/PINE64 RockPro64](https://wiki.nixos.org/wiki/NixOS_on_ARM/PINE64_ROCKPro64)
|
||||||
[NixOS Wiki/NixOS on ARM/Installation](https://wiki.nixos.org/wiki/NixOS_on_ARM/Installation)
|
[NixOS Wiki/NixOS on ARM/Installation](https://wiki.nixos.org/wiki/NixOS_on_ARM/Installation)
|
||||||
|
[Pine64/RockPro64/Installing Arch Linux ARM](https://pine64.org/documentation/ROCKPro64/Software/Installing_Arch_Linux_ARM/)
|
||||||
|
|
||||||
|
## Updating
|
||||||
|
|
||||||
|
From `chopper`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo nixos-rebuild switch --flake .
|
||||||
|
```
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
|
|||||||
Generated
+10
-6
@@ -2,14 +2,18 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 0,
|
"lastModified": 1726937504,
|
||||||
"narHash": "sha256-XD6GfVgSfWjqqWAuybkvaxS1/xrwTrh3V1dSkoYJW3Q=",
|
"narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=",
|
||||||
"path": "/nix/store/jjjyazlmzjls1kdpgn776iy9w345yq7l-source",
|
"owner": "nixos",
|
||||||
"type": "path"
|
"repo": "nixpkgs",
|
||||||
|
"rev": "9357f4f23713673f310988025d9dc261c20e70c6",
|
||||||
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"owner": "nixos",
|
||||||
"type": "indirect"
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
outputs = { self, nixpkgs }: {
|
outputs = { self, nixpkgs }: {
|
||||||
# miscellaneous stuff that's important
|
# miscellaneous stuff that's important
|
||||||
nixosModules.base = {lib, ...}: {
|
nixosModules.base = {lib, ...}: {
|
||||||
@@ -6,16 +9,26 @@
|
|||||||
networking.hostName = "chopper";
|
networking.hostName = "chopper";
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
sdImage.firmwarePartitionOffset = 32;
|
||||||
|
nix.settings = {
|
||||||
|
extra-experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
# Configuration of individual users
|
# Configuration of individual users
|
||||||
nixosModules.users = {...}: {
|
nixosModules.users = {...}: {
|
||||||
users.users.taneb = {
|
users.users = {
|
||||||
isNormalUser = true;
|
taneb = {
|
||||||
extraGroups = [ "wheel" ];
|
isNormalUser = true;
|
||||||
openssh.authorizedKeys.keys = [
|
extraGroups = [ "wheel" ];
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIV9ymP4tpq11a8wfUvn8eEEwAPvZZSPZTbASLh7YxOw nvd1234@gmail.com"
|
openssh.authorizedKeys.keys = [
|
||||||
];
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIV9ymP4tpq11a8wfUvn8eEEwAPvZZSPZTbASLh7YxOw nvd1234@gmail.com"
|
||||||
hashedPassword = "$y$j9T$MWZj8eSLcR5nrSOCemh.U/$g9PN2cQ78F8aV2ZJP5YU7xYrEZasQ70VmO5DfQLhc90";
|
];
|
||||||
|
hashedPassword = "$y$j9T$9pxQ4Zj7OirGMmgclhUb0/$YCfaYmIaaHRrkqiqdNbQSlJ7puX8bGrMCLavq6Pe1e3";
|
||||||
|
};
|
||||||
|
nairis = {
|
||||||
|
isNormalUser = true;
|
||||||
|
hashedPassword = "$y$j9T$luA6OU3OWVXbJc6DZM4Fx1$nTc89zTdKgozwR5kZQglbWaCkOFtmNZcpO4WCcYYPZC";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
users.mutableUsers = false;
|
users.mutableUsers = false;
|
||||||
};
|
};
|
||||||
@@ -27,6 +40,50 @@
|
|||||||
settings.PasswordAuthentication = false;
|
settings.PasswordAuthentication = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
nixosModules.zfs = {...}: {
|
||||||
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
|
boot.zfs.forceImportRoot = false;
|
||||||
|
boot.zfs.extraPools = [ "storage" ];
|
||||||
|
# zfs needs this for some reason
|
||||||
|
networking.hostId = "488ecad2";
|
||||||
|
};
|
||||||
|
nixosModules.plex = {...}: {
|
||||||
|
services.plex = {
|
||||||
|
enable = true;
|
||||||
|
dataDir = "/storage/data";
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
nixosModules.hledger = {...}: {
|
||||||
|
services.hledger-web = {
|
||||||
|
enable = true;
|
||||||
|
allow = "edit";
|
||||||
|
host = "0.0.0.0";
|
||||||
|
baseUrl = "http://192.168.1.37:5000";
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ 5000 ];
|
||||||
|
};
|
||||||
|
nixosModules.samba = {...}: {
|
||||||
|
services.samba = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
settings = {
|
||||||
|
chopper = {
|
||||||
|
path = "/storage/media";
|
||||||
|
browseable = "yes";
|
||||||
|
"read only" = "no";
|
||||||
|
"guest ok" = "no";
|
||||||
|
"inherit permissions" = "yes";
|
||||||
|
"create mask" = "0666";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.samba-wsdd = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
nixosConfigurations.chopper = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.chopper = nixpkgs.lib.nixosSystem {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
@@ -34,6 +91,10 @@
|
|||||||
self.nixosModules.base
|
self.nixosModules.base
|
||||||
self.nixosModules.users
|
self.nixosModules.users
|
||||||
self.nixosModules.ssh
|
self.nixosModules.ssh
|
||||||
|
self.nixosModules.zfs
|
||||||
|
self.nixosModules.plex
|
||||||
|
self.nixosModules.samba
|
||||||
|
self.nixosModules.hledger
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user