From 16d2c2e23d2b5d5f75b820285aa038a4d15342cc Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 15 Nov 2022 15:48:15 +0100 Subject: lib.host: add consul option --- lib/types.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/types.nix b/lib/types.nix index f312b73..0e0e093 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -58,6 +58,14 @@ rec { default = false; }; + consul = mkOption { + description = '' + Whether the host is a member of the global consul network + ''; + type = bool; + default = false; + }; + owner = mkOption { type = user; }; -- cgit v1.2.3 From 4d78208a98efa9612e77decc6101d17df0e55de3 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 23 Nov 2022 17:08:55 +0100 Subject: lib.types.net.ip*: add net-independent defaults --- lib/types.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/types.nix b/lib/types.nix index 0e0e093..67a0c6f 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -136,7 +136,7 @@ rec { default = null; }; ip4 = mkOption { - type = nullOr (submodule { + type = nullOr (submodule (ip4: { options = { addr = mkOption { type = addr4; @@ -146,13 +146,15 @@ rec { } // { retiolum.default = "10.243.0.0/16"; wiregrill.default = "10.244.0.0/16"; - }.${config._module.args.name} or {}); + }.${config._module.args.name} or { + default = "${ip4.config.addr}/32"; + }); }; - }); + })); default = null; }; ip6 = mkOption { - type = nullOr (submodule { + type = nullOr (submodule (ip6: { options = { addr = mkOption { type = addr6; @@ -163,9 +165,11 @@ rec { } // { retiolum.default = "42:0::/32"; wiregrill.default = "42:1::/32"; - }.${config._module.args.name} or {}); + }.${config._module.args.name} or { + default = "${ip6.config.addr}/128"; + }); }; - }); + })); default = null; }; ssh = mkOption { -- cgit v1.2.3 From e03d29d7a805f13ed321fd5f79a06a0293ff3237 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 5 Dec 2022 14:35:20 +0100 Subject: tv nix: auto-optimise-store = true --- tv/2configs/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index f3ce2da..41dab52 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -53,6 +53,10 @@ with import ; nix.binaryCaches = ["https://cache.nixos.org"]; + nix.extraOptions = '' + auto-optimise-store = true + ''; + nix.useSandbox = true; } { -- cgit v1.2.3 From 06773bdd5890befc215a60d069cee6272b4d49a3 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 5 Dec 2022 16:54:54 +0100 Subject: tv: use nix.settings --- tv/2configs/default.nix | 13 +++++-------- tv/2configs/hw/x220.nix | 4 ++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 41dab52..c904702 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -46,18 +46,15 @@ with import ; } { - # TODO check if both are required: - nix.sandboxPaths = [ "/etc/protocols" pkgs.iana-etc.outPath ]; - - nix.requireSignedBinaryCaches = true; - - nix.binaryCaches = ["https://cache.nixos.org"]; - nix.extraOptions = '' auto-optimise-store = true ''; - nix.useSandbox = true; + # TODO check if both are required: + nix.settings.extra-sandbox-paths = [ + "/etc/protocols" + pkgs.iana-etc.outPath + ]; } { nixpkgs.config.allowUnfree = false; diff --git a/tv/2configs/hw/x220.nix b/tv/2configs/hw/x220.nix index 8c68cde..25e2eff 100644 --- a/tv/2configs/hw/x220.nix +++ b/tv/2configs/hw/x220.nix @@ -28,8 +28,8 @@ in } { - nix.buildCores = 2; - nix.maxJobs = 2; + nix.settings.cores = 2; + nix.settings.max-jobs = 2; } (if lib.versionAtLeast (lib.versions.majorMinor lib.version) "21.11" then { nix.daemonCPUSchedPolicy = "batch"; -- cgit v1.2.3 From e837b044790e4e24062de224db9ae8147655057e Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 5 Dec 2022 15:10:15 +0100 Subject: tv vim: rtp -> outPath --- tv/2configs/vim.nix | 2 +- tv/5pkgs/vim/default.nix | 4 ++++ tv/5pkgs/vim/hack.nix | 2 +- tv/5pkgs/vim/nix.nix | 2 +- tv/5pkgs/vim/showsyntax.nix | 2 +- tv/5pkgs/vim/tv.nix | 2 +- tv/5pkgs/vim/vim.nix | 2 +- 7 files changed, 10 insertions(+), 6 deletions(-) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index fed74c9..e296a0c 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -13,7 +13,7 @@ let { environment.variables.VIMINIT = ":so /etc/vimrc"; }; - extra-runtimepath = concatMapStringsSep "," (pkg: "${pkg.rtp}") [ + extra-runtimepath = pkgs.tv.vim.makeRuntimePath [ pkgs.tv.vimPlugins.elixir pkgs.tv.vimPlugins.file-line pkgs.tv.vimPlugins.fzf diff --git a/tv/5pkgs/vim/default.nix b/tv/5pkgs/vim/default.nix index 5582be3..e0e2761 100644 --- a/tv/5pkgs/vim/default.nix +++ b/tv/5pkgs/vim/default.nix @@ -2,6 +2,10 @@ with import ; self: super: { tv = super.tv // { + vim = { + makePlugin = outPath: outPath // { inherit outPath; }; + makeRuntimePath = concatMapStringsSep "," (getAttr "outPath"); + }; vimPlugins = mapNixDir (path: self.callPackage path {}) ./.; }; } diff --git a/tv/5pkgs/vim/hack.nix b/tv/5pkgs/vim/hack.nix index 2145cc1..0e94968 100644 --- a/tv/5pkgs/vim/hack.nix +++ b/tv/5pkgs/vim/hack.nix @@ -1,7 +1,7 @@ with import ; { pkgs }: -(rtp: rtp // { inherit rtp; }) (pkgs.writeTextFile (let +pkgs.tv.vim.makePlugin (pkgs.writeTextFile (let name = "hack"; in { name = "vim-color-${name}-1.0.2"; diff --git a/tv/5pkgs/vim/nix.nix b/tv/5pkgs/vim/nix.nix index 6715af7..01f769f 100644 --- a/tv/5pkgs/vim/nix.nix +++ b/tv/5pkgs/vim/nix.nix @@ -1,7 +1,7 @@ with import ; { pkgs }: -(rtp: rtp // { inherit rtp; }) (pkgs.write "vim-syntax-nix-nested" { +pkgs.tv.vim.makePlugin (pkgs.write "vim-syntax-nix-nested" { "/syntax/haskell.vim".text = '' syn region String start=+\[[[:alnum:]]*|+ end=+|]+ diff --git a/tv/5pkgs/vim/showsyntax.nix b/tv/5pkgs/vim/showsyntax.nix index a5547e4..c27dd04 100644 --- a/tv/5pkgs/vim/showsyntax.nix +++ b/tv/5pkgs/vim/showsyntax.nix @@ -1,6 +1,6 @@ { pkgs }: -(rtp: rtp // { inherit rtp; }) (pkgs.writeTextFile (let +pkgs.tv.vim.makePlugin (pkgs.writeTextFile (let name = "showsyntax"; in { name = "vim-plugin-${name}-1.0.0"; diff --git a/tv/5pkgs/vim/tv.nix b/tv/5pkgs/vim/tv.nix index ae6245b..dee6b2d 100644 --- a/tv/5pkgs/vim/tv.nix +++ b/tv/5pkgs/vim/tv.nix @@ -1,6 +1,6 @@ { pkgs }: -(rtp: rtp // { inherit rtp; }) (pkgs.write "vim-tv" { +pkgs.tv.vim.makePlugin (pkgs.write "vim-tv" { # # Haskell # diff --git a/tv/5pkgs/vim/vim.nix b/tv/5pkgs/vim/vim.nix index 216ab6a..6034dbd 100644 --- a/tv/5pkgs/vim/vim.nix +++ b/tv/5pkgs/vim/vim.nix @@ -1,7 +1,7 @@ with import ; { pkgs }: -(rtp: rtp // { inherit rtp; }) (pkgs.writeTextFile (let +pkgs.tv.vim.makePlugin (pkgs.writeTextFile (let name = "vim"; in { name = "vim-syntax-${name}-1.0.0"; -- cgit v1.2.3 From 29674bc0200e07f78136a465c1cca2c3e49db262 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 5 Dec 2022 16:02:32 +0100 Subject: tv fzf: bump complete-1 --- tv/5pkgs/override/fzf/complete1.patch | 90 ++++++++++++++++++++++------------- tv/5pkgs/override/fzf/default.nix | 8 ++-- 2 files changed, 59 insertions(+), 39 deletions(-) diff --git a/tv/5pkgs/override/fzf/complete1.patch b/tv/5pkgs/override/fzf/complete1.patch index 4b2126a..3e3f2c4 100644 --- a/tv/5pkgs/override/fzf/complete1.patch +++ b/tv/5pkgs/override/fzf/complete1.patch @@ -1,50 +1,72 @@ +commit 57cbd76c068121b685399fdb4649e7ba537983d6 +Author: tv +Date: Mon Dec 5 15:24:30 2022 +0100 + + Add --complete-1 option + +diff --git a/man/man1/fzf.1 b/man/man1/fzf.1 +index 79e7291..3b8a753 100644 +--- a/man/man1/fzf.1 ++++ b/man/man1/fzf.1 +@@ -685,6 +685,9 @@ interactive finder and automatically select the only match + If there is no match for the initial query (\fB--query\fR), do not start + interactive finder and exit immediately + .TP ++.B "--complete-1" ++Exit interactive finder when there's exactly one match ++.TP + .BI "-f, --filter=" "STR" + Filter mode. Do not start interactive finder. When used with \fB--no-sort\fR, + fzf becomes a fuzzy-version of grep. diff --git a/src/core.go b/src/core.go -index a18c3a1..a3d92a4 100644 +index 2ddddc3..09afff2 100644 --- a/src/core.go +++ b/src/core.go -@@ -331,6 +331,13 @@ func Run(opts *Options, version string, revision string) { +@@ -337,8 +337,14 @@ func Run(opts *Options, version string, revision string) { + } + determine(val.final) } - } - terminal.UpdateList(val, clearSelection()) -+ if (opts.Complete1) { -+ count := val.Length() -+ if count == 1 { ++ } else { ++ if opts.Complete1 && val.Length() == 1 { + opts.Printer(val.Get(0).item.AsString(opts.Ansi)) + terminal.reqBox.Set(reqClose, nil) ++ } else { ++ terminal.UpdateList(val, clearSelection()) + } -+ } + } +- terminal.UpdateList(val, clearSelection()) } } } diff --git a/src/options.go b/src/options.go -index a55dc34..7f121cd 100644 +index 5400311..1e38fe4 100644 --- a/src/options.go +++ b/src/options.go -@@ -92,6 +92,7 @@ const usage = `usage: fzf [options] - -1, --select-1 Automatically select the only match - -0, --exit-0 Exit immediately when there's no match - -f, --filter=STR Filter mode. Do not start interactive finder. -+ --complete-1 Exit interactive finder when there's exactly one match - --print-query Print query as the first line - --expect=KEYS Comma-separated list of keys to complete fzf - --read0 Read input delimited by ASCII NUL characters -@@ -208,6 +209,7 @@ type Options struct { - Query string - Select1 bool - Exit0 bool -+ Complete1 bool - Filter *string - ToggleSort bool - Expect map[tui.Event]string -@@ -269,6 +271,7 @@ func defaultOptions() *Options { - Query: "", - Select1: false, - Exit0: false, -+ Complete1: false, - Filter: nil, - ToggleSort: false, - Expect: make(map[tui.Event]string), -@@ -1311,6 +1314,8 @@ func parseOptions(opts *Options, allArgs []string) { +@@ -108,6 +108,7 @@ const usage = `usage: fzf [options] + -1, --select-1 Automatically select the only match + -0, --exit-0 Exit immediately when there's no match + -f, --filter=STR Filter mode. Do not start interactive finder. ++ --complete-1 Exit interactive finder when there's exactly one match + --print-query Print query as the first line + --expect=KEYS Comma-separated list of keys to complete fzf + --read0 Read input delimited by ASCII NUL characters +@@ -274,6 +275,7 @@ type Options struct { + Query string + Select1 bool + Exit0 bool ++ Complete1 bool + Filter *string + ToggleSort bool + Expect map[tui.Event]string +@@ -342,6 +344,7 @@ func defaultOptions() *Options { + Query: "", + Select1: false, + Exit0: false, ++ Complete1: false, + Filter: nil, + ToggleSort: false, + Expect: make(map[tui.Event]string), +@@ -1546,6 +1549,8 @@ func parseOptions(opts *Options, allArgs []string) { opts.Exit0 = true case "+0", "--no-exit-0": opts.Exit0 = false diff --git a/tv/5pkgs/override/fzf/default.nix b/tv/5pkgs/override/fzf/default.nix index 661db0e..2254d45 100644 --- a/tv/5pkgs/override/fzf/default.nix +++ b/tv/5pkgs/override/fzf/default.nix @@ -1,9 +1,7 @@ self: super: super.fzf.overrideAttrs (old: { - # XXX cannot use `patches` because fzf has a custom patchPhase - patchPhase = '' - patch -Np1 < ${./complete1.patch} - ${old.patchPhase or ""} - ''; + patches = old.patches or [] ++ [ + ./complete1.patch + ]; }) -- cgit v1.2.3 From 71aef1f0b75f8030160b9b98a7dd5cea17a528cd Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 4 Apr 2022 15:19:19 +0200 Subject: tv xmonad: move my* to Build This prevents Main from getting rebuilt due to TH whenever one of its imported modules changes. --- tv/5pkgs/haskell/xmonad-tv/src/Build.hs | 24 ++++++++++++++++++++++++ tv/5pkgs/haskell/xmonad-tv/src/main.hs | 17 +---------------- 2 files changed, 25 insertions(+), 16 deletions(-) create mode 100644 tv/5pkgs/haskell/xmonad-tv/src/Build.hs diff --git a/tv/5pkgs/haskell/xmonad-tv/src/Build.hs b/tv/5pkgs/haskell/xmonad-tv/src/Build.hs new file mode 100644 index 0000000..553a129 --- /dev/null +++ b/tv/5pkgs/haskell/xmonad-tv/src/Build.hs @@ -0,0 +1,24 @@ +{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE TypeApplications #-} + +module Build where + +import XMonad (Dimension) +import THEnv.JSON (getCompileEnvJSONExp) + + +myFont :: String +myFont = + "-schumacher-*-*-*-*-*-*-*-*-*-*-*-iso10646-*" + +myScreenWidth :: Dimension +myScreenWidth = + $(getCompileEnvJSONExp (id @Dimension) "XMONAD_BUILD_SCREEN_WIDTH") + +myTermFontWidth :: Dimension +myTermFontWidth = + $(getCompileEnvJSONExp (id @Dimension) "XMONAD_BUILD_TERM_FONT_WIDTH") + +myTermPadding :: Dimension +myTermPadding = + 2 diff --git a/tv/5pkgs/haskell/xmonad-tv/src/main.hs b/tv/5pkgs/haskell/xmonad-tv/src/main.hs index 81373f4..b82f398 100644 --- a/tv/5pkgs/haskell/xmonad-tv/src/main.hs +++ b/tv/5pkgs/haskell/xmonad-tv/src/main.hs @@ -1,6 +1,4 @@ {-# LANGUAGE LambdaCase #-} -{-# LANGUAGE TemplateHaskell #-} -{-# LANGUAGE TypeApplications #-} module Main (main) where @@ -35,22 +33,9 @@ import XMonad.Actions.PerWorkspaceKeys (chooseAction) import XMonad.Stockholm.Pager import XMonad.Stockholm.Shutdown -import THEnv.JSON (getCompileEnvJSONExp) -myFont :: String -myFont = "-schumacher-*-*-*-*-*-*-*-*-*-*-*-iso10646-*" - -myScreenWidth :: Dimension -myScreenWidth = - $(getCompileEnvJSONExp (id @Dimension) "XMONAD_BUILD_SCREEN_WIDTH") - -myTermFontWidth :: Dimension -myTermFontWidth = - $(getCompileEnvJSONExp (id @Dimension) "XMONAD_BUILD_TERM_FONT_WIDTH") - -myTermPadding :: Dimension -myTermPadding = 2 +import Build (myFont, myScreenWidth, myTermFontWidth, myTermPadding) main :: IO () -- cgit v1.2.3 From a55064d787e0f1bca999b23e23fff2393e8c6858 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 5 Dec 2022 16:25:33 +0100 Subject: tv: deprecated xmonad-stockholm --- tv/2configs/gitrepos.nix | 2 +- tv/5pkgs/haskell/xmonad-tv/default.nix | 8 +- tv/5pkgs/haskell/xmonad-tv/src/Shutdown.hs | 113 +++++++++++++++++++++++++ tv/5pkgs/haskell/xmonad-tv/src/main.hs | 27 +----- tv/5pkgs/haskell/xmonad-tv/src/xmonad-tv.cabal | 5 +- 5 files changed, 122 insertions(+), 33 deletions(-) create mode 100644 tv/5pkgs/haskell/xmonad-tv/src/Shutdown.hs diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix index 50444c1..4fba5fe 100644 --- a/tv/2configs/gitrepos.nix +++ b/tv/2configs/gitrepos.nix @@ -134,7 +134,6 @@ let { web-routes-wai-custom = {}; xintmap = {}; xmonad-aeson = {}; - xmonad-stockholm = {}; xmonad-web = {}; } // mapAttrs (_: recursiveUpdate { cgit.section = "4. museum"; }) { cac-api = { @@ -165,6 +164,7 @@ let { soundcloud = { cgit.desc = "SoundCloud command line interface"; }; + xmonad-stockholm = {}; }); restricted-repos = mapAttrs make-restricted-repo ( diff --git a/tv/5pkgs/haskell/xmonad-tv/default.nix b/tv/5pkgs/haskell/xmonad-tv/default.nix index edb5f25..be3eca9 100644 --- a/tv/5pkgs/haskell/xmonad-tv/default.nix +++ b/tv/5pkgs/haskell/xmonad-tv/default.nix @@ -1,6 +1,6 @@ { mkDerivation, aeson, base, bytestring, containers, directory -, extra, lib, template-haskell, th-env, unix, X11, xmonad -, xmonad-contrib, xmonad-stockholm +, extra, filepath, lib, systemd, template-haskell, th-env +, transformers, unix, X11, xmonad, xmonad-contrib }: mkDerivation { pname = "xmonad-tv"; @@ -9,8 +9,8 @@ mkDerivation { isLibrary = false; isExecutable = true; executableHaskellDepends = [ - aeson base bytestring containers directory extra template-haskell - th-env unix X11 xmonad xmonad-contrib xmonad-stockholm + aeson base bytestring containers directory extra filepath systemd + template-haskell th-env transformers unix X11 xmonad xmonad-contrib ]; license = lib.licenses.mit; } diff --git a/tv/5pkgs/haskell/xmonad-tv/src/Shutdown.hs b/tv/5pkgs/haskell/xmonad-tv/src/Shutdown.hs new file mode 100644 index 0000000..d4a4d93 --- /dev/null +++ b/tv/5pkgs/haskell/xmonad-tv/src/Shutdown.hs @@ -0,0 +1,113 @@ +{-# LANGUAGE LambdaCase #-} + +module Shutdown + ( newShutdownEventHandler + , shutdown + ) + where + +import Control.Applicative ((<|>), empty) +import Control.Concurrent (threadDelay) +import Control.Monad (forever, guard, when) +import Data.Monoid (All(All)) +import System.Directory (XdgDirectory(XdgData), createDirectoryIfMissing, doesFileExist, getAppUserDataDirectory, getXdgDirectory) +import System.Exit (exitSuccess) +import System.Environment (lookupEnv) +import System.FilePath (()) +import System.IO.Error (isDoesNotExistError, tryIOError) +import System.IO (hPutStrLn, stderr) +import System.Posix.Process (getProcessID) +import System.Posix.Signals (nullSignal, signalProcess) +import System.Posix.Types (ProcessID) +import XMonad hiding (getXMonadDataDir) + + +-- XXX this is for compatibility with both xmonad<0.17 and xmonad>=0.17 +getXMonadDataDir :: IO String +getXMonadDataDir = xmEnvDir <|> xmDir <|> xdgDir + where + -- | Check for xmonad's environment variables first + xmEnvDir :: IO String + xmEnvDir = + maybe empty pure =<< lookupEnv "XMONAD_DATA_DIR" + + -- | Check whether the config file or a build script is in the + -- @~\/.xmonad@ directory + xmDir :: IO String + xmDir = do + d <- getAppUserDataDirectory "xmonad" + conf <- doesFileExist $ d "xmonad.hs" + build <- doesFileExist $ d "build" + pid <- doesFileExist $ d "xmonad.pid" + + -- Place *everything* in ~/.xmonad if yes + guard $ conf || build || pid + pure d + + -- | Use XDG directories as a fallback + xdgDir :: IO String + xdgDir = do + d <- getXdgDirectory XdgData "xmonad" + d <$ createDirectoryIfMissing True d + + +newShutdownEventHandler :: IO (Event -> X All) +newShutdownEventHandler = do + writeProcessIDToFile + return handleShutdownEvent + +handleShutdownEvent :: Event -> X All +handleShutdownEvent = \case + ClientMessageEvent { ev_message_type = mt } -> do + isShutdownEvent <- (mt ==) <$> getAtom "XMONAD_SHUTDOWN" + when isShutdownEvent $ do + broadcastMessage ReleaseResources + writeStateToFile + io exitSuccess >> return () + return (All (not isShutdownEvent)) + _ -> + return (All True) + +sendShutdownEvent :: IO () +sendShutdownEvent = do + dpy <- openDisplay "" + rw <- rootWindow dpy $ defaultScreen dpy + a <- internAtom dpy "XMONAD_SHUTDOWN" False + allocaXEvent $ \e -> do + setEventType e clientMessage + setClientMessageEvent e rw a 32 0 currentTime + sendEvent dpy rw False structureNotifyMask e + sync dpy False + +shutdown :: IO () +shutdown = do + pid <- readProcessIDFromFile + sendShutdownEvent + hPutStrLn stderr ("waiting for: " <> show pid) + result <- tryIOError (waitProcess pid) + if isSuccess result + then hPutStrLn stderr ("result: " <> show result <> " [AKA success^_^]") + else hPutStrLn stderr ("result: " <> show result) + where + isSuccess = either isDoesNotExistError (const False) + +waitProcess :: ProcessID -> IO () +waitProcess pid = forever (signalProcess nullSignal pid >> threadDelay 10000) + +-- +-- PID file stuff +-- + +getProcessIDFileName :: IO FilePath +getProcessIDFileName = ( "xmonad.pid") <$> getXMonadDataDir + +writeProcessIDToFile :: IO () +writeProcessIDToFile = do + pidFileName <- getProcessIDFileName + pid <- getProcessID + writeFile pidFileName (show pid) + +readProcessIDFromFile :: IO ProcessID +readProcessIDFromFile = do + pidFileName <- getProcessIDFileName + read <$> readFile pidFileName diff --git a/tv/5pkgs/haskell/xmonad-tv/src/main.hs b/tv/5pkgs/haskell/xmonad-tv/src/main.hs index b82f398..d346bfd 100644 --- a/tv/5pkgs/haskell/xmonad-tv/src/main.hs +++ b/tv/5pkgs/haskell/xmonad-tv/src/main.hs @@ -30,10 +30,7 @@ import Data.Ratio import XMonad.Hooks.Place (placeHook, smart) import XMonad.Actions.PerWorkspaceKeys (chooseAction) -import XMonad.Stockholm.Pager -import XMonad.Stockholm.Shutdown - - +import Shutdown (shutdown, newShutdownEventHandler) import Build (myFont, myScreenWidth, myTermFontWidth, myTermPadding) @@ -139,8 +136,6 @@ myKeys conf = Map.fromList $ , ((_4 , xK_x ), chooseAction spawnTermAt) , ((_4C , xK_x ), spawnRootTerm) - , ((0 , xK_Menu ), gets windowset >>= allWorkspaceNames >>= pager pagerConfig (windows . W.view) ) - , ((_S , xK_Menu ), gets windowset >>= allWorkspaceNames >>= pager pagerConfig (windows . W.shift) ) , ((_C , xK_Menu ), toggleWS) , ((_4 , xK_space ), withFocused $ \w -> ifM (isFloatingX w) xdeny $ sendMessage NextLayout) @@ -218,23 +213,3 @@ xdeny = , "-e", "sleep", "0.05" ] Nothing - - -pagerConfig :: PagerConfig -pagerConfig = def - { pc_font = myFont - , pc_cellwidth = 64 - , pc_matchmethod = MatchPrefix - , pc_windowColors = windowColors - } - where - windowColors _ _ _ True _ = ("#ef4242","#ff2323") - windowColors wsf m c u wf = do - let y = defaultWindowColors wsf m c u wf - if m == False && wf == True - then ("#402020", snd y) - else y - - -allWorkspaceNames :: W.StackSet i l a sid sd -> X [i] -allWorkspaceNames = return . map W.tag . W.workspaces diff --git a/tv/5pkgs/haskell/xmonad-tv/src/xmonad-tv.cabal b/tv/5pkgs/haskell/xmonad-tv/src/xmonad-tv.cabal index f3bd2e0..a3ddcb0 100644 --- a/tv/5pkgs/haskell/xmonad-tv/src/xmonad-tv.cabal +++ b/tv/5pkgs/haskell/xmonad-tv/src/xmonad-tv.cabal @@ -15,14 +15,15 @@ executable xmonad containers, directory, extra, + filepath, template-haskell, th-env, unix, X11, xmonad, - xmonad-contrib, - xmonad-stockholm + xmonad-contrib other-modules: + Shutdown, THEnv.JSON default-language: Haskell2010 ghc-options: -O2 -Wall -threaded -- cgit v1.2.3 From 1cb2ba438a295b115f316a5039b0d24b800b7e51 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 6 Dec 2022 19:51:40 +0100 Subject: tv imgur htgen: use scriptFile --- tv/2configs/imgur.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tv/2configs/imgur.nix b/tv/2configs/imgur.nix index ba84fd2..1df67f9 100644 --- a/tv/2configs/imgur.nix +++ b/tv/2configs/imgur.nix @@ -18,8 +18,6 @@ with import ; krebs.htgen.imgur = { port = 7771; - script = /* sh */ '' - (. ${pkgs.htgen-imgur}/bin/htgen-imgur) - ''; + scriptFile = "${pkgs.htgen-imgur}/bin/htgen-imgur"; }; } -- cgit v1.2.3 From 99b30bf0b6a0510df91a06de747b09f9d7d763fe Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 7 Dec 2022 20:31:34 +0100 Subject: tv x220: disable power-profiles-daemon --- tv/2configs/hw/x220.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tv/2configs/hw/x220.nix b/tv/2configs/hw/x220.nix index 25e2eff..c3ec7b4 100644 --- a/tv/2configs/hw/x220.nix +++ b/tv/2configs/hw/x220.nix @@ -61,6 +61,9 @@ in emulateWheel = true; }; + # Conflicts with TLP, but gets enabled by DEs. + services.power-profiles-daemon.enable = false; + services.tlp.enable = true; services.tlp.settings = { START_CHARGE_THRESH_BAT0 = 80; -- cgit v1.2.3 From 53a1daa4f282c5df91e3d73b215a1ed01afc312e Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 7 Dec 2022 21:08:02 +0100 Subject: tv imagescan-plugin-networkscan: stdenv -> pkgs.pkgsi686Linux --- tv/5pkgs/simple/imagescan-plugin-networkscan.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tv/5pkgs/simple/imagescan-plugin-networkscan.nix b/tv/5pkgs/simple/imagescan-plugin-networkscan.nix index c3f2dea..4f9b84b 100644 --- a/tv/5pkgs/simple/imagescan-plugin-networkscan.nix +++ b/tv/5pkgs/simple/imagescan-plugin-networkscan.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { preFixup = '' patchelf --set-interpreter \ - ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 \ + ${pkgs.pkgsi686Linux.glibc}/lib/ld-linux-x86-64.so.2 \ $out/lib/utsushi/networkscan # libstdc++.so.6 -- cgit v1.2.3 From e4c88e7a5ae6ebd1fc8f34c1b4036daa4aed5a0e Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 8 Dec 2022 16:12:00 +0100 Subject: tv pinentry-urxvt: show tinted screenshots --- tv/5pkgs/simple/pinentry-urxvt/default.nix | 74 ++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 3 deletions(-) diff --git a/tv/5pkgs/simple/pinentry-urxvt/default.nix b/tv/5pkgs/simple/pinentry-urxvt/default.nix index 65b76c0..6e4f6b0 100644 --- a/tv/5pkgs/simple/pinentry-urxvt/default.nix +++ b/tv/5pkgs/simple/pinentry-urxvt/default.nix @@ -20,7 +20,11 @@ let type = lib.types.str; }; display = lib.mkOption { - default = ":0"; + default = null; + type = lib.types.nullOr lib.types.str; + }; + xwud.className = lib.mkOption { + default = "PinentryUrxvtXwudFloat"; type = lib.types.str; }; }; @@ -30,12 +34,76 @@ let in + # pinentry-urxvt - A mechanism for PIN entry utilizing rxvt-unicode + # + # This spawns a PIN entry terminal on top of a tinted screenshot of the + # current display's root window. The display for spawning the terminal can + # be predefined, in which case both the current and the predefined display + # will show the screenshot. + # + # The purpose of the screenshot, aside from looking nice, is to prevent entry + # of the PIN into the wrong window, e.g. by accidentally moving the cursor + # while typing. If necessary, the screenshot can be closed by sending 'q', + # 'Q', or ctrl-c while its focused. + # pkgs.write "pinentry-urxvt" { "/bin/pinentry".link = pkgs.writeDash "pinentry-urxvt-wrapper" '' set -efu + + trap cleanup EXIT + + cleanup() { + rm "$screenshot" + # Kill process group in order to kill screenshot windows. + ${pkgs.utillinux}/bin/kill 0 + } + + screenshot=$(${pkgs.coreutils}/bin/mktemp -t pinentry-urxvt.screenshot.XXXXXXXX) + + ${pkgs.xorg.xwd}/bin/xwd -root | + ${pkgs.imagemagick}/bin/convert xwd:- -fill \#424242 -colorize 80% xwd:"$screenshot" + + show_screenshot() { + ${pkgs.exec "pinentry-urxvt.show_screenshot" { + filename = "${pkgs.xorg.xwud}/bin/xwud"; + argv = [ + cfg.xwud.className + "-noclick" + ]; + }} < "$screenshot" & + wait_for_screenshot $! + } + + # Wait for the xwud window by trying to intercept the call to munmap(). + # If it cannot be intercepted within 0.1s, assume that attaching strace + # wasn't fast enough or xwud doesn't call munmap() anymore. In either + # case fall back to search the window by class name, assuming there can + # be only one per display. + wait_for_screenshot() { + if ! \ + ${pkgs.coreutils}/bin/timeout 0.1 \ + ${pkgs.strace}/bin/strace -p "$1" -e munmap 2>&1 | + read -r _ + then + until ${pkgs.xdotool}/bin/xdotool search \ + --classname ${lib.shell.escape cfg.xwud.className} + do + ${pkgs.coreutils}/bin/sleep 0.1 + done + fi + } + + show_screenshot + + ${lib.optionalString (cfg.display != null) /* sh */ '' + if test "$DISPLAY" != ${lib.shell.escape cfg.display}; then + export DISPLAY=${lib.shell.escape cfg.display} + show_screenshot + fi + ''} + exec 3<&0 4>&1 5>&2 - export DISPLAY=${lib.shell.escape cfg.display} - exec ${pkgs.rxvt_unicode}/bin/urxvt \ + ${pkgs.rxvt_unicode}/bin/urxvt \ -name ${lib.shell.escape cfg.appName} \ -e ${pkgs.writeDash "pinentry-urxvt-tty" '' set -efu -- cgit v1.2.3 From 896d690725f6c01ceab04097c196b021b5ded639 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Dec 2022 00:28:58 +0100 Subject: lib.mapNixDir: admit just files with .nix suffix --- lib/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index 7c3b037..d65c891 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -95,9 +95,12 @@ let path = dirPath + "/${relPath}"; in nameValuePair (toPackageName name) (f path)) - (filter - (name: name != "default.nix" && !hasPrefix "." name) - (attrNames (readDir dirPath)))); + (attrNames + (filterAttrs + (name: type: + (type == "regular" && hasSuffix ".nix" name && name != "default.nix") || + (type == "directory" && !hasPrefix "." name)) + (readDir dirPath)))); # https://tools.ietf.org/html/rfc5952 normalize-ip6-addr = -- cgit v1.2.3 From a0b92d1c55c7c95283c99cd9021dacbd5a1c59d0 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Dec 2022 00:30:08 +0100 Subject: lib: add isNixDirEntry --- lib/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index d65c891..ad3a78a 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -96,11 +96,11 @@ let in nameValuePair (toPackageName name) (f path)) (attrNames - (filterAttrs - (name: type: - (type == "regular" && hasSuffix ".nix" name && name != "default.nix") || - (type == "directory" && !hasPrefix "." name)) - (readDir dirPath)))); + (filterAttrs isNixDirEntry (readDir dirPath)))); + + isNixDirEntry = name: type: + (type == "regular" && hasSuffix ".nix" name && name != "default.nix") || + (type == "directory" && !hasPrefix "." name); # https://tools.ietf.org/html/rfc5952 normalize-ip6-addr = -- cgit v1.2.3 From 219afe833756136e9541d187d3a6ce2a5258679a Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Dec 2022 01:33:39 +0100 Subject: lib: add lib reference --- lib/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/default.nix b/lib/default.nix index ad3a78a..149b97a 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -194,3 +194,4 @@ let in lib +// { inherit lib; } -- cgit v1.2.3 From de73040c985a595111cc3500d70a8c60f9f960e3 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Dec 2022 00:30:44 +0100 Subject: tv pkgs: use isNixDirEntry --- tv/5pkgs/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tv/5pkgs/default.nix b/tv/5pkgs/default.nix index 5a018a1..494cb9e 100644 --- a/tv/5pkgs/default.nix +++ b/tv/5pkgs/default.nix @@ -14,7 +14,6 @@ fix (foldl' (flip extends) (_: super) (map (name: import (./. + "/${name}")) - (filter - (name: name != "default.nix" && !hasPrefix "." name) - (pushBack "override" - (attrNames (readDir ./.)))))) + (pushBack "override" + (attrNames + (filterAttrs isNixDirEntry (readDir ./.)))))) -- cgit v1.2.3 From c82942bb7b872765d109d5cc5fccec5f945f1200 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Dec 2022 01:31:56 +0100 Subject: tv: normalize lib imports --- tv/1systems/alnus/config.nix | 3 +-- tv/1systems/alnus/lib | 1 + tv/1systems/au/lib | 1 + tv/1systems/bu/config.nix | 6 ++---- tv/1systems/bu/lib | 1 + tv/1systems/lib | 1 + tv/1systems/mu/config.nix | 3 +-- tv/1systems/mu/lib | 1 + tv/1systems/nomic/config.nix | 3 +-- tv/1systems/nomic/lib | 1 + tv/1systems/querel/config.nix | 3 +-- tv/1systems/querel/lib | 1 + tv/1systems/wu/config.nix | 3 +-- tv/1systems/wu/lib | 1 + tv/1systems/xu/config.nix | 3 +-- tv/1systems/xu/lib | 1 + tv/1systems/zu/config.nix | 3 +-- tv/2configs/backup.nix | 5 ++--- tv/2configs/bash/default.nix | 7 ++----- tv/2configs/bash/lib | 1 + tv/2configs/binary-cache/default.nix | 2 +- tv/2configs/binary-cache/lib | 1 + tv/2configs/br.nix | 2 +- tv/2configs/default.nix | 3 +-- tv/2configs/exim-retiolum.nix | 7 ++----- tv/2configs/exim-smarthost.nix | 7 ++----- tv/2configs/gitconfig.nix | 7 ++----- tv/2configs/gitrepos.nix | 7 ++----- tv/2configs/htop.nix | 7 ++----- tv/2configs/hw/AO753.nix | 7 ++----- tv/2configs/hw/lib | 1 + tv/2configs/hw/w110er.nix | 5 ++--- tv/2configs/hw/x220.nix | 6 ++---- tv/2configs/imgur.nix | 3 +-- tv/2configs/lib | 1 + tv/2configs/nginx/default.nix | 7 ++----- tv/2configs/nginx/lib | 1 + tv/2configs/nginx/public_html.nix | 7 ++----- tv/2configs/pki/default.nix | 2 +- tv/2configs/pki/lib | 1 + tv/2configs/ppp.nix | 2 +- tv/2configs/pulse.nix | 6 ++---- tv/2configs/repo-sync/lib | 1 + tv/2configs/repo-sync/wiki.nix | 5 ++--- tv/2configs/retiolum.nix | 7 ++----- tv/2configs/ssh.nix | 7 ++----- tv/2configs/sshd.nix | 2 +- tv/2configs/urlwatch.nix | 2 +- tv/2configs/vim.nix | 6 ++---- tv/2configs/xdg.nix | 7 ++----- tv/2configs/xp-332.nix | 2 +- tv/2configs/xserver/Xmodmap.nix | 2 +- tv/2configs/xserver/default.nix | 5 ++--- tv/2configs/xserver/lib | 1 + tv/2configs/xserver/sxiv.nix | 2 +- tv/2configs/xserver/urxvt.nix | 2 +- tv/2configs/xserver/xserver.conf.nix | 5 ++--- tv/3modules/Xresources.nix | 2 +- tv/3modules/charybdis/config.nix | 2 +- tv/3modules/charybdis/default.nix | 3 ++- tv/3modules/charybdis/lib | 1 + tv/3modules/dnsmasq.nix | 2 +- tv/3modules/ejabberd/default.nix | 4 ++-- tv/3modules/ejabberd/lib | 1 + tv/3modules/focus.nix | 2 +- tv/3modules/hosts.nix | 7 ++----- tv/3modules/hw.nix | 2 +- tv/3modules/im.nix | 2 +- tv/3modules/iptables.nix | 6 ++---- tv/3modules/lib | 1 + tv/3modules/org.freedesktop.machine1.host-shell.nix | 3 ++- tv/3modules/slock.nix | 2 +- tv/3modules/x0vncserver.nix | 4 +--- tv/5pkgs/default.nix | 2 +- tv/5pkgs/haskell/default.nix | 2 +- tv/5pkgs/haskell/lib | 1 + tv/5pkgs/lib | 1 + tv/5pkgs/override/default.nix | 2 +- tv/5pkgs/override/lib | 1 + tv/5pkgs/rpi/default.nix | 4 +--- tv/5pkgs/rpi/lib | 1 + tv/5pkgs/simple/bash-fzf-history.nix | 2 +- tv/5pkgs/simple/default.nix | 2 +- tv/5pkgs/simple/lib | 1 + tv/5pkgs/simple/pinentry-urxvt/default.nix | 3 +-- tv/5pkgs/simple/pinentry-urxvt/lib | 1 + tv/5pkgs/simple/q/default.nix | 4 ++-- tv/5pkgs/simple/q/lib | 1 + tv/5pkgs/vim/default.nix | 2 +- tv/5pkgs/vim/hack.nix | 2 +- tv/5pkgs/vim/lib | 1 + tv/5pkgs/vim/nix.nix | 2 +- tv/5pkgs/vim/vim.nix | 2 +- tv/lib | 1 + 94 files changed, 121 insertions(+), 158 deletions(-) create mode 120000 tv/1systems/alnus/lib create mode 120000 tv/1systems/au/lib create mode 120000 tv/1systems/bu/lib create mode 120000 tv/1systems/lib create mode 120000 tv/1systems/mu/lib create mode 120000 tv/1systems/nomic/lib create mode 120000 tv/1systems/querel/lib create mode 120000 tv/1systems/wu/lib create mode 120000 tv/1systems/xu/lib create mode 120000 tv/2configs/bash/lib create mode 120000 tv/2configs/binary-cache/lib create mode 120000 tv/2configs/hw/lib create mode 120000 tv/2configs/lib create mode 120000 tv/2configs/nginx/lib create mode 120000 tv/2configs/pki/lib create mode 120000 tv/2configs/repo-sync/lib create mode 120000 tv/2configs/xserver/lib create mode 120000 tv/3modules/charybdis/lib create mode 120000 tv/3modules/ejabberd/lib create mode 120000 tv/3modules/lib create mode 120000 tv/5pkgs/haskell/lib create mode 120000 tv/5pkgs/lib create mode 120000 tv/5pkgs/override/lib create mode 120000 tv/5pkgs/rpi/lib create mode 120000 tv/5pkgs/simple/lib create mode 120000 tv/5pkgs/simple/pinentry-urxvt/lib create mode 120000 tv/5pkgs/simple/q/lib create mode 120000 tv/5pkgs/vim/lib create mode 120000 tv/lib diff --git a/tv/1systems/alnus/config.nix b/tv/1systems/alnus/config.nix index c36fbc4..90501d5 100644 --- a/tv/1systems/alnus/config.nix +++ b/tv/1systems/alnus/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - imports = [ diff --git a/tv/1systems/alnus/lib b/tv/1systems/alnus/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/alnus/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/au/lib b/tv/1systems/au/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/au/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/bu/config.nix b/tv/1systems/bu/config.nix index 11cdac3..22e5f14 100644 --- a/tv/1systems/bu/config.nix +++ b/tv/1systems/bu/config.nix @@ -1,7 +1,5 @@ -{ config, pkgs, ... }: let - lib = import ../../../lib; -in { - +with import ./lib; +{ config, pkgs, ... }: { imports = [ ./disks.nix diff --git a/tv/1systems/bu/lib b/tv/1systems/bu/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/bu/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/lib b/tv/1systems/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/mu/config.nix b/tv/1systems/mu/config.nix index 00bd5da..00cdf84 100644 --- a/tv/1systems/mu/config.nix +++ b/tv/1systems/mu/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - imports = [ diff --git a/tv/1systems/mu/lib b/tv/1systems/mu/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/mu/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/nomic/config.nix b/tv/1systems/nomic/config.nix index 4dc0b4e..fb67814 100644 --- a/tv/1systems/nomic/config.nix +++ b/tv/1systems/nomic/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - krebs.build.host = config.krebs.hosts.nomic; imports = [ diff --git a/tv/1systems/nomic/lib b/tv/1systems/nomic/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/nomic/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/querel/config.nix b/tv/1systems/querel/config.nix index 44c7685..8df29f7 100644 --- a/tv/1systems/querel/config.nix +++ b/tv/1systems/querel/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - imports = [ diff --git a/tv/1systems/querel/lib b/tv/1systems/querel/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/querel/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/wu/config.nix b/tv/1systems/wu/config.nix index bf250ce..4d45f6d 100644 --- a/tv/1systems/wu/config.nix +++ b/tv/1systems/wu/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ../lib; { config, pkgs, ... }: { - krebs.build.host = config.krebs.hosts.wu; imports = [ diff --git a/tv/1systems/wu/lib b/tv/1systems/wu/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/wu/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/xu/config.nix b/tv/1systems/xu/config.nix index 8a86e20..1d143ce 100644 --- a/tv/1systems/xu/config.nix +++ b/tv/1systems/xu/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - krebs.build.host = config.krebs.hosts.xu; imports = [ diff --git a/tv/1systems/xu/lib b/tv/1systems/xu/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/xu/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/zu/config.nix b/tv/1systems/zu/config.nix index 8a3040a..169fa6b 100644 --- a/tv/1systems/zu/config.nix +++ b/tv/1systems/zu/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - krebs.build.host = config.krebs.hosts.zu; imports = [ diff --git a/tv/2configs/backup.nix b/tv/2configs/backup.nix index a5e0cf4..c8ab73b 100644 --- a/tv/2configs/backup.nix +++ b/tv/2configs/backup.nix @@ -1,6 +1,5 @@ -{ config, lib, ... }: -with import ; -{ +with import ./lib; +{ config, pkgs, ... }: { krebs.backup.plans = { } // mapAttrs (_: recursiveUpdate { snapshots = { diff --git a/tv/2configs/bash/default.nix b/tv/2configs/bash/default.nix index 92e2499..c0855bb 100644 --- a/tv/2configs/bash/default.nix +++ b/tv/2configs/bash/default.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { programs.bash = { interactiveShellInit = /* sh */ '' HISTCONTROL='erasedups:ignorespace' diff --git a/tv/2configs/bash/lib b/tv/2configs/bash/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/2configs/bash/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/binary-cache/default.nix b/tv/2configs/binary-cache/default.nix index 58791f4..66d7407 100644 --- a/tv/2configs/binary-cache/default.nix +++ b/tv/2configs/binary-cache/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: with import ; +{ config, lib, pkgs, ... }: with import ./lib; { environment.etc."binary-cache.pubkey".text = config.krebs.build.host.binary-cache.pubkey; diff --git a/tv/2configs/binary-cache/lib b/tv/2configs/binary-cache/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/2configs/binary-cache/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/br.nix b/tv/2configs/br.nix index e6a46e9..4a8db2e 100644 --- a/tv/2configs/br.nix +++ b/tv/2configs/br.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { imports = [ diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index c904702..5710f28 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - boot.tmpOnTmpfs = true; krebs.enable = true; diff --git a/tv/2configs/exim-retiolum.nix b/tv/2configs/exim-retiolum.nix index 3d4ada4..fefc6dd 100644 --- a/tv/2configs/exim-retiolum.nix +++ b/tv/2configs/exim-retiolum.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { environment.systemPackages = [ pkgs.eximlog ]; diff --git a/tv/2configs/exim-smarthost.nix b/tv/2configs/exim-smarthost.nix index 4a0dcf6..e905536 100644 --- a/tv/2configs/exim-smarthost.nix +++ b/tv/2configs/exim-smarthost.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { environment.systemPackages = [ pkgs.eximlog ]; diff --git a/tv/2configs/gitconfig.nix b/tv/2configs/gitconfig.nix index 771a4b2..fb9b78e 100644 --- a/tv/2configs/gitconfig.nix +++ b/tv/2configs/gitconfig.nix @@ -1,8 +1,5 @@ -{ config, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { environment.etc.gitconfig.text = '' [alias] patch = !${pkgs.git}/bin/git --no-pager diff --no-color diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix index 4fba5fe..d8e7755 100644 --- a/tv/2configs/gitrepos.nix +++ b/tv/2configs/gitrepos.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -let { +with import ./lib; +{ config, pkgs, ... }: let { body = { diff --git a/tv/2configs/htop.nix b/tv/2configs/htop.nix index e78caeb..0937298 100644 --- a/tv/2configs/htop.nix +++ b/tv/2configs/htop.nix @@ -1,8 +1,5 @@ -{ pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ pkgs, ... }: { nixpkgs.config.packageOverrides = super: { htop = pkgs.symlinkJoin { name = "htop"; diff --git a/tv/2configs/hw/AO753.nix b/tv/2configs/hw/AO753.nix index dd6fcfe..b998fcf 100644 --- a/tv/2configs/hw/AO753.nix +++ b/tv/2configs/hw/AO753.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { imports = [ ../smartd.nix diff --git a/tv/2configs/hw/lib b/tv/2configs/hw/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/2configs/hw/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/hw/w110er.nix b/tv/2configs/hw/w110er.nix index 09dd9a4..bf749a9 100644 --- a/tv/2configs/hw/w110er.nix +++ b/tv/2configs/hw/w110er.nix @@ -1,6 +1,5 @@ -{ pkgs, ... }: let - lib = import ; -in { +with import ./lib; +{ pkgs, ... }: { imports = [ ../smartd.nix { diff --git a/tv/2configs/hw/x220.nix b/tv/2configs/hw/x220.nix index c3ec7b4..ee3c7dc 100644 --- a/tv/2configs/hw/x220.nix +++ b/tv/2configs/hw/x220.nix @@ -1,7 +1,5 @@ -{ config, pkgs, ... }: let - lib = import ; -in -{ +with import ./lib; +{ config, pkgs, ... }: { imports = [ ../smartd.nix { diff --git a/tv/2configs/imgur.nix b/tv/2configs/imgur.nix index 1df67f9..e221227 100644 --- a/tv/2configs/imgur.nix +++ b/tv/2configs/imgur.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - services.nginx.virtualHosts."ni.r" = { locations."/image" = { extraConfig = /* nginx */ '' diff --git a/tv/2configs/lib b/tv/2configs/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/2configs/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/nginx/default.nix b/tv/2configs/nginx/default.nix index efea3a8..6844df9 100644 --- a/tv/2configs/nginx/default.nix +++ b/tv/2configs/nginx/default.nix @@ -1,8 +1,5 @@ -{ config, lib, ... }: - -with import ; - -{ +with import ./lib; +{ config, ... }: { services.nginx = { enableReload = true; diff --git a/tv/2configs/nginx/lib b/tv/2configs/nginx/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/2configs/nginx/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/nginx/public_html.nix b/tv/2configs/nginx/public_html.nix index 43d7189..c2403cd 100644 --- a/tv/2configs/nginx/public_html.nix +++ b/tv/2configs/nginx/public_html.nix @@ -1,8 +1,5 @@ -{ config, lib, ... }: - -with import ; - -{ +with import ./lib; +{ config, ... }: { services.nginx = { enable = true; virtualHosts.default = { diff --git a/tv/2configs/pki/default.nix b/tv/2configs/pki/default.nix index 51a5c71..415755b 100644 --- a/tv/2configs/pki/default.nix +++ b/tv/2configs/pki/default.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let certFile = config.environment.etc."ssl/certs/ca-certificates.crt".source; diff --git a/tv/2configs/pki/lib b/tv/2configs/pki/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/2configs/pki/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/ppp.nix b/tv/2configs/ppp.nix index c801401..24d2831 100644 --- a/tv/2configs/ppp.nix +++ b/tv/2configs/ppp.nix @@ -1,5 +1,5 @@ +with import ./lib; { config, pkgs, ... }: let - lib = import ; cfg = { pin = "@${toString }"; ttys.ppp = "/dev/ttyACM0"; diff --git a/tv/2configs/pulse.nix b/tv/2configs/pulse.nix index 513a0eb..7a07e81 100644 --- a/tv/2configs/pulse.nix +++ b/tv/2configs/pulse.nix @@ -1,7 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; -let +with import ./lib; +{ config, pkgs, ... }: let pkg = pkgs.pulseaudio; runDir = "/run/pulse"; diff --git a/tv/2configs/repo-sync/lib b/tv/2configs/repo-sync/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/2configs/repo-sync/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/repo-sync/wiki.nix b/tv/2configs/repo-sync/wiki.nix index 9134399..515e731 100644 --- a/tv/2configs/repo-sync/wiki.nix +++ b/tv/2configs/repo-sync/wiki.nix @@ -1,6 +1,5 @@ -{ config, pkgs, ... }: let - lib = import ; -in { +with import ./lib; +{ config, pkgs, ... }: { krebs.repo-sync.enable = true; krebs.repo-sync.repos.wiki.branches.hotdog = { origin.url = "http://cgit.hotdog.r/wiki"; diff --git a/tv/2configs/retiolum.nix b/tv/2configs/retiolum.nix index 3c3b2ad..de77de3 100644 --- a/tv/2configs/retiolum.nix +++ b/tv/2configs/retiolum.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { krebs.tinc.retiolum = { enable = true; connectTo = filter (ne config.krebs.build.host.name) [ diff --git a/tv/2configs/ssh.nix b/tv/2configs/ssh.nix index 84d2473..ad82881 100644 --- a/tv/2configs/ssh.nix +++ b/tv/2configs/ssh.nix @@ -1,8 +1,5 @@ -{ config, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { # Override NixOS's "Allow DSA keys for now." environment.etc."ssh/ssh_config".text = mkForce '' AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"} diff --git a/tv/2configs/sshd.nix b/tv/2configs/sshd.nix index 79af5b0..4da8c82 100644 --- a/tv/2configs/sshd.nix +++ b/tv/2configs/sshd.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, ... }: let cfg.host = config.krebs.build.host; in { diff --git a/tv/2configs/urlwatch.nix b/tv/2configs/urlwatch.nix index 619b044..7ba364f 100644 --- a/tv/2configs/urlwatch.nix +++ b/tv/2configs/urlwatch.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let exec = filename: args: url: { inherit url; diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index e296a0c..909213d 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -1,7 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; -let { +with import ./lib; +{ config, pkgs, ... }: let { body = { environment.systemPackages = [ vim-wrapper diff --git a/tv/2configs/xdg.nix b/tv/2configs/xdg.nix index 18bac9b..b7c14af 100644 --- a/tv/2configs/xdg.nix +++ b/tv/2configs/xdg.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { environment.variables.XDG_RUNTIME_DIR = "/run/xdg/$LOGNAME"; systemd.tmpfiles.rules = let diff --git a/tv/2configs/xp-332.nix b/tv/2configs/xp-332.nix index a97fb36..51fd1ae 100644 --- a/tv/2configs/xp-332.nix +++ b/tv/2configs/xp-332.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { environment.etc."utsushi.conf".text = '' diff --git a/tv/2configs/xserver/Xmodmap.nix b/tv/2configs/xserver/Xmodmap.nix index 8e8e3df..8e555e9 100644 --- a/tv/2configs/xserver/Xmodmap.nix +++ b/tv/2configs/xserver/Xmodmap.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: -with import ; +with import ./lib; pkgs.writeText "Xmodmap" '' !keycode 66 = Caps_Lock diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index 8bedb0e..f534b55 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -1,6 +1,5 @@ -{ config, pkgs, ... }@args: -with import ; -let +with import ./lib; +{ config, pkgs, ... }@args: let cfg = { cacheDir = cfg.dataDir; configDir = "/var/empty"; diff --git a/tv/2configs/xserver/lib b/tv/2configs/xserver/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/2configs/xserver/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/xserver/sxiv.nix b/tv/2configs/xserver/sxiv.nix index 10e450d..eb862f8 100644 --- a/tv/2configs/xserver/sxiv.nix +++ b/tv/2configs/xserver/sxiv.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let cfg.user = config.krebs.build.user; in { diff --git a/tv/2configs/xserver/urxvt.nix b/tv/2configs/xserver/urxvt.nix index 2d504e1..3502c63 100644 --- a/tv/2configs/xserver/urxvt.nix +++ b/tv/2configs/xserver/urxvt.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let cfg.user = config.krebs.build.user; in { diff --git a/tv/2configs/xserver/xserver.conf.nix b/tv/2configs/xserver/xserver.conf.nix index 99038e5..3fdfebf 100644 --- a/tv/2configs/xserver/xserver.conf.nix +++ b/tv/2configs/xserver/xserver.conf.nix @@ -1,6 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; +with import ./lib; +{ config, pkgs, ... }: let cfg = config.services.xserver; diff --git a/tv/3modules/Xresources.nix b/tv/3modules/Xresources.nix index ab233dd..266531d 100644 --- a/tv/3modules/Xresources.nix +++ b/tv/3modules/Xresources.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let cfg = { enable = config.services.xserver.enable && config.tv.Xresources != {}; diff --git a/tv/3modules/charybdis/config.nix b/tv/3modules/charybdis/config.nix index dccbfde..4669345 100644 --- a/tv/3modules/charybdis/config.nix +++ b/tv/3modules/charybdis/config.nix @@ -1,4 +1,4 @@ -{ config, ... }: with import ; let +{ config, ... }: with import ./lib; let cfg = config.tv.charybdis; in toFile "charybdis.conf" '' /* doc/example.conf - brief example configuration file diff --git a/tv/3modules/charybdis/default.nix b/tv/3modules/charybdis/default.nix index 96aae70..4a0f995 100644 --- a/tv/3modules/charybdis/default.nix +++ b/tv/3modules/charybdis/default.nix @@ -1,4 +1,5 @@ -{ config, lib, pkgs, ... }@args: with import ; let +with import ./lib; +{ config, pkgs, ... }@args: let cfg = config.tv.charybdis; in { options.tv.charybdis = { diff --git a/tv/3modules/charybdis/lib b/tv/3modules/charybdis/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/3modules/charybdis/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/3modules/dnsmasq.nix b/tv/3modules/dnsmasq.nix index ab24ac0..e1dfdea 100644 --- a/tv/3modules/dnsmasq.nix +++ b/tv/3modules/dnsmasq.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, ... }: let cfg = config.tv.dnsmasq; in { diff --git a/tv/3modules/ejabberd/default.nix b/tv/3modules/ejabberd/default.nix index edc5296..e3a41a5 100644 --- a/tv/3modules/ejabberd/default.nix +++ b/tv/3modules/ejabberd/default.nix @@ -1,5 +1,5 @@ -{ config, lib, pkgs, ... }@args: with import ; let - +with import ./lib; +{ config, pkgs, ... }: let cfg = config.tv.ejabberd; gen-dhparam = pkgs.writeDash "gen-dhparam" '' diff --git a/tv/3modules/ejabberd/lib b/tv/3modules/ejabberd/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/3modules/ejabberd/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/3modules/focus.nix b/tv/3modules/focus.nix index b1a7b2e..c16d442 100644 --- a/tv/3modules/focus.nix +++ b/tv/3modules/focus.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { options.tv.focus.enable = mkEnableOption "tv.focus"; } diff --git a/tv/3modules/hosts.nix b/tv/3modules/hosts.nix index 1187405..2d382e2 100644 --- a/tv/3modules/hosts.nix +++ b/tv/3modules/hosts.nix @@ -1,8 +1,5 @@ -{ config, ... }: - -with import ; - -{ +with import ./lib; +{ config, ... }: { options.tv.hosts = mkOption { type = types.attrsOf types.host; default = diff --git a/tv/3modules/hw.nix b/tv/3modules/hw.nix index 6eb722d..db1a77c 100644 --- a/tv/3modules/hw.nix +++ b/tv/3modules/hw.nix @@ -1,5 +1,5 @@ +with import ./lib; let - lib = import ; local.types.screen = lib.types.submodule { options.width = lib.mkOption { type = lib.types.uint; diff --git a/tv/3modules/im.nix b/tv/3modules/im.nix index e98a573..76a61b1 100644 --- a/tv/3modules/im.nix +++ b/tv/3modules/im.nix @@ -1,6 +1,6 @@ +with import ./lib; { config, pkgs, ... }: let im = config.tv.im; - lib = import ; in { options = { tv.im.client.enable = lib.mkEnableOption "tv.im.client" // { diff --git a/tv/3modules/iptables.nix b/tv/3modules/iptables.nix index 9cf0bd5..c4bf464 100644 --- a/tv/3modules/iptables.nix +++ b/tv/3modules/iptables.nix @@ -1,7 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; -let { +with import ./lib; +{ config, pkgs, ... }: let { cfg = config.tv.iptables; body = { diff --git a/tv/3modules/lib b/tv/3modules/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/3modules/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/3modules/org.freedesktop.machine1.host-shell.nix b/tv/3modules/org.freedesktop.machine1.host-shell.nix index e1a5323..7d31edf 100644 --- a/tv/3modules/org.freedesktop.machine1.host-shell.nix +++ b/tv/3modules/org.freedesktop.machine1.host-shell.nix @@ -1,4 +1,5 @@ -{ config, ... }: let lib = import ../../lib; in { +with import ./lib; +{ config, ... }: { options.org.freedesktop.machine1.host-shell.access = lib.mkOption { default = {}; type = diff --git a/tv/3modules/slock.nix b/tv/3modules/slock.nix index 926adc8..a083032 100644 --- a/tv/3modules/slock.nix +++ b/tv/3modules/slock.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let cfg = config.tv.slock; in { diff --git a/tv/3modules/x0vncserver.nix b/tv/3modules/x0vncserver.nix index 4dbb34d..f19bfeb 100644 --- a/tv/3modules/x0vncserver.nix +++ b/tv/3modules/x0vncserver.nix @@ -1,8 +1,6 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let - cfg = config.tv.x0vncserver; - in { options.tv.x0vncserver = { display = mkOption { diff --git a/tv/5pkgs/default.nix b/tv/5pkgs/default.nix index 494cb9e..245d054 100644 --- a/tv/5pkgs/default.nix +++ b/tv/5pkgs/default.nix @@ -1,4 +1,4 @@ -with import ../../lib; +with import ./lib; let pushBack = x: xs: if elem x xs then diff --git a/tv/5pkgs/haskell/default.nix b/tv/5pkgs/haskell/default.nix index 33fd250..f05223d 100644 --- a/tv/5pkgs/haskell/default.nix +++ b/tv/5pkgs/haskell/default.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; let overrides = self: super: mapNixDir (path: self.callPackage path {}) [ diff --git a/tv/5pkgs/haskell/lib b/tv/5pkgs/haskell/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/5pkgs/haskell/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/lib b/tv/5pkgs/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/5pkgs/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/override/default.nix b/tv/5pkgs/override/default.nix index f719a9f..87b7ce9 100644 --- a/tv/5pkgs/override/default.nix +++ b/tv/5pkgs/override/default.nix @@ -1,4 +1,4 @@ -with import ../../../lib; +with import ./lib; self: super: mapNixDir (path: import path self super) ./. diff --git a/tv/5pkgs/override/lib b/tv/5pkgs/override/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/5pkgs/override/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/rpi/default.nix b/tv/5pkgs/rpi/default.nix index f0ac47f..e41d637 100644 --- a/tv/5pkgs/rpi/default.nix +++ b/tv/5pkgs/rpi/default.nix @@ -1,6 +1,4 @@ -let - lib = import ; -in +with import ./lib; self: super: diff --git a/tv/5pkgs/rpi/lib b/tv/5pkgs/rpi/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/5pkgs/rpi/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/simple/bash-fzf-history.nix b/tv/5pkgs/simple/bash-fzf-history.nix index 88a8e9e..1166ec7 100644 --- a/tv/5pkgs/simple/bash-fzf-history.nix +++ b/tv/5pkgs/simple/bash-fzf-history.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { pkgs , edit-key ? "ctrl-e" diff --git a/tv/5pkgs/simple/default.nix b/tv/5pkgs/simple/default.nix index 9fb45dd..82a19a9 100644 --- a/tv/5pkgs/simple/default.nix +++ b/tv/5pkgs/simple/default.nix @@ -1,4 +1,4 @@ -with import ../../../lib; +with import ./lib; self: super: diff --git a/tv/5pkgs/simple/lib b/tv/5pkgs/simple/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/5pkgs/simple/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/simple/pinentry-urxvt/default.nix b/tv/5pkgs/simple/pinentry-urxvt/default.nix index 6e4f6b0..c768a9f 100644 --- a/tv/5pkgs/simple/pinentry-urxvt/default.nix +++ b/tv/5pkgs/simple/pinentry-urxvt/default.nix @@ -1,8 +1,7 @@ +with import ./lib; { pkgs, ... }@args: let - lib = import ; - # config cannot be declared in the input attribute set because that would # cause callPackage to inject the wrong config. Instead, get it from ... # via args. diff --git a/tv/5pkgs/simple/pinentry-urxvt/lib b/tv/5pkgs/simple/pinentry-urxvt/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/5pkgs/simple/pinentry-urxvt/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/simple/q/def