From 8ef222bf9aa9ee7dd0d689cd1cade3b193139bc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Fri, 2 Dec 2022 13:43:26 +0000 Subject: [PATCH] extract state version --- nixos/common.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nixos/common.nix b/nixos/common.nix index d28e3db7..e310d002 100644 --- a/nixos/common.nix +++ b/nixos/common.nix @@ -1,4 +1,8 @@ -{ config, pkgs, lib, inputs, nixpkgs-nixos-unstable-and-unfree, ... }: { +{ config, pkgs, lib, inputs, nixpkgs-nixos-unstable-and-unfree, ... }: +let + stateVersion = "22.05"; + username = "cyryl"; +in { imports = [ ./common-hardware.nix ./common-services.nix @@ -29,7 +33,7 @@ i18n.defaultLocale = "en_GB.UTF-8"; - users.users.cyryl = { + users.users."${username}" = { isNormalUser = true; extraGroups = [ "adbusers" @@ -94,5 +98,5 @@ ''; }; - system = { stateVersion = "22.05"; }; + system = { inherit stateVersion; }; }