Move my username to a variable

pull/1/head
Tudor Roman 2023-06-04 13:09:14 +02:00
parent adf3189a1f
commit f550c7983f
4 changed files with 8 additions and 6 deletions

View File

@ -37,6 +37,7 @@
vars = {
stateVersion = "22.05";
emacs = "emacsPgtkNativeComp";
username = "tudor";
};
mkPkgs = system: import nixpkgs {
inherit system;

View File

@ -28,11 +28,11 @@
man.generateCaches = true;
};
users.users.tudor = {
users.users.${vars.username} = {
isNormalUser = true;
extraGroups = [ "wheel" "scanner" "lp" ];
uid = 1000;
home = "/home/tudor";
home = "/home/${vars.username}";
};
system.stateVersion = vars.stateVersion;

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, pkgs, vars, ... }:
{
imports = [ ../_all ];
@ -15,7 +15,7 @@
wsl = {
enable = true;
wslConf.automount.root = "/mnt";
defaultUser = "tudor";
defaultUser = vars.username;
startMenuLaunchers = true;
nativeSystemd = true;
};

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, ...}:
{ config, lib, pkgs, vars, ...}:
let
cfg = config.systemModules.services.web.cgit;
readmeFile = ./cgit-root-readme.md;
logoFile = ./logo.png;
repoDir = "/home/${vars.username}/git/";
configFile = pkgs.writeText "cgitrc" ''
css=/cgit.css
logo=/logo.png
@ -31,7 +32,7 @@ let
snapshots=tar.gz zip
section-from-path=1
scan-path=/home/tudor/git/
scan-path=${repoDir}
'';
in
with lib; {