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: {
# notmuch = super.notmuch.overrideAttrs (o: {
# doCheck = false;
# });
})

View File

@ -192,7 +192,20 @@ in
};
};
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
grim
eagle

View File

@ -4,10 +4,11 @@ let
forceWayland = true;
applicationName = "firefox";
};
thefuck-alias = shell: pkgs.runCommand "thefuck-alias" {
TF_SHELL = shell;
HOME = "/build";
} "${pkgs.thefuck}/bin/thefuck -a > $out";
thefuck-alias = shell:
pkgs.runCommand "thefuck-alias" {
TF_SHELL = shell;
HOME = "/build";
} "${pkgs.thefuck}/bin/thefuck -a > $out";
in {
imports = [ ./arbtt.nix ./desktop.nix ];
nixpkgs = {
@ -97,24 +98,7 @@ in {
direnv
vue-mode
solarized-theme
#wlrctl
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 = {
@ -165,7 +149,7 @@ in {
# verified by wireguard key
extraOptions.StrictHostKeyChecking = "no";
};
in rec {
in rec {
"pub.yori.cc" = {
user = "public";
identityFile = "~/.ssh/id_rsa_pub";
@ -199,12 +183,8 @@ in {
"10.109.0.*" = lumivpn;
"10.110.0.*" = lumivpn // { port = 2233; };
"10.111.0.*" = lumivpn;
"192.168.42.*" = {
user = "yorick.van.pelt";
};
"karpenoktem.nl" = {
user = "root";
};
"192.168.42.*" = { user = "yorick.van.pelt"; };
"karpenoktem.nl" = { user = "root"; };
sankhara = {
user = "infra";
port = 33931;
@ -259,15 +239,17 @@ in {
source ${thefuck-alias "bash"}
eval "$(broot --print-shell-function bash)"
if [ "$IN_CACHED_NIX_SHELL" ]; then
eval "$shellHook"
unset shellHook
eval "$shellHook"
unset shellHook
fi
'';
};
};
# todo: precompile?
home.file.".emacs.d/init.el".source = (toString /home/yorick/dotfiles/emacs/init.el);
home.file.".emacs.d/early-init.el".source = (toString /home/yorick/dotfiles/emacs/early-init.el);
home.file.".emacs.d/init.el".source =
(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 = ''
import "${toString ../config.nix}"
'';
@ -286,63 +268,138 @@ in {
enableSshSupport = true;
};
};
home.packages = with pkgs.envs;
[ apps code games pdf media misc scripts coins js ] ++ (with pkgs; [
github-cli
nix-tree
virt-manager
watchman
gcr.out # alacritty
notmuch
gmailieer
git-absorb
#afew
broot
fd
htop
kcachegrind
lm_sensors
niv
nixfmt
linuxPackages.perf
pssh
smartmontools
vim
xdg_utils
nix-top
nix-diff
ltrace
asciinema
cargo
minecraft
unzip
exa
cachix
y-firefox
cached-nix-shell
]); # qtwayland
# systemd.user.services.gmi = {
# Unit = {
# Description = "gmi";
# };
# Service = {
# CPUSchedulingPolicy = "idle";
# IOSchedulingClass = "idle";
# WorkingDirectory = "/home/yorick/mail/account.gmail";
# ExecStart = "${pkgs.writeScript "gmi-pull" ''
# #!/usr/bin/env bash
# gmi pull
# notmuch new
# ''}";
# };
# };
# systemd.user.timers.gmi = {
# Timer = {
# OnCalendar = "*:0/5";
# Unit = "gmi.service";
# };
# Install.WantedBy = [ "timers.target" ];
# };
home.packages = (with pkgs; [
## utils
# afew
broot
fd
gcr.out
git-absorb
github-cli
gmailieer
htop
kcachegrind
lm_sensors
notmuch
watchman
## misc
atop
awscli
borgbackup
bup
# catdoc
expect
fzf
gitAndTools.git-annex
glxinfo
gnupg1
imagemagick
iodine
jo
jq
lnav
magic-wormhole
man-pages
mosh
neofetch
openssl
pass
pv
screen
sshfs-fuse
sshuttle
thefuck
w3m
wakelan
## media
aria2
castnow
mpv
nodePackages.peerflix
streamlink
yt-dlp
## code
cloc
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 = ''
no-greeting
@ -357,6 +414,7 @@ in {
};
manual.manpages.enable = false;
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.emacs-overlay)
(import ./pkgs)
(import ./pkgs/envs.nix)
(import ./nixos/overlay.nix)
(import ./overlay.nix)
]

View File

@ -4,13 +4,6 @@
ftb = super.callPackage ./ftb.nix {};
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 {};
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
'';
};
}