configurations fix, working on display switching

This commit is contained in:
Pavel Kachalouski
2019-04-23 12:54:50 +02:00
parent 4ff1b7524c
commit be96153754
7 changed files with 61 additions and 15 deletions

View File

@@ -2,4 +2,4 @@
rsync -rp scripts $HOME
rsync -rp i3 $HOME/.config
#rsync -rp nixos /etc
sudo rsync -rp nixos /etc

View File

@@ -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"

BIN
i3/windows.wav Normal file

Binary file not shown.

View File

@@ -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;

31
nixos/monitor-hotplug.nix Normal file
View File

@@ -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" ];
};
}

View File

@@ -1,6 +1,13 @@
{ config, pkgs, ... }:
{
security.sudo = {
enable = true;
configFile = ''
Defaults:nnm timestamp_timeout=30
'';
};
security.pki.certificates = [
''
finfactory

View File

@@ -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"