Compare commits
12
Commits
f8ab913941
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe86dce099 | ||
|
|
270feb3e85 | ||
|
|
90eac24b77 | ||
|
|
072dbfe689 | ||
|
|
35862426ae | ||
|
|
530edccdf5 | ||
|
|
22b8aedee4 | ||
|
|
075b1ff967 | ||
|
|
9fcb0cfad1 | ||
|
|
5e34efac9d | ||
|
|
30f97c74b5 | ||
|
|
2fb3f631d4 |
@@ -21,7 +21,7 @@ MicroSD card as boot and OS.
|
||||
|
||||
### 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:
|
||||
|
||||
Generated
+10
-6
@@ -2,14 +2,18 @@
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 0,
|
||||
"narHash": "sha256-XD6GfVgSfWjqqWAuybkvaxS1/xrwTrh3V1dSkoYJW3Q=",
|
||||
"path": "/nix/store/jjjyazlmzjls1kdpgn776iy9w345yq7l-source",
|
||||
"type": "path"
|
||||
"lastModified": 1726937504,
|
||||
"narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9357f4f23713673f310988025d9dc261c20e70c6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
outputs = { self, nixpkgs }: {
|
||||
# miscellaneous stuff that's important
|
||||
nixosModules.base = {lib, ...}: {
|
||||
@@ -13,13 +16,19 @@
|
||||
};
|
||||
# Configuration of individual users
|
||||
nixosModules.users = {...}: {
|
||||
users.users.taneb = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIV9ymP4tpq11a8wfUvn8eEEwAPvZZSPZTbASLh7YxOw nvd1234@gmail.com"
|
||||
];
|
||||
hashedPassword = "$y$j9T$9pxQ4Zj7OirGMmgclhUb0/$YCfaYmIaaHRrkqiqdNbQSlJ7puX8bGrMCLavq6Pe1e3";
|
||||
users.users = {
|
||||
taneb = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIV9ymP4tpq11a8wfUvn8eEEwAPvZZSPZTbASLh7YxOw nvd1234@gmail.com"
|
||||
];
|
||||
hashedPassword = "$y$j9T$9pxQ4Zj7OirGMmgclhUb0/$YCfaYmIaaHRrkqiqdNbQSlJ7puX8bGrMCLavq6Pe1e3";
|
||||
};
|
||||
nairis = {
|
||||
isNormalUser = true;
|
||||
hashedPassword = "$y$j9T$luA6OU3OWVXbJc6DZM4Fx1$nTc89zTdKgozwR5kZQglbWaCkOFtmNZcpO4WCcYYPZC";
|
||||
};
|
||||
};
|
||||
users.mutableUsers = false;
|
||||
};
|
||||
@@ -41,11 +50,40 @@
|
||||
nixosModules.plex = {...}: {
|
||||
services.plex = {
|
||||
enable = true;
|
||||
dataDir = "/storage/data";
|
||||
openFirewall = 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 {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
@@ -53,8 +91,10 @@
|
||||
self.nixosModules.base
|
||||
self.nixosModules.users
|
||||
self.nixosModules.ssh
|
||||
self.nixosModules.zfs
|
||||
self.nixosModules.plex
|
||||
self.nixosModules.zfs
|
||||
self.nixosModules.plex
|
||||
self.nixosModules.samba
|
||||
self.nixosModules.hledger
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user