diff --git a/deploy-configs.sh b/deploy-configs.sh index 5c58628..4c33fd9 100755 --- a/deploy-configs.sh +++ b/deploy-configs.sh @@ -2,4 +2,4 @@ rsync -rp scripts $HOME rsync -rp i3 $HOME/.config -#rsync -rp nixos /etc +sudo rsync -rp nixos /etc diff --git a/i3/config b/i3/config index 64003e4..aea3103 100644 --- a/i3/config +++ b/i3/config @@ -180,7 +180,7 @@ bindsym $mod+i exec idea-community bindsym $mod+o exec firefox bindsym $mod+g exec gedit bindsym $mod+n exec nautilus -bindsym $mod+l exec '$HOME/scripts/lock.sh' +bindsym $mod+l exec "$HOME/scripts/lock.sh" # audio bindsym XF86AudioRaiseVolume exec "pactl set-sink-mute 0 false ; pactl set-sink-volume 0 +5%" @@ -224,9 +224,10 @@ bar { } # autostart +exec --no-startup-id cvlc --play-and-exit "$HOME/.config/i3/windows.wav" exec --no-startup-id volumeicon exec --no-startup-id firefox exec --no-startup-id st -f "Liberation Mono:pixelsize=16:antialias=true:autohint=true" exec --no-startup-id telegram-desktop exec --no-startup-id mattermost-desktop -exec --no-startup-id xautolock -time 10 -locker '$HOME/scripts/lock.sh' +exec --no-startup-id xautolock -time 10 -locker "$HOME/scripts/lock.sh" diff --git a/i3/windows.wav b/i3/windows.wav new file mode 100644 index 0000000..be5faf1 Binary files /dev/null and b/i3/windows.wav differ diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 34265b3..a8cc7ac 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -9,6 +9,7 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix ./security.nix + ./monitor-hotplug.nix ]; # Use the systemd-boot EFI boot loader. @@ -107,7 +108,6 @@ xautolock squashfsTools #skypeforlinux - atom vscode rpm unzip @@ -127,7 +127,13 @@ p7zip zlib.static zlib.dev + llvm + clang gcc + libunwind.out + libunwind.dev + re2 + robo3t #nextcloud-client cmake gnumake @@ -203,13 +209,13 @@ isNormalUser = true; uid = 1000; shell = pkgs.fish; - extraGroups = ["audio" "networkmanager" "wireshark" "vboxusers"]; + extraGroups = ["audio" "networkmanager" "wireshark" "vboxusers" "wheel"]; }; - fileSystems."/export/development" = { - device = "/home/nnm/development"; - options = [ "bind" ]; - }; + #fileSystems."/export/development" = { + # device = "/home/nnm/development"; + # options = [ "bind" ]; + #}; fileSystems."/mnt/Downloads-pc" = { device = "192.168.1.2:/Downloads"; @@ -217,11 +223,12 @@ options = ["x-systemd.automount,noauto"]; }; - services.nfs.server.enable = true; - services.nfs.server.exports = '' - /export 192.168.1.2(rw,fsid=0,no_subtree_check) - /export/development 192.168.1.2(rw,nohide,insecure,no_subtree_check) - ''; + # NFS server + #services.nfs.server.enable = true; + #services.nfs.server.exports = '' + # /export 192.168.1.2(rw,fsid=0,no_subtree_check) + # /export/development 192.168.1.2(rw,nohide,insecure,no_subtree_check) + #''; #virtualisation.virtualbox.host.enable = true; #virtualisation.virtualbox.host.enableExtensionPack = true; diff --git a/nixos/monitor-hotplug.nix b/nixos/monitor-hotplug.nix new file mode 100644 index 0000000..5926db3 --- /dev/null +++ b/nixos/monitor-hotplug.nix @@ -0,0 +1,31 @@ +{ config, pkgs, ... }: + +{ + services.udev = { + extraRules = '' + ACTION=="change", SUBSYSTEM=="drm", ENV{HOTPLUG}=="1", TAG+="systemd", ENV{SYSTEMD_WANTS}="monitor-hotplug.service" + ''; + }; + + systemd.services.monitor-hotplug = { + description = "Monitor hotplug"; + + environment = { + DISPLAY = ":0"; + XAUTHORITY = "/home/nnm/.Xauthority"; + }; + + path = [ pkgs.xorg.xrandr pkgs.bash pkgs.i3 ]; + + serviceConfig = { + Type = "oneshot"; + }; + + script = '' + #"/home/nnm/development/monitor-update-outputs/target/scala-2.11/monitor-update-outputs-out" + /run/current-system/sw/bin/echo test112233 + ''; + + wantedBy = [ "default.target" ]; + }; +} diff --git a/nixos/security.nix b/nixos/security.nix index 18ba6cf..3f5fb27 100644 --- a/nixos/security.nix +++ b/nixos/security.nix @@ -1,6 +1,13 @@ { config, pkgs, ... }: { + security.sudo = { + enable = true; + configFile = '' + Defaults:nnm timestamp_timeout=30 + ''; + }; + security.pki.certificates = [ '' finfactory diff --git a/systemd/monitor-switch/10-monitor-hotplug.rules b/systemd/monitor-switch/10-monitor-hotplug.rules index 241bc99..b234e11 100644 --- a/systemd/monitor-switch/10-monitor-hotplug.rules +++ b/systemd/monitor-switch/10-monitor-hotplug.rules @@ -1 +1 @@ -ACTION=="change", SUBSYSTEM=="drm", ENV{HOTPLUG}=="1", RUN+="/usr/bin/touch /tmp/monitor-hotplug-changed" +ACTION=="change", SUBSYSTEM=="drm", ENV{HOTPLUG}=="1", RUN+="/run/current-system/sw/bin/touch /tmp/monitor-hotplug-changed"