Compare commits

...

20 commits

Author SHA1 Message Date
c0004409d7
alyssum/samba: bind music
Some checks failed
CI / Build linux-lava for x86_64-linux (push) Has been cancelled
2026-06-19 09:12:52 +10:00
004832fc06
containers/emerald: bind music directory
Some checks failed
CI / Build linux-lava for x86_64-linux (push) Has been cancelled
2026-06-19 09:03:39 +10:00
83371117d4
containers/emerald: change mounts
Some checks are pending
CI / Build linux-lava for x86_64-linux (push) Waiting to run
2026-06-19 08:57:22 +10:00
e1c02d7a91
containers/emerald: move to alyssum
Some checks are pending
CI / Build linux-lava for x86_64-linux (push) Waiting to run
2026-06-19 08:01:17 +10:00
4dfc898140
user/neovim: switch to nixd 2026-06-19 07:36:13 +10:00
21dc584199
alyssum/home.syncthing: don't override devices and folders
Some checks failed
CI / Build linux-lava for x86_64-linux (push) Has been cancelled
2026-06-17 21:22:03 +10:00
6c80606b7e
alyssum/home.syncthing: fixup conf
Some checks are pending
CI / Build linux-lava for x86_64-linux (push) Waiting to run
2026-06-17 21:15:22 +10:00
907f2cabca
alyssum/home.syncthing: set proper defaults
Some checks are pending
CI / Build linux-lava for x86_64-linux (push) Waiting to run
2026-06-17 21:14:47 +10:00
5c13051b4b
alyssum/samba: bind some directories 2026-06-17 21:05:38 +10:00
bc3269a814
alyssum/home.syncthing: create another instance
Some checks are pending
CI / Build linux-lava for x86_64-linux (push) Waiting to run
2026-06-17 20:29:22 +10:00
63d9d6b004
alyssum/home.syncthing: add host to gui address
Some checks are pending
CI / Build linux-lava for x86_64-linux (push) Waiting to run
2026-06-17 19:58:03 +10:00
9a821fda94
alyssum/home.syncthing: fixup hm config
Some checks are pending
CI / Build linux-lava for x86_64-linux (push) Waiting to run
2026-06-17 19:50:02 +10:00
8157d0d561
alyssum/home.syncthing: init
Some checks are pending
CI / Build linux-lava for x86_64-linux (push) Waiting to run
2026-06-17 19:49:10 +10:00
024a6bdbe2
alyssum/samba: relax hosts
Some checks are pending
CI / Build linux-lava for x86_64-linux (push) Waiting to run
2026-06-17 18:47:15 +10:00
4bb20124a7
alyssum/samba: use full package for discovery
Some checks are pending
CI / Build linux-lava for x86_64-linux (push) Waiting to run
2026-06-17 18:34:34 +10:00
509684d0bd
alyssum/samba: use proper smbpasswd path
Some checks are pending
CI / Build linux-lava for x86_64-linux (push) Waiting to run
2026-06-17 18:28:39 +10:00
c782bd5e53
hosts/alyssum: add passwd age
Some checks are pending
CI / Build linux-lava for x86_64-linux (push) Waiting to run
2026-06-17 18:23:10 +10:00
4f8249b780
alyssum/samba: use proper credentials
Some checks are pending
CI / Build linux-lava for x86_64-linux (push) Waiting to run
2026-06-17 18:16:21 +10:00
d1a8e7222f
alyssum/samba: init 2026-06-17 18:11:09 +10:00
402c847f3c
dandelion/filesystem: reduce rootfs from 12G to 6G 2026-06-14 20:32:32 +10:00
18 changed files with 201 additions and 24 deletions

View file

@ -16,7 +16,8 @@
ShareURL = "https://${shareFqdn}";
EnableSharing = true;
DataFolder = "/persist/navidrome";
MusicFolder = "/binds/music";
MusicFolder = "/binds/music/main";
};
};
systemd.services.navidrome.serviceConfig.BindReadOnlyPaths = ["/binds/music"];
}

View file

@ -9,11 +9,11 @@
shareFqdn = "muse.lava.moe";
subnetId = "5";
subnet = x: "fd0d:1::${subnetId}:${toString x}";
subnet = x: "fd0d:2::${subnetId}:${toString x}";
host = subnet 1;
client = subnet 2;
subnet4 = x: "10.30.${subnetId}.${toString x}";
subnet4 = x: "10.32.${subnetId}.${toString x}";
host4 = subnet4 1;
client4 = subnet4 2;
@ -39,13 +39,7 @@
useACMEHost = "lava.moe";
forceSSL = true;
locations."/".proxyPass = "http://[${client}]:4533";
listenAddresses = [ "10.0.0.1" "[fd0d::1]" "100.67.1.1" ];
};
services.nginx.virtualHosts."${shareFqdn}" = {
useACMEHost = "lava.moe";
forceSSL = true;
locations."/".return = "404";
locations."/share/".proxyPass = "http://[${client}]:4533";
listenAddresses = [ "100.67.2.1" ];
};
systemd.tmpfiles.rules = [ "d /persist/containers/${name} 755 root users" ];
@ -68,7 +62,7 @@
isReadOnly = false;
};
bindMounts."music" = {
hostPath = "/persist/media/music";
hostPath = "/flower/media/music";
mountPoint = "/binds/music";
isReadOnly = true;
};

View file

@ -5,6 +5,8 @@
age.secrets = {
acme_dns.file = ../../secrets/acme_dns.age;
passwd.file = ../../secrets/passwd.age;
navidrome_env.file = ../../secrets/navidrome_env.age;
wpa_conf = {
file = ../../secrets/wpa_conf.age;
path = "/etc/wpa_supplicant/imperative.conf";
@ -26,11 +28,14 @@
modules.services.nginx
modules.services.syncthing
inputs.c-emerald.nixosModule
inputs.c-garnet.nixosModule
./filesystem.nix
./kernel.nix
./networking.nix
./home.syncthing.nix
./samba.nix
../../users/hana
];

View file

@ -0,0 +1,39 @@
{ config, lib, ... }:
let
configOn = user: port: {
me.binds."/home/${user}/.config/syncthing" = "${user}/syncthing/config";
me.binds."/home/${user}/.local/state/syncthing" = "${user}/syncthing/state";
systemd.tmpfiles.rules = [ "d /flower/syncthing/${user} 700 ${user} users" ];
users.users.${user} = {
hashedPasswordFile = config.age.secrets.passwd.path;
isNormalUser = true;
linger = true;
};
home-manager.users.${user} = { ... }: {
home = {
username = "${user}";
homeDirectory = "/home/${user}";
stateVersion = "26.05";
};
services.syncthing = {
enable = true;
guiAddress = "[::]:${toString port}";
overrideDevices = false;
overrideFolders = false;
settings = {
options.listenAddresses = [
"tcp://0.0.0.0:2${toString port}"
"quic://0.0.0.0:2${toString port}"
"dynamic+https://relays.syncthing.net/endpoint"
];
defaults.folder.path = "/flower/syncthing/${user}";
};
};
};
};
in lib.mkMerge [
(configOn "kujira" 8385)
(configOn "cilly" 8386)
]

84
hosts/alyssum/samba.nix Normal file
View file

@ -0,0 +1,84 @@
{ config, lib, pkgs, ... }:
let
configOn = user: let
passwd_fname = "passwd_smb${user}";
in {
age.secrets.${passwd_fname}.file = ../../secrets/${passwd_fname}.age;
me.binds."/flower/smb/${user}/music" = "/flower/media/music/${user}";
me.binds."/flower/smb/${user}/syncthing" = "/flower/syncthing/${user}";
users.users.${user} = {
hashedPasswordFile = config.age.secrets.passwd.path;
isNormalUser = true;
};
system.activationScripts = {
init_smbpasswd.text = let
smbpasswd = "${config.services.samba.package}/bin/smbpasswd";
in ''
printf "$(cat ${config.age.secrets.${passwd_fname}.path})\n$(cat ${config.age.secrets.${passwd_fname}.path})\n" | ${smbpasswd} -sa ${user}
'';
};
services.samba.settings."${user}" = {
"path" = "/flower/smb/${user}";
"browseable" = "yes";
"read only" = "no";
"guest ok" = "no";
"create mask" = "0644";
"directory mask" = "0755";
"force user" = user;
"force group" = "users";
"valid users" = user;
};
};
in lib.mkMerge [
(configOn "cilly")
(configOn "kujira")
{
me.binds."/flower/smb/kujira/opencloud" = "/flower/opencloud/data/storage/users/users/a8e29fc0-673c-4c67-be00-2442904acb43";
networking.firewall.allowPing = true;
services.samba = {
enable = true;
package = pkgs.samba4Full;
openFirewall = true;
settings = {
global = {
"server smb encrypt" = "required";
"workgroup" = "WORKGROUP";
"server string" = "smbnix";
"netbios name" = "smbnix";
"security" = "user";
"hosts allow" = "100.64.0.0/10 127.0.0.1 alyssum localhost";
"hosts deny" = "0.0.0.0/0";
"guest account" = "nobody";
"map to guest" = "bad user";
};
"public" = {
"path" = "/flower/smb/public";
"browseable" = "yes";
"read only" = "no";
"guest ok" = "yes";
"create mask" = "0644";
"directory mask" = "0755";
"force user" = "hana";
"force group" = "users";
};
};
};
services.samba-wsdd = {
enable = true;
openFirewall = true;
};
services.avahi = {
enable = true;
openFirewall = true;
nssmdns4 = true;
publish.enable = true;
publish.userServices = true;
};
}
]

View file

@ -5,7 +5,6 @@
age.secrets = {
acme_dns.file = ../../secrets/acme_dns.age;
navidrome_env.file = ../../secrets/navidrome_env.age;
slskd_env.file = ../../secrets/slskd_env.age;
wg_dandelion.file = ../../secrets/wg_dandelion.age;
};
@ -31,12 +30,12 @@
inputs.c-beryllium.nixosModule
inputs.c-citrine.nixosModule
inputs.c-diamond.nixosModule
inputs.c-emerald.nixosModule
inputs.c-fluorite.nixosModule
./filesystem.nix
./kernel.nix
./networking.nix
./nginx.nix
../../users/hana
];

View file

@ -22,7 +22,7 @@ in {
"/" = {
device = "rootfs";
fsType = "tmpfs";
options = [ "defaults" "size=12G" "mode=755" ];
options = [ "defaults" "size=6G" "mode=755" ];
};
"/boot" = mkLabelMount "UEFI" "vfat";

View file

@ -0,0 +1,8 @@
{ ... }: {
services.nginx.virtualHosts."muse.lava.moe" = {
useACMEHost = "lava.moe";
forceSSL = true;
locations."/".return = "404";
locations."/share/".proxyPass = "http://[fd0d:2::5:2]:4533";
};
}

View file

@ -1,8 +1,12 @@
{ config, lib, ...}: {
imports = [ ./options.nix ];
fileSystems = lib.mapAttrs (dest: key: {
fileSystems = lib.mapAttrs (dest: key: let
target = if (lib.strings.hasPrefix "/" key)
then key
else "/persist/binds/${key}";
in {
depends = [ "/persist" ];
device = "/persist/binds/${key}";
device = target;
fsType = "none";
options = [ "bind" ];
}) config.me.binds;

View file

@ -1,5 +1,6 @@
{ config, lib, pkgs, ... }: {
{ config, inputs, pkgs, ... }: {
nix = {
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
package = pkgs.nixVersions.latest;
settings = rec {

View file

@ -1,9 +1,9 @@
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, sysConfig, ... }:
let
luaconf = pkgs.writeText "config.lua"
(lib.replaceStrings
["{{OMNISHARP_PATH}}" "{{DART_PATH}}" "{{CATPPUCCIN_FLAVOUR}}"]
["${pkgs.omnisharp-roslyn}/bin/OmniSharp" "${pkgs.dart}/bin/dart" config.catppuccin.nvim.flavor]
["{{OMNISHARP_PATH}}" "{{DART_PATH}}" "{{CATPPUCCIN_FLAVOUR}}" "{{USERNAME}}" "{{HOSTNAME}}"]
["${pkgs.omnisharp-roslyn}/bin/OmniSharp" "${pkgs.dart}/bin/dart" config.catppuccin.nvim.flavor config.home.username sysConfig.networking.hostName]
(builtins.readFile ../../res/config.lua));
in {
systemd.user.tmpfiles.rules = [
@ -21,6 +21,7 @@ in {
withRuby = false;
extraPackages = with pkgs; [
nixd
rust-analyzer
texlab
astro-language-server

View file

@ -167,7 +167,7 @@ vim.diagnostic.config({
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
local servers = { 'astro', 'clangd', 'cssls', 'html', 'nil_ls', 'tailwindcss', 'texlab', 'ts_ls', 'yamlls' }
local servers = { 'astro', 'clangd', 'cssls', 'html', 'tailwindcss', 'texlab', 'ts_ls', 'yamlls' }
for _, lsp in ipairs(servers) do
vim.lsp.config(lsp, {
capabilities = capabilities,
@ -292,6 +292,32 @@ vim.lsp.config("diagnosticls", {
})
vim.lsp.enable("diagnosticls")
-- LSP/nixd
vim.lsp.config("nixd", {
cmd = { "nixd" },
filetypes = { "nix" },
root_markers = { "flake.nix", ".git" },
settings = {
nixd = {
nixpkgs = {
expr = "import <nixpkgs> { }",
},
formatting = {
command = { "nixfmt" },
},
options = {
nixos = {
expr = '(builtins.getFlake (toString ./.)).nixosConfigurations.{{HOSTNAME}}.options',
},
home_manager = {
expr = '(builtins.getFlake (builtins.toString ./.)).nixosConfigurations."{{USERNAME}}@{{HOSTNAME}}".options.home-manager.users.type.getSubOptions []',
},
},
},
},
})
vim.lsp.enable("nixd")
-- LSP/Signatures
require("lsp_signature").setup {
hint_enable = false,

View file

@ -7,11 +7,13 @@ let
rin = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPru5eTBvHJ4ZmrrzPRHCGM09wQP/ZHSaKYalDuBVO15";
in {
"secrets/passwd.age".publicKeys = [ anemone blossom rin ];
"secrets/passwd.age".publicKeys = [ alyssum anemone blossom rin ];
"secrets/passwd_smbcilly.age".publicKeys = [ alyssum rin ];
"secrets/passwd_smbkujira.age".publicKeys = [ alyssum rin ];
"secrets/wpa_conf.age".publicKeys = [ alyssum blossom rin ];
"secrets/acme_dns.age".publicKeys = [ alyssum dandelion hazel rin ];
"secrets/navidrome_env.age".publicKeys = [ anemone dandelion rin ];
"secrets/navidrome_env.age".publicKeys = [ alyssum dandelion rin ];
"secrets/slskd_env.age".publicKeys = [ anemone dandelion rin ];
"secrets/tailscale_auth.age".publicKeys = [ alyssum anemone blossom dandelion rin ];
"secrets/warden_admin.age".publicKeys = [ rin ];

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,7 @@
age-encryption.org/v1
-> ssh-ed25519 kOMSPw CQaXT9/nw3NGD2/H/ctSQGXIoacgjfKQ24wkpEieLSQ
i4xEXgWGQ7xgQyaDQQIeDuiCLjA6Le23qSnv8C1cbcI
-> ssh-ed25519 U9FXlg GL4dCSCku/FA6ipb9XI1AxO4lhm2r/1lRAeqaGrB32o
+pPgqwnoPi3wJLobTimVMj0rng+XRapRG6jTYFXSsDM
--- eVgn3ON19pqq+L832bqlbkHUQXdaTI+LfSL4bYfEdew
Æ*Œl\ÈWç!J7E/´»îò"f@%\ìüÏ[¨òj8fÓ¶ž

View file

@ -0,0 +1,7 @@
age-encryption.org/v1
-> ssh-ed25519 kOMSPw Kn+LPMoyOrVwI/nrGgnxgVA3D+tVY9Tccg/Yx/jL+E8
IfWiSBh7KgNvgcHlcDzfdcB9nxm1zy12Ae7AGm39fdE
-> ssh-ed25519 U9FXlg 6eIIGEIYDo02FBsgBnwbuOeR8t4xB6jSmLfIL73UCDg
QOc0ddunQQcVEVD20DKKpn3wZWUSveFJSUTBnv+xnNk
--- MjN2i0FNzbUpBGUDNgWGXrRsYl2gtsQX+JlzZV/fYdw
TÎ <çR#d<> ĆÌŽlLkáN¦½º8´cÃ_N¬)±ŠT

View file

@ -15,7 +15,6 @@ in {
ffmpeg
gnupg
kitty
nil
nodejs_latest
pamixer
pnpm