mirror of
https://github.com/thilobillerbeck/dotfiles.git
synced 2024-12-22 03:53:05 +01:00
Compare commits
12 commits
fe3ceceb58
...
998f2da70e
Author | SHA1 | Date | |
---|---|---|---|
998f2da70e | |||
056a6a5a78 | |||
524dac968d | |||
22ee8f1224 | |||
6fa5399be4 | |||
24a9ededc4 | |||
b840b7ae3a | |||
c47a0eac60 | |||
b7b83cf85c | |||
2747027967 | |||
5d2c71064f | |||
5cfdae0809 |
7 changed files with 38 additions and 71 deletions
|
@ -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";
|
||||
}
|
||||
|
|
54
flake.lock
54
flake.lock
|
@ -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": 1733085484,
|
||||
"narHash": "sha256-dVmNuUajnU18oHzBQWZm1BQtANCHaqNuxTHZQ+GN0r8=",
|
||||
"lastModified": 1734344598,
|
||||
"narHash": "sha256-wNX3hsScqDdqKWOO87wETUEi7a/QlPVgpC/Lh5rFOuA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "c1fee8d4a60b89cae12b288ba9dbc608ff298163",
|
||||
"rev": "83ecd50915a09dca928971139d3a102377a8d242",
|
||||
"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": 1732958734,
|
||||
"narHash": "sha256-DY1Aq+pAU/n0loBjCRfeSbEG/ji2M+mrEkcEnsN/AHk=",
|
||||
"lastModified": 1734260421,
|
||||
"narHash": "sha256-vsr+9xKkirwEjvXTS2sOVIxlKQmF/QjszD+Ph0/oRgc=",
|
||||
"owner": "ryantm",
|
||||
"repo": "nixpkgs-update",
|
||||
"rev": "dffb2930904b08ca8d226594b543cbae150b5f67",
|
||||
"rev": "712e24bd6543801c52f6c0656a8371f8d029030e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -286,11 +286,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1732837521,
|
||||
"narHash": "sha256-jNRNr49UiuIwaarqijgdTR2qLPifxsVhlJrKzQ8XUIE=",
|
||||
"lastModified": 1734424634,
|
||||
"narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "970e93b9f82e2a0f3675757eb0bfc73297cc6370",
|
||||
"rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -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}";
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
}:
|
||||
|
||||
let
|
||||
nixGL = import ./../../home-manager/utils/nixGLWrap.nix { inherit pkgs config; };
|
||||
nixGL = config.lib.nixGL.wrap;
|
||||
in
|
||||
{
|
||||
programs.alacritty = {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
}:
|
||||
|
||||
let
|
||||
nixGL = import ./../../home-manager/utils/nixGLWrap.nix { inherit pkgs config; };
|
||||
nixGL = config.lib.nixGL.wrap;
|
||||
in
|
||||
{
|
||||
programs.kitty = {
|
||||
|
|
|
@ -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
|
||||
'';
|
||||
}))
|
Loading…
Reference in a new issue