Changes
This commit is contained in:
parent
ba24ea38da
commit
f43c989493
@ -43,13 +43,35 @@ with deviceSpecific; {
|
|||||||
"gid=${toString config.users.groups.smbgrp.gid}"
|
"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) {
|
"/media/windows/files" = lib.mkIf (!isHost) {
|
||||||
fsType = "cifs";
|
fsType = "cifs";
|
||||||
device = "//192.168.0.100/Files";
|
device = "//192.168.0.100/Files";
|
||||||
options = [
|
options = [
|
||||||
"user=${secrets.windows-samba.user}"
|
"user=${secrets.windows-samba.user}"
|
||||||
"password=${secrets.windows-samba.password}"
|
"password=${secrets.windows-samba.password}"
|
||||||
"nofail"
|
# "nofail"
|
||||||
"uid=${toString config.users.users.alukard.uid}"
|
"uid=${toString config.users.users.alukard.uid}"
|
||||||
"gid=${toString config.users.groups.users.gid}"
|
"gid=${toString config.users.groups.users.gid}"
|
||||||
];
|
];
|
||||||
@ -61,7 +83,7 @@ with deviceSpecific; {
|
|||||||
"ro"
|
"ro"
|
||||||
"user=${secrets.windows-samba.user}"
|
"user=${secrets.windows-samba.user}"
|
||||||
"password=${secrets.windows-samba.password}"
|
"password=${secrets.windows-samba.password}"
|
||||||
"nofail"
|
# "nofail"
|
||||||
"uid=${toString config.users.users.alukard.uid}"
|
"uid=${toString config.users.users.alukard.uid}"
|
||||||
"gid=${toString config.users.groups.users.gid}"
|
"gid=${toString config.users.groups.users.gid}"
|
||||||
];
|
];
|
||||||
@ -69,7 +91,9 @@ with deviceSpecific; {
|
|||||||
};
|
};
|
||||||
swapDevices = [
|
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"
|
"/dev/disk/by-partuuid/2de40bc4-a91c-4c89-a2cd-cbf34a0adf01"
|
||||||
else if device == "NixOS-VM" then
|
else if device == "NixOS-VM" then
|
||||||
"/dev/disk/by-partuuid/4caf1e45-2f1c-4cb2-a914-f2e90961503a"
|
"/dev/disk/by-partuuid/4caf1e45-2f1c-4cb2-a914-f2e90961503a"
|
||||||
|
@ -32,22 +32,23 @@ with deviceSpecific; {
|
|||||||
disable netbios = yes
|
disable netbios = yes
|
||||||
smb ports = 445
|
smb ports = 445
|
||||||
|
|
||||||
[private]
|
[Data]
|
||||||
path = /shared/samba
|
path = /shared/data
|
||||||
browsable = yes
|
browsable = yes
|
||||||
read only = no
|
read only = yes
|
||||||
force create mode = 0660
|
force create mode = 0660
|
||||||
force directory mode = 2770
|
force directory mode = 2770
|
||||||
valid users = @smbgrp
|
valid users = @smbgrp
|
||||||
|
|
||||||
[files]
|
[Files]
|
||||||
path = /shared/files
|
path = /shared/files
|
||||||
browsable = yes
|
browsable = yes
|
||||||
read only = no
|
read only = no
|
||||||
guest only = yes
|
# guest only = yes
|
||||||
force create mode = 0660
|
force create mode = 0660
|
||||||
force directory mode = 2770
|
force directory mode = 2770
|
||||||
force user = smbuser
|
# force user = smbuser
|
||||||
|
valid users = @smbgrp
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
services.accounts-daemon.enable = true;
|
services.accounts-daemon.enable = true;
|
||||||
|
|
||||||
services.avahi.enable = true;
|
services.avahi.enable = true;
|
||||||
|
services.avahi.ipv6 = true;
|
||||||
services.avahi.nssmdns = true;
|
services.avahi.nssmdns = true;
|
||||||
services.avahi.publish.enable = true;
|
services.avahi.publish.enable = true;
|
||||||
services.avahi.publish.addresses = true;
|
services.avahi.publish.addresses = true;
|
||||||
@ -48,11 +49,11 @@
|
|||||||
|
|
||||||
services.upower.enable = true;
|
services.upower.enable = true;
|
||||||
|
|
||||||
virtualisation.docker.enable = config.deviceSpecific.isHost;
|
# virtualisation.docker.enable = config.deviceSpecific.isHost;
|
||||||
virtualisation.virtualbox.host = lib.mkIf config.deviceSpecific.isHost {
|
# virtualisation.virtualbox.host = lib.mkIf config.deviceSpecific.isHost {
|
||||||
enable = true;
|
# enable = true;
|
||||||
# enableHardening = false;
|
# # enableHardening = false;
|
||||||
enableExtensionPack = true;
|
# enableExtensionPack = true;
|
||||||
};
|
# };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,7 @@ in
|
|||||||
|
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
(mkIf cfgC.enable {
|
(mkIf cfgC.enable {
|
||||||
|
environment.systemPackages = with pkgs; [ (barrier.override { avahiWithLibdnssdCompat = true; }) ];
|
||||||
systemd.user.services."barrier-client" = {
|
systemd.user.services."barrier-client" = {
|
||||||
after = [ "network.target" "graphical-session.target" ];
|
after = [ "network.target" "graphical-session.target" ];
|
||||||
description = "Barrier client";
|
description = "Barrier client";
|
||||||
@ -78,6 +79,7 @@ in
|
|||||||
};
|
};
|
||||||
})
|
})
|
||||||
(mkIf cfgS.enable {
|
(mkIf cfgS.enable {
|
||||||
|
environment.systemPackages = with pkgs; [ (barrier.override { avahiWithLibdnssdCompat = true; }) ];
|
||||||
systemd.user.services."barrier-server" = {
|
systemd.user.services."barrier-server" = {
|
||||||
after = [ "network.target" "graphical-session.target" ];
|
after = [ "network.target" "graphical-session.target" ];
|
||||||
description = "Barrier server";
|
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.enable = true;
|
||||||
server.autoStart = true;
|
server.autoStart = true;
|
||||||
server.configFile = pkgs.writeTextFile {
|
server.configFile = pkgs.writeTextFile {
|
||||||
name = "barrier.conf";
|
name = "barrier.conf";
|
||||||
text = ''
|
text = ''
|
||||||
section: screens
|
section: screens
|
||||||
NixOS-VM:
|
ataraxia-pc:
|
||||||
dell-ataraxia:
|
dell-ataraxia:
|
||||||
end
|
end
|
||||||
section: links
|
section: links
|
||||||
dell-ataraxia:
|
dell-ataraxia:
|
||||||
right = NixOS-VM
|
right = ataraxia-pc
|
||||||
end
|
end
|
||||||
section: options
|
section: options
|
||||||
keystroke(super+alt+left) = switchInDirection(left)
|
keystroke(super+alt+left) = switchInDirection(left)
|
||||||
@ -110,7 +112,7 @@ in
|
|||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
client.enable = true;
|
client.enable = true;
|
||||||
client.serverAddress = "NixOS-VM";
|
client.serverAddress = "ataraxia-pc";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
BIN
secret.nix.gpg
BIN
secret.nix.gpg
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user