loki: Add samba, spice-gtk
This commit is contained in:
parent
63c7a2966c
commit
2713f1578d
2 changed files with 63 additions and 0 deletions
|
@ -66,6 +66,9 @@
|
|||
wallpaper = ../../wallpapers/river-2560.png;
|
||||
wayvnc = false;
|
||||
};
|
||||
samba = {
|
||||
enable = true;
|
||||
};
|
||||
tailscale = {
|
||||
enable = true;
|
||||
nftables = true;
|
||||
|
@ -228,6 +231,8 @@
|
|||
to = 1410;
|
||||
}
|
||||
];
|
||||
|
||||
allowPing = true;
|
||||
};
|
||||
|
||||
wireless.iwd = {
|
||||
|
@ -450,6 +455,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
virtualisation.spiceUSBRedirection.enable = true;
|
||||
|
||||
programs = {
|
||||
sway = {
|
||||
enable = true;
|
||||
|
@ -556,6 +563,7 @@
|
|||
systemPackages = with pkgs; [
|
||||
incus
|
||||
iwgtk
|
||||
spice-gtk
|
||||
tailscale
|
||||
];
|
||||
};
|
||||
|
|
55
modules/samba/default.nix
Normal file
55
modules/samba/default.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.eboskma.samba;
|
||||
|
||||
sharedFolder = types.submodule {
|
||||
options = {
|
||||
path = mkOption {
|
||||
description = "Path";
|
||||
type = types.path;
|
||||
example = literalExpression "/srv/files";
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
description = "Name of the share. Defaults to folder name of {option}`eboskma.samba.shares.*.path`";
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
options.eboskma.samba = {
|
||||
enable = mkEnableOption "Shared folders over CIFS";
|
||||
|
||||
shares = mkOption {
|
||||
description = "Folders to share";
|
||||
type = types.listOf sharedFolder;
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services = {
|
||||
samba = {
|
||||
enable = true;
|
||||
package = pkgs.samba4Full;
|
||||
nmbd.enable = true;
|
||||
openFirewall = true;
|
||||
usershares = {
|
||||
enable = true;
|
||||
group = "users";
|
||||
};
|
||||
};
|
||||
samba-wsdd = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue