cleaned up server and laptop home.nix files, along with the homeConfigurations for them
This commit is contained in:
41
flake.nix
41
flake.nix
@@ -36,9 +36,6 @@
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
username = "pagedmov";
|
||||
in {
|
||||
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
|
||||
# Home Manager configurations for each user/machine
|
||||
homeConfigurations = {
|
||||
oganessonHome = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
@@ -47,7 +44,6 @@
|
||||
inherit self username inputs;
|
||||
};
|
||||
|
||||
# Specific Home Manager config for oganesson
|
||||
modules = [
|
||||
./hosts/desktop/home.nix
|
||||
./modules/home
|
||||
@@ -58,21 +54,33 @@
|
||||
};
|
||||
|
||||
mercuryHome = home-manager.lib.homeManagerConfiguration {
|
||||
inherit system;
|
||||
pkgs = pkgs;
|
||||
extraSpecialArgs = { inherit self inputs username; };
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = {
|
||||
host = "oganesson";
|
||||
inherit self username inputs;
|
||||
};
|
||||
|
||||
# Specific Home Manager config for mercury
|
||||
configuration = import ./hosts/laptop/home.nix;
|
||||
modules = [
|
||||
./hosts/laptop/home.nix
|
||||
./modules/home
|
||||
stylix.homeManagerModules.stylix
|
||||
nixvim.homeManagerModules.nixvim
|
||||
nur.nixosModules.nur
|
||||
];
|
||||
};
|
||||
|
||||
xenonHome = home-manager.lib.homeManagerConfiguration {
|
||||
inherit system;
|
||||
pkgs = pkgs;
|
||||
extraSpecialArgs = { inherit self inputs username; };
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = {
|
||||
host = "oganesson";
|
||||
inherit self username inputs;
|
||||
};
|
||||
|
||||
# Specific Home Manager config for xenon
|
||||
configuration = import ./hosts/server/home.nix;
|
||||
modules = [
|
||||
./hosts/server/home.nix
|
||||
./modules/home/servermodule.nix
|
||||
nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -86,7 +94,6 @@
|
||||
modules = [
|
||||
./hosts/desktop/config.nix
|
||||
./modules/sys
|
||||
home-manager.nixosModules.home-manager
|
||||
stylix.nixosModules.stylix
|
||||
nur.nixosModules.nur
|
||||
];
|
||||
@@ -101,9 +108,7 @@
|
||||
modules = [
|
||||
./hosts/laptop/config.nix
|
||||
./modules/sys
|
||||
home-manager.nixosModules.home-manager
|
||||
stylix.nixosModules.stylix
|
||||
nixvim.nixosModules.nixvim
|
||||
nur.nixosModules.nur
|
||||
];
|
||||
};
|
||||
@@ -118,9 +123,7 @@
|
||||
./hosts/server/config.nix
|
||||
./modules/sys
|
||||
./modules/server
|
||||
home-manager.nixosModules.home-manager
|
||||
stylix.nixosModules.stylix
|
||||
nixvim.nixosModules.nixvim
|
||||
nur.nixosModules.nur
|
||||
];
|
||||
};
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
{
|
||||
username,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
{ username, lib, config, ... }: {
|
||||
home.username = "${username}"; # Replace with your actual username
|
||||
home.homeDirectory = "/home/${username}"; # Replace with your actual home directory
|
||||
home.stateVersion = "24.05"; # Adjust this based on your system's NixOS version
|
||||
home.homeDirectory =
|
||||
"/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;
|
||||
|
||||
|
||||
@@ -1,30 +1,13 @@
|
||||
{
|
||||
host,
|
||||
pkgs,
|
||||
self,
|
||||
inputs,
|
||||
username,
|
||||
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} = {
|
||||
{ host, pkgs, self, inputs, username, lib, config, ... }: {
|
||||
home.username = "${username}"; # Replace with your actual username
|
||||
home.homeDirectory =
|
||||
"/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;
|
||||
imports = [
|
||||
inputs.self.outputs.homeManagerModules.default
|
||||
];
|
||||
|
||||
# My custom home-manager modules
|
||||
|
||||
movOpts = {
|
||||
# modules/home/files
|
||||
homeFiles.enable = true;
|
||||
|
||||
@@ -54,40 +37,11 @@ in {
|
||||
batConfig.enable = true;
|
||||
|
||||
# modules/home/scripts
|
||||
movScripts.enable = true;
|
||||
movScripts.commandScripts.enable = true;
|
||||
movScripts.hyprlandControls.enable = true;
|
||||
movScripts.nixShortcuts.enable = true;
|
||||
|
||||
dconf.settings = lib.mkIf config.movOpts.virtConfig.enable {
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = ["qemu:///system"];
|
||||
uris = ["qemu:///system"];
|
||||
movScripts = {
|
||||
enable = true;
|
||||
commandScripts.enable = true;
|
||||
hyprlandControls.enable = true;
|
||||
nixShortcuts.enable = true;
|
||||
};
|
||||
};
|
||||
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}"];
|
||||
}
|
||||
|
||||
@@ -1,75 +1,34 @@
|
||||
{
|
||||
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} = {
|
||||
{ host, pkgs, self, inputs, lib, username, config, ... }: {
|
||||
|
||||
home.username = "${username}"; # Replace with your actual username
|
||||
home.homeDirectory =
|
||||
"/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;
|
||||
imports = [ movModules ];
|
||||
|
||||
movOpts = {
|
||||
# modules/home/environment
|
||||
autojumpConfig.enable = true;
|
||||
btopConfig.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;
|
||||
zshConfig.enable = true;
|
||||
batConfig.enable = true;
|
||||
userPkgs.enable = true;
|
||||
|
||||
# modules/home/scripts
|
||||
movScripts = {
|
||||
enable = true;
|
||||
commandScripts.enable = true;
|
||||
hyprlandControls.enable = true;
|
||||
nixShortcuts.enable = true;
|
||||
commandScripts = {
|
||||
enable = true;
|
||||
toolbelt.enable = false;
|
||||
};
|
||||
hyprlandControls = {
|
||||
scheck.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
username = "${username}";
|
||||
homeDirectory = "/home/${username}";
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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}"];
|
||||
}
|
||||
|
||||
47
modules/home/servermodule.nix
Normal file
47
modules/home/servermodule.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user