From 204a7a75ab094232b44655fb8cc01a5ed014f925 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 17 Jun 2018 03:00:14 -0700 Subject: [PATCH 1/4] [NixOS] Enable Avahi --- nixos/configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 6133502e..2d4100c8 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -169,6 +169,7 @@ in # services.printing.enable = true; # Enable sound. + services.avahi.enable = true; sound.enable = true; hardware.pulseaudio.enable = true; From 6a726f066ecfd0e78b8a843ef73bbb9a00e2b169 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 17 Jun 2018 03:01:41 -0700 Subject: [PATCH 2/4] [NixOS] Build clipit from source --- nixos/configuration.nix | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 2d4100c8..35b62090 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -20,14 +20,21 @@ let }; propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ [pkgs.libappindicator-gtk3]; }); - # clipit-master = pkgs.clipt.overrideAttrs (oldAttrs: rec { - # src = fetchFromGitHub { - # owner = "shantzu"; - # repo = "ClipIt"; - # rev = "eb9adaf2b5fd65aac1e83d6544b9076aae6af5b7"; - # sha256 = "01if8y93wa0mwbkzkzx2v1vqh47zlz4k1dysl6yh5rmppd1psknz"; - # }; - # }); + clipit-master = pkgs.clipit.overrideAttrs (oldAttrs: rec { + version = "9741c39382a3f6e4c03eac6905a49794d07c465a"; + preConfigure = "./autogen.sh"; + configureFlags = ["--with-gtk3" "--enable-appindicator"]; + src = pkgs.fetchFromGitHub { + owner = "IvanMalison"; + repo = "ClipIt"; + sha256 = "13lddvbsp16nir9ibllr403qxhwyh4h2bh6774icbb250pghykjx"; + rev = version; + }; + buildInputs = with pkgs; [ + autoconf automake intltool gtk3 xdotool hicolor-icon-theme + libappindicator-gtk3 + ]; + }); in { nixpkgs.config.allowUnfree = true; @@ -90,7 +97,7 @@ in # Desktop autorandr - clipit + clipit-master compton feh networkmanagerapplet From b0ff8efabcff901017ca7512ec66dfb40f18c148 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 17 Jun 2018 03:02:10 -0700 Subject: [PATCH 3/4] [NixOS] Random stuff WIP --- nixos/configuration.nix | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 35b62090..6c14f70e 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -86,6 +86,7 @@ in vlc xfce.thunar spotify + steam termite rxvt_unicode emacs @@ -100,6 +101,7 @@ in clipit-master compton feh + gnome3.gpaste networkmanagerapplet pinentry pommed_light @@ -110,6 +112,7 @@ in volnoti xclip xdotool + # haskellPackages.status-notifier-item xorg.xkbcomp xsettingsd @@ -136,6 +139,7 @@ in ncdu pass python-with-my-packages + # qttools rcm silver-searcher stow @@ -156,26 +160,8 @@ in GDK_PIXBUF_MODULE_FILE = "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"; }; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. services.openssh.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - - # Enable CUPS to print documents. - # services.printing.enable = true; - - # Enable sound. services.avahi.enable = true; sound.enable = true; hardware.pulseaudio.enable = true; From d24718a1e2f9da83bee561c34fdc09d3deefd00b Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 17 Jun 2018 03:02:38 -0700 Subject: [PATCH 4/4] [Emacs] Add stack build, disable undo-tree --- dotfiles/emacs.d/README.org | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index d6203c83..520b2e6e 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -1441,7 +1441,7 @@ The file server file for this emacs instance no longer exists.") (expand-file-name server-name server-dir))) (setq server-use-tcp t) (when (equal nil (server-running-p)) (server-start)) - (run-with-timer 0 60 'imalison:make-main-emacs-server))) + (imalison:make-main-emacs-server))) #+END_SRC ** list-environment #+BEGIN_SRC emacs-lisp @@ -1647,11 +1647,17 @@ custom-set-faces in your custom file. (let ((frame-mode-use-new-frame-or-window t)) (imalison:named-compile "stack build"))) +(defun imalison:stack-build () + (interactive) + (let ((frame-mode-use-new-frame-or-window t)) + (imalison:named-compile "nix-build default.nix"))) + (defhydra imalison:compile nil "Compile" ("p" imalison:projectile-helm-command-from-zsh "Run a command in projectile root") ("d" helm-command-from-zsh "Run a command in default directory") ("c" imalison:named-compile "Enter Custom Command") ("s" imalison:stack-build "Stack build") + ("n" imalison:nix-build "Nix build") ("t" imalison:make-test "Test") ("u" imalison:glide-up "Update Dependencies")) ;; The following parens close the use-package/progn created several blocks above @@ -2549,6 +2555,10 @@ eval-last-sexp. (progn (setq nix-indent-function 'nix-indent-line))) #+END_SRC +#+BEGIN_SRC emacs-lisp +(use-package nix-update + :after nix) +#+END_SRC *** clojure The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877bea582fed72bbca0dc1f80fcb2ec0e6d5/layers/+lang/clojure/funcs.el#L30][spacemacs]]. It adds fancification to a clojure mode. #+BEGIN_SRC emacs-lisp @@ -4266,8 +4276,10 @@ I had to disable this mode because something that it does messes with coding set (add-hook 'prog-mode-hook (lambda () (rainbow-delimiters-mode t))))) #+END_SRC ** undo-tree +Disabled because it makes it hard to redo things #+BEGIN_SRC emacs-lisp (use-package undo-tree + :disabled t :bind (("C--" . undo-redo) ("C-c u" . undo-tree-visualize) ("C-c r" . undo-tree-redo)) @@ -4284,6 +4296,7 @@ I had to disable this mode because something that it does messes with coding set ** recentf #+BEGIN_SRC emacs-lisp (use-package recentf + :demand t :config (progn (setq recentf-max-saved-items 1000