mirror of
https://github.com/nmasur/dotfiles
synced 2025-11-17 05:12:42 +00:00
fix rebuilds and broken packages after update
This commit is contained in:
@@ -68,7 +68,8 @@ lib
|
|||||||
inputs.nix2vim.overlay
|
inputs.nix2vim.overlay
|
||||||
inputs.zellij-switch.overlays.default
|
inputs.zellij-switch.overlays.default
|
||||||
inputs.helix.overlays.default
|
inputs.helix.overlays.default
|
||||||
] ++ (importOverlays ../overlays);
|
]
|
||||||
|
++ (importOverlays ../overlays);
|
||||||
|
|
||||||
# System types to support.
|
# System types to support.
|
||||||
supportedSystems = [
|
supportedSystems = [
|
||||||
@@ -97,7 +98,10 @@ lib
|
|||||||
system:
|
system:
|
||||||
import inputs.nixpkgs {
|
import inputs.nixpkgs {
|
||||||
inherit system overlays;
|
inherit system overlays;
|
||||||
config.permittedInsecurePackages = [ "litestream-0.3.13" ];
|
config.permittedInsecurePackages = [
|
||||||
|
"litestream-0.3.13"
|
||||||
|
"electron-36.9.5"
|
||||||
|
];
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -130,7 +134,8 @@ lib
|
|||||||
];
|
];
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit colorscheme;
|
inherit colorscheme;
|
||||||
} // specialArgs;
|
}
|
||||||
|
// specialArgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
buildNixos =
|
buildNixos =
|
||||||
@@ -152,8 +157,10 @@ lib
|
|||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit colorscheme;
|
inherit colorscheme;
|
||||||
} // specialArgs;
|
}
|
||||||
} // homeModule.home-manager;
|
// specialArgs;
|
||||||
|
}
|
||||||
|
// homeModule.home-manager;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -178,8 +185,10 @@ lib
|
|||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit colorscheme;
|
inherit colorscheme;
|
||||||
} // specialArgs;
|
}
|
||||||
} // homeModule.home-manager;
|
// specialArgs;
|
||||||
|
}
|
||||||
|
// homeModule.home-manager;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -222,12 +231,15 @@ lib
|
|||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit colorscheme;
|
inherit colorscheme;
|
||||||
} // specialArgs;
|
}
|
||||||
} // homeModule.home-manager;
|
// specialArgs;
|
||||||
|
}
|
||||||
|
// homeModule.home-manager;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
} // specialArgs;
|
}
|
||||||
|
// specialArgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
pkgs.writeShellScriptBin "rebuild" ''
|
pkgs.writeShellScriptBin "rebuild" ''
|
||||||
echo ${pkgs.system}
|
echo ${pkgs.stdenv.hostPlatform.system}
|
||||||
SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"}
|
SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"}
|
||||||
if [ "$SYSTEM" == "darwin" ]; then
|
if [ "$SYSTEM" == "darwin" ]; then
|
||||||
sudo darwin-rebuild switch --flake ${builtins.toString ../../../../.}
|
sudo darwin-rebuild switch --flake ${builtins.toString ../../../../.}
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ in
|
|||||||
if terminal == pkgs.wezterm then
|
if terminal == pkgs.wezterm then
|
||||||
"start --class com.noah.aerc -- aerc"
|
"start --class com.noah.aerc -- aerc"
|
||||||
else
|
else
|
||||||
"--class=com.noah.aerc -e=aerc";
|
"--class=com.noah.aerc -e aerc";
|
||||||
in
|
in
|
||||||
"exec ${
|
"exec ${
|
||||||
# Don't name the script `aerc` or it will affect grep
|
# Don't name the script `aerc` or it will affect grep
|
||||||
|
|||||||
@@ -29,6 +29,18 @@ in
|
|||||||
doas nixos-rebuild switch --flake ${config.nmasur.presets.programs.dotfiles.path}
|
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
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,6 @@ in
|
|||||||
|
|
||||||
# Broken on 2023-12-11
|
# Broken on 2023-12-11
|
||||||
# https://forum.obsidian.md/t/electron-25-is-now-eol-please-upgrade-to-a-newer-version/72878/8
|
# 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" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -214,9 +214,9 @@ in
|
|||||||
cfg.commands.lockScreen != null
|
cfg.commands.lockScreen != null
|
||||||
) "exec ${cfg.commands.lockScreen}";
|
) "exec ${cfg.commands.lockScreen}";
|
||||||
"${modifier}+Mod1+h" =
|
"${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" =
|
"${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
|
# Window options
|
||||||
"${modifier}+q" = "kill";
|
"${modifier}+q" = "kill";
|
||||||
|
|||||||
Reference in New Issue
Block a user