This commit is contained in:
Dmitriy Holkin 2019-09-28 02:04:07 +04:00
commit 5eecf7bdb7
4 changed files with 47 additions and 19 deletions

View File

@ -43,13 +43,35 @@ with deviceSpecific; {
"gid=${toString config.users.groups.smbgrp.gid}"
];
};
"/shared/data" = lib.mkIf (isHost) {
fsType = "ntfs";
device = "/dev/disk/by-partuuid/f9f853f5-498a-4981-8082-02feeae85377";
options = [
"ro"
# "noatime"
"nofail"
"uid=${toString config.users.users.alukard.uid}"
"gid=${toString config.users.groups.smbgrp.gid}"
];
};
"/shared/files" = lib.mkIf (isHost) {
fsType = "ntfs";
device = "/dev/disk/by-partuuid/8a1d933c-302b-4e62-b9af-a45ecd05777f";
options = [
# "ro"
# "noatime"
"nofail"
"uid=${toString config.users.users.alukard.uid}"
"gid=${toString config.users.groups.smbgrp.gid}"
];
};
"/media/windows/files" = lib.mkIf (!isHost) {
fsType = "cifs";
device = "//192.168.0.100/Files";
options = [
"user=${secrets.windows-samba.user}"
"password=${secrets.windows-samba.password}"
"nofail"
# "nofail"
"uid=${toString config.users.users.alukard.uid}"
"gid=${toString config.users.groups.users.gid}"
];
@ -61,7 +83,7 @@ with deviceSpecific; {
"ro"
"user=${secrets.windows-samba.user}"
"password=${secrets.windows-samba.password}"
"nofail"
# "nofail"
"uid=${toString config.users.users.alukard.uid}"
"gid=${toString config.users.groups.users.gid}"
];
@ -69,7 +91,9 @@ with deviceSpecific; {
};
swapDevices = [
{
device = if device == "Dell-Laptop" then
device = if device == "AMD-Workstation" then
"/dev/disk/by-partuuid/3c4f9305-ad40-4ed3-b568-f1559f1c845a"
else if device == "Dell-Laptop" then
"/dev/disk/by-partuuid/2de40bc4-a91c-4c89-a2cd-cbf34a0adf01"
else if device == "NixOS-VM" then
"/dev/disk/by-partuuid/4caf1e45-2f1c-4cb2-a914-f2e90961503a"

View File

@ -32,22 +32,23 @@ with deviceSpecific; {
disable netbios = yes
smb ports = 445
[private]
path = /shared/samba
[Data]
path = /shared/data
browsable = yes
read only = no
read only = yes
force create mode = 0660
force directory mode = 2770
valid users = @smbgrp
[files]
[Files]
path = /shared/files
browsable = yes
read only = no
guest only = yes
# guest only = yes
force create mode = 0660
force directory mode = 2770
force user = smbuser
# force user = smbuser
valid users = @smbgrp
'';
};
environment.systemPackages =

View File

@ -40,6 +40,7 @@
services.accounts-daemon.enable = true;
services.avahi.enable = true;
services.avahi.ipv6 = true;
services.avahi.nssmdns = true;
services.avahi.publish.enable = true;
services.avahi.publish.addresses = true;
@ -48,11 +49,11 @@
services.upower.enable = true;
virtualisation.docker.enable = config.deviceSpecific.isHost;
virtualisation.virtualbox.host = lib.mkIf config.deviceSpecific.isHost {
enable = true;
# enableHardening = false;
enableExtensionPack = true;
};
# virtualisation.docker.enable = config.deviceSpecific.isHost;
# virtualisation.virtualbox.host = lib.mkIf config.deviceSpecific.isHost {
# enable = true;
# # enableHardening = false;
# enableExtensionPack = true;
# };
}

View File

@ -68,6 +68,7 @@ in
config = mkMerge [
(mkIf cfgC.enable {
environment.systemPackages = with pkgs; [ (barrier.override { avahiWithLibdnssdCompat = true; }) ];
systemd.user.services."barrier-client" = {
after = [ "network.target" "graphical-session.target" ];
description = "Barrier client";
@ -78,6 +79,7 @@ in
};
})
(mkIf cfgS.enable {
environment.systemPackages = with pkgs; [ (barrier.override { avahiWithLibdnssdCompat = true; }) ];
systemd.user.services."barrier-server" = {
after = [ "network.target" "graphical-session.target" ];
description = "Barrier server";
@ -88,19 +90,19 @@ in
};
})
({
services.barrier = if config.device == "NixOS-VM" then {
services.barrier = if config.device == "AMD-Workstation" then {
server.enable = true;
server.autoStart = true;
server.configFile = pkgs.writeTextFile {
name = "barrier.conf";
text = ''
section: screens
NixOS-VM:
ataraxia-pc:
dell-ataraxia:
end
section: links
dell-ataraxia:
right = NixOS-VM
right = ataraxia-pc
end
section: options
keystroke(super+alt+left) = switchInDirection(left)
@ -110,7 +112,7 @@ in
};
} else {
client.enable = true;
client.serverAddress = "NixOS-VM";
client.serverAddress = "ataraxia-pc";
};
})
];