common: move to modules, move some files out, modules: adjust dir structure

This commit is contained in:
wo2wz 2025-10-04 18:32:46 -04:00
parent ed5f8c3ae6
commit 0bc9abc4c0
43 changed files with 86 additions and 83 deletions

View file

@ -1,22 +0,0 @@
{ config, pkgs, lib, ... }:
{
imports = [
./ssh
./boot.nix
./home-manager.nix
./locales.nix
./networking.nix
./nix.nix
./swap.nix
./users.nix
];
environment = {
systemPackages = with pkgs; [ wget ];
# remove default packages
defaultPackages = lib.mkForce [ ];
};
}

View file

@ -1,8 +0,0 @@
{ hostName, config, ... }:
{
networking = {
networkmanager.enable = true;
hostName = "${hostName}";
};
}

View file

@ -1,8 +0,0 @@
{ config, ... }:
{
imports = [
./client.nix
./server.nix
];
}

View file

@ -4,16 +4,13 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../common/ssh/server.nix ../../modules/common
../../common/boot.nix
../../common/locales.nix
../../common/nix.nix
../../common/users.nix
../../modules/nixos/bash.nix ../../modules/nixos/programs/bash.nix
../../modules/nixos/git.nix ../../modules/nixos/programs/git.nix
../../modules/nixos/tailscale.nix ../../modules/nixos/services/openssh.nix
../../modules/nixos/homeserver ../../modules/nixos/services/tailscale.nix
../../modules/nixos/services/homeserver
]; ];
fileSystems = { fileSystems = {
@ -75,15 +72,11 @@
environment.defaultPackages = lib.mkForce []; environment.defaultPackages = lib.mkForce [];
services = { # for cloudflare browser ssh
scx.scheduler = lib.mkForce "scx_rusty"; services.openssh.settings.Macs = [
"hmac-sha2-512"
# for cloudflare browser ssh "hmac-sha2-256"
openssh.settings.Macs = [ ];
"hmac-sha2-512"
"hmac-sha2-256"
];
};
system.stateVersion = "25.05"; system.stateVersion = "25.05";
} }

View file

@ -4,11 +4,9 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../common
../../common/desktop
../../modules/common ../../modules/common
../../modules/nixos ../../modules/nixos
../../modules/nixos/mumble.nix
]; ];
fileSystems = { fileSystems = {

View file

@ -2,9 +2,9 @@
{ {
imports = [ imports = [
../../common/locales.nix ../../modules/common/locales.nix
../../common/nix.nix ../../modules/common/nix.nix
../../common/users.nix ../../modules/common/users.nix
inputs.nixos-avf.nixosModules.avf inputs.nixos-avf.nixosModules.avf
]; ];

View file

@ -4,12 +4,13 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../common
../../common/desktop
../../modules/common ../../modules/common
../../modules/nixos
../../modules/common/niri ../../modules/nixos/programs
../../modules/nixos/programs/niri.nix
../../modules/nixos/services/openssh.nix
../../modules/nixos/services/tailscale.nix
../../modules/nixos/system
inputs.nixos-hardware.nixosModules.dell-xps-15-9570-nvidia inputs.nixos-hardware.nixosModules.dell-xps-15-9570-nvidia
]; ];

View file

@ -1,4 +1,4 @@
{ inputs, config, pkgs, ... }: { config, ... }:
{ {
boot = { boot = {
@ -11,11 +11,4 @@
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
}; };
services.scx = {
enable = true;
package = pkgs.scx.rustscheds;
# use gaming performance scheduler
scheduler = "scx_lavd";
};
} }

View file

@ -0,0 +1,5 @@
{ config, lib, ... }:
{
environment.defaultPackages = lib.mkForce [];
}

View file

@ -1,8 +1,12 @@
{ config, ... }: { config, pkgs, lib, ... }:
{ {
imports = [ imports = [
./stylix.nix ./boot.nix
./yubikey.nix ./default-packages.nix
./locales.nix
./networking.nix
./nix.nix
./users.nix
]; ];
} }

5
modules/common/networking.nix Executable file
View file

@ -0,0 +1,5 @@
{ hostName, config, ... }:
{
networking.hostName = "${hostName}";
}

View file

@ -2,10 +2,8 @@
{ {
imports = [ imports = [
./bash.nix ./programs
./gaming.nix ./services
./kde.nix ./system
# ./niri.nix
./tailscale.nix
]; ];
} }

View file

@ -0,0 +1,11 @@
{ config, ... }:
{
imports = [
./bash.nix
./gaming.nix
./git.nix
./kde.nix
./ssh.nix
];
}

View file

@ -0,0 +1,9 @@
{ config, ... }:
{
imports = [
./mumble.nix
./openssh.nix
./tailscale.nix
];
}

View file

@ -0,0 +1,12 @@
{ config, ... }:
{
imports = [
./desktop.nix
./home-manager.nix
./scx.nix
./stylix.nix
./swap.nix
./yubikey.nix
];
}

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
networking.networkmanager.enable = true;
hardware = { hardware = {
bluetooth = { bluetooth = {
enable = true; enable = true;

View file

@ -0,0 +1,10 @@
{ config, pkgs, ... }:
{
services.scx = {
enable = true;
package = pkgs.scx.rustscheds;
# use gaming performance scheduler
scheduler = "scx_lavd";
};
}