1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 11:37:44 +00:00

Improve: Don't hardcode username for HM

This commit is contained in:
RGBCube 2023-05-06 16:21:30 +03:00
parent 812b7b53a1
commit 11c6bc5bb1
6 changed files with 5 additions and 7 deletions

View file

@ -32,7 +32,6 @@
with { with {
hostName = builtins.baseNameOf configDirectory; hostName = builtins.baseNameOf configDirectory;
hostPlatform = import (configDirectory + "/platform.nix"); hostPlatform = import (configDirectory + "/platform.nix");
userName = import (configDirectory + "/username.nix");
}; };
{ {
@ -46,7 +45,7 @@
}; };
# Helper function for DRY. # Helper function for DRY.
homeManagerConfiguration = attrs: { homeManagerConfiguration = userName: attrs: {
home-manager.users.${userName} = attrs; home-manager.users.${userName} = attrs;
}; };
}; };

View file

@ -19,6 +19,6 @@
// //
(homeManagerConfiguration { (homeManagerConfiguration "nixos" {
home.stateVersion = "22.11"; home.stateVersion = "22.11";
}) })

View file

@ -1,6 +1,6 @@
{ homeManagerConfiguration, ... }: { homeManagerConfiguration, ... }:
homeManagerConfiguration { homeManagerConfiguration "nixos" {
programs.git.enable = true; programs.git.enable = true;
programs.git = { programs.git = {
userName = "RGBCube"; userName = "RGBCube";

View file

@ -8,7 +8,7 @@
// //
(homeManagerConfiguration { (homeManagerConfiguration "nixos" {
programs.neovim.enable = true; programs.neovim.enable = true;
programs.neovim = { programs.neovim = {
defaultEditor = true; defaultEditor = true;

View file

@ -1,6 +1,6 @@
{ homeManagerConfiguration, ... }: { homeManagerConfiguration, ... }:
homeManagerConfiguration { homeManagerConfiguration "nixos" {
programs.nushell.enable = true; programs.nushell.enable = true;
programs.nushell = { programs.nushell = {
configFile.source = ./config.nu; configFile.source = ./config.nu;

View file

@ -1 +0,0 @@
"nixos"