This commit is contained in:
Thilo Billerbeck 2024-12-19 22:09:57 +01:00
commit fccb38974f
10 changed files with 119 additions and 80 deletions

View file

@ -21,4 +21,9 @@ fi
# Install home-manager
cd $HOME/.config/home-manager
nix run .#homeConfigurations.$USER@$(hostname).activationPackage
git remote set-url origin git@github.com:thilobillerbeck/dotfiles.git
nix run .#homeConfigurations.$USER@$(hostname).activationPackage
if [[ "$XDG_CURRENT_DESKTOP" == "KDE" || "$KDE_FULL_SESSION" == "true" ]]; then
xargs flatpak install -y < $HOME/.config/home-manager/scripts/flatpak-bootstrap/flatpaks-plasma.txt
fi

View file

@ -6,9 +6,6 @@
...
}:
let
nixGL = import ./../../home-manager/utils/nixGLWrap.nix { inherit pkgs config; };
in
{
imports = [ ./../../home-manager/modules/machine.nix ];
@ -24,7 +21,5 @@ in
nixpkgs.config.allowUnfree = true;
nixGLPrefix = lib.getExe pkgs.nixgl.nixGLIntel;
nix.settings.builders = "@/etc/nix/machines";
}

View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1731102567,
"narHash": "sha256-A0xTZedeIwMceV86/BB3b6GgS+DVoqQwxywDgH68x7s=",
"lastModified": 1734036866,
"narHash": "sha256-KqdRX+IGfD4PsPNu/0Uqda3JHBqqcY0LSt3dayY8voM=",
"owner": "dagger",
"repo": "nix",
"rev": "9852fdddcdcb52841275ffb6a39fa1524d538d5a",
"rev": "8f7e40ca59ad9f85d6dfe3de623fed9adf0d5bec",
"type": "github"
},
"original": {
@ -22,11 +22,11 @@
},
"flake-compat": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
@ -93,11 +93,11 @@
]
},
"locked": {
"lastModified": 1733484277,
"narHash": "sha256-i5ay20XsvpW91N4URET/nOc0VQWOAd4c4vbqYtcH8Rc=",
"lastModified": 1734622215,
"narHash": "sha256-OOfI0XhSJGHblfdNDhfnn8QnZxng63rWk9eeJ2tCbiI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d00c6f6d0ad16d598bf7e2956f52c1d9d5de3c3a",
"rev": "1395379a7a36e40f2a76e7b9936cc52950baa1be",
"type": "github"
},
"original": {
@ -157,11 +157,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1731668526,
"narHash": "sha256-ZszfGYOrwol3MGFpttahldT+UOfqXckk6XwZrUyHLxE=",
"lastModified": 1734239219,
"narHash": "sha256-iKY/OGNANXpd9hXBGfx8vObpHW4IcOH0MrerLCCc7hA=",
"owner": "thiagokokada",
"repo": "nix-alien",
"rev": "97fe58a8ac15663b1ecdebd84d2187eb71f8532d",
"rev": "a266d0f74dd4a82ec6a72b02fbf3fbc5f7105f15",
"type": "github"
},
"original": {
@ -193,11 +193,11 @@
]
},
"locked": {
"lastModified": 1731593150,
"narHash": "sha256-FvksinoI2Y6kuwH+cKBu1oDA8uPGfoRqgtQV6O8GDc4=",
"lastModified": 1734234111,
"narHash": "sha256-icEMqBt4HtGH52PU5FHidgBrNJvOfXH6VQKNtnD1aw8=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "40d882b55e89add1ded379cc99edaab24983d6d9",
"rev": "311d6cf3ad3f56cb051ffab1f480b2909b3f754d",
"type": "github"
},
"original": {
@ -213,11 +213,11 @@
]
},
"locked": {
"lastModified": 1733024876,
"narHash": "sha256-vy9Q41hBE7Zg0yakF79neVgb3i3PQMSMR7uHPpPywFE=",
"lastModified": 1734234111,
"narHash": "sha256-icEMqBt4HtGH52PU5FHidgBrNJvOfXH6VQKNtnD1aw8=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "6e0b7f81367069589a480b91603a10bcf71f3103",
"rev": "311d6cf3ad3f56cb051ffab1f480b2909b3f754d",
"type": "github"
},
"original": {
@ -249,11 +249,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1731319897,
"narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=",
"lastModified": 1733940404,
"narHash": "sha256-Pj39hSoUA86ZePPF/UXiYHHM7hMIkios8TYG29kQT4g=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dc460ec76cbff0e66e269457d7b728432263166c",
"rev": "5d67ea6b4b63378b9c13be21e2ec9d1afc921713",
"type": "github"
},
"original": {
@ -271,11 +271,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1733352485,
"narHash": "sha256-QGjqvF6YtgOI6qXx5bJVMjX+qxa26MQp1OczUCF9LnE=",
"lastModified": 1734559477,
"narHash": "sha256-Jwvow0ri+ZgCdP6jpNQVjxub14Pxs1kyjvDV3BbvNzE=",
"owner": "ryantm",
"repo": "nixpkgs-update",
"rev": "c56a31e6dd4149ab5fc334c40267f23aff22745b",
"rev": "7f089591e8f595011323c8a7370b195fa3dfe0b7",
"type": "github"
},
"original": {
@ -286,11 +286,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1733392399,
"narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=",
"lastModified": 1734424634,
"narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661",
"rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
"type": "github"
},
"original": {

View file

@ -2,6 +2,7 @@
lib,
pkgs,
config,
inputs,
...
}:
with lib;
@ -81,6 +82,13 @@ with lib;
news.display = "silent";
targets.genericLinux.enable = config.machine.isGeneric;
nixGL = {
packages = inputs.nixgl.packages;
defaultWrapper = "mesa";
installScripts = ["mesa"];
vulkan.enable = true;
};
home = {
username = "${config.machine.username}";
homeDirectory = "/home/${config.machine.username}";

View file

@ -8,7 +8,7 @@
with lib;
let
nixGL = import ./../../home-manager/utils/nixGLWrap.nix { inherit pkgs config; };
nixGL = config.lib.nixGL.wrap;
electronFlags = "--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime --disable-gpu-shader-disk-cache -n";
in
{
@ -78,16 +78,18 @@ in
unrar
inputs.w17.packages.x86_64-linux.default
aichat
(pkgs.nerdfonts.override {
fonts = [
"JetBrainsMono"
"FiraCode"
"FiraMono"
];
})
nerd-fonts.jetbrains-mono
nerd-fonts.fira-code
nerd-fonts.fira-mono
nix-output-monitor
nodePackages.pnpm
npm-check-updates
# FPGA stuff
yosys
nextpnr
icestorm
icebreaker
]
++ (
if (!config.machine.isGeneric) then

View file

@ -6,7 +6,7 @@
}:
let
nixGL = import ./../../home-manager/utils/nixGLWrap.nix { inherit pkgs config; };
nixGL = config.lib.nixGL.wrap;
in
{
programs.alacritty = {

View file

@ -5,14 +5,14 @@
}:
let
nixGL = import ./../../home-manager/utils/nixGLWrap.nix { inherit pkgs config; };
nixGL = config.lib.nixGL.wrap;
in
{
programs.kitty = {
enable = true;
package = (nixGL pkgs.kitty);
font = {
name = "JetbrainsMono NFM";
name = "JetBrainsMono";
size = 14;
};
themeFile = "Dracula";

View file

@ -22,6 +22,7 @@ in
"bun"
"tldr"
"flutter"
"nix"
];
};
git.repos = [ configPath ];

View file

@ -1,36 +0,0 @@
# Call once on import to load global context
{ pkgs, config }:
# Wrap a single package
pkg:
if config.nixGLPrefix == "" then
pkg
else
# Wrap the package's binaries with nixGL, while preserving the rest of
# the outputs and derivation attributes.
(pkg.overrideAttrs (old: {
name = "nixGL-${pkg.name}";
buildCommand = ''
set -eo pipefail
${
# Heavily inspired by https://stackoverflow.com/a/68523368/6259505
pkgs.lib.concatStringsSep "\n" (
map (outputName: ''
echo "Copying output ${outputName}"
set -x
cp -rs --no-preserve=mode "${pkg.${outputName}}" "''$${outputName}"
set +x
'') (old.outputs or [ "out" ])
)
}
rm -rf $out/bin/*
shopt -s nullglob # Prevent loop from running if no files
for file in ${pkg.out}/bin/*; do
echo "#!${pkgs.bash}/bin/bash" > "$out/bin/$(basename $file)"
echo "exec -a \"\$0\" ${config.nixGLPrefix} $file \"\$@\"" >> "$out/bin/$(basename $file)"
chmod +x "$out/bin/$(basename $file)"
done
shopt -u nullglob # Revert nullglob back to its normal default state
'';
}))

View file

@ -0,0 +1,64 @@
com.brave.Browser
com.github.mtkennerly.ludusavi
com.github.tchx84.Flatseal
com.github.wwmm.easyeffects
com.heroicgameslauncher.hgl
com.mastermindzh.tidal-hifi
com.nextcloud.desktopclient.nextcloud
com.spotify.Client
com.usebottles.bottles
com.valvesoftware.Steam
com.vysp3r.ProtonPlus
com.vysp3r.RetroPlus
dev.deedles.Trayscale
dev.vencord.Vesktop
im.nheko.Nheko
info.mumble.Mumble
io.anytype.anytype
io.appflowy.AppFlowy
io.github.dimtpap.coppwr
io.github.dvlv.boxbuddyrs
io.github.flattool.Warehouse
io.github.zen_browser.zen
io.gpt4all.gpt4all
io.missioncenter.MissionCenter
io.ossia.score
io.podman_desktop.PodmanDesktop
it.fabiodistasio.AntaresSQL
it.mijorus.gearlever
md.obsidian.Obsidian
net.ankiweb.Anki
net.lutris.Lutris
net.retrodeck.retrodeck
org.ardour.Ardour
org.audacityteam.Audacity
org.fedoraproject.MediaWriter
org.filezillaproject.Filezilla
org.fkoehler.KTailctl
org.freac.freac
org.gnome.Boxes
org.gnome.DejaDup
org.gnome.World.PikaBackup
org.godotengine.Godot
org.inkscape.Inkscape
org.kde.filelight
org.kde.gwenview
org.kde.haruna
org.kde.kcalc
org.kde.kclock
org.kde.kdenlive
org.kde.kontact
org.kde.kweather
org.kde.okular
org.libreoffice.LibreOffice
org.mixxx.Mixxx
org.mozilla.Thunderbird
org.mozilla.firefox
org.musescore.MuseScore
org.onlyoffice.desktopeditors
org.raspberrypi.rpi-imager
org.rncbc.qpwgraph
org.signal.Signal
org.telegram.desktop
org.zotero.Zotero
page.kramo.Cartridges