cleaned up server and laptop home.nix files, along with the homeConfigurations for them

This commit is contained in:
pagedmov
2024-11-07 01:40:48 -05:00
parent 388daff285
commit 50decf03c9
5 changed files with 164 additions and 205 deletions

View File

@@ -36,9 +36,6 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
username = "pagedmov"; username = "pagedmov";
in { in {
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
# Home Manager configurations for each user/machine
homeConfigurations = { homeConfigurations = {
oganessonHome = home-manager.lib.homeManagerConfiguration { oganessonHome = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
@@ -47,7 +44,6 @@
inherit self username inputs; inherit self username inputs;
}; };
# Specific Home Manager config for oganesson
modules = [ modules = [
./hosts/desktop/home.nix ./hosts/desktop/home.nix
./modules/home ./modules/home
@@ -58,21 +54,33 @@
}; };
mercuryHome = home-manager.lib.homeManagerConfiguration { mercuryHome = home-manager.lib.homeManagerConfiguration {
inherit system; inherit pkgs;
pkgs = pkgs; extraSpecialArgs = {
extraSpecialArgs = { inherit self inputs username; }; host = "oganesson";
inherit self username inputs;
};
# Specific Home Manager config for mercury modules = [
configuration = import ./hosts/laptop/home.nix; ./hosts/laptop/home.nix
./modules/home
stylix.homeManagerModules.stylix
nixvim.homeManagerModules.nixvim
nur.nixosModules.nur
];
}; };
xenonHome = home-manager.lib.homeManagerConfiguration { xenonHome = home-manager.lib.homeManagerConfiguration {
inherit system; inherit pkgs;
pkgs = pkgs; extraSpecialArgs = {
extraSpecialArgs = { inherit self inputs username; }; host = "oganesson";
inherit self username inputs;
};
# Specific Home Manager config for xenon modules = [
configuration = import ./hosts/server/home.nix; ./hosts/server/home.nix
./modules/home/servermodule.nix
nixvim.homeManagerModules.nixvim
];
}; };
}; };
@@ -86,7 +94,6 @@
modules = [ modules = [
./hosts/desktop/config.nix ./hosts/desktop/config.nix
./modules/sys ./modules/sys
home-manager.nixosModules.home-manager
stylix.nixosModules.stylix stylix.nixosModules.stylix
nur.nixosModules.nur nur.nixosModules.nur
]; ];
@@ -101,9 +108,7 @@
modules = [ modules = [
./hosts/laptop/config.nix ./hosts/laptop/config.nix
./modules/sys ./modules/sys
home-manager.nixosModules.home-manager
stylix.nixosModules.stylix stylix.nixosModules.stylix
nixvim.nixosModules.nixvim
nur.nixosModules.nur nur.nixosModules.nur
]; ];
}; };
@@ -118,9 +123,7 @@
./hosts/server/config.nix ./hosts/server/config.nix
./modules/sys ./modules/sys
./modules/server ./modules/server
home-manager.nixosModules.home-manager
stylix.nixosModules.stylix stylix.nixosModules.stylix
nixvim.nixosModules.nixvim
nur.nixosModules.nur nur.nixosModules.nur
]; ];
}; };

View File

@@ -1,13 +1,9 @@
{ { username, lib, config, ... }: {
username,
lib,
config,
...
}:
{
home.username = "${username}"; # Replace with your actual username home.username = "${username}"; # Replace with your actual username
home.homeDirectory = "/home/${username}"; # Replace with your actual home directory home.homeDirectory =
home.stateVersion = "24.05"; # Adjust this based on your system's NixOS version "/home/${username}"; # Replace with your actual home directory
home.stateVersion =
"24.05"; # Adjust this based on your system's NixOS version
programs.home-manager.enable = true; programs.home-manager.enable = true;
@@ -16,29 +12,29 @@
homeFiles.enable = true; homeFiles.enable = true;
# modules/home/environment # modules/home/environment
hyprlandConfig.enable = true; hyprlandConfig.enable = true;
autojumpConfig.enable = true; autojumpConfig.enable = true;
stylixHomeConfig.enable = true; stylixHomeConfig.enable = true;
waybarConfig.enable = true; waybarConfig.enable = true;
gtkConfig.enable = true; gtkConfig.enable = true;
spicetifyConfig.enable = true; spicetifyConfig.enable = true;
starshipConfig.enable = true; starshipConfig.enable = true;
# modules/home/programs # modules/home/programs
btopConfig.enable = true; btopConfig.enable = true;
swayncConfig.enable = true; swayncConfig.enable = true;
userPkgs.enable = true; userPkgs.enable = true;
cavaConfig.enable = true; cavaConfig.enable = true;
ezaConfig.enable = true; ezaConfig.enable = true;
firefoxConfig.enable = true; firefoxConfig.enable = true;
fuzzelConfig.enable = true; fuzzelConfig.enable = true;
fzfConfig.enable = true; fzfConfig.enable = true;
gitConfig.enable = true; gitConfig.enable = true;
kittyConfig.enable = true; kittyConfig.enable = true;
yaziConfig.enable = true; yaziConfig.enable = true;
zshConfig.enable = true; zshConfig.enable = true;
passConfig.enable = true; passConfig.enable = true;
batConfig.enable = true; batConfig.enable = true;
# modules/home/scripts # modules/home/scripts
movScripts.enable = true; movScripts.enable = true;
@@ -49,8 +45,8 @@
dconf.settings = { dconf.settings = {
"org/virt-manager/virt-manager/connections" = { "org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"]; autoconnect = [ "qemu:///system" ];
uris = ["qemu:///system"]; uris = [ "qemu:///system" ];
}; };
}; };
} }

View File

@@ -1,93 +1,47 @@
{ { host, pkgs, self, inputs, username, lib, config, ... }: {
host, home.username = "${username}"; # Replace with your actual username
pkgs, home.homeDirectory =
self, "/home/${username}"; # Replace with your actual home directory
inputs, home.stateVersion =
username, "24.05"; # Adjust this based on your system's NixOS version
lib,
config,
...
}: let
nur = config.nur;
in {
imports = [inputs.home-manager.nixosModules.home-manager];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
backupFileExtension = "backup";
extraSpecialArgs = {inherit self inputs host username nur;};
users = {
${username} = {
programs.home-manager.enable = true;
imports = [
inputs.self.outputs.homeManagerModules.default
];
# My custom home-manager modules programs.home-manager.enable = true;
# modules/home/files movOpts = {
homeFiles.enable = true; # modules/home/files
homeFiles.enable = true;
# modules/home/environment # modules/home/environment
hyprlandConfig.enable = true; hyprlandConfig.enable = true;
autojumpConfig.enable = true; autojumpConfig.enable = true;
stylixHomeConfig.enable = true; stylixHomeConfig.enable = true;
waybarConfig.enable = true; waybarConfig.enable = true;
gtkConfig.enable = true; gtkConfig.enable = true;
spicetifyConfig.enable = true; spicetifyConfig.enable = true;
starshipConfig.enable = true; starshipConfig.enable = true;
# modules/home/programs # modules/home/programs
btopConfig.enable = true; btopConfig.enable = true;
swayncConfig.enable = true; swayncConfig.enable = true;
userPkgs.enable = true; userPkgs.enable = true;
cavaConfig.enable = true; cavaConfig.enable = true;
ezaConfig.enable = true; ezaConfig.enable = true;
firefoxConfig.enable = true; firefoxConfig.enable = true;
fuzzelConfig.enable = true; fuzzelConfig.enable = true;
fzfConfig.enable = true; fzfConfig.enable = true;
gitConfig.enable = true; gitConfig.enable = true;
kittyConfig.enable = true; kittyConfig.enable = true;
yaziConfig.enable = true; yaziConfig.enable = true;
zshConfig.enable = true; zshConfig.enable = true;
passConfig.enable = true; passConfig.enable = true;
batConfig.enable = true; batConfig.enable = true;
# modules/home/scripts # modules/home/scripts
movScripts.enable = true; movScripts = {
movScripts.commandScripts.enable = true; enable = true;
movScripts.hyprlandControls.enable = true; commandScripts.enable = true;
movScripts.nixShortcuts.enable = true; hyprlandControls.enable = true;
nixShortcuts.enable = true;
dconf.settings = lib.mkIf config.movOpts.virtConfig.enable {
"org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"];
uris = ["qemu:///system"];
};
};
home = {
username = "${username}";
homeDirectory = "/home/${username}";
stateVersion = "24.05";
};
};
}; };
}; };
users = {
groups.persist = {};
users = {
root.initialPassword = "1234";
${username} = {
isNormalUser = true;
initialPassword = "1234";
shell = pkgs.zsh;
extraGroups = ["wheel" "persist" "libvirtd"];
};
};
};
security.sudo.extraConfig = ''
${username} ALL=(ALL) NOPASSWD: /etc/profiles/per-user/${username}/bin/rebuild
'';
nix.settings.allowed-users = ["${username}"];
} }

View File

@@ -1,75 +1,34 @@
{ { host, pkgs, self, inputs, lib, username, config, ... }: {
host,
pkgs,
self,
inputs,
lib,
username,
config,
...
}: let
nur = config.nur;
movModules = inputs.self.outputs.homeManagerModules.default;
in {
imports = [inputs.home-manager.nixosModules.home-manager];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
backupFileExtension = "backup";
extraSpecialArgs = { inherit self inputs host username nur; };
users = {
${username} = {
programs.home-manager.enable = true;
imports = [ movModules ];
autojumpConfig.enable = true;
btopConfig.enable = true;
starshipConfig.enable = true;
ezaConfig.enable = true;
fzfConfig.enable = true;
gitConfig.enable = true;
yaziConfig.enable = true;
zshConfig.enable = true;
batConfig.enable = true;
userPkgs.enable = true;
movScripts = { home.username = "${username}"; # Replace with your actual username
enable = true; home.homeDirectory =
nixShortcuts.enable = true; "/home/${username}"; # Replace with your actual home directory
commandScripts = { home.stateVersion =
enable = true; "24.05"; # Adjust this based on your system's NixOS version
toolbelt.enable = false;
};
hyprlandControls = {
scheck.enable = true;
};
};
home = { programs.home-manager.enable = true;
username = "${username}";
homeDirectory = "/home/${username}"; movOpts = {
stateVersion = "24.05"; # modules/home/environment
}; autojumpConfig.enable = true;
}; starshipConfig.enable = true;
zshConfig.enable = true;
# modules/home/programs
btopConfig.enable = true;
userPkgs.enable = true;
ezaConfig.enable = true;
fzfConfig.enable = true;
gitConfig.enable = true;
yaziConfig.enable = true;
batConfig.enable = true;
# modules/home/scripts
movScripts = {
enable = true;
commandScripts.enable = true;
hyprlandControls.enable = true;
nixShortcuts.enable = true;
}; };
}; };
users = {
users = {
root.initialPassword = "1234";
${username} = {
isNormalUser = true;
createHome = true;
home = "/home/pagedmov";
homeMode = "755";
initialPassword = "1234";
shell = pkgs.zsh;
extraGroups = [ "wheel" ];
};
jellyfin.extraGroups = [ "users" ];
};
};
security.sudo.extraConfig = ''
${username} ALL=(ALL) NOPASSWD: /etc/profiles/per-user/${username}/bin/rebuild
'';
nix.settings.allowed-users = ["${username}"];
} }

View File

@@ -0,0 +1,47 @@
{
inputs,
nixpkgs,
config,
self,
username,
host,
lib,
...
}: {
imports = [
./environment/starship.nix
./environment/userpkgs.nix
./environment/zshell.nix
./programs/nixvim
./programs/autojump.nix
./programs/bat.nix
./programs/btop.nix
./programs/eza.nix
./programs/fzf.nix
./programs/git.nix
./programs/yazi.nix
./scripts
];
movOpts = {
# ./environment
zshConfig.enable = lib.mkDefault false;
starshipConfig.enable = lib.mkDefault false;
userPkgs.enable = lib.mkDefault false;
# ./programs
autojumpConfig.enable = lib.mkDefault false;
btopConfig.enable = lib.mkDefault false;
ezaConfig.enable = lib.mkDefault false;
fzfConfig.enable = lib.mkDefault false;
gitConfig.enable = lib.mkDefault false;
yaziConfig.enable = lib.mkDefault false;
batConfig.enable = lib.mkDefault false;
# ./scripts
movScripts.enable = lib.mkDefault false;
movScripts.commandScripts.enable = lib.mkDefault false;
movScripts.hyprlandControls.enable = lib.mkDefault false;
movScripts.nixShortcuts.enable = lib.mkDefault false;
};
}