started work on integrating new module patterns into server config

This commit is contained in:
pagedMov
2024-11-02 11:42:31 -04:00
parent 64af69bcc5
commit 2bb66a88bb
5 changed files with 97 additions and 55 deletions

View File

@@ -102,11 +102,11 @@
xenon = nixpkgs.lib.nixosSystem { xenon = nixpkgs.lib.nixosSystem {
specialArgs = { specialArgs = {
host = "xenon"; host = "xenon";
inherit self inputs scheme wallpaper username; inherit self inputs username;
}; };
modules = [ modules = [
./hosts/server ./hosts/server/config.nix
./modules ./modules/sys
stylix.nixosModules.stylix stylix.nixosModules.stylix
nixvim.nixosModules.nixvim nixvim.nixosModules.nixvim
nur.nixosModules.nur nur.nixosModules.nur

28
hosts/server/config.nix Normal file
View File

@@ -0,0 +1,28 @@
{
pkgs,
username,
...
}: {
imports = [
./hardware.nix
./home.nix
];
nixSettings.enable = true;
networkModule.enable = true;
bootLoader.enable = true;
issue.enable = true;
sysPkgs.enable = true;
sysProgs.enable = true;
sysServices.enable = true;
environment = {
variables = {
PATH = "${pkgs.clang-tools}/bin:$PATH";
TERM = "kitty";
};
shells = with pkgs; [
zsh
bash
];
};
}

View File

@@ -1,15 +0,0 @@
{
host,
inputs,
username,
nur,
pkgs,
self,
...
}: {
imports = [
./../../modules/server
./settings.nix
./hardware.nix
];
}

66
hosts/server/home.nix Normal file
View File

@@ -0,0 +1,66 @@
{
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;
ezaConfig.enable = true;
fzfConfig.enable = true;
gitConfig.enable = true;
yaziConfig.enable = true;
zshConfig.enable = true;
batConfig.enable = true;
movScripts = {
enable = true;
nixShortcuts.enable = true;
commandScripts = {
enable = true;
toolbelt.enable = false;
};
};
home = {
username = "${username}";
homeDirectory = "/home/${username}";
stateVersion = "24.05";
};
};
};
};
users = {
users = {
root.initialPassword = "1234";
${username} = {
isNormalUser = true;
initialPassword = "1234";
shell = pkgs.zsh;
extraGroups = [ "wheel" ];
};
};
};
security.sudo.extraConfig = ''
${username} ALL=(ALL) NOPASSWD: /etc/profiles/per-user/${username}/bin/rebuild
'';
nix.settings.allowed-users = ["${username}"];
}

View File

@@ -1,37 +0,0 @@
{
pkgs,
username,
...
}: {
system.stateVersion = "24.05";
nixpkgs.config.allowUnfree = true;
nix = {
settings = {
auto-optimise-store = true;
experimental-features = ["nix-command" "flakes"];
substituters = ["https://nix-gaming.cachix.org"];
};
};
networking = {
networkmanager.enable = true;
hostName = "xenon";
firewall = {
enable = true;
};
};
environment = {
variables = {
PATH = "${pkgs.clang-tools}/bin:$PATH";
};
shells = with pkgs; [
zsh
bash
];
};
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
}