Added Variables For Username & Hostname in Flake

This commit is contained in:
Tyler Kelley 2024-01-12 01:01:44 -06:00
parent 0237f7ee19
commit e824d34932
3 changed files with 7 additions and 5 deletions

View File

@ -11,6 +11,8 @@
outputs = inputs@{ nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
hostname = "hyprnix";
username = "zaney";
pkgs = import nixpkgs {
inherit system;
config = {
@ -25,7 +27,7 @@
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.zaney = import ./home.nix;
home-manager.users.${username} = import ./home.nix;
}
];
};
@ -35,7 +37,7 @@
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.zaney = import ./home.nix;
home-manager.users.${username} = import ./home.nix;
}
];
};

View File

@ -1,8 +1,8 @@
{ config, pkgs, ... }:
{
home.username = "zaney";
home.homeDirectory = "/home/zaney";
home.username = ${username};
home.homeDirectory = "/home/${username}";
home.stateVersion = "23.11";
home.file.".config/zaney-stinger.mov".source = ./media/zaney-stinger.mov;

View File

@ -40,7 +40,7 @@
};
# Define a user account. Don't forget to set a password with passwd.
users.users.zaney = {
users.users.${username} = {
homeMode = "755";
isNormalUser = true;
description = "Tyler Kelley";