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 zcmZo=aOxidIGTaJ=ccA#-yvd)WH7-s&yu;x#hfunSt>F0g#NSMK1Z@2@&SV?#J>b0>WD za1QAU%B(o8xxLi!x{Qd1PugkUQ|)sOh6OvVT4Z^v`BmA@fNy1itvhb5DSfg;I-x_X zSfk#9-%7UQe|YXTW&Z4X+YJ9}dsZGXzL8SY)1Yem=ECguMf;v!-E8f1#`;*{dL8j+ z%Aywo4m@Jq>2mq$yt!$QAHO^xeB!?{oBa*N>*tq+{@9$Id^~8?0rAGtYlaIec1yky zzFoX)wQxxx?^-?Cl_6i|&Mvuq&V+C3bm2DDOD`E0Yv?`vdCJ;eZGqXrKTJ=}?mWLQ zK2c0_+K1;eip(W9{i(ktpxMK8>6F)9@hYy{>O1}~F({5G>MK}O@5jZSzISqm_2n}m zq5Mzg&b^=TD)(Gp6!WP_KG8FS|LU5FA7ZBE=aAhFpyKy@wF_t%FE1}C7{1`{n4vp zE@F$~>fd@@-Tw1d%ZH2KUcQ-`nX9u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