From f43c989493fe24d588ebbfc9cd47b6594cb11e09 Mon Sep 17 00:00:00 2001 From: Dmitriy Holkin Date: Sat, 28 Sep 2019 01:53:49 +0400 Subject: [PATCH] Changes --- modules/filesystems.nix | 30 +++++++++++++++++++++++++++--- modules/samba.nix | 13 +++++++------ modules/services.nix | 13 +++++++------ modules/workspace/barrier.nix | 10 ++++++---- secret.nix.gpg | Bin 1050 -> 1182 bytes 5 files changed, 47 insertions(+), 19 deletions(-) diff --git a/modules/filesystems.nix b/modules/filesystems.nix index afae593..4b579b2 100644 --- a/modules/filesystems.nix +++ b/modules/filesystems.nix @@ -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" diff --git a/modules/samba.nix b/modules/samba.nix index b69fab6..341edd4 100644 --- a/modules/samba.nix +++ b/modules/samba.nix @@ -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 = diff --git a/modules/services.nix b/modules/services.nix index e06c3f9..1ebe189 100644 --- a/modules/services.nix +++ b/modules/services.nix @@ -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; + # }; } diff --git a/modules/workspace/barrier.nix b/modules/workspace/barrier.nix index 49621b2..f2f6a50 100644 --- a/modules/workspace/barrier.nix +++ b/modules/workspace/barrier.nix @@ -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"; }; }) ]; diff --git a/secret.nix.gpg b/secret.nix.gpg index decf4641301488efede6e69b1c719f5d9b1f1435..97358f1f8941d6617ebd64420a4d93a07a936ffa 100644 GIT binary patch literal 1182 zcmV;P1Y!Gy0Sp5t#%vKxT`Ri*2meY6@v%_<1A$+i*GUy&l1`_v(mMT~r7?ZIJay zLsX7ZX?V*iw{=0+926)_X3I^=hn&GyQ$nhuIogBjcDYdYc2R}6+N^ctq#Iy}7IP?n zNDn$4i2qk@wj&Q~e?4eV*1W02GuUKujDRIQ?9iKsqQ2$TvpY=8JH~OZEEnb@712<@ z;sLot)8(F>X5-`Oz!S*-BL+X%A=l5QRrs@OW5-gez!!ma)-j=YyBX{g+jF|B6LfJ6 ztu7s@RP>#jblc7}4waV^h9%PJ0i!4`;rYrtKPI3y!TbW{Hr(gm7m*ezmhk78ayJ>W z{D0aIDU1Tr%1YfAdJ5Yoxc{Uub69eYaH4-s3I}JslZZRh%v4nm^0 z#3m|Ka!2TJG=|U`tT-?pA}mcgaMcY11!@p4wXen17DN`JUVrUM)wlWDgz(Y!>Fk+l zZ6UDNZR!ea1(PWp4=wsLFW;YvAK^nIwb7>PC!Qa>?6eZfQ>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