updates + remove factorio + disable gpt4all (broken)

This commit is contained in:
2024-10-15 23:20:26 -04:00
parent d96d1e2367
commit fddb34888a
8 changed files with 83 additions and 69 deletions

View File

@@ -46,12 +46,32 @@
homeDirectory = "/home/${username}";
hostname = nixpkgs.lib.strings.removeSuffix "\n" (builtins.readFile /etc/hostname);
pkgs = import nixpkgs { };
# stolen from: https://stackoverflow.com/a/42398526
optimizeWithFlags =
pkg: flags:
pkgs.lib.overrideDerivation pkg (
old:
let
newflags = pkgs.lib.foldl' (acc: x: "${acc} ${x}") "" flags;
oldflags = if (pkgs.lib.hasAttr "NIX_CFLAGS_COMPILE" old) then "${old.NIX_CFLAGS_COMPILE}" else "";
in
{
NIX_CFLAGS_COMPILE = "${oldflags} ${newflags}";
stdenv = pkgs.clang19Stdenv;
}
);
in
{
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs username homeDirectory;
inherit
inputs
username
homeDirectory
optimizeWithFlags
;
};
modules = [
./system-${hostname}.nix