separated out the bits of my config so I can have two computers

This commit is contained in:
2026-07-25 03:58:23 -05:00
parent e27621c910
commit fa292da0f0
5 changed files with 80 additions and 40 deletions
+10
View File
@@ -0,0 +1,10 @@
{ ... }:
{
imports = [
./configuration.nix
./artemis-hardware-configuration.nix
];
networking.hostName = "artemis";
}
+10
View File
@@ -0,0 +1,10 @@
{ ... }:
{
imports = [
./configuration.nix
./athena-hardware-configuration.nix
];
networking.hostName = "athena";
}
+26 -20
View File
@@ -5,19 +5,12 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
# Use latest kernel. # Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_zen; boot.kernelPackages = pkgs.linuxPackages_zen;
networking.hostName = "artemis"; # Define your hostname.
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary # Configure network proxy if necessary
@@ -83,22 +76,31 @@
}; };
musnix.enable = true; musnix.enable = true;
musnix.kernel.realtime = false; # force non-RT while we tune everything else
musnix.rtirq.enable = true; # IRQ thread priority tuning — helps USB audio specifically
musnix.rtirq.nameList = "snd usb"; # prioritize sound + USB IRQs
# realtime audio shenanigans # realtime audio shenanigans
security.pam.loginLimits = [ security.pam.loginLimits = [
{ {
domain = "@audio"; domain = "@audio";
type = "-"; type = "-";
item = "rtprio"; item = "rtprio";
value = "95"; value = "95";
} }
{ {
domain = "@audio"; domain = "@audio";
type = "-"; type = "-";
item = "memlock"; item = "memlock";
value = "unlimited"; value = "unlimited";
} }
]; ];
systemd.user.services.pipewire.serviceConfig.CPUAffinity = "8-15";
systemd.user.services.wireplumber.serviceConfig.CPUAffinity = "8-15";
systemd.services.rtkit-daemon.serviceConfig.CPUAffinity = "8-15";
programs.nix-ld.enable = true;
# Enable touchpad support (enabled default in most desktopManager). # Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true; # services.xserver.libinput.enable = true;
@@ -132,6 +134,7 @@
hydrapaper hydrapaper
nextcloud-client nextcloud-client
fastfetch fastfetch
epson-escpr2
]; ];
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
@@ -158,6 +161,9 @@
}) })
]; ];
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1235", ATTR{power/control}="on"
'';
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
# services.openssh.enable = true; # services.openssh.enable = true;
+33 -19
View File
@@ -15,29 +15,43 @@
outputs = { self, nixpkgs, home-manager, nix-flatpak, musnix, ... }: outputs = { self, nixpkgs, home-manager, nix-flatpak, musnix, ... }:
let let
system = "x86_64-linux"; system = "x86_64-linux";
commonModules = [
musnix.nixosModules.musnix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.cybrneko = { pkgs, ... }: {
imports = [
nix-flatpak.homeManagerModules.nix-flatpak
./home.nix
./users/cybrneko.nix
];
};
}
];
in { in {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { nixosConfigurations = {
inherit system; artemis = nixpkgs.lib.nixosSystem {
inherit system;
modules = [ modules = [
./configuration.nix ./artemis.nix
] ++ commonModules;
};
musnix.nixosModules.musnix athena = nixpkgs.lib.nixosSystem {
inherit system;
home-manager.nixosModules.home-manager modules = [
./athena.nix
{ ] ++ commonModules;
home-manager.useGlobalPkgs = true; };
home-manager.useUserPackages = true;
home-manager.users.cybrneko = { pkgs, ... }: {
imports = [
nix-flatpak.homeManagerModules.nix-flatpak
./home.nix
./users/cybrneko.nix
];
};
}
];
}; };
}; };
} }