This commit is contained in:
Motiejus Jakštys 2024-02-02 11:06:36 +02:00 committed by Motiejus Jakštys
parent b5fc3ce865
commit eb47df5e5a
1 changed files with 29 additions and 26 deletions

View File

@ -6,27 +6,13 @@
fullDesktop, fullDesktop,
hmOnly, hmOnly,
... ...
}: { }: let
home = { pkgNicer = pkgs.writeShellApplication {
inherit stateVersion;
username = "motiejus";
homeDirectory = "/home/motiejus";
};
home.packages = with pkgs;
lib.mkMerge [
(lib.mkIf fullDesktop [
go
zig
])
(writeShellApplication {
name = "nicer"; name = "nicer";
text = '' text = ''
set -e f=$(${pkgs.coreutils}/bin/mktemp)
f=$(${coreutils}/bin/mktemp) trap '${pkgs.coreutils}/bin/rm -f "$f"' EXIT
trap 'rm -f "$f"' EXIT ${pkgs.coreutils}/bin/env > "$f"
${coreutils}/bin/env > "$f"
systemd-run \ systemd-run \
--user \ --user \
--same-dir \ --same-dir \
@ -44,7 +30,24 @@
--service-type=exec \ --service-type=exec \
-- "$@" -- "$@"
''; '';
}) };
in {
home = {
inherit stateVersion;
username = "motiejus";
homeDirectory = "/home/motiejus";
};
home.packages = with pkgs;
lib.mkMerge [
[pkgNicer]
(lib.mkIf fullDesktop [
go
zig
])
(lib.mkIf hmOnly [ (lib.mkIf hmOnly [
pkgs.nixgl.nixGLIntel pkgs.nixgl.nixGLIntel
ncdu ncdu