From 22acd4632390bf1231bc7e234fbb6361bbb61368 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sun, 11 Apr 2021 10:23:56 +0200 Subject: Add signal wraper --- machines/base.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'machines/base.nix') diff --git a/machines/base.nix b/machines/base.nix index 75935ec..e00ec97 100755 --- a/machines/base.nix +++ b/machines/base.nix @@ -37,6 +37,8 @@ ## === XDG === environment.variables = rec { + PATH = "$HOME/scripts:$PATH"; + XDG_CONFIG_HOME = "$HOME/.config"; XDG_CACHE_HOME = "$HOME/.cache"; XDG_DATA_HOME = "$HOME/.local/share"; @@ -79,6 +81,7 @@ syntaxHighlighting.enable = true; promptInit = '' + [ "$(tty)" = "/dev/tty1" ] && startx any-nix-shell zsh --info-right | source /dev/stdin autoload -U colors && colors PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " -- cgit 1.4.1 From 167733884d9e80b56ce168d45c08404bc4aabe5b Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sun, 11 Apr 2021 10:25:05 +0200 Subject: Remove obsolete settings --- machines/base.nix | 2 +- machines/x220/configuration.nix | 23 +++++++++++--------- machines/x220/hardware-configuration.nix | 4 ++-- modules/dockd.nix | 15 ++++++------- pkgs/dwm/config.h | 7 ++++--- pkgs/dwmblocks/config.h | 36 ++++++++++++++++++++++++++++++++ pkgs/dwmblocks/default.nix | 3 ++- 7 files changed, 66 insertions(+), 24 deletions(-) create mode 100644 pkgs/dwmblocks/config.h (limited to 'machines/base.nix') diff --git a/machines/base.nix b/machines/base.nix index e00ec97..035ee59 100755 --- a/machines/base.nix +++ b/machines/base.nix @@ -16,7 +16,7 @@ wget vim curl htop file stdenv git zip unzip dnsutils ripgrep jq - any-nix-shell + any-nix-shell fd ]; console.font = "${pkgs.terminus_font}/share/consolefonts/ter-v22n"; diff --git a/machines/x220/configuration.nix b/machines/x220/configuration.nix index 56d1d2f..73c8a59 100644 --- a/machines/x220/configuration.nix +++ b/machines/x220/configuration.nix @@ -25,7 +25,7 @@ in ]; boot.plymouth.enable = true; - boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + # boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; networking = { hostName = "x220"; @@ -45,11 +45,19 @@ in show-trace = true ''; + environment.variables = { + ELECTRUMDIR="$\{XDG_DATA_HOME:-$HOME/.local/share}/electrum"; + }; + + environment.binsh = "${pkgs.dash}/bin/dash"; + environment.systemPackages = with pkgs; [ + guvcview + signal usbutils discord # Basic tools - groff file ssh-ident busybox_utils + file ssh-ident busybox_utils # XORG perfs dunst @@ -58,7 +66,7 @@ in zathura sxiv pulsemixer lynx lf arandr wpa_supplicant_gui system-config-printer libreoffice - vscodium abook + abook # Audio/Video mpd mpc_cli mpv ffmpeg youtube-dl @@ -67,13 +75,10 @@ in gitAndTools.gh docker-compose xsel bc libnotify pamixer maim killall - quickserve ueberzug chafa + ueberzug chafa # Thinkpad utils - nur.repos.pn.dockd acpi tpacpi-bat - - wineStaging - + acpi tpacpi-bat ]; fonts.fonts = with pkgs; [ @@ -91,8 +96,6 @@ in programs.browserpass.enable = true; programs.dockd.enable = true; - virtualisation.anbox.enable = true; - programs.adb.enable = true; virtualisation.docker.enable = true; systemd.services.docker.wantedBy = lib.mkForce []; diff --git a/machines/x220/hardware-configuration.nix b/machines/x220/hardware-configuration.nix index cf9c47e..d2c7fbc 100755 --- a/machines/x220/hardware-configuration.nix +++ b/machines/x220/hardware-configuration.nix @@ -12,8 +12,8 @@ boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" "tp_smapi" "v4l2loopback" ]; - boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback tp_smapi ]; + boot.kernelModules = [ "kvm-intel" "tp_smapi" "v4l2loopback" "acpi_call" ]; + boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback tp_smapi acpi_call ]; boot.loader.grub.enable = true; diff --git a/modules/dockd.nix b/modules/dockd.nix index 0993e81..e2b5870 100644 --- a/modules/dockd.nix +++ b/modules/dockd.nix @@ -18,26 +18,26 @@ in }; config = lib.mkIf (cfg.enable) { + environment.systemPackages = [ pkgs.nur.repos.pn.dockd ]; environment.etc = { "dockd/docked.conf".text = '' [Screen] height=1080 -width=3840 -mm_height=311 -mm_width=1041 +width=1920 +mm_height=282 +mm_width=502 [CRTC] crtc=63 x=0 y=0 rotation=1 -mode=1920x1080 -outputs_len=1 -outputs_0=HDMI3 +mode=None +outputs_len=0 [CRTC] crtc=64 -x=1920 +x=0 y=0 rotation=1 mode=1920x1080 @@ -51,6 +51,7 @@ y=0 rotation=1 mode=None outputs_len=0 + ''; "dockd/undocked.conf".text = '' [Screen] diff --git a/pkgs/dwm/config.h b/pkgs/dwm/config.h index bdb3507..20cf0c2 100644 --- a/pkgs/dwm/config.h +++ b/pkgs/dwm/config.h @@ -19,8 +19,8 @@ static const int swallowfloating = 0; /* 1 means swallow floating wind static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ -static const char *fonts[] = { "monospace:size=10", "JoyPixels:pixelsize=10:antialias=true:autohint=true" }; -static char dmenufont[] = "monospace:size=10"; +static const char *fonts[] = { "monospace:size=11", "JoyPixels:pixelsize=11:antialias=true:autohint=true" }; +static char dmenufont[] = "monospace:size=11"; static char normbgcolor[] = "#222222"; static char normbordercolor[] = "#444444"; static char normfgcolor[] = "#bbbbbb"; @@ -228,7 +228,8 @@ static Key keys[] = { { MODKEY, XK_F8, spawn, SHCMD("mw -Y") }, { MODKEY, XK_F9, spawn, SHCMD("dmenumount") }, { MODKEY, XK_F10, spawn, SHCMD("dmenuumount") }, - { MODKEY, XK_F11, spawn, SHCMD("mpv --no-cache --no-osc --no-input-default-bindings --input-conf=/dev/null --title=webcam $(ls /dev/video[0,2,4,6,8] | tail -n 1)") }, + /* { MODKEY, XK_F11, spawn, SHCMD("mpv --no-cache --no-osc --no-input-default-bindings --input-conf=/dev/null --title=webcam $(ls /dev/video[1,4,6,8] | tail -n 1)") }, */ + { MODKEY, XK_F11, spawn, SHCMD("guvcview -d /dev/video1 -g none") }, { MODKEY, XK_F12, xrdb, {.v = NULL } }, { MODKEY, XK_space, zoom, {0} }, { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, diff --git a/pkgs/dwmblocks/config.h b/pkgs/dwmblocks/config.h new file mode 100644 index 0000000..b40020e --- /dev/null +++ b/pkgs/dwmblocks/config.h @@ -0,0 +1,36 @@ +//Modify this file to change what commands output to your statusbar, and recompile using the make command. +static const Block blocks[] = { + /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/ + /* {"⌨", "sb-kbselect", 0, 30}, */ + {"", "cat /tmp/recordingicon 2>/dev/null", 0, 9}, + {"", "sb-tasks", 10, 26}, + {"", "sb-music", 0, 11}, + /* {"", "sb-pacpackages", 0, 8}, */ + /* {"", "sb-news", 0, 6}, */ + /* {"", "sb-price lbc \"LBRY Token\" 📚", 9000, 22}, */ + {"", "sb-price bat \"Basic Attention Token\" 🦁", 9000, 20}, + /* {"", "sb-price link \"Chainlink\" 🔗", 300, 25}, */ + /* {"", "sb-price xmr \"Monero\" 🔒", 9000, 24}, */ + /* {"", "sb-price eth Ethereum 🍸", 9000, 23}, */ + {"", "sb-price btc Bitcoin 💰", 9000, 21}, + {"", "sb-torrent", 20, 7}, + {"", "sb-memory", 10, 14}, + {"", "sb-cpu", 10, 18}, + /* {"", "sb-moonphase", 18000, 17}, */ + {"", "sb-forecast", 18000, 5}, + {"", "sb-mailbox", 180, 12}, + {"", "sb-nettraf", 1, 16}, + {"", "sb-volume", 0, 10}, + {"", "sb-battery", 5, 3}, + {"", "sb-clock", 10, 1}, + {"", "sb-internet", 5, 4}, + /* {"", "sb-help-icon", 0, 15}, */ +}; + +//Sets delimiter between status commands. NULL character ('\0') means no delimiter. +static char *delim = " "; + +// Have dwmblocks automatically recompile and run when you edit this file in +// vim with the following line in your vimrc/init.vim: + +// autocmd BufWritePost ~/.local/src/dwmblocks/config.h !cd ~/.local/src/dwmblocks/; sudo make install && { killall -q dwmblocks;setsid dwmblocks & } diff --git a/pkgs/dwmblocks/default.nix b/pkgs/dwmblocks/default.nix index d582780..ecc3b5b 100644 --- a/pkgs/dwmblocks/default.nix +++ b/pkgs/dwmblocks/default.nix @@ -1,7 +1,8 @@ pkgs: pkgs.nur.repos.pn.dwmblocks.override { patches = [ - ./dwmblocks.diff + #./dwmblocks.diff # ./dwmblocks-todo.diff ]; + config_h = ./config.h; } -- cgit 1.4.1