citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

config.nix (9239B)


      1 { pkgs }:
      2 let #monstercatPkgs = import <monstercatpkgs> { inherit pkgs; };
      3     #haskellOverrides = import ./haskell-overrides { inherit monstercatPkgs; };
      4     jb55pkgs = import <jb55pkgs> { inherit pkgs; };
      5     callPackage = pkgs.callPackage;
      6     doJailbreak = pkgs.haskell.lib.doJailbreak;
      7     dontCheck = pkgs.haskell.lib.dontCheck;
      8     regularFiles = builtins.filterSource (f: type: type == "symlink"
      9                                                 || type == "directory"
     10                                                 || type == "regular");
     11 in {
     12   allowUnfree = true;
     13   allowUnfreeRedistributable = true;
     14   android_sdk.accept_license = true;
     15   allowBroken = false;
     16   checkMeta = true;
     17   zathura.useMupdf = true;
     18   #android_sdk.accept_license = true;
     19 
     20   packageOverrides = super: rec {
     21     qemu = super.qemu.override {
     22       smbdSupport = true;
     23     };
     24 
     25     mpv = pkgs.wrapMpv pkgs.mpv-unwrapped {
     26       scripts = [ pkgs.mpvScripts.mpris ];
     27     };
     28 
     29     # /run/current-system/sw/bin/ls $HOME/.emacs.d/elpa | sed 's/-[[:digit:]].*//g;s/\+$/-plus/g' | sort -u
     30     #emacs = super.emacsHead;
     31     nur = import (builtins.fetchTarball {
     32       url = "https://github.com/nix-community/NUR/archive/cff4dfbe6d6f4ab14560234fcf2d73332ee3ecc1.tar.gz";
     33       sha256 = "01yxz6w820vryirrwkmsnxkmvp35dncjp1n8fdfsq4n0r28nw31a";
     34     }) {
     35       inherit pkgs;
     36     };
     37 
     38     msmtp = pkgs.lib.overrideDerivation super.msmtp (attrs: {
     39       patches = [
     40         (super.fetchurl {
     41           url = "https://jb55.com/s/msmtpq-custom-conn-test.patch";
     42           sha256 = "4d342ea9e757fe5f3fd939479c4b619dcc9630ba9d0bdacf5ccfec9b5b67b861";
     43         })
     44       ];
     45     });
     46 
     47     neomutt = pkgs.lib.overrideDerivation super.neomutt (attrs: {
     48       postConfigure = ''
     49         sed -i '/HAVE_CURS_SET 1/d' config.h
     50       '';
     51     });
     52 
     53     #weechat = super.weechat.override {configure = {availablePlugins, ...}: {
     54     #    scripts = with super.weechatScripts; [ wee-slack weechat-matrix ];
     55     #  };
     56     #};
     57 
     58     #dunst = pkgs.lib.overrideDerivation super.dunst (attrs: {
     59     #  src = pkgs.fetchFromGitHub {
     60     #    owner = "jb55";
     61     #    repo  = "dunst";
     62     #    rev   = "138edff170e4e4a2bf6891bd634c4ec215d4b7ef";
     63     #    sha256 = "1pf3v4mrcd0cfhvm9fk9nwvgj5dy6qlbs0mhlcyx26cbqxd62brp";
     64     #  };
     65     #});
     66 
     67     #lastpass-cli = super.lastpass-cli.override { guiSupport = true; };
     68 
     69     wine = super.wineWowPackages.staging;
     70 
     71     #phonectl = super.python3Packages.callPackage (import (super.fetchFromGitHub {
     72     #  owner  = "jb55";
     73     #  repo   = "phonectl";
     74     #  sha256 = "0wqpwg32qa1rzpw7881r6q2zklxlq1y4qgyyy742pihfh99rkcmj";
     75     #  rev    = "de0f37a20d16a32a73f9267860302357b2df0c20";
     76     #})) {};
     77 
     78     #htop = pkgs.lib.overrideDerivation super.htop (attrs: {
     79     #  patches =
     80     #    [ (super.fetchurl
     81     #      { url = "https://jb55.com/s/htop-vim.patch";
     82     #        sha256 = "3d72aa07d28d7988e91e8e4bc68d66804a4faeb40b93c7a695c97f7d04a55195";
     83     #      })
     84     #      (super.fetchurl
     85     #      { url = "https://jb55.com/s/0001-Improving-Command-display-sort.patch";
     86     #        sha256 = "2207dccce7f9de0c3c6f56d846d7e547c96f63c8a4659ef46ef90c3bd9a013d1";
     87     #      })
     88     #    ];
     89     #});
     90 
     91     ds4ctl = super.callPackage ./scripts/ds4ctl { };
     92 
     93     haskellEnvHoogle = haskellEnvFun {
     94       name = "haskellEnvHoogle";
     95       #compiler = "ghc821";
     96       withHoogle = true;
     97     };
     98 
     99     haskellEnv = haskellEnvFun {
    100       name = "haskellEnv";
    101       #compiler = "ghc821";
    102       withHoogle = false;
    103     };
    104 
    105     haskell-tools = super.buildEnv {
    106       name = "haskell-tools";
    107       paths = haskellTools super.haskellPackages;
    108     };
    109 
    110     jb55-tools-env = pkgs.buildEnv {
    111       name = "jb55-tools";
    112       paths = with jb55pkgs; [
    113         csv-delim
    114         csv-scripts
    115         dbopen
    116         extname
    117         mandown
    118         snap
    119         sharefile
    120         samp
    121       ];
    122     };
    123 
    124     jvm-tools-env = pkgs.buildEnv {
    125       name = "jvm-tools";
    126       paths = with pkgs; [
    127         gradle
    128         maven
    129         oraclejdk
    130       ];
    131     };
    132 
    133     gaming-env = pkgs.buildEnv {
    134       name = "gaming";
    135       paths = with pkgs; [
    136         steam
    137       ];
    138     };
    139 
    140     file-tools = pkgs.buildEnv {
    141       name = "file-tools";
    142       paths = with pkgs; [
    143         ripgrep
    144         ranger
    145       ];
    146     };
    147 
    148     network-tools = pkgs.buildEnv {
    149       name = "network-tools";
    150       paths = with pkgs; with xorg; [
    151         nmap
    152         dnsutils
    153         whois
    154         nethogs
    155       ];
    156     };
    157 
    158     system-tools = pkgs.buildEnv {
    159       name = "system-tools";
    160       paths = with pkgs; with xorg; [
    161         xbacklight
    162         acpi
    163         psmisc
    164       ];
    165     };
    166 
    167     desktop-tools = pkgs.buildEnv {
    168       name = "desktop-tools";
    169       paths = with pkgs; with xorg; [
    170         twmn
    171         libnotify
    172       ];
    173     };
    174 
    175     syntax-tools = pkgs.buildEnv {
    176       name = "syntax-tools";
    177       paths = with pkgs; [
    178         shellcheck
    179       ];
    180     };
    181 
    182     mail-tools = pkgs.buildEnv {
    183       name = "mail-tools";
    184       paths = with pkgs; [
    185         notmuch
    186         msmtp
    187         muchsync
    188         isync
    189       ];
    190     };
    191 
    192     photo-env = pkgs.buildEnv {
    193       name = "photo-tools";
    194       paths = with pkgs; [
    195         gimp
    196         darktable
    197         rawtherapee
    198         ufraw
    199         dcraw
    200       ];
    201     };
    202 
    203     git-tools = pkgs.buildEnv {
    204       name = "git-tools";
    205       paths = with pkgs; [
    206         diffstat
    207         diffutils
    208         gist
    209         git-series
    210         gitAndTools.git-extras
    211         gitAndTools.git-absorb
    212         gitAndTools.delta
    213         gitAndTools.gitFull
    214         github-release
    215         patch
    216         patchutils
    217       ];
    218     };
    219 
    220     haskellEnvFun = { withHoogle ? false, compiler ? null, name }:
    221       let hp = if compiler != null
    222                  then super.haskell.packages.${compiler}
    223                  else super.haskellPackages;
    224 
    225           ghcWith = if withHoogle
    226                       then hp.ghcWithHoogle
    227                       else hp.ghcWithPackages;
    228 
    229       in super.buildEnv {
    230         name = name;
    231         paths = [(ghcWith myHaskellPackages)];
    232       };
    233 
    234     haskellTools = hp: with hp; [
    235       alex
    236       cabal-install
    237       cabal2nix
    238       #stack2nix
    239       hpack
    240       ghc-core
    241       happy
    242       (dontCheck hasktags)
    243       hindent
    244       hlint
    245       structured-haskell-mode
    246       haskell-ci
    247     ];
    248 
    249     myHaskellPackages = hp: with hp; [
    250       Boolean
    251       Decimal
    252       HTTP
    253       HUnit
    254       MissingH
    255       QuickCheck
    256       SafeSemaphore
    257       aeson
    258       aeson-qq
    259       async
    260       attoparsec
    261       base32string
    262       base58-bytestring
    263       bifunctors
    264       unliftio
    265       blaze-builder
    266       blaze-builder-conduit
    267       blaze-html
    268       blaze-markup
    269       cased
    270       cassava
    271       cereal
    272       colour
    273       comonad
    274       comonad-transformers
    275       directory
    276       dlist
    277       dlist-instances
    278       doctest
    279       either
    280       elm-export
    281       elm-export-persistent
    282       exceptions
    283       filepath
    284       fingertree
    285       foldl
    286       formatting
    287       free
    288       generics-sop
    289       hamlet
    290       hashable
    291       hashids
    292       here
    293       heroku
    294       hedgehog
    295       hspec
    296       hspec-expectations
    297       html
    298       http-client
    299       http-date
    300       http-types
    301       inline-c
    302       io-memoize
    303       io-storage
    304       keys
    305       language-c
    306       language-javascript
    307       lens
    308       lens-action
    309       lens-aeson
    310       lens-datetime
    311       lens-family
    312       lens-family-core
    313       lifted-async
    314       lifted-base
    315       linear
    316       list-extras
    317       logict
    318       mbox
    319       mime-mail
    320       mime-types
    321       mmorph
    322       monad-control
    323       monad-coroutine
    324       monad-loops
    325       monad-par
    326       monad-par-extras
    327       monad-stm
    328       monadloc
    329       neat-interpolation
    330       network
    331       newtype
    332       numbers
    333       options
    334       optparse-applicative
    335       optparse-generic
    336       pandoc
    337       parsec
    338       megaparsec
    339       parsers
    340       pcg-random
    341       persistent
    342       persistent-postgresql
    343       persistent-template
    344       posix-paths
    345       postgresql-simple
    346       pretty-show
    347       probability
    348       profunctors
    349       pwstore-fast
    350       quickcheck-instances
    351       random
    352       reducers
    353       reflection
    354       regex-applicative
    355       regex-base
    356       regex-compat
    357       regex-posix
    358       relational-record
    359       resourcet
    360       retry
    361       rex
    362       s3-signer
    363       safe
    364       scotty
    365       sqlite-simple
    366       lucid
    367       semigroupoids
    368       semigroups
    369       shake
    370       shakespeare
    371       shqq
    372       simple-reflect
    373       split
    374       spoon
    375       stache
    376       stm
    377       stm-chans
    378       store
    379       stache
    380       streaming
    381       smtp-mail
    382       streaming-bytestring
    383       streaming-wai
    384       strict
    385       stringsearch
    386       strptime
    387       syb
    388       system-fileio
    389       system-filepath
    390       tagged
    391       taggy
    392       taggy-lens
    393       tar
    394       tardis
    395       tasty
    396       tasty-hspec
    397       tasty-hunit
    398       tasty-quickcheck
    399       tasty-smallcheck
    400       temporary
    401       test-framework
    402       test-framework-hunit
    403       text
    404       text-regex-replace
    405       thyme
    406       time
    407       time-units
    408       transformers
    409       transformers-base
    410       turtle
    411       unagi-chan
    412       uniplate
    413       unix-compat
    414       unordered-containers
    415       uuid
    416       vector
    417       void
    418       wai
    419       wai-middleware-static
    420       wai-extra
    421       warp
    422       wreq
    423       xhtml
    424       xml-lens
    425       yaml
    426       zippers
    427       zlib
    428     ];
    429   };
    430 }