Common: set system.configurationRevision

This commit is contained in:
Toast 2023-09-14 23:19:26 +02:00
parent 884590e972
commit da0bd77930
2 changed files with 10 additions and 7 deletions

View file

@ -47,7 +47,7 @@ inputs = {
}; };
}; };
outputs = {nixpkgs, nixpkgs-unstable, agenix, home-manager, home-manager-unstable, nixos-hardware, nix-impermanence, nix-index-db, nix-index-db-unstable, jovian, ... } @inputs: { outputs = { self, nixpkgs, nixpkgs-unstable, agenix, home-manager, home-manager-unstable, nixos-hardware, nix-impermanence, nix-index-db, nix-index-db-unstable, jovian, ... } @inputs: {
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell { devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
name = "Environment for toast's nixos configurations"; name = "Environment for toast's nixos configurations";
@ -67,7 +67,7 @@ outputs = {nixpkgs, nixpkgs-unstable, agenix, home-manager, home-manager-unstabl
nixosConfigurations = { nixosConfigurations = {
Archie = nixpkgs-unstable.lib.nixosSystem { Archie = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { systemPkgs = inputs.nixpkgs-unstable; }; specialArgs = { systemPkgs = inputs.nixpkgs-unstable; flakeSelf = self; };
/* /*
I used to set up nixpkgs in the flake, but doing that made I used to set up nixpkgs in the flake, but doing that made
defining overlays in modules impossible (or at least I could defining overlays in modules impossible (or at least I could
@ -88,7 +88,7 @@ outputs = {nixpkgs, nixpkgs-unstable, agenix, home-manager, home-manager-unstabl
SurfaceGo = nixpkgs.lib.nixosSystem { SurfaceGo = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { systemPkgs = inputs.nixpkgs; }; specialArgs = { systemPkgs = inputs.nixpkgs; flakeSelf = self; };
modules = [ modules = [
agenix.nixosModules.default agenix.nixosModules.default
home-manager.nixosModule home-manager.nixosModule
@ -103,7 +103,7 @@ outputs = {nixpkgs, nixpkgs-unstable, agenix, home-manager, home-manager-unstabl
SteamDeck = nixpkgs-unstable.lib.nixosSystem { SteamDeck = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { systemPkgs = inputs.nixpkgs-unstable; }; specialArgs = { systemPkgs = inputs.nixpkgs-unstable; flakeSelf = self; };
modules = [ modules = [
agenix.nixosModules.default agenix.nixosModules.default
jovian.nixosModules.default jovian.nixosModules.default
@ -119,7 +119,7 @@ outputs = {nixpkgs, nixpkgs-unstable, agenix, home-manager, home-manager-unstabl
Everest = nixpkgs.lib.nixosSystem { Everest = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { systemPkgs = inputs.nixpkgs; }; specialArgs = { systemPkgs = inputs.nixpkgs; flakeSelf = self; };
modules = [ modules = [
agenix.nixosModules.default agenix.nixosModules.default
home-manager.nixosModule home-manager.nixosModule

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, flakeSelf, ... }:
{ {
environment = { environment = {
@ -85,5 +85,8 @@
manually on everything else manually on everything else
*/ */
system.stateVersion = "23.05"; system = {
stateVersion = "23.05";
configurationRevision = flakeSelf.sourceInfo.rev or flakeSelf.sourceInfo.dirtyRev;
};
} }