From 82a03e9407bd5f12c934fc93bfae56320224b102 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Sat, 16 Nov 2019 04:10:53 +0100 Subject: j emacs: +spacemacs theme --- jeschli/2configs/emacs.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index f866bbca9..614f195fa 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -210,6 +210,7 @@ let epkgs.melpaPackages.evil epkgs.melpaPackages.google-this epkgs.melpaPackages.monokai-alt-theme + epkgs.melpaPackages.spacemacs-theme epkgs.melpaPackages.zenburn-theme # development -- cgit v1.2.3 From 6f9d15b33e3b1e1135072d6325cda69501fc2f4d Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:40:28 +0100 Subject: j haskell: intial commit --- jeschli/2configs/haskell.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 jeschli/2configs/haskell.nix diff --git a/jeschli/2configs/haskell.nix b/jeschli/2configs/haskell.nix new file mode 100644 index 000000000..2e00d0673 --- /dev/null +++ b/jeschli/2configs/haskell.nix @@ -0,0 +1,19 @@ +{ config, pkgs, ... }: +let + all-hies = import (fetchTarball "https://github.com/infinisil/all-hies/tarball/master") {}; +in +{ + environment.systemPackages = with pkgs; [ + cabal2nix + gcc + ghc + haskellPackages.cabal-install + haskellPackages.ghcid + haskellPackages.hindent + haskellPackages.hlint + haskellPackages.hoogle + haskellPackages.stack + haskellPackages.stylish-haskell + (all-hies.selection { selector = p: {inherit (p) ghc864; }; }) + ]; +} -- cgit v1.2.3 From f1e7fcd50e495e0029278a1f7527dbb4c4ba9507 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:30:49 +0100 Subject: j reagenzglas: add haskell --- jeschli/1systems/reagenzglas/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/1systems/reagenzglas/config.nix b/jeschli/1systems/reagenzglas/config.nix index 7596f17d6..518dcbca7 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -7,6 +7,7 @@ + ./desktop.nix ./i3-configuration.nix -- cgit v1.2.3 From c194ec0cd5d98d309b26b32f857e7d583e842f8d Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:32:02 +0100 Subject: j reagenzglas: reformat environment.systemPackages --- jeschli/1systems/reagenzglas/config.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jeschli/1systems/reagenzglas/config.nix b/jeschli/1systems/reagenzglas/config.nix index 518dcbca7..344aa67b2 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -37,10 +37,12 @@ # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ - wget vim git - rofi ag alacritty + git + rofi + vim + wget ]; users.users.ombi = { -- cgit v1.2.3 From a81d642640076d288f2da5440154558a238581ee Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:32:45 +0100 Subject: j reagenzglas: add copyq --- jeschli/1systems/reagenzglas/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/1systems/reagenzglas/config.nix b/jeschli/1systems/reagenzglas/config.nix index 344aa67b2..cf229dba7 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -39,6 +39,7 @@ environment.systemPackages = with pkgs; [ ag alacritty + copyq git rofi vim -- cgit v1.2.3 From 51a18aac3b87938331ec7246f5a982b95295800a Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:33:09 +0100 Subject: j reagenzglas: add direnv --- jeschli/1systems/reagenzglas/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/1systems/reagenzglas/config.nix b/jeschli/1systems/reagenzglas/config.nix index cf229dba7..3ace77bff 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -40,6 +40,7 @@ ag alacritty copyq + direnv git rofi vim -- cgit v1.2.3 From 03a248ca58d2e6eb298887bfaee6b6c06adeffe5 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:33:33 +0100 Subject: j reagenzglas: add go --- jeschli/1systems/reagenzglas/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/1systems/reagenzglas/config.nix b/jeschli/1systems/reagenzglas/config.nix index 3ace77bff..f8c7d344e 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -41,6 +41,7 @@ alacritty copyq direnv + go git rofi vim -- cgit v1.2.3 From 1be540b8156171811b884dcf0dacc2866f5d085e Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:34:08 +0100 Subject: j emacs: set racer paths for use with a shell-nix --- jeschli/2configs/emacs.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 614f195fa..0a81048fa 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -123,6 +123,8 @@ let # # This requires rls and racer to be installed on the system rustDevelopment = '' + (setq racer-rust-src-path nil) ;; read from shell-nix + (setq racer-cmd "racer") ;; read from shell-nix (add-hook 'rust-mode-hook #'racer-mode) (add-hook 'rust-mode-hook (lambda() (local-set-key (kbd "C-c C-d") 'racer-describe) -- cgit v1.2.3 From fbe0090b42ec5abcf6c53ff442aeb22e14a4fc1c Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:37:07 +0100 Subject: j reagenzglas: i3-config: i3-sensible-terminal -> alacritty --- jeschli/1systems/reagenzglas/i3-configuration.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jeschli/1systems/reagenzglas/i3-configuration.nix b/jeschli/1systems/reagenzglas/i3-configuration.nix index c9968c17a..93809a821 100644 --- a/jeschli/1systems/reagenzglas/i3-configuration.nix +++ b/jeschli/1systems/reagenzglas/i3-configuration.nix @@ -21,8 +21,8 @@ let floating_modifier $mod # start a terminal - bindsym $mod+Return exec i3-sensible-terminal - + bindsym $mod+Return exec alacritty + # kill focused window bindsym $mod+Shift+q kill -- cgit v1.2.3 From 4f7083def0e7d4afa14977f95af9767596e9e718 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:37:44 +0100 Subject: j reagenzglas: i3 config bind rofi to meta+x --- jeschli/1systems/reagenzglas/i3-configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/1systems/reagenzglas/i3-configuration.nix b/jeschli/1systems/reagenzglas/i3-configuration.nix index 93809a821..f7bb3afa5 100644 --- a/jeschli/1systems/reagenzglas/i3-configuration.nix +++ b/jeschli/1systems/reagenzglas/i3-configuration.nix @@ -32,6 +32,7 @@ let # start dmenu (a program launcher) bindsym $mod+d exec ${pkgs.rofi}/bin/rofi -modi drun#run -combi-modi drun#run -show combi -show-icons -display-combi run + bindsym $mod+x exec ${pkgs.rofi}/bin/rofi -modi window -show window -auto-select # There also is the (new) i3-dmenu-desktop which only displays applications # shipping a .desktop file. It is a wrapper around dmenu, so you need that # installed. -- cgit v1.2.3 From c0ec1da481486a7a2245a8af50c98fbc952f1b09 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:38:52 +0100 Subject: j reagenzglas: i3 config: remove trailing whitespaces --- jeschli/1systems/reagenzglas/i3-configuration.nix | 61 ++++++++++++----------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/jeschli/1systems/reagenzglas/i3-configuration.nix b/jeschli/1systems/reagenzglas/i3-configuration.nix index f7bb3afa5..576553e79 100644 --- a/jeschli/1systems/reagenzglas/i3-configuration.nix +++ b/jeschli/1systems/reagenzglas/i3-configuration.nix @@ -5,89 +5,90 @@ with pkgs; let i3_config_file = pkgs.writeText "config" '' set $mod Mod4 - + font pango:monospace 8 - + #font pango:DejaVu Sans Mono 8 - + # Before i3 v4.8, we used to recommend this one as the default: # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 # The font above is very space-efficient, that is, it looks good, sharp and # clear in small sizes. However, its unicode glyph coverage is limited, the old # X core fonts rendering does not support right-to-left and this being a bitmap # font, it doesn’t scale on retina/hidpi displays. - + # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod - + # start a terminal bindsym $mod+Return exec alacritty # kill focused window bindsym $mod+Shift+q kill - + # start dmenu (a program launcher) # bindsym $mod+d exec dmenu_run # start dmenu (a program launcher) bindsym $mod+d exec ${pkgs.rofi}/bin/rofi -modi drun#run -combi-modi drun#run -show combi -show-icons -display-combi run - + bindsym $mod+x exec ${pkgs.rofi}/bin/rofi -modi window -show window -auto-select + # There also is the (new) i3-dmenu-desktop which only displays applications # shipping a .desktop file. It is a wrapper around dmenu, so you need that # installed. # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop - + # change focus bindsym $mod+j focus left bindsym $mod+k focus down bindsym $mod+l focus up bindsym $mod+semicolon focus right - + # alternatively, you can use the cursor keys: bindsym $mod+Left focus left bindsym $mod+Down focus down bindsym $mod+Up focus up bindsym $mod+Right focus right - + # move focused window bindsym $mod+Shift+j move left bindsym $mod+Shift+k move down bindsym $mod+Shift+l move up bindsym $mod+Shift+colon move right - + # alternatively, you can use the cursor keys: bindsym $mod+Shift+Left move left bindsym $mod+Shift+Down move down bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right - + # split in horizontal orientation bindsym $mod+h split h - + # split in vertical orientation bindsym $mod+v split v - + # enter fullscreen mode for the focused container bindsym $mod+f fullscreen toggle - + # change container layout (stacked, tabbed, toggle split) bindsym $mod+s layout stacking bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split - + # toggle tiling / floating bindsym $mod+Shift+space floating toggle - + # change focus between tiling / floating windows bindsym $mod+space focus mode_toggle - + # focus the parent container bindsym $mod+a focus parent - + # focus the child container #bindsym $mod+d focus child - + # Define names for default workspaces for which we configure key bindings later on. # We use variables to avoid repeating the names in multiple places. set $ws1 "1" @@ -100,7 +101,7 @@ let set $ws8 "8" set $ws9 "9" set $ws10 "10" - + # switch to workspace bindsym $mod+1 workspace $ws1 bindsym $mod+2 workspace $ws2 @@ -112,7 +113,7 @@ let bindsym $mod+8 workspace $ws8 bindsym $mod+9 workspace $ws9 bindsym $mod+0 workspace $ws10 - + # move focused container to workspace bindsym $mod+Shift+1 move container to workspace $ws1 bindsym $mod+Shift+2 move container to workspace $ws2 @@ -124,18 +125,18 @@ let bindsym $mod+Shift+8 move container to workspace $ws8 bindsym $mod+Shift+9 move container to workspace $ws9 bindsym $mod+Shift+0 move container to workspace $ws10 - + # reload the configuration file bindsym $mod+Shift+c reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) bindsym $mod+Shift+r restart # exit i3 (logs you out of your X session) bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" - + # resize window (you can also use the mouse for that) mode "resize" { # These bindings trigger as soon as you enter the resize mode - + # Pressing left will shrink the window’s width. # Pressing right will grow the window’s width. # Pressing up will shrink the window’s height. @@ -144,27 +145,27 @@ let bindsym k resize grow height 10 px or 10 ppt bindsym l resize shrink height 10 px or 10 ppt bindsym semicolon resize grow width 10 px or 10 ppt - + # same bindings, but for the arrow keys bindsym Left resize shrink width 10 px or 10 ppt bindsym Down resize grow height 10 px or 10 ppt bindsym Up resize shrink height 10 px or 10 ppt bindsym Right resize grow width 10 px or 10 ppt - + # back to normal: Enter or Escape or $mod+r bindsym Return mode "default" bindsym Escape mode "default" bindsym $mod+r mode "default" } - + bindsym $mod+r mode "resize" - + # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) bar { status_command i3status } - ''; + ''; in { -- cgit v1.2.3 From 5f68f44d845b4cbde0743ce4eb9c0b488a34813c Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 23:48:13 +0100 Subject: j eamcs: Fix org-capture wrong-argument bug --- jeschli/2configs/emacs-org-agenda.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jeschli/2configs/emacs-org-agenda.nix b/jeschli/2configs/emacs-org-agenda.nix index f9139fcfe..916788968 100644 --- a/jeschli/2configs/emacs-org-agenda.nix +++ b/jeschli/2configs/emacs-org-agenda.nix @@ -144,7 +144,7 @@ let (interactive) (save-excursion (beginning-of-line 0) - (org-remove-empty-drawer-at "LOGBOOK" (point)))) + (org-remove-empty-drawer-at (point)))) (add-hook 'org-clock-out-hook 'bh/remove-empty-drawer-on-clock-out 'append) -- cgit v1.2.3 From 5e850efd8d2685fa04ce246d3d63120ae1ddc10a Mon Sep 17 00:00:00 2001 From: Jeschli Date: Thu, 12 Dec 2019 10:55:55 +0100 Subject: j emacs: Update refile file --- jeschli/2configs/emacs-org-agenda.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/jeschli/2configs/emacs-org-agenda.nix b/jeschli/2configs/emacs-org-agenda.nix index 916788968..0420dc43d 100644 --- a/jeschli/2configs/emacs-org-agenda.nix +++ b/jeschli/2configs/emacs-org-agenda.nix @@ -114,29 +114,29 @@ let ("NEXT" ("WAITING") ("CANCELLED") ("HOLD")) ("DONE" ("WAITING") ("CANCELLED") ("HOLD"))))) -(setq org-directory "~/projects/notes_private") -(setq org-default-notes-file "~/projects/notes_private/refile.org") +(setq org-directory "~/projects/notes_privat") +(setq org-default-notes-file "~/projects/notes_privat/refile.org") ;; I use C-c c to start capture mode (global-set-key (kbd "C-c c") 'org-capture) ;; Capture templates for: TODO tasks, Notes, appointments, phone calls, meetings, and org-protocol (setq org-capture-templates - (quote (("t" "todo" entry (file "~/git/org/refile.org") + (quote (("t" "todo" entry (file org-default-notes-file) "* TODO %?\n%U\n%a\n" :clock-in t :clock-resume t) - ("r" "respond" entry (file "~/git/org/refile.org") + ("r" "respond" entry (file org-default-notes-file) "* NEXT Respond to %:from on %:subject\nSCHEDULED: %t\n%U\n%a\n" :clock-in t :clock-resume t :immediate-finish t) - ("n" "note" entry (file "~/git/org/refile.org") + ("n" "note" entry (file org-default-notes-file) "* %? :NOTE:\n%U\n%a\n" :clock-in t :clock-resume t) ("j" "Journal" entry (file+datetree "~/git/org/diary.org") "* %?\n%U\n" :clock-in t :clock-resume t) - ("w" "org-protocol" entry (file "~/git/org/refile.org") + ("w" "org-protocol" entry (file org-default-notes-file) "* TODO Review %c\n%U\n" :immediate-finish t) - ("m" "Meeting" entry (file "~/git/org/refile.org") + ("m" "Meeting" entry (file org-default-notes-file) "* MEETING with %? :MEETING:\n%U" :clock-in t :clock-resume t) - ("p" "Phone call" entry (file "~/git/org/refile.org") + ("p" "Phone call" entry (file org-default-notes-file) "* PHONE %? :PHONE:\n%U" :clock-in t :clock-resume t) - ("h" "Habit" entry (file "~/git/org/refile.org") + ("h" "Habit" entry (file org-default-notes-file) "* NEXT %?\n%U\n%a\nSCHEDULED: %(format-time-string \"%<<%Y-%m-%d %a .+1d/3d>>\")\n:PROPERTIES:\n:STYLE: habit\n:REPEAT_TO_STATE: NEXT\n:END:\n")))) ;; Remove empty LOGBOOK drawers on clock out -- cgit v1.2.3 From 555e4f0825da1b06be97e1d487c800145c51c9f6 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Fri, 20 Dec 2019 08:56:06 +0100 Subject: j reagenzglas: add audio --- jeschli/1systems/reagenzglas/config.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jeschli/1systems/reagenzglas/config.nix b/jeschli/1systems/reagenzglas/config.nix index f8c7d344e..a3bc7b5b0 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -54,13 +54,16 @@ }; users.users.jeschli = { - isNormalUser = true; + isNormalUser = true; + extraGroups = [ "audio" ]; }; # services.xserver.synaptics.enable = true; services.xserver.libinput.enable = true; services.xserver.libinput.disableWhileTyping = true; + hardware.pulseaudio.enable = true; + #Enable ssh daemon services.openssh.enable = true; -- cgit v1.2.3 From 81e9f8b8b5e02edca0cec7680fb43f0cd64200ae Mon Sep 17 00:00:00 2001 From: Jeschli Date: Sat, 16 Nov 2019 04:10:53 +0100 Subject: j emacs: +spacemacs theme --- jeschli/2configs/emacs.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index f866bbca9..614f195fa 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -210,6 +210,7 @@ let epkgs.melpaPackages.evil epkgs.melpaPackages.google-this epkgs.melpaPackages.monokai-alt-theme + epkgs.melpaPackages.spacemacs-theme epkgs.melpaPackages.zenburn-theme # development -- cgit v1.2.3 From e75eb3ec0876f0df477d48f642dbce904acce519 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:40:28 +0100 Subject: j haskell: intial commit --- jeschli/2configs/haskell.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 jeschli/2configs/haskell.nix diff --git a/jeschli/2configs/haskell.nix b/jeschli/2configs/haskell.nix new file mode 100644 index 000000000..2e00d0673 --- /dev/null +++ b/jeschli/2configs/haskell.nix @@ -0,0 +1,19 @@ +{ config, pkgs, ... }: +let + all-hies = import (fetchTarball "https://github.com/infinisil/all-hies/tarball/master") {}; +in +{ + environment.systemPackages = with pkgs; [ + cabal2nix + gcc + ghc + haskellPackages.cabal-install + haskellPackages.ghcid + haskellPackages.hindent + haskellPackages.hlint + haskellPackages.hoogle + haskellPackages.stack + haskellPackages.stylish-haskell + (all-hies.selection { selector = p: {inherit (p) ghc864; }; }) + ]; +} -- cgit v1.2.3 From aeab0fd92480bd8ff7339790c4e048546ffaccdf Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:30:49 +0100 Subject: j reagenzglas: add haskell --- jeschli/1systems/reagenzglas/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/1systems/reagenzglas/config.nix b/jeschli/1systems/reagenzglas/config.nix index 7596f17d6..518dcbca7 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -7,6 +7,7 @@ + ./desktop.nix ./i3-configuration.nix -- cgit v1.2.3 From 493f78edab0cf254a34acfa88115c42830e26394 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:32:02 +0100 Subject: j reagenzglas: reformat environment.systemPackages --- jeschli/1systems/reagenzglas/config.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jeschli/1systems/reagenzglas/config.nix b/jeschli/1systems/reagenzglas/config.nix index 518dcbca7..344aa67b2 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -37,10 +37,12 @@ # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ - wget vim git - rofi ag alacritty + git + rofi + vim + wget ]; users.users.ombi = { -- cgit v1.2.3 From 3adf052d3201c7c0c646f4227cf6614535fc2550 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:32:45 +0100 Subject: j reagenzglas: add copyq --- jeschli/1systems/reagenzglas/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/1systems/reagenzglas/config.nix b/jeschli/1systems/reagenzglas/config.nix index 344aa67b2..cf229dba7 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -39,6 +39,7 @@ environment.systemPackages = with pkgs; [ ag alacritty + copyq git rofi vim -- cgit v1.2.3 From 27a6c546c29a1168a8796ba617b96b7d4ecc4ac9 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:33:09 +0100 Subject: j reagenzglas: add direnv --- jeschli/1systems/reagenzglas/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/1systems/reagenzglas/config.nix b/jeschli/1systems/reagenzglas/config.nix index cf229dba7..3ace77bff 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -40,6 +40,7 @@ ag alacritty copyq + direnv git rofi vim -- cgit v1.2.3 From ff5430a015feda6608932120e190dbc5ae65232e Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:33:33 +0100 Subject: j reagenzglas: add go --- jeschli/1systems/reagenzglas/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/1systems/reagenzglas/config.nix b/jeschli/1systems/reagenzglas/config.nix index 3ace77bff..f8c7d344e 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -41,6 +41,7 @@ alacritty copyq direnv + go git rofi vim -- cgit v1.2.3 From c4806aa4f791b11358fa9e8f3b52cad400212dca Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:34:08 +0100 Subject: j emacs: set racer paths for use with a shell-nix --- jeschli/2configs/emacs.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 614f195fa..0a81048fa 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -123,6 +123,8 @@ let # # This requires rls and racer to be installed on the system rustDevelopment = '' + (setq racer-rust-src-path nil) ;; read from shell-nix + (setq racer-cmd "racer") ;; read from shell-nix (add-hook 'rust-mode-hook #'racer-mode) (add-hook 'rust-mode-hook (lambda() (local-set-key (kbd "C-c C-d") 'racer-describe) -- cgit v1.2.3 From fecc8f7a3384055ab6e54c42f10cf0118f8acd24 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:37:07 +0100 Subject: j reagenzglas: i3-config: i3-sensible-terminal -> alacritty --- jeschli/1systems/reagenzglas/i3-configuration.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jeschli/1systems/reagenzglas/i3-configuration.nix b/jeschli/1systems/reagenzglas/i3-configuration.nix index c9968c17a..93809a821 100644 --- a/jeschli/1systems/reagenzglas/i3-configuration.nix +++ b/jeschli/1systems/reagenzglas/i3-configuration.nix @@ -21,8 +21,8 @@ let floating_modifier $mod # start a terminal - bindsym $mod+Return exec i3-sensible-terminal - + bindsym $mod+Return exec alacritty + # kill focused window bindsym $mod+Shift+q kill -- cgit v1.2.3 From 4918f057dfb714ff1414f3fbb2cba3687d22991b Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:37:44 +0100 Subject: j reagenzglas: i3 config bind rofi to meta+x --- jeschli/1systems/reagenzglas/i3-configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/1systems/reagenzglas/i3-configuration.nix b/jeschli/1systems/reagenzglas/i3-configuration.nix index 93809a821..f7bb3afa5 100644 --- a/jeschli/1systems/reagenzglas/i3-configuration.nix +++ b/jeschli/1systems/reagenzglas/i3-configuration.nix @@ -32,6 +32,7 @@ let # start dmenu (a program launcher) bindsym $mod+d exec ${pkgs.rofi}/bin/rofi -modi drun#run -combi-modi drun#run -show combi -show-icons -display-combi run + bindsym $mod+x exec ${pkgs.rofi}/bin/rofi -modi window -show window -auto-select # There also is the (new) i3-dmenu-desktop which only displays applications # shipping a .desktop file. It is a wrapper around dmenu, so you need that # installed. -- cgit v1.2.3 From f941030622f35ed35e354f9b87991b72947434ed Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 19:38:52 +0100 Subject: j reagenzglas: i3 config: remove trailing whitespaces --- jeschli/1systems/reagenzglas/i3-configuration.nix | 61 ++++++++++++----------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/jeschli/1systems/reagenzglas/i3-configuration.nix b/jeschli/1systems/reagenzglas/i3-configuration.nix index f7bb3afa5..576553e79 100644 --- a/jeschli/1systems/reagenzglas/i3-configuration.nix +++ b/jeschli/1systems/reagenzglas/i3-configuration.nix @@ -5,89 +5,90 @@ with pkgs; let i3_config_file = pkgs.writeText "config" '' set $mod Mod4 - + font pango:monospace 8 - + #font pango:DejaVu Sans Mono 8 - + # Before i3 v4.8, we used to recommend this one as the default: # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 # The font above is very space-efficient, that is, it looks good, sharp and # clear in small sizes. However, its unicode glyph coverage is limited, the old # X core fonts rendering does not support right-to-left and this being a bitmap # font, it doesn’t scale on retina/hidpi displays. - + # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod - + # start a terminal bindsym $mod+Return exec alacritty # kill focused window bindsym $mod+Shift+q kill - + # start dmenu (a program launcher) # bindsym $mod+d exec dmenu_run # start dmenu (a program launcher) bindsym $mod+d exec ${pkgs.rofi}/bin/rofi -modi drun#run -combi-modi drun#run -show combi -show-icons -display-combi run - + bindsym $mod+x exec ${pkgs.rofi}/bin/rofi -modi window -show window -auto-select + # There also is the (new) i3-dmenu-desktop which only displays applications # shipping a .desktop file. It is a wrapper around dmenu, so you need that # installed. # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop - + # change focus bindsym $mod+j focus left bindsym $mod+k focus down bindsym $mod+l focus up bindsym $mod+semicolon focus right - + # alternatively, you can use the cursor keys: bindsym $mod+Left focus left bindsym $mod+Down focus down bindsym $mod+Up focus up bindsym $mod+Right focus right - + # move focused window bindsym $mod+Shift+j move left bindsym $mod+Shift+k move down bindsym $mod+Shift+l move up bindsym $mod+Shift+colon move right - + # alternatively, you can use the cursor keys: bindsym $mod+Shift+Left move left bindsym $mod+Shift+Down move down bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right - + # split in horizontal orientation bindsym $mod+h split h - + # split in vertical orientation bindsym $mod+v split v - + # enter fullscreen mode for the focused container bindsym $mod+f fullscreen toggle - + # change container layout (stacked, tabbed, toggle split) bindsym $mod+s layout stacking bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split - + # toggle tiling / floating bindsym $mod+Shift+space floating toggle - + # change focus between tiling / floating windows bindsym $mod+space focus mode_toggle - + # focus the parent container bindsym $mod+a focus parent - + # focus the child container #bindsym $mod+d focus child - + # Define names for default workspaces for which we configure key bindings later on. # We use variables to avoid repeating the names in multiple places. set $ws1 "1" @@ -100,7 +101,7 @@ let set $ws8 "8" set $ws9 "9" set $ws10 "10" - + # switch to workspace bindsym $mod+1 workspace $ws1 bindsym $mod+2 workspace $ws2 @@ -112,7 +113,7 @@ let bindsym $mod+8 workspace $ws8 bindsym $mod+9 workspace $ws9 bindsym $mod+0 workspace $ws10 - + # move focused container to workspace bindsym $mod+Shift+1 move container to workspace $ws1 bindsym $mod+Shift+2 move container to workspace $ws2 @@ -124,18 +125,18 @@ let bindsym $mod+Shift+8 move container to workspace $ws8 bindsym $mod+Shift+9 move container to workspace $ws9 bindsym $mod+Shift+0 move container to workspace $ws10 - + # reload the configuration file bindsym $mod+Shift+c reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) bindsym $mod+Shift+r restart # exit i3 (logs you out of your X session) bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" - + # resize window (you can also use the mouse for that) mode "resize" { # These bindings trigger as soon as you enter the resize mode - + # Pressing left will shrink the window’s width. # Pressing right will grow the window’s width. # Pressing up will shrink the window’s height. @@ -144,27 +145,27 @@ let bindsym k resize grow height 10 px or 10 ppt bindsym l resize shrink height 10 px or 10 ppt bindsym semicolon resize grow width 10 px or 10 ppt - + # same bindings, but for the arrow keys bindsym Left resize shrink width 10 px or 10 ppt bindsym Down resize grow height 10 px or 10 ppt bindsym Up resize shrink height 10 px or 10 ppt bindsym Right resize grow width 10 px or 10 ppt - + # back to normal: Enter or Escape or $mod+r bindsym Return mode "default" bindsym Escape mode "default" bindsym $mod+r mode "default" } - + bindsym $mod+r mode "resize" - + # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) bar { status_command i3status } - ''; + ''; in { -- cgit v1.2.3 From 8f3b78f5b84db3275ae81cb10a663b1be28785f9 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Wed, 11 Dec 2019 23:48:13 +0100 Subject: j eamcs: Fix org-capture wrong-argument bug --- jeschli/2configs/emacs-org-agenda.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jeschli/2configs/emacs-org-agenda.nix b/jeschli/2configs/emacs-org-agenda.nix index f9139fcfe..916788968 100644 --- a/jeschli/2configs/emacs-org-agenda.nix +++ b/jeschli/2configs/emacs-org-agenda.nix @@ -144,7 +144,7 @@ let (interactive) (save-excursion (beginning-of-line 0) - (org-remove-empty-drawer-at "LOGBOOK" (point)))) + (org-remove-empty-drawer-at (point)))) (add-hook 'org-clock-out-hook 'bh/remove-empty-drawer-on-clock-out 'append) -- cgit v1.2.3 From 5b5c38432b56ea3dedf822254f0b041eaca70b58 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Thu, 12 Dec 2019 10:55:55 +0100 Subject: j emacs: Update refile file --- jeschli/2configs/emacs-org-agenda.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/jeschli/2configs/emacs-org-agenda.nix b/jeschli/2configs/emacs-org-agenda.nix index 916788968..0420dc43d 100644 --- a/jeschli/2configs/emacs-org-agenda.nix +++ b/jeschli/2configs/emacs-org-agenda.nix @@ -114,29 +114,29 @@ let ("NEXT" ("WAITING") ("CANCELLED") ("HOLD")) ("DONE" ("WAITING") ("CANCELLED") ("HOLD"))))) -(setq org-directory "~/projects/notes_private") -(setq org-default-notes-file "~/projects/notes_private/refile.org") +(setq org-directory "~/projects/notes_privat") +(setq org-default-notes-file "~/projects/notes_privat/refile.org") ;; I use C-c c to start capture mode (global-set-key (kbd "C-c c") 'org-capture) ;; Capture templates for: TODO tasks, Notes, appointments, phone calls, meetings, and org-protocol (setq org-capture-templates - (quote (("t" "todo" entry (file "~/git/org/refile.org") + (quote (("t" "todo" entry (file org-default-notes-file) "* TODO %?\n%U\n%a\n" :clock-in t :clock-resume t) - ("r" "respond" entry (file "~/git/org/refile.org") + ("r" "respond" entry (file org-default-notes-file) "* NEXT Respond to %:from on %:subject\nSCHEDULED: %t\n%U\n%a\n" :clock-in t :clock-resume t :immediate-finish t) - ("n" "note" entry (file "~/git/org/refile.org") + ("n" "note" entry (file org-default-notes-file) "* %? :NOTE:\n%U\n%a\n" :clock-in t :clock-resume t) ("j" "Journal" entry (file+datetree "~/git/org/diary.org") "* %?\n%U\n" :clock-in t :clock-resume t) - ("w" "org-protocol" entry (file "~/git/org/refile.org") + ("w" "org-protocol" entry (file org-default-notes-file) "* TODO Review %c\n%U\n" :immediate-finish t) - ("m" "Meeting" entry (file "~/git/org/refile.org") + ("m" "Meeting" entry (file org-default-notes-file) "* MEETING with %? :MEETING:\n%U" :clock-in t :clock-resume t) - ("p" "Phone call" entry (file "~/git/org/refile.org") + ("p" "Phone call" entry (file org-default-notes-file) "* PHONE %? :PHONE:\n%U" :clock-in t :clock-resume t) - ("h" "Habit" entry (file "~/git/org/refile.org") + ("h" "Habit" entry (file org-default-notes-file) "* NEXT %?\n%U\n%a\nSCHEDULED: %(format-time-string \"%<<%Y-%m-%d %a .+1d/3d>>\")\n:PROPERTIES:\n:STYLE: habit\n:REPEAT_TO_STATE: NEXT\n:END:\n")))) ;; Remove empty LOGBOOK drawers on clock out -- cgit v1.2.3 From 8d24736da4c4bda9b1073c2e3c408378a11d39bd Mon Sep 17 00:00:00 2001 From: Jeschli Date: Fri, 20 Dec 2019 08:56:06 +0100 Subject: j reagenzglas: add audio --- jeschli/1systems/reagenzglas/config.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jeschli/1systems/reagenzglas/config.nix b/jeschli/1systems/reagenzglas/config.nix index f8c7d344e..a3bc7b5b0 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -54,13 +54,16 @@ }; users.users.jeschli = { - isNormalUser = true; + isNormalUser = true; + extraGroups = [ "audio" ]; }; # services.xserver.synaptics.enable = true; services.xserver.libinput.enable = true; services.xserver.libinput.disableWhileTyping = true; + hardware.pulseaudio.enable = true; + #Enable ssh daemon services.openssh.enable = true; -- cgit v1.2.3 From 8cd1b405b04c17d4d411a3607b85548b7c868d12 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Tue, 11 Feb 2020 17:50:51 +0100 Subject: j configs: add elisp for emacs config as submodule --- .gitmodules | 6 ++++++ jeschli/2configs/elisp | 1 + 2 files changed, 7 insertions(+) create mode 160000 jeschli/2configs/elisp diff --git a/.gitmodules b/.gitmodules index 5b4336510..e9b098519 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,9 @@ [submodule "lass/5pkgs/autowifi"] path = lass/5pkgs/autowifi url = https://github.com/Lassulus/autowifi +[submodule "jeschli/2configs/misc-elisp-scripts"] + path = jeschli/2configs/misc-elisp-scripts + url = git@github.com:Jeschli/misc-elisp-scripts.git +[submodule "jeschli/2configs/elisp"] + path = jeschli/2configs/elisp + url = git@github.com:Jeschli/misc-elisp-scripts.git diff --git a/jeschli/2configs/elisp b/jeschli/2configs/elisp new file mode 160000 index 000000000..a2cb18b59 --- /dev/null +++ b/jeschli/2configs/elisp @@ -0,0 +1 @@ +Subproject commit a2cb18b59ed0c5707e3fd87b5fd6a20a0074b73c -- cgit v1.2.3 From eb6669994ed94ceae9acbf25aae86eabec0e856f Mon Sep 17 00:00:00 2001 From: Jeschli Date: Tue, 11 Feb 2020 17:52:46 +0100 Subject: j emacs as exwm; add chrome --- jeschli/1systems/reagenzglas/config.nix | 11 +++++++++-- jeschli/2configs/emacs.nix | 34 +++++++++++++++++++++++++++------ 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/jeschli/1systems/reagenzglas/config.nix b/jeschli/1systems/reagenzglas/config.nix index a3bc7b5b0..91c2ed548 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -9,8 +9,8 @@ - ./desktop.nix - ./i3-configuration.nix +# ./desktop.nix +# ./i3-configuration.nix ./hardware-configuration.nix ]; @@ -39,6 +39,8 @@ environment.systemPackages = with pkgs; [ ag alacritty + google-chrome + chromium copyq direnv go @@ -67,6 +69,11 @@ #Enable ssh daemon services.openssh.enable = true; + #Enable clight + services.clight.enable = true; + services.geoclue2.enable = true; + location.provider = "geoclue2"; + users.users.root.openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDM1xtX/SF2IzfAIzrXvH4HsW05eTBX8U8MYlEPadq0DS/nHC45hW2PSEUOVsH0UhBRAB+yClVLyN+JAYsuOoQacQqAVq9R7HAoFITdYTMJCxVs4urSRv0pWwTopRIh1rlI+Q0QfdMoeVtO2ZKG3KoRM+APDy2dsX8LTtWjXmh/ZCtpGl1O8TZtz2ZyXyv9OVDPnQiFwPU3Jqs2Z036c+kwxWlxYc55FRuqwRtQ48c/ilPMu+ZvQ22j1Ch8lNuliyAg1b8pZdOkMJF3R8b46IQ8FEqkr3L1YQygYw2M50B629FPgHgeGPMz3mVd+5lzP+okbhPJjMrUqZAUwbMGwGzZ ombi@nixos" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKFXgtbgeivxlMKkoEJ4ANhtR+LRMSPrsmL4U5grFUME jeschli@nixos" diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 0a81048fa..cffa1c744 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -9,7 +9,7 @@ let ]; }; - orgAgendaView = import ./emacs-org-agenda.nix; +# orgAgendaView = import ./emacs-org-agenda.nix; packageRepos = '' (require 'package) ;; You might already have this line @@ -179,7 +179,6 @@ let ${theme} ${windowCosmetics} - ${orgAgendaView} ${myFunctionKeys} ${lspMode} ''; @@ -202,9 +201,14 @@ let epkgs.melpaPackages.academic-phrases epkgs.melpaPackages.gitlab - epkgs.melpaPackages.helm epkgs.melpaPackages.weechat +# helm + epkgs.melpaPackages.helm + epkgs.melpaPackages.helm-fuzzier + epkgs.melpaPackages.helm-ag + + # emacs convenience epkgs.melpaPackages.ag epkgs.melpaPackages.company @@ -235,12 +239,15 @@ let epkgs.melpaPackages.org-mime epkgs.melpaPackages.orgit - epkgs.elpaPackages.which-key + + epkgs.exwm + epkgs.melpaPackages.desktop-environment + epkgs.melpaPackages.helm-exwm ]; emacsWithOverlay = pkgsWithOverlay.emacsWithPackagesFromUsePackage { - config = builtins.readFile dotEmacs; # builtins.readFile ./emacs.el; + config = builtins.readFile ./elisp/init.el; # Package is optional, defaults to pkgs.emacs package = pkgsWithOverlay.emacsGit; # Optionally provide extra packages not in the configuration file @@ -260,6 +267,21 @@ let ''; in { environment.systemPackages = [ - myEmacs myEmacsWithDaemon myEmacsClient + myEmacs myEmacsWithDaemon myEmacsClient emacsWithOverlay ]; + + services.xserver = { + enable = true; + xkbOptions = "caps:super"; + exportConfiguration = true; + + displayManager.slim.enable = true; + windowManager.default = "exwm"; + + # Set up the login session + windowManager.session = [{ + name = "exwm"; + start = "${emacsWithOverlay}/bin/emacs -q -l " + builtins.toString ./elisp/init.el; + }]; + }; } -- cgit v1.2.3 From ae267972786437b2e2942e11873bf6c098d270d3 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Tue, 18 Feb 2020 21:10:19 +0100 Subject: j: root@baeckerei add success to reagenzglas --- jeschli/1systems/reagenzglas/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/1systems/reagenzglas/config.nix b/jeschli/1systems/reagenzglas/config.nix index 91c2ed548..43d9ebf5d 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -77,6 +77,7 @@ users.users.root.openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDM1xtX/SF2IzfAIzrXvH4HsW05eTBX8U8MYlEPadq0DS/nHC45hW2PSEUOVsH0UhBRAB+yClVLyN+JAYsuOoQacQqAVq9R7HAoFITdYTMJCxVs4urSRv0pWwTopRIh1rlI+Q0QfdMoeVtO2ZKG3KoRM+APDy2dsX8LTtWjXmh/ZCtpGl1O8TZtz2ZyXyv9OVDPnQiFwPU3Jqs2Z036c+kwxWlxYc55FRuqwRtQ48c/ilPMu+ZvQ22j1Ch8lNuliyAg1b8pZdOkMJF3R8b46IQ8FEqkr3L1YQygYw2M50B629FPgHgeGPMz3mVd+5lzP+okbhPJjMrUqZAUwbMGwGzZ ombi@nixos" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKFXgtbgeivxlMKkoEJ4ANhtR+LRMSPrsmL4U5grFUME jeschli@nixos" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG7C3bgoL9VeVl8pgu8sp3PCOs6TXk4R9y7JKJAHGsfm root@baeckerei" ]; # This value determines the NixOS release with which your system is to be -- cgit v1.2.3 From 1e915baafbc56c4c626a3c3d042ac0e7d6276561 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 17 Mar 2020 20:51:18 +0100 Subject: irc-announce cat2: use awk --- krebs/5pkgs/simple/irc-announce/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/krebs/5pkgs/simple/irc-announce/default.nix b/krebs/5pkgs/simple/irc-announce/default.nix index a90814aa9..52cf12862 100644 --- a/krebs/5pkgs/simple/irc-announce/default.nix +++ b/krebs/5pkgs/simple/irc-announce/default.nix @@ -25,10 +25,10 @@ pkgs.writeDashBin "irc-announce" '' # This is used to see what we send to the irc server. (debug output) echo2() { echo "$*"; echo "$*" >&2; } cat2() { - while read -r line; do - echo "$line" - echo "$line" >&2 - done + awk '{ + print $0 + print $0 > "/dev/stderr" + }' } # privmsg_cat transforms stdin to a privmsg -- cgit v1.2.3 From c12407200df12ef7397bf4fa0f96bb33ac96e0b7 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 22 Mar 2020 12:37:50 +0100 Subject: nixpkgs: b7bbc6d -> bf7c0f0 --- krebs/nixpkgs.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index e0b37d1fc..c5665a70a 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,7 +1,7 @@ { "url": "https://github.com/NixOS/nixpkgs-channels", - "rev": "b7bbc6d37878ed00b6467b574b02e840279f7d3d", - "date": "2020-02-26T11:51:29+01:00", - "sha256": "02q10jgi6m0vak3amb50ifw1pj82i17hs0npdkig7lsp8w3is7jq", + "rev": "bf7c0f0461e047bec108a5c5d5d1b144289a65ba", + "date": "2020-03-17T13:04:05+00:00", + "sha256": "01dsh9932x6xcba2p0xg4n563b85i3p7s2sakj7yf2ws8pgmwhq9", "fetchSubmodules": false } -- cgit v1.2.3 From 29263a2941b87d34883839f3368a1f1c5c3f687a Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 22 Mar 2020 13:18:59 +0100 Subject: nixpkgs-unstable: 55beed9 -> d96bd33 --- krebs/nixpkgs-unstable.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/nixpkgs-unstable.json b/krebs/nixpkgs-unstable.json index 1600d6f4a..847e3c61e 100644 --- a/krebs/nixpkgs-unstable.json +++ b/krebs/nixpkgs-unstable.json @@ -1,7 +1,7 @@ { "url": "https://github.com/NixOS/nixpkgs-channels", - "rev": "55beed9922c2f6b030af61ca7e33bd47850c68f2", - "date": "2020-02-26T03:53:16-05:00", - "sha256": "0jxkb3bl7axa6vmfsfdfx4mxv6wx0pc8iiwgrw2qh8wxhlhbylks", + "rev": "d96bd3394b734487d1c3bfbac0e8f17465e03afe", + "date": "2020-03-19T15:32:34+01:00", + "sha256": "05n27wz5ln9ni5cy5rhjcy612i44gmblkq5m0g827v8pd0nk00da", "fetchSubmodules": false } -- cgit v1.2.3 From ee59d7d72a29cc2b6c69a0d68a815eacfd980263 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 23 Mar 2020 09:55:43 +0100 Subject: grib2json: init --- krebs/5pkgs/simple/grib2json/default.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 krebs/5pkgs/simple/grib2json/default.nix diff --git a/krebs/5pkgs/simple/grib2json/default.nix b/krebs/5pkgs/simple/grib2json/default.nix new file mode 100644 index 000000000..2a7959a75 --- /dev/null +++ b/krebs/5pkgs/simple/grib2json/default.nix @@ -0,0 +1,19 @@ +{ stdenv, fetchzip, makeWrapper, jre }: + +stdenv.mkDerivation { + name = "grib2json"; + src = fetchzip { + url = "https://github.com/krebs/grib2json-bin/archive/31efe677b40fe491c988d50f96b59b1b7e2d46f7.zip"; + sha256 = "1h3yxg270bvac7kaqsbsv4f8nln1i03rfz4cm8cp7llhjj3s6a6b"; + }; + installPhase = '' + mkdir -p $out/bin + cp -r lib $out/ + cat > $out/bin/grib2json << EOF + #!/bin/sh + set -x + ${jre}/bin/java -jar $out/lib/grib2json-0.8.0-SNAPSHOT.jar "\$@" + EOF + chmod +x $out/bin/grib2json + ''; +} -- cgit v1.2.3 From 539f783a7eba249f4221c4013032a05839ac3282 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 23 Mar 2020 09:55:58 +0100 Subject: nomads-cloud: init --- krebs/5pkgs/simple/nomads-cloud/default.nix | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 krebs/5pkgs/simple/nomads-cloud/default.nix diff --git a/krebs/5pkgs/simple/nomads-cloud/default.nix b/krebs/5pkgs/simple/nomads-cloud/default.nix new file mode 100644 index 000000000..2af74dc44 --- /dev/null +++ b/krebs/5pkgs/simple/nomads-cloud/default.nix @@ -0,0 +1,43 @@ +{ writers, coreutils, grib2json, curl, jq, findutils, imagemagick }: +writers.writeDashBin "nomads-cloud" '' + prefix=$(mktemp -d) + grib_path=$prefix.grib + json_path=$prefix.json + pgm_path=$prefix.pgm + png_path="$1" + + mkdir -p "$prefix" + + date=$(${coreutils}/bin/date +%Y%m%d) + for hour in 18 12 06 00; do + url="https://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_0p25_1hr.pl?file=gfs.t''${hour}z.pgrb2.0p25.anl&lev_entire_atmosphere_%5C%28considered_as_a_single_layer%5C%29=on&var_CWAT=on&leftlon=-180&rightlon=180&toplat=90&bottomlat=-90&dir=%2Fgfs.$date%2F$hour" + ${curl}/bin/curl -fsS "$url" > "$grib_path" + if [ "$?" -eq 0 ]; then + break + fi + done + ${grib2json}/bin/grib2json --data "$grib_path" > "$json_path" + + width=$(${jq}/bin/jq '.[0].header.nx' < "$json_path") + height=$(${jq}/bin/jq '.[0].header.ny' < "$json_path") + + # The maximum gray value. Must be bigger than 0 and less than 65536. + maxval=256 + + # pgm - Netpbm grayscale image format + # http://netpbm.sourceforge.net/doc/pgm.html + { + echo P2 + echo "$width $height" + echo "$maxval" + cat "$json_path" | + ${jq}/bin/jq --argjson maxval "$maxval" -c ' + .[0].data[] * $maxval | round + ' | + ${findutils}/bin/xargs -n "$width" + } > "$pgm_path" + + ${imagemagick}/bin/convert -roll +50% "$pgm_path" "$png_path" + + rm -r "$prefix" +'' -- cgit v1.2.3 From 2552d6321c309291147e3d7cc53501480b69f295 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 23 Mar 2020 09:57:54 +0100 Subject: realwallpaper: add nomad-clouds as cloud provider --- krebs/5pkgs/simple/realwallpaper/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/krebs/5pkgs/simple/realwallpaper/default.nix b/krebs/5pkgs/simple/realwallpaper/default.nix index ef83d2e59..3f75e9e1e 100644 --- a/krebs/5pkgs/simple/realwallpaper/default.nix +++ b/krebs/5pkgs/simple/realwallpaper/default.nix @@ -1,5 +1,5 @@ { pkgs, ... }: -pkgs.writeDashBin "generate-wallpaper" '' +pkgs.writers.writeDashBin "generate-wallpaper" '' set -euf # usage: getimg FILENAME URL @@ -68,15 +68,15 @@ pkgs.writeDashBin "generate-wallpaper" '' "$nightmap_url" & fetch daymap-raw.png \ "$daymap_url" & - fetch clouds-raw.jpg \ - "$cloudmap_url" & fetch marker.json \ "$marker_url" & wait + ${pkgs.nomads-cloud}/bin/nomads-cloud clouds-raw.png + check_type nightmap-raw.jpg image check_type daymap-raw.png image - check_type clouds-raw.jpg image + check_type clouds-raw.png image in_size=2048x1024 xplanet_out_size=1466x1200 @@ -87,7 +87,7 @@ pkgs.writeDashBin "generate-wallpaper" '' for raw in \ nightmap-raw.jpg \ daymap-raw.png \ - clouds-raw.jpg \ + clouds-raw.png \ ; do normal=''${raw%-raw.*}.png -- cgit v1.2.3 From cab3be8a19d445d3292454099dbc1ca97bca60c5 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 23 Mar 2020 09:58:10 +0100 Subject: realwallpaper: add subsolar/lunar points --- krebs/5pkgs/simple/realwallpaper/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/krebs/5pkgs/simple/realwallpaper/default.nix b/krebs/5pkgs/simple/realwallpaper/default.nix index 3f75e9e1e..b46cf08c1 100644 --- a/krebs/5pkgs/simple/realwallpaper/default.nix +++ b/krebs/5pkgs/simple/realwallpaper/default.nix @@ -128,6 +128,8 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' # create marker file from json if [ -s marker.json ]; then jq -r 'to_entries[] | @json "\(.value.latitude) \(.value.longitude)"' marker.json > marker_file + echo 'position=sun image=subsolar.png transparent={255,255,255}' >> marker_file + echo 'position=moon image=sublunar.png transparent={255,255,255}' >> marker_file fi # make all unmodified files as final -- cgit v1.2.3 From e4816a16f9144f4267856f87aa2879fff277730d Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 23 Mar 2020 13:05:43 +0100 Subject: realwallpaper: use new sun/moon icons --- krebs/5pkgs/simple/realwallpaper/default.nix | 30 ++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/krebs/5pkgs/simple/realwallpaper/default.nix b/krebs/5pkgs/simple/realwallpaper/default.nix index b46cf08c1..62d88e1e9 100644 --- a/krebs/5pkgs/simple/realwallpaper/default.nix +++ b/krebs/5pkgs/simple/realwallpaper/default.nix @@ -64,12 +64,17 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' cd "$working_dir" # fetch source images in parallel - fetch nightmap-raw.jpg \ - "$nightmap_url" & - fetch daymap-raw.png \ - "$daymap_url" & - fetch marker.json \ - "$marker_url" & + # fetch basic images which should not change + test -e nightmap-raw.jpg || fetch nightmap-raw.jpg "$nightmap_url" & + test -e sun-raw.png || fetch sun-raw.png \ + "http://simpleicon.com/wp-content/uploads/sun-64x64.png" & + + test -e moon-raw.png || fetch moon-raw.png \ + "http://simpleicon.com/wp-content/uploads/moon__star-64x64.png" & + + # regular fetches + fetch daymap-raw.png "$daymap_url" & + fetch marker.json "$marker_url" & wait ${pkgs.nomads-cloud}/bin/nomads-cloud clouds-raw.png @@ -112,6 +117,14 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' convert nightmap.png -threshold 25% nightmap-lightmask.png fi + if needs_rebuild sun.png sun-raw.png; then + convert sun-raw.png -fill gold -opaque black -resize 50% PNG64:sun.png + fi + + if needs_rebuild moon.png moon-raw.png; then + convert moon-raw.png -fill royalblue -opaque black -resize 50% PNG64:moon.png + fi + # create layers make_layer nightmap-snowlayer.png nightmap-fullsnow.png daymap-snowmask.png make_layer nightmap-lightlayer.png nightmap.png nightmap-lightmask.png @@ -125,11 +138,12 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' nightmap-lightsnowlayer.png \ nightmap.png + # create marker file from json if [ -s marker.json ]; then jq -r 'to_entries[] | @json "\(.value.latitude) \(.value.longitude)"' marker.json > marker_file - echo 'position=sun image=subsolar.png transparent={255,255,255}' >> marker_file - echo 'position=moon image=sublunar.png transparent={255,255,255}' >> marker_file + echo 'position=sun image=sun.png' >> marker_file + echo 'position=moon image=moon.png' >> marker_file fi # make all unmodified files as final -- cgit v1.2.3 From e2ef8aba938fb39f826014de919471c7ce751d83 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 23 Mar 2020 13:05:55 +0100 Subject: fetch clouds only every 3h --- krebs/5pkgs/simple/realwallpaper/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/krebs/5pkgs/simple/realwallpaper/default.nix b/krebs/5pkgs/simple/realwallpaper/default.nix index 62d88e1e9..f81f96efe 100644 --- a/krebs/5pkgs/simple/realwallpaper/default.nix +++ b/krebs/5pkgs/simple/realwallpaper/default.nix @@ -77,7 +77,10 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' fetch marker.json "$marker_url" & wait - ${pkgs.nomads-cloud}/bin/nomads-cloud clouds-raw.png + # fetch clouds if they are older than 3h + if ! test "$(find clouds-raw.png -mmin -180)"; then + ${pkgs.nomads-cloud}/bin/nomads-cloud clouds-raw.png + fi check_type nightmap-raw.jpg image check_type daymap-raw.png image -- cgit v1.2.3 From 119b56956c8bcb992c86ca8d0e854884e7c44695 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 23 Mar 2020 18:47:23 +0100 Subject: nomads-cloud: double sqrt for better clouds --- krebs/5pkgs/simple/nomads-cloud/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/krebs/5pkgs/simple/nomads-cloud/default.nix b/krebs/5pkgs/simple/nomads-cloud/default.nix index 2af74dc44..9c39de891 100644 --- a/krebs/5pkgs/simple/nomads-cloud/default.nix +++ b/krebs/5pkgs/simple/nomads-cloud/default.nix @@ -22,7 +22,7 @@ writers.writeDashBin "nomads-cloud" '' height=$(${jq}/bin/jq '.[0].header.ny' < "$json_path") # The maximum gray value. Must be bigger than 0 and less than 65536. - maxval=256 + maxval=1000 # pgm - Netpbm grayscale image format # http://netpbm.sourceforge.net/doc/pgm.html @@ -32,7 +32,7 @@ writers.writeDashBin "nomads-cloud" '' echo "$maxval" cat "$json_path" | ${jq}/bin/jq --argjson maxval "$maxval" -c ' - .[0].data[] * $maxval | round + ((.[0].data[] | sqrt | sqrt) * $maxval | round) ' | ${findutils}/bin/xargs -n "$width" } > "$pgm_path" -- cgit v1.2.3 From e5cbe0cbe17a63854efc0271c1ae0d922a23572d Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 23 Mar 2020 20:28:29 +0100 Subject: realwallpaper: use cloud_gamme instead of sqrt hack --- krebs/5pkgs/simple/nomads-cloud/default.nix | 2 +- krebs/5pkgs/simple/realwallpaper/default.nix | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/krebs/5pkgs/simple/nomads-cloud/default.nix b/krebs/5pkgs/simple/nomads-cloud/default.nix index 9c39de891..6e4ace484 100644 --- a/krebs/5pkgs/simple/nomads-cloud/default.nix +++ b/krebs/5pkgs/simple/nomads-cloud/default.nix @@ -32,7 +32,7 @@ writers.writeDashBin "nomads-cloud" '' echo "$maxval" cat "$json_path" | ${jq}/bin/jq --argjson maxval "$maxval" -c ' - ((.[0].data[] | sqrt | sqrt) * $maxval | round) + ((.[0].data[]) * $maxval | round) ' | ${findutils}/bin/xargs -n "$width" } > "$pgm_path" diff --git a/krebs/5pkgs/simple/realwallpaper/default.nix b/krebs/5pkgs/simple/realwallpaper/default.nix index f81f96efe..d28f20cb6 100644 --- a/krebs/5pkgs/simple/realwallpaper/default.nix +++ b/krebs/5pkgs/simple/realwallpaper/default.nix @@ -169,7 +169,8 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' map=daymap-final.png night_map=nightmap-final.png cloud_map=clouds-final.png - cloud_threshold=10 + cloud_threshold=1 + cloud_gamma=2.5 shade=15 ''} @@ -181,7 +182,8 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' map=daymap-final.png night_map=nightmap-final.png cloud_map=clouds-final.png - cloud_threshold=10 + cloud_threshold=1 + cloud_gamma=2.5 marker_file=marker_file shade=15 ''} -- cgit v1.2.3 From 4337f9dbce769cf64eba0c9ade8097145e782a83 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 24 Mar 2020 10:12:23 +0100 Subject: realwallpaper: add chlora water layer --- krebs/5pkgs/simple/realwallpaper/default.nix | 49 +++++++++++++++++++++------- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/krebs/5pkgs/simple/realwallpaper/default.nix b/krebs/5pkgs/simple/realwallpaper/default.nix index d28f20cb6..9be8f7c7c 100644 --- a/krebs/5pkgs/simple/realwallpaper/default.nix +++ b/krebs/5pkgs/simple/realwallpaper/default.nix @@ -73,8 +73,22 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' "http://simpleicon.com/wp-content/uploads/moon__star-64x64.png" & # regular fetches - fetch daymap-raw.png "$daymap_url" & fetch marker.json "$marker_url" & + + # fetch daymap twice daily + if ! test "$(find daymap-raw.png -mmin -720)"; then + fetch daymap-raw.png "$daymap_url" & + fi + + # fetch cholrophyl once every week + chlora_url=$(curl -Ss \ + 'https://neo.sci.gsfc.nasa.gov/view.php?datasetId=MY1DMM_CHLORA&date=2999-12-31' \ + | grep '3600 x 1800' | sed 's/.*href="\([^"]*\)".*/\1/') + + if ! test "$(find chlora-raw.jpg -mtime -7)"; then + fetch chlora-raw.jpg "$chlora_url" & + fi + wait # fetch clouds if they are older than 3h @@ -96,6 +110,7 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' nightmap-raw.jpg \ daymap-raw.png \ clouds-raw.png \ + chlora-raw.jpg \ ; do normal=''${raw%-raw.*}.png @@ -105,7 +120,26 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' fi done - # create nightmap-fullsnow + if needs_rebuild sun.png sun-raw.png; then + convert sun-raw.png -fill gold -opaque black -resize 50% PNG64:sun.png + fi + + if needs_rebuild moon.png moon-raw.png; then + convert moon-raw.png -fill royalblue -opaque black -resize 50% PNG64:moon.png + fi + + # -- Daymap -- + + # merge with water chlora layer + convert daymap.png chlora.png -compose lighten -composite daymap-final.png + + # -- Nightmap -- + + # merge with water chlora layer + convert nightmap.png \( -fill black -colorize 70% chlora.png \) \ + -compose lighten -composite nightmap-chlora.png + + # create nightmap-fullsnow, a big blue picture if needs_rebuild nightmap-fullsnow.png; then convert -size $in_size xc:$nightsnow_color nightmap-fullsnow.png fi @@ -120,14 +154,6 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' convert nightmap.png -threshold 25% nightmap-lightmask.png fi - if needs_rebuild sun.png sun-raw.png; then - convert sun-raw.png -fill gold -opaque black -resize 50% PNG64:sun.png - fi - - if needs_rebuild moon.png moon-raw.png; then - convert moon-raw.png -fill royalblue -opaque black -resize 50% PNG64:moon.png - fi - # create layers make_layer nightmap-snowlayer.png nightmap-fullsnow.png daymap-snowmask.png make_layer nightmap-lightlayer.png nightmap.png nightmap-lightmask.png @@ -139,7 +165,7 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' flatten nightmap-final.png \ nightmap-lightsnowlayer.png \ - nightmap.png + nightmap-chlora.png # create marker file from json @@ -151,7 +177,6 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' # make all unmodified files as final for normal in \ - daymap.png \ clouds.png \ ; do -- cgit v1.2.3 From c76f1618940ff188258212a0988d3de7525f9e9e Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 25 Mar 2020 15:39:25 +0100 Subject: realwallpaper: redesign with new image sources --- krebs/3modules/realwallpaper.nix | 18 --- krebs/5pkgs/simple/realwallpaper/default.nix | 164 ++++++++++++--------------- 2 files changed, 73 insertions(+), 109 deletions(-) diff --git a/krebs/3modules/realwallpaper.nix b/krebs/3modules/realwallpaper.nix index a83758ccd..7a0052a4f 100644 --- a/krebs/3modules/realwallpaper.nix +++ b/krebs/3modules/realwallpaper.nix @@ -17,21 +17,6 @@ let default = "/var/realwallpaper/"; }; - nightmap = mkOption { - type = types.str; - default = "http://eoimages.gsfc.nasa.gov/images/imagerecords/55000/55167/earth_lights_lrg.jpg"; - }; - - daymap = mkOption { - type = types.str; - default = "https://www.nnvl.noaa.gov/images/globaldata/SnowIceCover_Daily.png"; - }; - - cloudmap = mkOption { - type = types.str; - default = "http://home.megapass.co.kr/~holywatr/cloud_data/clouds_2048.jpg"; - }; - marker = mkOption { type = types.str; default = "http://graph.r/marker.json"; @@ -67,9 +52,6 @@ let environment = { working_dir = cfg.workingDir; - nightmap_url = cfg.nightmap; - daymap_url = cfg.daymap; - cloudmap_url = cfg.cloudmap; marker_url = cfg.marker; }; diff --git a/krebs/5pkgs/simple/realwallpaper/default.nix b/krebs/5pkgs/simple/realwallpaper/default.nix index 9be8f7c7c..dfe03ff35 100644 --- a/krebs/5pkgs/simple/realwallpaper/default.nix +++ b/krebs/5pkgs/simple/realwallpaper/default.nix @@ -17,24 +17,28 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' fi } - # usage: image_size FILENAME - image_size() { - identify "$1" | awk '{print$3}' + # check if file exists and fetch only if missing + fetch_once() { + name=$1 + url=$2 + test -e "$name" || fetch "$name" "$url" } - # usage: make_mask DST SRC MASK - make_layer() { - if needs_rebuild "$@"; then - echo "make $1 (apply mask)" >&2 - convert "$2" "$3" -alpha off -compose copy_opacity -composite "$1" + fetch_older_min() { + min=$1 + name=$2 + url=$3 + if ! test "$(find $name -mmin -$min)"; then + fetch "$name" "$url" fi } - # usage: flatten DST HILAYER LOLAYER - flatten() { - if needs_rebuild "$@"; then - echo "make $1 (flatten)" >&2 - composite "$2" "$3" "$1" + fetch_older_days() { + days=$1 + name=$2 + url=$3 + if ! test "$(find $name -mmin -$days)"; then + fetch "$name" "$url" fi } @@ -60,35 +64,36 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' return $result } + get_neo_url() { + url=$1 + curl -Ss "$url" | grep '3600 x 1800' | sed 's/.*href="\([^"]*\)".*/\1/' + } + main() { cd "$working_dir" # fetch source images in parallel - # fetch basic images which should not change - test -e nightmap-raw.jpg || fetch nightmap-raw.jpg "$nightmap_url" & - test -e sun-raw.png || fetch sun-raw.png \ - "http://simpleicon.com/wp-content/uploads/sun-64x64.png" & - - te