fix rebuilds and broken packages after update

This commit is contained in:
Noah Masur
2025-11-15 10:40:33 -05:00
parent 5c922310f5
commit e4a8ef15ce
6 changed files with 39 additions and 15 deletions

View File

@@ -68,7 +68,8 @@ lib
inputs.nix2vim.overlay
inputs.zellij-switch.overlays.default
inputs.helix.overlays.default
] ++ (importOverlays ../overlays);
]
++ (importOverlays ../overlays);
# System types to support.
supportedSystems = [
@@ -97,7 +98,10 @@ lib
system:
import inputs.nixpkgs {
inherit system overlays;
config.permittedInsecurePackages = [ "litestream-0.3.13" ];
config.permittedInsecurePackages = [
"litestream-0.3.13"
"electron-36.9.5"
];
config.allowUnfree = true;
}
);
@@ -130,7 +134,8 @@ lib
];
extraSpecialArgs = {
inherit colorscheme;
} // specialArgs;
}
// specialArgs;
};
buildNixos =
@@ -152,8 +157,10 @@ lib
home-manager = {
extraSpecialArgs = {
inherit colorscheme;
} // specialArgs;
} // homeModule.home-manager;
}
// specialArgs;
}
// homeModule.home-manager;
}
];
};
@@ -178,8 +185,10 @@ lib
home-manager = {
extraSpecialArgs = {
inherit colorscheme;
} // specialArgs;
} // homeModule.home-manager;
}
// specialArgs;
}
// homeModule.home-manager;
}
];
};
@@ -222,12 +231,15 @@ lib
home-manager = {
extraSpecialArgs = {
inherit colorscheme;
} // specialArgs;
} // homeModule.home-manager;
}
// specialArgs;
}
// homeModule.home-manager;
}
];
specialArgs = {
} // specialArgs;
}
// specialArgs;
};
}

View File

@@ -1,7 +1,7 @@
{ pkgs, ... }:
pkgs.writeShellScriptBin "rebuild" ''
echo ${pkgs.system}
echo ${pkgs.stdenv.hostPlatform.system}
SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"}
if [ "$SYSTEM" == "darwin" ]; then
sudo darwin-rebuild switch --flake ${builtins.toString ../../../../.}

View File

@@ -214,7 +214,7 @@ in
if terminal == pkgs.wezterm then
"start --class com.noah.aerc -- aerc"
else
"--class=com.noah.aerc -e=aerc";
"--class=com.noah.aerc -e aerc";
in
"exec ${
# Don't name the script `aerc` or it will affect grep

View File

@@ -29,6 +29,18 @@ in
doas nixos-rebuild switch --flake ${config.nmasur.presets.programs.dotfiles.path}
'';
};
rebuildNixosAndPause = lib.mkOption {
type = lib.types.package;
default = pkgs.writeShellScriptBin "rebuild-nixos-pause" ''
${lib.getExe cfg.commands.rebuildNixos} || read
'';
};
rebuildHomeAndPause = lib.mkOption {
type = lib.types.package;
default = pkgs.writeShellScriptBin "rebuild-home-pause" ''
${lib.getExe cfg.commands.rebuildHome} || read
'';
};
};
};

View File

@@ -22,6 +22,6 @@ in
# Broken on 2023-12-11
# https://forum.obsidian.md/t/electron-25-is-now-eol-please-upgrade-to-a-newer-version/72878/8
# insecurePackages = [ "electron-25.9.0" ];
# allowInsecurePackages = [ "electron-36.9.5" ];
};
}

View File

@@ -214,9 +214,9 @@ in
cfg.commands.lockScreen != null
) "exec ${cfg.commands.lockScreen}";
"${modifier}+Mod1+h" =
''exec --no-startup-id ${lib.getExe cfg.terminal} -e="${pkgs.home-manager}/bin/home-manager switch --flake ${config.nmasur.presets.programs.dotfiles.path}#''${hostname} || read" '';
''exec --no-startup-id ${lib.getExe cfg.terminal} -e "${lib.getExe config.nmasur.presets.programs.nixpkgs.commands.rebuildHome} '';
"${modifier}+Mod1+r" =
"exec --no-startup-id ${lib.getExe cfg.terminal} -e=\'doas nixos-rebuild switch --flake ${config.nmasur.presets.programs.dotfiles.path} || read\'";
"exec --no-startup-id ${lib.getExe cfg.terminal} -e ${lib.getExe config.nmasur.presets.programs.nixpkgs.commands.rebuildNixos}";
# Window options
"${modifier}+q" = "kill";