diff --git a/nixos/flake.nix b/nixos/flake.nix index 3429bb1..94b5ec2 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -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; }; }; } diff --git a/nixos/modules/common.nix b/nixos/modules/common.nix index 43f7204..8a5c0a6 100644 --- a/nixos/modules/common.nix +++ b/nixos/modules/common.nix @@ -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 = [ ... ]; diff --git a/nixos/systems/yoga/configuration.nix b/nixos/systems/yoga/configuration.nix index d3ba94f..564c476 100644 --- a/nixos/systems/yoga/configuration.nix +++ b/nixos/systems/yoga/configuration.nix @@ -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" ];