[NODES] New node, goliath.

This commit is contained in:
Kat Inskip 2023-04-16 08:43:42 -07:00
parent 3979de8a15
commit 572dd0e4db
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
31 changed files with 303 additions and 135 deletions

90
flake.lock generated
View file

@ -2,17 +2,18 @@
"nodes": {
"agenix": {
"inputs": {
"darwin": "darwin_2",
"nixpkgs": [
"ragenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1673301561,
"narHash": "sha256-gRUWHbBAtMuPDJQXotoI8u6+3DGBIUZHkyQWpIv7WpM=",
"lastModified": 1677126346,
"narHash": "sha256-4s+PPGC1M07QsPyeye5drc2JLa1lhDnCV3XAsG8+pH4=",
"owner": "ryantm",
"repo": "agenix",
"rev": "42d371d861a227149dc9a7e03350c9ab8b8ddd68",
"rev": "c2a71c83c70844c5e31db69347e86af080bcdad0",
"type": "github"
},
"original": {
@ -24,11 +25,11 @@
"arcexprs": {
"flake": false,
"locked": {
"lastModified": 1675450557,
"narHash": "sha256-0Syp+pnuTCjAM9aJAX3DIt6qbAvp/wNeoaGeBn5zmEM=",
"lastModified": 1680285462,
"narHash": "sha256-iuDi6MUfLxGYQUgpy5x7HBDIGf8dnPGMkYs/9qujmyE=",
"owner": "arcnmx",
"repo": "nixexprs",
"rev": "4d4f3a24770be3e60b69cfc191b67f7a1ecbd6a8",
"rev": "c425430b7c084e154a6ce56b496d4d04f6f60c68",
"type": "github"
},
"original": {
@ -44,6 +45,29 @@
"nixpkgs"
]
},
"locked": {
"lastModified": 1680266963,
"narHash": "sha256-IW/lzbUCOcldLHWHjNSg1YoViDnZOmz0ZJL7EH9OkV8=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "99d4187d11be86b49baa3a1aec0530004072374f",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"darwin_2": {
"inputs": {
"nixpkgs": [
"ragenix",
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1673295039,
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
@ -126,11 +150,11 @@
]
},
"locked": {
"lastModified": 1675462931,
"narHash": "sha256-JiOUSERBtA1lN/s9YTKGZoZ3XUicHDwr+C8swaPSh3M=",
"lastModified": 1680667162,
"narHash": "sha256-2vgxK4j42y73S3XB2cThz1dSEyK9J9tfu4mhuEfAw68=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e2c1756e3ae001ca8696912016dd31cb1503ccf3",
"rev": "440faf5ae472657ef2d8cc7756d77b6ab0ace68d",
"type": "github"
},
"original": {
@ -173,11 +197,11 @@
]
},
"locked": {
"lastModified": 1674962474,
"narHash": "sha256-qEXdgW5fnMSdQwP1zQYa0fVtI0f3G1f2qNRjUEherCs=",
"lastModified": 1679224439,
"narHash": "sha256-QkvcuC4b67FUkkxlMsLTMPbwoD7yZr0UvJpu6jkFuLo=",
"owner": "Mic92",
"repo": "nix-index-database",
"rev": "a385f6192f5471c4cebeeb0d2e966b5ccf123df5",
"rev": "2f5e6e915d70c04d673a8930f94591595c73eb84",
"type": "github"
},
"original": {
@ -188,11 +212,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1676908974,
"narHash": "sha256-o7sJTBeumorVIM/b1b/Q4q+WJn8Rou5kx8DEBbKOZJI=",
"lastModified": 1680876084,
"narHash": "sha256-eP9yxP0wc7XuVaODugh+ajgbFGaile2O1ihxiLxOuvU=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "157e1e4b127b5cb37822be247e8ec37a7f475270",
"rev": "3006d2860a6ed5e01b0c3e7ffb730e9b293116e2",
"type": "github"
},
"original": {
@ -203,11 +227,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1675454231,
"narHash": "sha256-5rgcWq1nFWlbR3NsLqY7i/7358uhkSeMQJ/LEHk3BWA=",
"lastModified": 1680758185,
"narHash": "sha256-sCVWwfnk7zEX8Z+OItiH+pcSklrlsLZ4TJTtnxAYREw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "06999209d7a0043d4372e38f57cffae00223d592",
"rev": "0e19daa510e47a40e06257e205965f3b96ce0ac9",
"type": "github"
},
"original": {
@ -220,11 +244,11 @@
"pypi-deps-db": {
"flake": false,
"locked": {
"lastModified": 1675544670,
"narHash": "sha256-CV3qfT4CdMR9CbyPmbJXMHNgLK0p+62nwM2/yF8QHS0=",
"lastModified": 1680985995,
"narHash": "sha256-S+NdGu68oxxoQv1doFutV0z6RtGFGJflW+IQrMmi618=",
"owner": "DavHau",
"repo": "pypi-deps-db",
"rev": "f822ecb6e8e27ac4e1c34218536658d6be0da51f",
"rev": "639d6de67d4b1d2f73f7c1a471d312474c5695a8",
"type": "github"
},
"original": {
@ -245,11 +269,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1675293936,
"narHash": "sha256-xaObOxlMiZ8noXbXWfoUJrCjVZ8oc9HBblc/MeCq7fc=",
"lastModified": 1677625082,
"narHash": "sha256-62xmRPfjZgDn8AgEhb6eRoJrTxGeM8HfhfF+PkJokok=",
"owner": "yaxitech",
"repo": "ragenix",
"rev": "325733b734aa4cc4d6b19f1169e6672cad4128ca",
"rev": "6f2dacf3d6af36228a8fad3b136990a6b6dfe30b",
"type": "github"
},
"original": {
@ -292,11 +316,11 @@
]
},
"locked": {
"lastModified": 1673662873,
"narHash": "sha256-/YOtiDKPUXKKpIhsAds11llfC42ScGW27bbHnNZebco=",
"lastModified": 1676687290,
"narHash": "sha256-DP0CJ7qtUXf+mmMglJL1yANizzV1O4UfQ9NrKgy7O04=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "90163bbbadce526f8b248a5fe545b06c59597108",
"rev": "bdccd5e973d45159f7d13f7c65a4271dc02cf6d4",
"type": "github"
},
"original": {
@ -392,11 +416,11 @@
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"lastModified": 1680946745,
"narHash": "sha256-KqGlwg9UTDsFBZZB8wzXgMnc8XQm95LtSbFvBsnqkPI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"rev": "946da791763db1c306b86a8bd3828bf5814a1247",
"type": "github"
},
"original": {
@ -418,11 +442,11 @@
]
},
"locked": {
"lastModified": 1675351082,
"narHash": "sha256-4Oi4k4Qp1vOvKoACHDcz0xiVj7DuMaCL57fP3W77eA0=",
"lastModified": 1680542705,
"narHash": "sha256-PBxB4VDO0sG0mW/xRtyoWaX+VvtC6N58kosSGvNB8NQ=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "52cadf92e1bfdef235d5cd77b9a4b2ab848baa8a",
"rev": "900bcf15600b841362f9549a5714922e029d8aef",
"type": "github"
},
"original": {

View file

@ -14,8 +14,9 @@
imports;
dirImports = wrapImports tree.prev;
in
tree.prev
dirImports
// {
user = tree.prev.user;
common = {
imports = with tree.prev; [
base16
@ -27,6 +28,7 @@ in
imports = with dirImports; [
gui
wezterm
vscodium
gpg
];
};

31
kat/gnome/dconf.nix Normal file
View file

@ -0,0 +1,31 @@
{pkgs, ...}: {
dconf = {
enable = true;
settings = {
"org/gnome/shell" = {
favorite-apps = [
"brave-browser.desktop"
"thunderbird.desktop"
"nheko.desktop"
"discord.desktop"
"signal-desktop.desktop"
"org.telegram.desktop.desktop"
"codium.desktop"
"obsidian.desktop"
"org.wezfurlong.wezterm.desktop"
"spotify.desktop"
"steam.desktop"
"org.gnome.Nautilus.desktop"
"bitwarden.desktop"
];
};
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
enable-hot-corners = false;
};
"org/gnome/desktop/wm/preferences" = {
workspace-names = ["Main"];
};
};
};
}

35
kat/gnome/extensions.nix Normal file
View file

@ -0,0 +1,35 @@
{pkgs, ...}: {
dconf = {
settings = {
"org/gnome/shell" = {
disable-user-extensions = false;
# `gnome-extensions list` for a list
enabled-extensions = [
"user-theme@gnome-shell-extensions.gcampax.github.com"
"trayIconsReloaded@selfmade.pl"
"Vitals@CoreCoding.com"
"dash-to-panel@jderose9.github.com"
"space-bar@luchrioh"
"date-menu-formatter@marcinjakubowski.github.com"
];
};
"org/gnome/shell/extensions/date-menu-formatter" = {
pattern = "y-MM-dd kk:mm XXX";
"font-size" = "12";
};
"org/gnome/shell/extensions/vitals" = {
"hot-sensors" = ["_memory_usage_" "_system_load_1m_" "__network-rx_max__" "_temperature_k10temp_tctl_"];
};
};
};
home.packages = with pkgs.gnomeExtensions; [
space-bar
user-themes
tray-icons-reloaded
vitals
dash-to-panel
date-menu-formatter
];
}

33
kat/gnome/gtk.nix Normal file
View file

@ -0,0 +1,33 @@
{pkgs, ...}: {
gtk = {
enable = true;
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
theme = {
name = "palenight";
package = pkgs.palenight-theme;
};
cursorTheme = {
name = "Numix-Cursor";
package = pkgs.numix-cursor-theme;
};
gtk3.extraConfig = {
Settings = ''
gtk-application-prefer-dark-theme=1
'';
};
gtk4.extraConfig = {
Settings = ''
gtk-application-prefer-dark-theme=1
'';
};
};
home.sessionVariables.GTK_THEME = "palenight";
}

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: {
{pkgs, ...}: {
home.packages = with pkgs; [
# Password manager
bitwarden
@ -10,7 +10,7 @@
# Mail
thunderbird
# Music
# spotify
spotify
playerctl
# Chat
discord
@ -18,7 +18,6 @@
tdesktop # Telegram
dino # XMPP
signal-desktop
element-desktop
mumble-develop
# IDEs
jetbrains.idea-community

View file

@ -9,6 +9,7 @@
"wheel"
"video"
"systemd-journal"
"networkmanager"
"plugdev"
"input"
"uinput"

View file

@ -10,10 +10,12 @@
hashicorp.terraform
arrterian.nix-env-selector
jnoortheen.nix-ide
vscodevim.vim
catppuccin.catppuccin-vsc
];
userSettings = {
"nix.enableLanguageServer" = true;
"workbench.colorTheme" = "Synthax";
"workbench.colorTheme" = "Catppuccin Frappé";
"editor.suggest.preview" = true;
"[nix]" = {
"editor.defaultFormatter" = "kamadorueda.alejandra";

View file

@ -1,55 +0,0 @@
{ lib, config, inputs, ... }: let
# TODO: convert to nix-std
inherit (lib.attrsets) mapAttrsToList mapAttrs filterAttrs;
inherit (lib.lists) optionals;
inherit (lib.options) mkOption;
inherit (lib.types) int attrsOf submodule;
buildMachines = mapAttrsToList (name: extern_: let
extern = extern_.config;
in {
hostName = "${name}.inskip.me";
sshUser = "deploy";
systems = [ extern.nixpkgs.system ] ++ optionals (extern.nix.settings ? extra-platforms) extern.nix.settings.extra-platforms;
maxJobs = 100;
speedFactor = config.distributed.outputs.${name};
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
} ) (filterAttrs (n: _: n != config.networking.hostName && n == "koishi") (inputs.self.nixosConfigurations // inputs.self.darwinConfigurations));
daiyousei = {
hostName = "daiyousei.inskip.me";
sshUser = "root";
system = "aarch64-linux";
maxJobs = 100;
speedFactor = 1;
supportedFeatures = ["benchmark" "big-parallel" "kvm"];
mandatoryFeatures = [];
};
in {
options.distributed = let
baseOptions = {
options.preference = mkOption {
type = int;
default = 1;
};
};
in baseOptions.options // {
systems = mkOption {
type = attrsOf (submodule baseOptions);
default = {};
};
outputs = mkOption {
type = attrsOf int;
default = {};
};
};
config = {
distributed.outputs = mapAttrs (name: extern: extern.config.distributed.preference +
(if config.distributed.systems ? ${name} && config.distributed.systems.${name} ? preference then
config.distributed.systems.${name}.preference
else 0)
) (inputs.self.nixosConfigurations // inputs.self.darwinConfigurations);
nix = {
inherit buildMachines;
distributedBuilds = true;
};
};
}

View file

@ -24,26 +24,6 @@
services = {
blueman.enable = true;
pipewire.media-session.config.bluez-monitor = {
properties = { };
rules = [
{
actions = {
update-props = {
"bluez5.a2dp-source-role" = "input";
"bluez5.auto-connect" = [ "hfp_hf" "hsp_hs" "a2dp_sink" "a2dp_source" "hsp_ag" "hfp_ag" ];
};
};
matches = [ { "device.name" = "~bluez_card.*"; } ];
}
{
actions = {
update-props = { "node.pause-on-idle" = false; };
};
matches = [ { "node.name" = "~bluez_input.*"; } { "node.name" = "~bluez_output.*"; } ];
}
];
};
};
home-manager.sharedModules = [

View file

@ -9,32 +9,12 @@ in {
defaults.pcm.rate_converter "speexrate_best"
'';
};
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
config = {
pipewire = {
"context.properties" = {
"log.level" = 2;
"default.clock.min-quantum" =
32; # default; going lower may cause crackles and distorted audio
};
pipewire-pulse = {
"context.modules" = [{
name = "libpipewire-module-protocol-pulse";
args = {
"pulse.min.quantum" = 32; # controls minimum playback quant
"pulse.min.req" = 32; # controls minimum recording quant
"pulse.min.frag" = 32; # controls minimum fragment size
"server.address" =
[ "unix:native" ]; # the default address of the server
};
}];
};
};
};
pulse.enable = true;
alsa.support32Bit = true;
jack.enable = true;

View file

@ -0,0 +1,6 @@
_: {
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
};
}

View file

@ -0,0 +1,37 @@
{
pkgs,
lib,
...
}: let
inherit (lib.modules) mkForce;
in {
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
environment.gnome.excludePackages =
(with pkgs; [
gnome-photos
gnome-tour
])
++ (with pkgs.gnome; [
cheese # webcam tool
gnome-music
gedit # text editor
epiphany # web browser
geary # email reader
gnome-characters
tali # poker game
iagno # go game
hitori # sudoku game
atomix # puzzle game
yelp # Help view
gnome-contacts
gnome-initial-setup
]);
programs.dconf.enable = true;
environment.systemPackages = with pkgs; [
gnome.gnome-tweaks
gnome-extension-manager
];
services.gnome3.gnome-keyring.enable = mkForce false;
}

View file

@ -71,7 +71,7 @@
.${string.toLower config.type};
modules = with tree; [
tree.modules.${config.folder}
tree.modules.common
#tree.modules.common
tree.${config.folder}.common
tree.kat.user.${config.folder}
common

91
systems/goliath.nix Normal file
View file

@ -0,0 +1,91 @@
_: let
hostConfig = {
config,
lib,
tree,
pkgs,
...
}: {
imports = with tree.nixos.hardware;
[
common-wifi-bt
sound
]
++ (with tree.nixos.roles; [
graphical
gaming
gnome
bootable
])
++ (with tree.kat; [
gui
gnome
]);
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
boot.supportedFilesystems = ["ntfs"];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/cf7fc410-4e27-4797-8464-a409766928c1";
fsType = "ext4";
};
"/boot/efi" = {
device = "/dev/disk/by-uuid/D0D8-F8BF";
fsType = "vfat";
};
};
boot.initrd.secrets = {
"/crypto_keyfile.bin" = null;
};
# Enable swap on luks
boot.initrd.luks.devices."luks-111c4857-5d73-4e75-89c7-43be9b044ade".device = "/dev/disk/by-uuid/111c4857-5d73-4e75-89c7-43be9b044ade";
boot.initrd.luks.devices."luks-111c4857-5d73-4e75-89c7-43be9b044ade".keyFile = "/crypto_keyfile.bin";
boot.initrd.luks.devices."luks-af144e7f-e35b-49e7-be90-ef7001cc2abd".device = "/dev/disk/by-uuid/af144e7f-e35b-49e7-be90-ef7001cc2abd";
services.openssh = {
hostKeys = [
{
bits = 4096;
path = "/var/lib/secrets/${config.networking.hostName}-osh-pk";
type = "rsa";
}
{
path = "/var/lib/secrets/${config.networking.hostName}-ed25519-osh-pk";
type = "ed25519";
}
];
extraConfig = ''
HostCertificate /var/lib/secrets/${config.networking.hostName}-osh-cert
HostCertificate /var/lib/secrets/${config.networking.hostName}-osh-ed25519-cert
'';
};
swapDevices = [
{device = "/dev/disk/by-uuid/bebdb14c-4707-4e05-848f-5867764b7c27";}
];
networking = {
hostId = "dddbb888";
useDHCP = false;
};
system.stateVersion = "21.11";
};
in {
arch = "x86_64";
type = "NixOS";
modules = [
hostConfig
];
}

View file

@ -5,10 +5,12 @@ _: let
common-pc-laptop-ssd
] ++ (with tree.nixos.roles; [
graphical
sway
laptop
bootable
]) ++ (with tree; [
kat.gui
kat.sway
]);
fileSystems = {