refactoring installed pkgs

auto-flake-update
Yorick van Pelt 2022-04-11 15:27:39 +02:00
parent 69646bff13
commit a465cda40d
Signed by: yorick
GPG Key ID: A36E70F9DC014A15
7 changed files with 163 additions and 281 deletions

View File

@ -1,5 +1,3 @@
(pkgs: super: { (pkgs: super: {
# notmuch = super.notmuch.overrideAttrs (o: {
# doCheck = false;
# });
}) })

View File

@ -192,7 +192,20 @@ in
}; };
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
envs.de gtk-engine-murrine
hicolor-icon-theme
vanilla-dmz
# arc-theme
libnotify
#rxvt_unicode-with-plugins
pavucontrol
light
# dropbox # really?
# xorg.xrdb
siji fira-mono playerctl
mosquitto
#hs.arbtt
gebaar-libinput gebaar-libinput
grim grim
eagle eagle

View File

@ -4,10 +4,11 @@ let
forceWayland = true; forceWayland = true;
applicationName = "firefox"; applicationName = "firefox";
}; };
thefuck-alias = shell: pkgs.runCommand "thefuck-alias" { thefuck-alias = shell:
TF_SHELL = shell; pkgs.runCommand "thefuck-alias" {
HOME = "/build"; TF_SHELL = shell;
} "${pkgs.thefuck}/bin/thefuck -a > $out"; HOME = "/build";
} "${pkgs.thefuck}/bin/thefuck -a > $out";
in { in {
imports = [ ./arbtt.nix ./desktop.nix ]; imports = [ ./arbtt.nix ./desktop.nix ];
nixpkgs = { nixpkgs = {
@ -97,24 +98,7 @@ in {
direnv direnv
vue-mode vue-mode
solarized-theme solarized-theme
#wlrctl
nix-mode nix-mode
# (epkgs.melpaBuild {
# pname = "nix-mode";
# version = "1.4.0";
# packageRequires = [ json-mode epkgs.mmm-mode company ];
# recipe = pkgs.writeText "recipe" ''
# (nix-mode
# :repo "nixos/nix-mode" :fetcher github
# :files ("nix*.el"))
# '';
# src = pkgs.fetchFromGitHub {
# owner = "nixos";
# repo = "nix-mode";
# rev = "ddf091708b9069f1fe0979a7be4e719445eed918";
# sha256 = "0s8ljr4d7kys2xqrhkvj75l7babvk60kxgy4vmyqfwj6xmcxi3ad";
# };
# })
]); ]);
}; };
git = { git = {
@ -165,7 +149,7 @@ in {
# verified by wireguard key # verified by wireguard key
extraOptions.StrictHostKeyChecking = "no"; extraOptions.StrictHostKeyChecking = "no";
}; };
in rec { in rec {
"pub.yori.cc" = { "pub.yori.cc" = {
user = "public"; user = "public";
identityFile = "~/.ssh/id_rsa_pub"; identityFile = "~/.ssh/id_rsa_pub";
@ -199,12 +183,8 @@ in {
"10.109.0.*" = lumivpn; "10.109.0.*" = lumivpn;
"10.110.0.*" = lumivpn // { port = 2233; }; "10.110.0.*" = lumivpn // { port = 2233; };
"10.111.0.*" = lumivpn; "10.111.0.*" = lumivpn;
"192.168.42.*" = { "192.168.42.*" = { user = "yorick.van.pelt"; };
user = "yorick.van.pelt"; "karpenoktem.nl" = { user = "root"; };
};
"karpenoktem.nl" = {
user = "root";
};
sankhara = { sankhara = {
user = "infra"; user = "infra";
port = 33931; port = 33931;
@ -259,15 +239,17 @@ in {
source ${thefuck-alias "bash"} source ${thefuck-alias "bash"}
eval "$(broot --print-shell-function bash)" eval "$(broot --print-shell-function bash)"
if [ "$IN_CACHED_NIX_SHELL" ]; then if [ "$IN_CACHED_NIX_SHELL" ]; then
eval "$shellHook" eval "$shellHook"
unset shellHook unset shellHook
fi fi
''; '';
}; };
}; };
# todo: precompile? # todo: precompile?
home.file.".emacs.d/init.el".source = (toString /home/yorick/dotfiles/emacs/init.el); home.file.".emacs.d/init.el".source =
home.file.".emacs.d/early-init.el".source = (toString /home/yorick/dotfiles/emacs/early-init.el); (toString /home/yorick/dotfiles/emacs/init.el);
home.file.".emacs.d/early-init.el".source =
(toString /home/yorick/dotfiles/emacs/early-init.el);
xdg.configFile."nixpkgs/config.nix".text = '' xdg.configFile."nixpkgs/config.nix".text = ''
import "${toString ../config.nix}" import "${toString ../config.nix}"
''; '';
@ -286,63 +268,138 @@ in {
enableSshSupport = true; enableSshSupport = true;
}; };
}; };
home.packages = with pkgs.envs; home.packages = (with pkgs; [
[ apps code games pdf media misc scripts coins js ] ++ (with pkgs; [ ## utils
github-cli # afew
nix-tree broot
virt-manager fd
watchman gcr.out
gcr.out # alacritty git-absorb
notmuch github-cli
gmailieer gmailieer
git-absorb htop
#afew kcachegrind
broot lm_sensors
fd notmuch
htop watchman
kcachegrind
lm_sensors ## misc
niv atop
nixfmt awscli
linuxPackages.perf borgbackup
pssh bup
smartmontools # catdoc
vim expect
xdg_utils fzf
nix-top gitAndTools.git-annex
nix-diff glxinfo
ltrace gnupg1
asciinema imagemagick
cargo iodine
minecraft jo
unzip jq
exa lnav
cachix magic-wormhole
y-firefox man-pages
cached-nix-shell mosh
]); # qtwayland neofetch
# systemd.user.services.gmi = { openssl
# Unit = { pass
# Description = "gmi"; pv
# }; screen
# Service = { sshfs-fuse
# CPUSchedulingPolicy = "idle"; sshuttle
# IOSchedulingClass = "idle"; thefuck
# WorkingDirectory = "/home/yorick/mail/account.gmail"; w3m
# ExecStart = "${pkgs.writeScript "gmi-pull" '' wakelan
# #!/usr/bin/env bash
# gmi pull ## media
# notmuch new aria2
# ''}"; castnow
# }; mpv
# }; nodePackages.peerflix
# systemd.user.timers.gmi = { streamlink
# Timer = { yt-dlp
# OnCalendar = "*:0/5";
# Unit = "gmi.service"; ## code
# }; cloc
# Install.WantedBy = [ "timers.target" ]; gcc
# }; gdb
git-crypt
git-fire
gnumake
hub
python3
silver-searcher
sqlite
## nix
nix-tree
niv
nixfmt
patchelf
nix-prefetch-git
nix-du
nix-top
nix-diff
cachix
cached-nix-shell
## js
nodejs
electron
## pdf
ocamlPackages.cpdf
zathura
pandoc
poppler_utils
## misc
asciinema
cargo
exa
linuxPackages.perf
ltrace
pssh
smartmontools
unzip
vim
xdg_utils
#wlrctl
## coins
electrum
## apps
alacritty
calibre
chromium
discord
fanficfare
feh
gajim
gimp
gopass
hledger
neomutt
spotify
tdesktop
virt-manager
wireshark
y-firefox
yubioath-desktop # todo
## games
minecraft
steam
# minecraft
# nottetris2
# openttd
# wine
# winetricks
]);
home.file.".gnupg/gpg.conf".text = '' home.file.".gnupg/gpg.conf".text = ''
no-greeting no-greeting
@ -357,6 +414,7 @@ in {
}; };
manual.manpages.enable = false; manual.manpages.enable = false;
home.sessionVariables = { home.sessionVariables = {
HOME_MANAGER_CONFIG = toString ./home.nix; # unused, but checked for existence HOME_MANAGER_CONFIG =
toString ./home.nix; # unused, but checked for existence
}; };
} }

View File

@ -5,7 +5,6 @@ in [
(import sources.nixpkgs-mozilla) (import sources.nixpkgs-mozilla)
(import sources.emacs-overlay) (import sources.emacs-overlay)
(import ./pkgs) (import ./pkgs)
(import ./pkgs/envs.nix)
(import ./nixos/overlay.nix) (import ./nixos/overlay.nix)
(import ./overlay.nix) (import ./overlay.nix)
] ]

View File

@ -4,13 +4,6 @@
ftb = super.callPackage ./ftb.nix {}; ftb = super.callPackage ./ftb.nix {};
pyroscope = (import (import ../nix/sources.nix).nixos-stable {}).callPackage ./pyroscope {}; # TODO: update this pyroscope = (import (import ../nix/sources.nix).nixos-stable {}).callPackage ./pyroscope {}; # TODO: update this
#lejos = super.callPackage ../pkgs/lejos.nix {};
weiightminder = super.callPackage (builtins.fetchGit {
url = https://gist.github.com/yorickvP/229d21a7da13c9c514dbd26147822641;
rev = "9749ef4d83c0078bc0248215ee882d7124827cf3";
}) {};
yscripts = super.callPackage ../bin {}; yscripts = super.callPackage ../bin {};
factorio = super.factorio.override { factorio = super.factorio.override {

View File

@ -1,134 +0,0 @@
self: super: with super;
let
mkEnv = name: paths: buildEnv {inherit name paths; };
py3 = python36Packages; hs = haskellPackages; js = nodePackages; ml = ocamlPackages;
py2 = python27Packages; elm = elmPackages;
in {
envs = recurseIntoAttrs {
de = mkEnv "y-de-deps" [
gtk-engine-murrine
hicolor-icon-theme
vanilla-dmz
# arc-theme
libnotify
#rxvt_unicode-with-plugins
pavucontrol
light
# dropbox # really?
xorg.xrdb
# xclip xorg.xrandr arandr
siji fira-mono playerctl
mosquitto
#hs.arbtt
];
scripts = mkEnv "y-scripts" [
# peageprint
# weiightminder
];
apps = mkEnv "y-apps" [
#wpa_supplicant_gui
alacritty
gajim
neomutt
#torbrowser
chromium
#firefox-bin
gimp
feh
tdesktop
#hexchat
#inkscape
# libreoffice
# skype
spotify
#quasselClient
calibre
#py2.plover
wireshark # meld
discord
fanficfare
hledger
#transmission-remote-gtk
gopass
yubioath-desktop # todo
];
media = mkEnv "y-media" [
streamlink
yt-dlp
mpv
aria2
js.peerflix
castnow
];
coins = mkEnv "y-coins" [
# altcoins.namecoin
# altcoins.dogecoin
electrum
];
nix = mkEnv "y-nix" [
patchelf nix-prefetch-git nixopsUnstable nox niv nix-diff nixfmt
nix-du
];
c = mkEnv "y-cdev" [
valgrind cdecl gdb ltrace cmake radare2 # gcc
];
misc = mkEnv "y-misc" [
gitAndTools.git-annex
gnupg1 man-pages bup # catdoc
borgbackup
imagemagick
openssl
sshfs-fuse
sshuttle iodine stow
expect duplicity
wakelan pass
abduco dvtm w3m
jq jo
thefuck
magic-wormhole
mosh pv
screen fzf
atop lnav neofetch awscli
glxinfo
];
code = mkEnv "y-code" (with gitAndTools; [
python3 git-crypt hub gnumake cloc silver-searcher git-fire gti gcc
gdb sqlite
]);
java = openjdk;
games = mkEnv "y-games" [
# steam openttd wine winetricks minecraft nottetris2
steam
];
js = mkEnv "y-jsdev" [
js.jshint nodejs electron /*js.node2nix*/
];
pdf = mkEnv "y-pdf" [
ml.cpdf zathura pandoc poppler_utils
];
hs = mkEnv "y-hs" [
ghc stack cabal-install
];
};
# install with nix-env -iAr nixos.hosts.$(hostname -s)
# will remove all your previously installed nix-env stuff
# so check with nix-env -q first
hosts = with self; with self.envs; rec {
jarvis = [apps code de /*games*/ envs.js pdf nix media misc scripts coins];
blackadder = jarvis;
woodhouse = [de media misc kodi chromium spotify];
pennyworth = [];
frumar = [bup gitAndTools.git-annex rtorrent pyroscope];
};
}

View File

@ -1,45 +0,0 @@
{ jdk7, ant, libusb, makeWrapper, stdenv, lib, fetchurl }:
let lejospkg = type: attrs:
stdenv.mkDerivation ({
name = "lejos-${type}-${attrs.version}";
JDK_PATH = jdk7;
buildPhase = ''
pushd build
ant
popd
'';
installPhase = ''
runHook preInstall
mkdir -p $out/opt/lejos/${type} $out/bin
cp -r * $out/opt/lejos/${type}
for i in $(find $out/opt/lejos/${type}/bin/* -executable); do
makeWrapper $i $out/bin/`basename $i` --set JAVA_HOME $JDK_PATH \
--set ${lib.toUpper type}_HOME $out/opt/lejos/${type}
done
runHook postInstall
'';
buildInputs = [ jdk7 ant libusb makeWrapper ];
} // attrs);
in
{
nxj = lejospkg "nxj" rec {
version = "0.9.1beta-3";
src = fetchurl {
url = "mirror://sourceforge/nxt.lejos.p/${version}/leJOS_NXJ_${version}.tar.gz";
sha256 = "18ll9phbl1i2dasici1m8jprcfhzl03dq0h1dsdl9iwq1yv380pi";
};
};
ev3 = lejospkg "ev3" rec {
version = "0.9.1-beta";
src = fetchurl {
url = "mirror://sourceforge/ev3.lejos.p/${version}/leJOS_EV3_${version}.tar.gz";
sha256 = "12v5za15xijq8frsvrf1amr75jf80c593xdpplcx5l4rxhb3bprp";
};
buildPhase = "echo binary distribution";
postPatch = ''
mkdir -p $out/share/java
cp $(find . -iname '*.jar') $out/share/java
'';
};
}