mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add nix autoUpgrade
This commit is contained in:
parent
03f043cd82
commit
0adc639ae0
3 changed files with 54 additions and 25 deletions
|
|
@ -19,6 +19,9 @@ in {
|
||||||
mods.desktop.gaming.enable = true;
|
mods.desktop.gaming.enable = true;
|
||||||
mods.boot.enable = false;
|
mods.boot.enable = false;
|
||||||
|
|
||||||
|
mods.nix.upgrade.enable = true;
|
||||||
|
mods.nix.clean.enable = true;
|
||||||
|
|
||||||
mods.theme.enable = true;
|
mods.theme.enable = true;
|
||||||
mods.theme.scheme = "woodland";
|
mods.theme.scheme = "woodland";
|
||||||
mods.theme.wallpaper = ./wallpaper.png;
|
mods.theme.wallpaper = ./wallpaper.png;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,15 @@
|
||||||
options.mods.xdg.enable = lib.mkEnableOption "enables xdg settings";
|
options.mods.xdg.enable = lib.mkEnableOption "enables xdg settings";
|
||||||
|
|
||||||
config = lib.mkIf config.mods.xdg.enable {
|
config = lib.mkIf config.mods.xdg.enable {
|
||||||
|
environment.sessionVariables = {
|
||||||
|
XDG_CACHE_HOME = "$HOME/.cache";
|
||||||
|
XDG_CONFIG_DIRS = "/etc/xdg";
|
||||||
|
XDG_CONFIG_HOME = "$HOME/.config";
|
||||||
|
XDG_DATA_DIRS = "/usr/local/share/:/usr/share/";
|
||||||
|
XDG_DATA_HOME = "$HOME/.local/share";
|
||||||
|
XDG_STATE_HOME = "$HOME/.local/state";
|
||||||
|
};
|
||||||
|
|
||||||
xdg = let
|
xdg = let
|
||||||
browser = [ "librewolf.desktop" ];
|
browser = [ "librewolf.desktop" ];
|
||||||
associations = {
|
associations = {
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,47 @@
|
||||||
{ pkgs, lib, config, inputs, system, ... }: {
|
{ pkgs, lib, config, inputs, system, ... }: {
|
||||||
programs.nh = {
|
|
||||||
enable = true;
|
options = {
|
||||||
clean.enable = true;
|
mods.nix.upgrade.enable = lib.mkEnableOption "enables nix auto upgrade";
|
||||||
clean.extraArgs = "--keep-since 4d --keep 3";
|
mods.nix.upgrade.enable = lib.mkEnableOption "enables nix auto cleaning";
|
||||||
flake = "/home/${config.mods.user.name}/.config/home";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
config = {
|
||||||
nix.settings = {
|
|
||||||
substituters = [
|
|
||||||
"https://cache.nixos.org"
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
"https://nixpkgs-unfree.cachix.org"
|
|
||||||
"https://hyprland.cachix.org"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
"nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs="
|
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
system.autoUpgrade = {
|
||||||
inputs.nix-alien.packages.${system}.nix-alien
|
enable = config.mods.nix.upgrade.enable;
|
||||||
colmena
|
flake = inputs.self.outPath;
|
||||||
];
|
flags = [ "--commit-lock-file" "-L" ];
|
||||||
programs.nix-ld.enable = true;
|
dates = "02:00";
|
||||||
|
randomizedDelaySec = "45min";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.nh = {
|
||||||
|
enable = true;
|
||||||
|
clean.enable = config.mods.nix.clean.enable;
|
||||||
|
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||||
|
flake = inputs.self.outPath;
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
nix.settings = {
|
||||||
|
substituters = [
|
||||||
|
"https://cache.nixos.org"
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://nixpkgs-unfree.cachix.org"
|
||||||
|
"https://hyprland.cachix.org"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
"nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs="
|
||||||
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
inputs.nix-alien.packages.${system}.nix-alien
|
||||||
|
colmena
|
||||||
|
];
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue