feat: use user and theme attributes

This commit is contained in:
Michael Mandl 2024-07-10 08:17:30 +02:00
parent 428b91c3d5
commit 27b66ec830
Signed by: mandlm
GPG key ID: 088ED38F036C7AF2
6 changed files with 19 additions and 15 deletions

View file

@ -25,7 +25,9 @@
]; ];
extraSpecialArgs = { extraSpecialArgs = {
username = "mandlm"; user = "mandlm";
userName = "Michael Mandl";
userEmail = "mandlm@molez.net";
theme = "dark"; theme = "dark";
}; };
}; };
@ -37,7 +39,9 @@
]; ];
extraSpecialArgs = { extraSpecialArgs = {
username = "mmandl"; user = "mmandl";
userName = "Michael Mandl";
userEmail = "michael.mandl@horsch.com";
theme = "dark"; theme = "dark";
}; };
}; };

View file

@ -1,7 +1,7 @@
{ ... }: { theme, ... }:
let let
theme_name = "Solarized (dark)"; theme_name = "Solarized (${theme})";
in in
{ {
programs = { programs = {

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs, userName, userEmail, ... }:
{ {
programs = { programs = {
@ -7,8 +7,8 @@
git = { git = {
enable = true; enable = true;
userName = "Michael Mandl"; inherit userName;
userEmail = "michael.mandl@horsch.com"; inherit userEmail;
signing = { signing = {
key = "088ED38F036C7AF2"; key = "088ED38F036C7AF2";

View file

@ -1,8 +1,8 @@
{ pkgs, ... }: { pkgs, user, ... }:
{ {
home.username = "mmandl"; home.username = user;
home.homeDirectory = "/home/mmandl"; home.homeDirectory = "/home/${user}";
home.stateVersion = "24.05"; # Please read the comment before changing. home.stateVersion = "24.05"; # Please read the comment before changing.

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs, theme, ... }:
let let
pkg_src = pkgs; pkg_src = pkgs;
in in
@ -160,7 +160,7 @@ in
${builtins.readFile ./telescope.lua } ${builtins.readFile ./telescope.lua }
${builtins.readFile ./themes.lua } ${builtins.readFile ./themes.lua }
vim.opt.background = 'dark' vim.opt.background = '${theme}'
${builtins.readFile ./project-nvim.lua } ${builtins.readFile ./project-nvim.lua }
${builtins.readFile ./dap.lua } ${builtins.readFile ./dap.lua }

View file

@ -1,8 +1,8 @@
{ pkgs, username, ... }: { pkgs, user, ... }:
{ {
home.username = "${username}"; home.username = user;
home.homeDirectory = "/home/${username}"; home.homeDirectory = "/home/${user}";
home.stateVersion = "24.05"; # Please read the comment before changing. home.stateVersion = "24.05"; # Please read the comment before changing.