From 9094f94983decf67686565b24fc6802d3bb1c8ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Wed, 26 Sep 2018 07:03:55 +0200 Subject: [PATCH] Configure + open KDE connect ports ~ i3: compact workspace setup + autostart dropbox + scardanelli: xrandr config ~ redshift: simpler location - stack: aliases + PATH: add ~/.local/bin --- config.nix | 6 +++++ configs/graphics.nix | 54 ++++++++++++-------------------------------- configs/shells.nix | 4 ++-- 3 files changed, 23 insertions(+), 41 deletions(-) diff --git a/config.nix b/config.nix index 49a8c48..acff5d3 100644 --- a/config.nix +++ b/config.nix @@ -70,6 +70,12 @@ in { terminal = "screen-256color"; }; + # for kdeconnect + networking.firewall = { + allowedTCPPortRanges = [ { from = 1714; to = 1764; } ]; + allowedUDPPortRanges = [ { from = 1714; to = 1764; } ]; + }; + home-manager.users.kfm = { gtk = { enable = true; diff --git a/configs/graphics.nix b/configs/graphics.nix index 2480c08..1468d05 100644 --- a/configs/graphics.nix +++ b/configs/graphics.nix @@ -218,36 +218,14 @@ let bindsym $mod+Shift+c reload bindsym $mod+Shift+r restart - set $WS1 1 - set $WS2 2 - set $WS3 3 - set $WS4 4 - set $WS5 5 - set $WS6 6 - set $WS7 7 - set $WS8 8 - set $WS9 9 - set $WS10 10 - bindsym $mod+0 workspace $WS10 - bindsym $mod+1 workspace $WS1 - bindsym $mod+2 workspace $WS2 - bindsym $mod+3 workspace $WS3 - bindsym $mod+4 workspace $WS4 - bindsym $mod+5 workspace $WS5 - bindsym $mod+6 workspace $WS6 - bindsym $mod+7 workspace $WS7 - bindsym $mod+8 workspace $WS8 - bindsym $mod+9 workspace $WS9 - bindsym $mod+Shift+0 move container to workspace $WS10 - bindsym $mod+Shift+1 move container to workspace $WS1 - bindsym $mod+Shift+2 move container to workspace $WS2 - bindsym $mod+Shift+3 move container to workspace $WS3 - bindsym $mod+Shift+4 move container to workspace $WS4 - bindsym $mod+Shift+5 move container to workspace $WS5 - bindsym $mod+Shift+6 move container to workspace $WS6 - bindsym $mod+Shift+7 move container to workspace $WS7 - bindsym $mod+Shift+8 move container to workspace $WS8 - bindsym $mod+Shift+9 move container to workspace $WS9 + ${with lib; + strings.concatMapStringsSep "\n" + (i: let n = toString i; ws = "$workspace" + n; in + ''set ${ws} ${n} + bindsym $mod+${n} workspace ${ws} + bindsym $mod+Shift+${n} move container to workspace ${ws}'') + (lists.range 0 9) + } bindsym XF86AudioLowerVolume exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5 && pkill -RTMIN+3 i3blocks bindsym XF86AudioRaiseVolume exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5 && pkill -RTMIN+3 i3blocks @@ -306,6 +284,7 @@ in { notifier = ''${pkgs.libnotify}/bin/notify-send -u normal -a xautolock "Locking soon" "The screen will lock in 10 seconds."''; }; displayManager.auto = { enable = true; user = "kfm"; }; + displayManager.sessionCommands = "${pkgs.dropbox-cli}/bin/dropbox start"; desktopManager.xterm.enable = false; desktopManager.wallpaper.mode = "fill"; windowManager.default = "i3"; @@ -314,13 +293,10 @@ in { configFile = pkgs.writeText "i3.conf" i3_conf; extraPackages = []; }; - windowManager.xmonad = { - enable = true; - enableContribAndExtras = true; - }; - xrandrHeads = if (config.networking.hostName == "homeros") - then [ "LVDS1" { output = "HDMI1"; primary = true; } ] - else []; + xrandrHeads = { + homeros = [ "LVDS1" { output = "HDMI1"; primary = true; } ]; + scardanelli = [ "eDP1" ]; + }.${config.networking.hostName}; }; i18n = { @@ -338,8 +314,8 @@ in { services.redshift = { enable = true; - latitude = "52.516667"; - longitude = "13.388889"; + latitude = "52"; + longitude = "13"; }; services.illum.enable = true; diff --git a/configs/shells.nix b/configs/shells.nix index bb28a89..fd16b6b 100644 --- a/configs/shells.nix +++ b/configs/shells.nix @@ -7,13 +7,13 @@ in { ":r" = ''echo "You stupid!"''; clipboard = "${pkgs.xclip}/bin/xclip -se c"; external-ip = "${pkgs.dnsutils}/bin/dig +short myip.opendns.com @resolver1.opendns.com"; - ghc = "${pkgs.stack}/bin/stack ghc --"; - ghci = "${pkgs.stack}/bin/stack ghc -- --interactive"; ip = "${pkgs.iproute}/bin/ip -c"; ocaml = rlwrap "${pkgs.ocaml}/bin/ocaml"; tmux = "${pkgs.tmux}/bin/tmux -2"; } // scripts; + environment.interactiveShellInit = "export PATH=$PATH:$HOME/.local/bin"; + environment.extraInit = '' function mcd { newdir='_mcd_command_failed_'