Auto-upgrade

This commit is contained in:
Daan Vanoverloop 2023-07-01 13:04:46 +02:00
parent d7a08d5f19
commit e81bf05078
3 changed files with 18 additions and 13 deletions

View File

@ -6,20 +6,25 @@
};
outputs = inputs@{ self, nixpkgs, home-manager }:
let
homeconfig = {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.daan = import ./modules/home;
};
common-gui-modules = [
./modules/common.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.daan = import ./modules/home;
}
];
# common-server-modules = [
# ];
in
{
nixosConfigurations.danacus-yoga = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./systems/yoga/configuration.nix
home-manager.nixosModules.home-manager
homeconfig
];
] ++ common-gui-modules;
};
};
}

View File

@ -118,6 +118,10 @@
};
};
system.autoUpgrade.enable = true;
system.autoUpgrade.flake = "/home/daan/nixconfig/nixos#danacus-yoga";
system.autoUpgrade.flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];

View File

@ -1,15 +1,11 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../../modules/common.nix
];
# Enable compression
fileSystems."/".options = [ "compress=zstd" ];
fileSystems."/home".options = [ "compress=zstd" ];
fileSystems."/nix".options = [ "compress=zstd" "noatime" ];