Compare commits

...
14 Commits
Author SHA1 Message Date
Taneb 35862426ae Get hledger to work 2024-06-29 05:54:54 +00:00
Taneb 530edccdf5 Add hledger-web service 2024-06-26 15:09:19 +00:00
Taneb 22b8aedee4 Switch to unstable
I couldn't figure out how to update stable for some reason
2024-06-26 15:07:44 +00:00
Taneb 075b1ff967 Add note about adding samba users to readme 2024-06-01 11:07:42 +00:00
Taneb 9fcb0cfad1 Check a box 2024-06-01 11:04:47 +00:00
Taneb 5e34efac9d Samba and also get rid of tabs 2024-06-01 11:04:12 +00:00
Taneb 30f97c74b5 Add account for Nairis 2024-05-31 16:24:16 +00:00
Taneb 2fb3f631d4 Reformat in preparation for multiple users 2024-05-31 16:24:04 +00:00
Taneb f8ab913941 Move data dir for plex 2024-05-09 13:48:22 +00:00
Taneb 684cf02eee Add plex setup
I want to move where the config is but eh
2024-05-09 06:58:18 +00:00
Taneb e2a0b0bcde Set up zfs
It's not done declaratively but eh
2024-05-04 14:33:24 +00:00
Taneb eac215ce10 Add note about switching 2024-05-04 12:40:19 +00:00
Taneb e5d0e1dbf0 Update README 2024-05-04 12:38:17 +00:00
Taneb 17fd651768 Enable flakes and nix command 2024-05-04 12:37:58 +00:00
3 changed files with 97 additions and 17 deletions
+20 -4
View File
@@ -12,16 +12,16 @@ MicroSD card as boot and OS.
### Zeroth milestone
- [X] SSH daemon
- [ ] User who can act as a local admin
- [X] User who can act as a local admin
### First milestone
- [ ] ZFS set up on the HDDs
- [ ] Plex media server
- [X] ZFS set up on the HDDs
- [X] Plex media server
### Second milestone
- [ ] Samba for easy file access from Windows
- [X] Samba for easy file access from Windows
- [ ] NFS for easy file access from Linux
### Third milestone
@@ -29,6 +29,14 @@ MicroSD card as boot and OS.
- [ ] Torrent client web control interface available over LAN
- [ ] 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
To build the SD image:
@@ -51,6 +59,14 @@ Further instructions can be found on these pages:
[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
### Building boot thing
Generated
+10 -6
View File
@@ -2,14 +2,18 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 0,
"narHash": "sha256-XD6GfVgSfWjqqWAuybkvaxS1/xrwTrh3V1dSkoYJW3Q=",
"path": "/nix/store/jjjyazlmzjls1kdpgn776iy9w345yq7l-source",
"type": "path"
"lastModified": 1719254875,
"narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
+61 -1
View File
@@ -1,4 +1,7 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }: {
# miscellaneous stuff that's important
nixosModules.base = {lib, ...}: {
@@ -7,10 +10,14 @@
networking.firewall.enable = true;
system.stateVersion = "24.05";
sdImage.firmwarePartitionOffset = 32;
nix.settings = {
extra-experimental-features = [ "nix-command" "flakes" ];
};
};
# Configuration of individual users
nixosModules.users = {...}: {
users.users.taneb = {
users.users = {
taneb = {
isNormalUser = true;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [
@@ -18,6 +25,11 @@
];
hashedPassword = "$y$j9T$9pxQ4Zj7OirGMmgclhUb0/$YCfaYmIaaHRrkqiqdNbQSlJ7puX8bGrMCLavq6Pe1e3";
};
nairis = {
isNormalUser = true;
hashedPassword = "$y$j9T$luA6OU3OWVXbJc6DZM4Fx1$nTc89zTdKgozwR5kZQglbWaCkOFtmNZcpO4WCcYYPZC";
};
};
users.mutableUsers = false;
};
# Configuration of SSH server
@@ -28,6 +40,50 @@
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;
shares = {
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 {
system = "aarch64-linux";
modules = [
@@ -35,6 +91,10 @@
self.nixosModules.base
self.nixosModules.users
self.nixosModules.ssh
self.nixosModules.zfs
self.nixosModules.plex
self.nixosModules.samba
self.nixosModules.hledger
];
};
};