primitive config for Drone,

use rustscheds package for scx,
add nixos bash module
This commit is contained in:
wo2wz 2025-08-01 01:43:18 -04:00
parent a1196deb25
commit e1cccdbfa8
6 changed files with 120 additions and 39 deletions

View file

@ -14,6 +14,7 @@
services.scx = {
enable = true;
package = pkgs.scx.rustscheds;
# use gaming performance scheduler
scheduler = "scx_lavd";
};

78
flake.lock generated
View file

@ -76,11 +76,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1753363396,
"narHash": "sha256-orjQhGQK2Q41pDk0wltZW+FT0a5zufxSqsT95A8lwYI=",
"lastModified": 1753956075,
"narHash": "sha256-rtsO7As/JBQATahVVGH3GIMngjBuH+40bAgwlhhWDjk=",
"owner": "chaotic-cx",
"repo": "nyx",
"rev": "a37600ce98428a6c364a08c62be3333840e50041",
"rev": "131c2fa4b9eff9785c0c680a77689e4b8bbd9b96",
"type": "github"
},
"original": {
@ -182,11 +182,11 @@
]
},
"locked": {
"lastModified": 1753282444,
"narHash": "sha256-QGeWgozKiGBTJrLYnXd9xwOY9HKsm4cFHsU8fopGVnU=",
"lastModified": 1753943136,
"narHash": "sha256-eiEE5SabVcIlGSTRcRyBjmJMaYAV95SJnjy8YSsVeW4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "62975b8e23c4e39599b3303f6e76faa280a02c63",
"rev": "bd82507edd860c453471c46957cbbe3c9fd01b5c",
"type": "github"
},
"original": {
@ -202,11 +202,11 @@
]
},
"locked": {
"lastModified": 1753288231,
"narHash": "sha256-WcMW9yUDfER8kz4NdCaaI/ep0Ef91L+Nf7MetNzHZc4=",
"lastModified": 1753592768,
"narHash": "sha256-oV695RvbAE4+R9pcsT9shmp6zE/+IZe6evHWX63f2Qg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "7b5a978e00273b8676c530c03d315f5b75fae564",
"rev": "fc3add429f21450359369af74c2375cb34a2d204",
"type": "github"
},
"original": {
@ -225,11 +225,11 @@
]
},
"locked": {
"lastModified": 1753257349,
"narHash": "sha256-Zb4528e94DwdUC0rKIX1+EFtkoelggWQakZ/YKemqJ4=",
"lastModified": 1753938227,
"narHash": "sha256-KzjI9khMC2tOL5FClh3sHq8Gax1O5Rw0bH1hvJ3FU3E=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"rev": "e89a3203fbb3a833d7b7777efc13697b6a962cfd",
"rev": "8d1f0004594e0eddc00159ad7666e669a6bcb711",
"type": "github"
},
"original": {
@ -250,11 +250,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1753374784,
"narHash": "sha256-R6vHaUJiehdXSnzZqCOxmtmAnHA4GBOpS/UKydzAI38=",
"lastModified": 1753988617,
"narHash": "sha256-86ffo9yJpQ9HalS1XgZXq9Sg0AMPLuIfskIU67RJwm0=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "da95771a65821bc98118cf3478eb2fc6fbfe035a",
"rev": "c6feaa63d1f36a2c0d7e725666d332c35be4e373",
"type": "github"
},
"original": {
@ -283,11 +283,11 @@
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1752870529,
"narHash": "sha256-23DJk5EfEDCq7Xy1QELcayG0VxbbWpdQ6t7jbhae1Ok=",
"lastModified": 1753983552,
"narHash": "sha256-xnPPjASWt4/u+GmRdrHADBKKSCtIhTFY53CSKM+Xtfk=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "fefc0bc0a71556eb75352e2b611e50eb5d3bf9c2",
"rev": "91b6a111cf228fadaabba706d8f4d155efc63b3a",
"type": "github"
},
"original": {
@ -337,11 +337,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1753250450,
"narHash": "sha256-i+CQV2rPmP8wHxj0aq4siYyohHwVlsh40kV89f3nw1s=",
"lastModified": 1753694789,
"narHash": "sha256-cKgvtz6fKuK1Xr5LQW/zOUiAC0oSQoA9nOISB0pJZqM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fc02ee70efb805d3b2865908a13ddd4474557ecf",
"rev": "dc9637876d0dcc8c9e5e22986b857632effeb727",
"type": "github"
},
"original": {
@ -369,11 +369,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1753345091,
"narHash": "sha256-CdX2Rtvp5I8HGu9swBmYuq+ILwRxpXdJwlpg8jvN4tU=",
"lastModified": 1753749649,
"narHash": "sha256-+jkEZxs7bfOKfBIk430K+tK9IvXlwzqQQnppC2ZKFj4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3ff0e34b1383648053bba8ed03f201d3466f90c9",
"rev": "1f08a4df998e21f4e8be8fb6fbf61d11a1a5076a",
"type": "github"
},
"original": {
@ -385,11 +385,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1753250450,
"narHash": "sha256-i+CQV2rPmP8wHxj0aq4siYyohHwVlsh40kV89f3nw1s=",
"lastModified": 1753694789,
"narHash": "sha256-cKgvtz6fKuK1Xr5LQW/zOUiAC0oSQoA9nOISB0pJZqM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fc02ee70efb805d3b2865908a13ddd4474557ecf",
"rev": "dc9637876d0dcc8c9e5e22986b857632effeb727",
"type": "github"
},
"original": {
@ -401,11 +401,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1753345091,
"narHash": "sha256-CdX2Rtvp5I8HGu9swBmYuq+ILwRxpXdJwlpg8jvN4tU=",
"lastModified": 1753749649,
"narHash": "sha256-+jkEZxs7bfOKfBIk430K+tK9IvXlwzqQQnppC2ZKFj4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3ff0e34b1383648053bba8ed03f201d3466f90c9",
"rev": "1f08a4df998e21f4e8be8fb6fbf61d11a1a5076a",
"type": "github"
},
"original": {
@ -486,11 +486,11 @@
]
},
"locked": {
"lastModified": 1753238793,
"narHash": "sha256-jmQeEpgX+++MEgrcikcwoSiI7vDZWLP0gci7XiWb9uQ=",
"lastModified": 1753930086,
"narHash": "sha256-Os6Ta5zamfAllmQNlvkbGZLHn06zJy3hVXRk+Dy2yMo=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "0ad7ab4ca8e83febf147197e65c006dff60623ab",
"rev": "17b672c10c1798696a516cb879edbc2ebd0f58a4",
"type": "github"
},
"original": {
@ -507,11 +507,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1752986956,
"narHash": "sha256-1AK8+W7d5eNyGRkcWHa+9oIChLJbY6jt7ujSJo+ft4M=",
"lastModified": 1753591727,
"narHash": "sha256-Ow+qyFckroPS4SQFHcFZ8mKh3HIQ2pQdC6DRjiYF9EE=",
"owner": "Gerg-L",
"repo": "spicetify-nix",
"rev": "51ac0aee7e7ee21ca0874b913f07f9004bc9311f",
"rev": "26c488b60360e15db372483d826cec89ac532980",
"type": "github"
},
"original": {
@ -541,11 +541,11 @@
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1753374305,
"narHash": "sha256-aAUulqDP3ift9kg4ApMX/2eZeYNIjgOyW7QfnVcO8Xk=",
"lastModified": 1753979771,
"narHash": "sha256-MdMdQymbivEWWkC5HqeLYtP8FYu0SqiSpiRlyw9Fm3Y=",
"owner": "nix-community",
"repo": "stylix",
"rev": "02bb376d4ce1bf8374114f2cb85f686c41ff17c0",
"rev": "5b81b0c4fbab3517b39d63f493760d33287150ad",
"type": "github"
},
"original": {

View file

@ -60,6 +60,7 @@
nixosConfigurations = {
Swordsmachine = nixosSystem "Swordsmachine";
Earthmover = nixosSystem "Earthmover";
Drone = nixosSystem "Drone";
};
};
}

18
hosts/Drone/default.nix Normal file
View file

@ -0,0 +1,18 @@
{ config, lib, ... }:
{
imports = [
../../common/boot.nix
../../common/locales.nix
../../common/nix.nix
../../common/users.nix
../../modules/nixos/bash.nix
];
networking.hostName = "${hostName}";
environment.defaultPackages = lib.mkForce [];
services.scx.scheduler = lib.mkForce "scx_rusty";
}

View file

@ -0,0 +1,53 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/5d75c750-e4b9-4e52-95e1-f397f2c763f5";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/5d75c750-e4b9-4e52-95e1-f397f2c763f5";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/5d75c750-e4b9-4e52-95e1-f397f2c763f5";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
fileSystems."/swap" =
{ device = "/dev/disk/by-uuid/b909336e-abc4-4b5e-acc4-eac05f6c6148";
fsType = "btrfs";
options = [ "subvol=swap" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

8
modules/nixos/bash.nix Normal file
View file

@ -0,0 +1,8 @@
{ config, ... }:
{
programs.bash.shellAliases = {
switch = "sudo nixos-rebuild switch";
boot = "sudo nixos-rebuild boot";
};
}