commit e76f08b20896c8aa8008f6fe102aaf08cce04fa5 parent 831776d09cf461c5b2697d009175e27e99d2fe7e Author: Vincent Demeester <vincent@sbr.pm> Date: Fri, 18 Dec 2020 13:18:09 +0100 nix: move pkgs to nix/packages Signed-off-by: Vincent Demeester <vincent@sbr.pm> Diffstat:
76 files changed, 69 insertions(+), 35 deletions(-)
diff --git a/ci.nix b/ci.nix @@ -33,7 +33,7 @@ let in concatMap f (attrValues s); outputsOf = p: map (o: p.${o}) p.outputs; - nurAttrs = p: import ./pkgs/default.nix { pkgs = p; }; + nurAttrs = p: import ./nix/packages/default.nix { pkgs = p; }; nurPkgs = p: flattenPkgs ( listToAttrs ( diff --git a/flake.nix b/flake.nix @@ -210,6 +210,7 @@ overlays = forEachSystem (system: [ (self.overlay."${system}") (_: _: import inputs.gitignore-nix { lib = inputs.nixpkgs.lib; }) + (import ./nix/overlays/infra.nix) ]); }; @@ -261,22 +262,25 @@ # Expose the packages defined in this flake, built for any supported systems. These are # meant to be consumed by other projects that might import this flake. + # + # Internal packages are handled through overlay definition, in internal. + # Note: they are also added to the systems overlay so there is no duplication of definition. packages = forEachSystem (system: let pkgs = pkgsBySystem."${system}"; in { - apeStable = stablePkgsBySystem."${system}".callPackage ./pkgs/ape { }; - apeUnstable = unstablePkgsBySystem."${system}".callPackage ./pkgs/ape { }; - ape = pkgs.callPackage ./pkgs/ape { }; - nr = pkgs.callPackage ./pkgs/nr { }; - ram = pkgs.callPackage ./pkgs/ram { }; - systemd-email = pkgs.callPackage ./pkgs/systemd-email { }; + apeStable = stablePkgsBySystem."${system}".callPackage ./nix/packages/ape { }; + apeUnstable = unstablePkgsBySystem."${system}".callPackage ./nix/packages/ape { }; + ape = pkgs.callPackage ./nix/packages/ape { }; + nr = pkgs.callPackage ./nix/packages/nr { }; + ram = pkgs.callPackage ./nix/packages/ram { }; + systemd-email = pkgs.callPackage ./nix/packages/systemd-email { }; - batzconverter = pkgs.callPackage ./pkgs/batzconverter { }; + batzconverter = pkgs.callPackage ./nix/packages/batzconverter { }; # Tekton - inherit (pkgs.callPackage ./pkgs/tkn { }) + inherit (pkgs.callPackage ./nix/packages/tkn { }) tkn_0_11 tkn_0_12 tkn_0_13 @@ -284,13 +288,13 @@ tkn ; - manifest-tool = pkgs.callPackage ./pkgs/manifest-tool { }; - ko = pkgs.callPackage ./pkgs/ko { }; - buildx = pkgs.callPackage ./pkgs/buildx { }; - buildkit = pkgs.callPackage ./pkgs/buildkit { }; + manifest-tool = pkgs.callPackage ./nix/packages/manifest-tool { }; + ko = pkgs.callPackage ./nix/packages/ko { }; + buildx = pkgs.callPackage ./nix/packages/buildx { }; + buildkit = pkgs.callPackage ./nix/packages/buildkit { }; } // optionalAttrs (system == "x86_64-linux") { # OpenShift - inherit (pkgs.callPackage ./pkgs/oc { }) + inherit (pkgs.callPackage ./nix/packages/oc { }) oc_4_1 oc_4_2 oc_4_3 @@ -299,7 +303,7 @@ oc_4_6 oc ; - inherit (pkgs.callPackage ./pkgs/openshift-install { }) + inherit (pkgs.callPackage ./nix/packages/openshift-install { }) openshift-install_4_3 openshift-install_4_4 openshift-install_4_5 diff --git a/nix/overlays/infra.nix b/nix/overlays/infra.nix @@ -0,0 +1,5 @@ +self: super: + +{ + systemd-email = super.callPackage ../packages/systemd-email { }; +} diff --git a/pkgs/README.org b/nix/packages/README.org diff --git a/pkgs/ape/default.nix b/nix/packages/ape/default.nix diff --git a/pkgs/athens/default.nix b/nix/packages/athens/default.nix diff --git a/pkgs/batzconverter/default.nix b/nix/packages/batzconverter/default.nix diff --git a/pkgs/buildkit/default.nix b/nix/packages/buildkit/default.nix diff --git a/pkgs/buildx/default.nix b/nix/packages/buildx/default.nix diff --git a/pkgs/containerd/default.nix b/nix/packages/containerd/default.nix diff --git a/pkgs/crc/default.nix b/nix/packages/crc/default.nix diff --git a/pkgs/crc/patches/1_10.patch b/nix/packages/crc/patches/1_10.patch diff --git a/pkgs/crc/patches/1_11.patch b/nix/packages/crc/patches/1_11.patch diff --git a/pkgs/crc/patches/1_9.patch b/nix/packages/crc/patches/1_9.patch diff --git a/pkgs/default.nix b/nix/packages/default.nix diff --git a/pkgs/envbox/default.nix b/nix/packages/envbox/default.nix diff --git a/pkgs/esc/default.nix b/nix/packages/esc/default.nix diff --git a/pkgs/esc/deps.nix b/nix/packages/esc/deps.nix diff --git a/pkgs/fhs/std.nix b/nix/packages/fhs/std.nix diff --git a/pkgs/gnome/extensions/bluetooth-quick-connect/default.nix b/nix/packages/gnome/extensions/bluetooth-quick-connect/default.nix diff --git a/pkgs/gnome/extensions/hide-top-bar/default.nix b/nix/packages/gnome/extensions/hide-top-bar/default.nix diff --git a/pkgs/gnome/extensions/nightthemeswitcher/default.nix b/nix/packages/gnome/extensions/nightthemeswitcher/default.nix diff --git a/pkgs/gnome/extensions/noannoyance/default.nix b/nix/packages/gnome/extensions/noannoyance/default.nix diff --git a/pkgs/gnome/extensions/shell/default.nix b/nix/packages/gnome/extensions/shell/default.nix diff --git a/pkgs/gogo-protobuf/default.nix b/nix/packages/gogo-protobuf/default.nix diff --git a/pkgs/gorun/default.nix b/nix/packages/gorun/default.nix diff --git a/pkgs/govanityurl/default.nix b/nix/packages/govanityurl/default.nix diff --git a/pkgs/ko/default.nix b/nix/packages/ko/default.nix diff --git a/pkgs/krew/default.nix b/nix/packages/krew/default.nix diff --git a/pkgs/kss/default.nix b/nix/packages/kss/default.nix diff --git a/pkgs/kubernix/default.nix b/nix/packages/kubernix/default.nix diff --git a/pkgs/manifest-tool/default.nix b/nix/packages/manifest-tool/default.nix diff --git a/pkgs/my/scripts/bin/authkey b/nix/packages/my/scripts/bin/authkey diff --git a/pkgs/my/scripts/bin/che-inst b/nix/packages/my/scripts/bin/che-inst diff --git a/pkgs/my/scripts/bin/chos4 b/nix/packages/my/scripts/bin/chos4 diff --git a/pkgs/my/scripts/bin/decode-kubernetes-secrets.py b/nix/packages/my/scripts/bin/decode-kubernetes-secrets.py diff --git a/pkgs/my/scripts/bin/git-remote-setup b/nix/packages/my/scripts/bin/git-remote-setup diff --git a/pkgs/my/scripts/bin/import-photos b/nix/packages/my/scripts/bin/import-photos diff --git a/pkgs/my/scripts/bin/knix b/nix/packages/my/scripts/bin/knix diff --git a/pkgs/my/scripts/bin/op-inst b/nix/packages/my/scripts/bin/op-inst diff --git a/pkgs/my/scripts/bin/pbcopy b/nix/packages/my/scripts/bin/pbcopy diff --git a/pkgs/my/scripts/bin/pbpaste b/nix/packages/my/scripts/bin/pbpaste diff --git a/pkgs/my/scripts/bin/redhat-vpn b/nix/packages/my/scripts/bin/redhat-vpn diff --git a/pkgs/my/scripts/bin/shot b/nix/packages/my/scripts/bin/shot diff --git a/pkgs/my/scripts/bin/shotf b/nix/packages/my/scripts/bin/shotf diff --git a/pkgs/my/scripts/bin/tktl b/nix/packages/my/scripts/bin/tktl diff --git a/pkgs/my/scripts/bin/vpnpass b/nix/packages/my/scripts/bin/vpnpass diff --git a/pkgs/my/scripts/builder.sh b/nix/packages/my/scripts/builder.sh diff --git a/pkgs/my/scripts/default.nix b/nix/packages/my/scripts/default.nix diff --git a/pkgs/my/vde-thinkpad/default.nix b/nix/packages/my/vde-thinkpad/default.nix diff --git a/pkgs/my/vde-thinkpad/dock b/nix/packages/my/vde-thinkpad/dock diff --git a/pkgs/my/vrsync/default.nix b/nix/packages/my/vrsync/default.nix diff --git a/pkgs/my/vrsync/foo b/nix/packages/my/vrsync/foo diff --git a/pkgs/my/vrsync/vrsync b/nix/packages/my/vrsync/vrsync diff --git a/pkgs/nr/default.nix b/nix/packages/nr/default.nix diff --git a/pkgs/oc/default.nix b/nix/packages/oc/default.nix diff --git a/pkgs/openshift-install/default.nix b/nix/packages/openshift-install/default.nix diff --git a/pkgs/operator-sdk/default.nix b/nix/packages/operator-sdk/default.nix diff --git a/pkgs/prm/default.nix b/nix/packages/prm/default.nix diff --git a/pkgs/protobuild/default.nix b/nix/packages/protobuild/default.nix diff --git a/pkgs/ram/default.nix b/nix/packages/ram/default.nix diff --git a/pkgs/rmapi/default.nix b/nix/packages/rmapi/default.nix diff --git a/pkgs/sec/default.nix b/nix/packages/sec/default.nix diff --git a/pkgs/systemd-email/default.nix b/nix/packages/systemd-email/default.nix diff --git a/pkgs/systemd-email/systemd-email b/nix/packages/systemd-email/systemd-email diff --git a/pkgs/tkn-oci/default.nix b/nix/packages/tkn-oci/default.nix diff --git a/pkgs/tkn/default.nix b/nix/packages/tkn/default.nix diff --git a/pkgs/toolbox/default.nix b/nix/packages/toolbox/default.nix diff --git a/pkgs/vscodeliveshare/default.nix b/nix/packages/vscodeliveshare/default.nix diff --git a/pkgs/yak/default.nix b/nix/packages/yak/default.nix diff --git a/pkgs/yaspell/default.nix b/nix/packages/yaspell/default.nix diff --git a/overlays/sbr.nix b/overlays/sbr.nix @@ -3,18 +3,18 @@ let compileEmacsFiles = super.callPackage ./emacs/builder.nix; in rec { - scripts = import ../pkgs/my/scripts { + scripts = import ../nix/packages/my/scripts { inherit (self) stdenv; }; - vrsync = import ../pkgs/my/vrsync { + vrsync = import ../nix/packages/my/vrsync { inherit (self) stdenv lib; }; - vde-thinkpad = import ../pkgs/my/vde-thinkpad { + vde-thinkpad = import ../nix/packages/my/vde-thinkpad { inherit (self) stdenv lib; }; bekind = super.callPackage ../tools/bekind { }; - my = import ../pkgs { + my = import ../nix/packages { inherit (self) pkgs; }; diff --git a/systems/hosts/foo.flake.nix b/systems/hosts/foo.flake.nix @@ -49,6 +49,7 @@ in ''; }; + environment.systemPackages = with pkgs; [ tkn ]; /* profiles = { desktop.i3.enable = true; diff --git a/systems/profiles/base.nix b/systems/profiles/base.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - inherit (lib) mkEnableOption mkIf; + inherit (lib) mkEnableOption mkIf mkDefault mkOverride; cfg = config.profiles.base; in { @@ -10,7 +10,30 @@ in }; }; config = mkIf cfg.enable { + # Use systemd-boot by default, can be overridden by configurations + boot.loader.systemd-boot.enable = mkDefault true; # `nix-daemon` will hit the stack limit when using `nixFlakes`. systemd.services.nix-daemon.serviceConfig."LimitSTACK" = "infinity"; + environment = { + variables = { + EDITOR = mkOverride 0 "vim"; + }; + }; + # Make sure we never remove SSH_AUTH_SOCK when reseting env through sudo + security.sudo.extraConfig = '' + Defaults env_keep += SSH_AUTH_SOCK + ''; + # Setup a *mailer* in case of failure in systemd + systemd.services."status-email-root@" = { + description = "status email for %i to vincent"; + serviceConfig = { + Type = "oneshot"; + ExecStart = '' + ${pkgs.systemd-email}/bin/systemd-email vincent@demeester.fr %i + ''; + User = "root"; + Environment = "PATH=/run/current-system/sw/bin"; + }; + }; }; } diff --git a/tools/gnus/init.el b/tools/gnus/init.el @@ -169,21 +169,21 @@ ;; -GnusSummary ;; GnusWin -(use-package gnus-win - :config - (gnus-add-configuration - '(article - (horizontal 1.0 - (vertical 40 (group 1.0)) - (vertical 1.0 - (summary 0.16 point) - (article 1.0))))) - - (gnus-add-configuration - '(summary - (horizontal 1.0 - (vertical 40 (group 1.0)) - (vertical 1.0 (summary 1.0 point)))))) +;; (use-package gnus-win +;; :config +;; (gnus-add-configuration +;; '(article +;; (horizontal 1.0 +;; (vertical 40 (group 1.0)) +;; (vertical 1.0 +;; (summary 0.16 point) +;; (article 1.0))))) +;; +;; (gnus-add-configuration +;; '(summary +;; (horizontal 1.0 +;; (vertical 40 (group 1.0)) +;; (vertical 1.0 (summary 1.0 point)))))) ;; -GnusWin ;; GnusDired diff --git a/users/vincent/desktop/i3.nix b/users/vincent/desktop/i3.nix @@ -185,6 +185,7 @@ in keybindings = { "Mod4+Return" = "exec alacritty"; "Mod4+Shift+Return" = "exec emacsclient -c"; + "Mod4+Control+Return" = "exec emacs"; }; gaps = { inner = 0;