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

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. # Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ]; # 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, ... }: { config, pkgs, ... }:
{ {
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
../../modules/common.nix
]; ];
# Enable compression
fileSystems."/".options = [ "compress=zstd" ]; fileSystems."/".options = [ "compress=zstd" ];
fileSystems."/home".options = [ "compress=zstd" ]; fileSystems."/home".options = [ "compress=zstd" ];
fileSystems."/nix".options = [ "compress=zstd" "noatime" ]; fileSystems."/nix".options = [ "compress=zstd" "noatime" ];