mirror of
https://github.com/semere-meb/dotfiles-nix.git
synced 2026-08-03 10:24:36 +00:00
using dynamic vars now
This commit is contained in:
parent
168633cf07
commit
edbbc0dbc2
5 changed files with 21 additions and 15 deletions
|
|
@ -15,11 +15,13 @@
|
||||||
outputs = { self, nixpkgs, home-manager, ... }:
|
outputs = { self, nixpkgs, home-manager, ... }:
|
||||||
let
|
let
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
|
userVars = import ./vars.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
nabro = lib.nixosSystem {
|
nabro = lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
specialArgs = { inherit userVars; };
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/nabro/configuration.nix
|
./hosts/nabro/configuration.nix
|
||||||
|
|
||||||
|
|
@ -28,9 +30,7 @@
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
|
extraSpecialArgs = { inherit userVars; };
|
||||||
|
|
||||||
|
|
||||||
backupFileExtension = "backup";
|
backupFileExtension = "backup";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, userVars, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.dotfiles.desktop;
|
cfg = config.dotfiles.desktop;
|
||||||
|
|
@ -39,7 +39,7 @@ in
|
||||||
tor-browser
|
tor-browser
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.semere = {
|
home-manager.users."${userVars.username}" = {
|
||||||
programs.foot = {
|
programs.foot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, userVars, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.dotfiles.shell;
|
cfg = config.dotfiles.shell;
|
||||||
|
|
@ -22,19 +22,19 @@ in
|
||||||
opencode
|
opencode
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.semere = {
|
home-manager.users."${userVars.username}" = {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
user = {
|
user = {
|
||||||
name = "Semere M. Mebrahtom";
|
name = userVars.fullName;
|
||||||
email = "semere.meharena1@gmail.com";
|
email = userVars.email;
|
||||||
};
|
};
|
||||||
commit.gpgsign = true;
|
commit.gpgsign = true;
|
||||||
gpg.program = "gpg";
|
gpg.program = "gpg";
|
||||||
};
|
};
|
||||||
signing = {
|
signing = {
|
||||||
key = "451054EEC0D2AFD1741D4E6A7FC937214DF30488";
|
key = userVars.gpgKey;
|
||||||
signByDefault = true;
|
signByDefault = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, userVars, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.dotfiles.user;
|
cfg = config.dotfiles.user;
|
||||||
|
|
@ -9,7 +9,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
users.users.semere = {
|
users.users."${userVars.username}" = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel"
|
||||||
|
|
@ -17,9 +17,9 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.semere = {
|
home-manager.users."${userVars.username}" = {
|
||||||
home.username = "semere";
|
home.username = userVars.username;
|
||||||
home.homeDirectory = "/home/semere";
|
home.homeDirectory = "/home/${userVars.username}";
|
||||||
home.stateVersion = "26.05";
|
home.stateVersion = "26.05";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
6
vars.nix
Normal file
6
vars.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
username = "semere";
|
||||||
|
email = "semere.meharena1@gmail.com";
|
||||||
|
fullName = "Semere M. Mebrahtom";
|
||||||
|
gpgKey = "451054EEC0D2AFD1741D4E6A7FC937214DF30488";
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue