From 0886027a4afd9594251b7082524cbf13f9a62e89 Mon Sep 17 00:00:00 2001 From: jeschli Date: Sat, 28 Sep 2019 19:00:03 +0000 Subject: j emacs: use nix-community overlay (needs 20.03) --- jeschli/2configs/emacs.nix | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index bc9cfdb4b..d243017f1 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -1,6 +1,14 @@ { config, pkgs, ... }: let + pkgsWithOverlay = import { + overlays = [ + (import (builtins.fetchTarball { + url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz; + })) + ]; + }; + orgAgendaView = import ./emacs-org-agenda.nix; packageRepos = '' @@ -47,6 +55,9 @@ let magit = '' (global-set-key (kbd "C-x g") 'magit-status) ; "Most Magit commands are commonly invoked from the status buffer" + + (with-eval-after-load 'magit + (require 'forge)) ''; windowCosmetics = '' @@ -145,8 +156,6 @@ let (global-set-key (kbd "") 'delete-other-windows) ''; - - dotEmacs = pkgs.writeText "dot-emacs" '' ${packageRepos} @@ -164,9 +173,11 @@ let ${myFunctionKeys} ''; - emacsWithCustomPackages = (pkgs.emacsPackagesNgGen pkgs.emacs).emacsWithPackages (epkgs: [ + #emacsWithCustomPackages + emacsPkgs= epkgs: [ #testing epkgs.melpaPackages.gitlab + epkgs.melpaPackages.forge # emacs convenience epkgs.melpaPackages.ag @@ -177,7 +188,7 @@ let epkgs.melpaPackages.monokai-alt-theme # development - epkgs.melpaStablePackages.magit + epkgs.melpaPackages.magit epkgs.melpaPackages.nix-mode epkgs.melpaPackages.go-mode epkgs.melpaPackages.haskell-mode @@ -196,20 +207,26 @@ let epkgs.melpaPackages.org-mime epkgs.elpaPackages.which-key - ]); + ]; +emacsWithOverlay = (pkgsWithOverlay.emacsWithPackagesFromUsePackage { + config = builtins.readFile dotEmacs; # builtins.readFile ./emacs.el; + # Package is optional, defaults to pkgs.emacs + package = pkgsWithOverlay.emacsGit; + # Optionally provide extra packages not in the configuration file + extraEmacsPackages = emacsPkgs; + }); myEmacs = pkgs.writeDashBin "my-emacs" '' - exec ${emacsWithCustomPackages}/bin/emacs -q -l ${dotEmacs} "$@" + exec ${emacsWithOverlay}/bin/emacs -q -l ${dotEmacs} "$@" ''; myEmacsWithDaemon = pkgs.writeDashBin "my-emacs-daemon" '' - exec ${emacsWithCustomPackages}/bin/emacs -q -l ${dotEmacs} --daemon + exec ${emacsWithOverlay}/bin/emacs -q -l ${dotEmacs} --daemon ''; myEmacsClient = pkgs.writeDashBin "meclient" '' - exec ${emacsWithCustomPackages}/bin/emacsclient --create-frame + exec ${emacsWithOverlay}/bin/emacsclient --create-frame ''; - in { environment.systemPackages = [ myEmacs myEmacsWithDaemon myEmacsClient -- cgit v1.2.3 From 5a5f899d715f864c5e97911cbd7e2dc839e79601 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Mon, 30 Sep 2019 08:10:02 +0200 Subject: j: extract python development into seperate nix file --- jeschli/2configs/python.nix | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 jeschli/2configs/python.nix diff --git a/jeschli/2configs/python.nix b/jeschli/2configs/python.nix new file mode 100644 index 000000000..0c32e1fc8 --- /dev/null +++ b/jeschli/2configs/python.nix @@ -0,0 +1,9 @@ +{ config, pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + python37 + python37Packages.pip + pipenv + ]; +} -- cgit v1.2.3 From 5ac6d30dd2b86f58189d179f08cbe97ff938bf7e Mon Sep 17 00:00:00 2001 From: Jeschli Date: Mon, 30 Sep 2019 08:11:39 +0200 Subject: j krops: extract target to argument of deploy --- jeschli/krops.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jeschli/krops.nix b/jeschli/krops.nix index 30b06c1e6..9a8a76676 100644 --- a/jeschli/krops.nix +++ b/jeschli/krops.nix @@ -29,9 +29,9 @@ in { # usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy) - deploy = pkgs.krops.writeDeploy "${name}-deploy" { + deploy = { target ? "root@${name}/var/src" }: pkgs.krops.writeDeploy "${name}-deploy" { source = source { test = false; }; - target = "root@${name}/var/src"; + inherit target; }; # usage: $(nix-build --no-out-link --argstr name HOSTNAME --argstr target PATH -A test) -- cgit v1.2.3 From b79f7715a032e3aa58c8a236ceb305b915974e9e Mon Sep 17 00:00:00 2001 From: Jeschli Date: Mon, 30 Sep 2019 08:12:29 +0200 Subject: j reagenzglas: remove own pre krops deploy skript --- jeschli/1systems/reagenzglas/config.nix | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/jeschli/1systems/reagenzglas/config.nix b/jeschli/1systems/reagenzglas/config.nix index 2eefb23fb..312bfb824 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -1,18 +1,5 @@ { config, pkgs, ... }: -with pkgs; -let - rebuild_script = pkgs.writeTextFile { - name="rebuild"; - text='' - #!/usr/bin/env sh - set -eu - sudo cp -r /etc/nixos ~/old-nixos - sudo cp -r $HOME/nixos /etc/ - sudo nixos-rebuild switch - ''; - executable=true; - }; -in + { imports = [ @@ -51,12 +38,6 @@ in rofi ]; - # How I rebuild the system - environment.shellAliases = { - rebuild = rebuild_script; - }; - - # Define a user account. Don't forget to set a password with ‘passwd’. users.users.ombi = { isNormalUser = true; extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. -- cgit v1.2.3 From b9c7139ec34352288be26afa22c65b452b8ff899 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Mon, 30 Sep 2019 08:12:54 +0200 Subject: j reagenzglas: include python --- 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 312bfb824..01d88530a 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -5,6 +5,7 @@ [ + ./desktop.nix ./i3-configuration.nix ./hardware-configuration.nix -- cgit v1.2.3 From 086609ea4b152715c5ce59bc0ee4c2e18720930a Mon Sep 17 00:00:00 2001 From: Jeschli Date: Mon, 30 Sep 2019 08:13:46 +0200 Subject: j reagenzglas: fix krebs.build.host --- jeschli/1systems/reagenzglas/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jeschli/1systems/reagenzglas/config.nix b/jeschli/1systems/reagenzglas/config.nix index 01d88530a..2d0351db7 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -15,7 +15,7 @@ boot.loader.systemd-boot.enable = true; # Wireless network with network manager - krebs.build.host = config.krebs.hosts.brauerei; + krebs.build.host = config.krebs.hosts.reagenzglas; # networking.hostName = "nixos"; # Define your hostname. networking.networkmanager.enable = true; -- cgit v1.2.3 From 0e36d00f258c02353e5fcca314b09cd35b67fa39 Mon Sep 17 00:00:00 2001 From: Jeschli Date: Mon, 30 Sep 2019 08:14:01 +0200 Subject: j reagenzglas: add silversearcher --- 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 2d0351db7..b56b76acb 100644 --- a/jeschli/1systems/reagenzglas/config.nix +++ b/jeschli/1systems/reagenzglas/config.nix @@ -37,6 +37,7 @@ wget vim git firefox rofi + ag ]; users.users.ombi = { -- cgit v1.2.3 From 7d5a58cd02e85abdf53c7cebaf295ff8a175e61e Mon Sep 17 00:00:00 2001 From: jeschli Date: Tue, 8 Oct 2019 05:18:09 +0000 Subject: j: add seperate rust config --- jeschli/1systems/bolide/config.nix | 1 + jeschli/2configs/rust.nix | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 jeschli/2configs/rust.nix diff --git a/jeschli/1systems/bolide/config.nix b/jeschli/1systems/bolide/config.nix index d859833ac..49b814793 100644 --- a/jeschli/1systems/bolide/config.nix +++ b/jeschli/1systems/bolide/config.nix @@ -14,6 +14,7 @@ in + ]; krebs.build.host = config.krebs.hosts.bolide; diff --git a/jeschli/2configs/rust.nix b/jeschli/2configs/rust.nix new file mode 100644 index 000000000..dbd90ebf5 --- /dev/null +++ b/jeschli/2configs/rust.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + rustup + ]; +} -- cgit v1.2.3