From 572dd0e4db9eabb061854bbba525b81bdc0e88ed Mon Sep 17 00:00:00 2001 From: Kat Inskip Date: Sun, 16 Apr 2023 08:43:42 -0700 Subject: [PATCH] [NODES] New node, goliath. --- flake.lock | 90 +++++++++++------- kat/default.nix | 4 +- kat/gnome/dconf.nix | 31 +++++++ kat/gnome/extensions.nix | 35 +++++++ kat/gnome/gtk.nix | 33 +++++++ kat/gui/packages.nix | 5 +- kat/{gui => sway}/barrier.nix | 0 kat/{gui => sway}/gtk.nix | 0 kat/{gui => sway}/konashow.nix | 0 kat/{gui => sway}/layout.xkb | 0 kat/{gui => sway}/mako.nix | 0 kat/{gui => sway}/sway.nix | 0 kat/{gui => sway}/swaylock.nix | 0 kat/{gui => sway}/waybar.nix | 0 kat/{gui => sway}/waybar.sass | 0 kat/{gui => sway}/wofi.nix | 0 kat/{gui => sway}/wofi.sass | 0 kat/{gui => sway}/xdg.nix | 0 kat/{gui => sway}/xkb.nix | 0 kat/user/nixos.nix | 1 + kat/vscodium.nix | 4 +- modules/common/distributed.nix | 55 ----------- nixos/hardware/bluetooth.nix | 20 ---- nixos/hardware/sound.nix | 22 +---- nixos/roles/gaming/steam.nix | 6 ++ nixos/roles/gnome/gnome.nix | 37 ++++++++ nixos/roles/{graphical => sway}/sway.nix | 0 .../roles/{graphical => sway}/xdg-portals.nix | 0 systems/default.nix | 2 +- systems/goliath.nix | 91 +++++++++++++++++++ systems/koishi.nix | 2 + 31 files changed, 303 insertions(+), 135 deletions(-) create mode 100644 kat/gnome/dconf.nix create mode 100644 kat/gnome/extensions.nix create mode 100644 kat/gnome/gtk.nix rename kat/{gui => sway}/barrier.nix (100%) rename kat/{gui => sway}/gtk.nix (100%) rename kat/{gui => sway}/konashow.nix (100%) rename kat/{gui => sway}/layout.xkb (100%) rename kat/{gui => sway}/mako.nix (100%) rename kat/{gui => sway}/sway.nix (100%) rename kat/{gui => sway}/swaylock.nix (100%) rename kat/{gui => sway}/waybar.nix (100%) rename kat/{gui => sway}/waybar.sass (100%) rename kat/{gui => sway}/wofi.nix (100%) rename kat/{gui => sway}/wofi.sass (100%) rename kat/{gui => sway}/xdg.nix (100%) rename kat/{gui => sway}/xkb.nix (100%) delete mode 100644 modules/common/distributed.nix create mode 100644 nixos/roles/gaming/steam.nix create mode 100644 nixos/roles/gnome/gnome.nix rename nixos/roles/{graphical => sway}/sway.nix (100%) rename nixos/roles/{graphical => sway}/xdg-portals.nix (100%) create mode 100644 systems/goliath.nix diff --git a/flake.lock b/flake.lock index 9b110e24..80282a47 100644 --- a/flake.lock +++ b/flake.lock @@ -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": { diff --git a/kat/default.nix b/kat/default.nix index 8c5f532f..bb06d85b 100644 --- a/kat/default.nix +++ b/kat/default.nix @@ -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 ]; }; diff --git a/kat/gnome/dconf.nix b/kat/gnome/dconf.nix new file mode 100644 index 00000000..b3480fa3 --- /dev/null +++ b/kat/gnome/dconf.nix @@ -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"]; + }; + }; + }; +} diff --git a/kat/gnome/extensions.nix b/kat/gnome/extensions.nix new file mode 100644 index 00000000..986fdd7d --- /dev/null +++ b/kat/gnome/extensions.nix @@ -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 + ]; +} diff --git a/kat/gnome/gtk.nix b/kat/gnome/gtk.nix new file mode 100644 index 00000000..c60dc623 --- /dev/null +++ b/kat/gnome/gtk.nix @@ -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"; +} diff --git a/kat/gui/packages.nix b/kat/gui/packages.nix index e09da91c..439899aa 100644 --- a/kat/gui/packages.nix +++ b/kat/gui/packages.nix @@ -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 diff --git a/kat/gui/barrier.nix b/kat/sway/barrier.nix similarity index 100% rename from kat/gui/barrier.nix rename to kat/sway/barrier.nix diff --git a/kat/gui/gtk.nix b/kat/sway/gtk.nix similarity index 100% rename from kat/gui/gtk.nix rename to kat/sway/gtk.nix diff --git a/kat/gui/konashow.nix b/kat/sway/konashow.nix similarity index 100% rename from kat/gui/konashow.nix rename to kat/sway/konashow.nix diff --git a/kat/gui/layout.xkb b/kat/sway/layout.xkb similarity index 100% rename from kat/gui/layout.xkb rename to kat/sway/layout.xkb diff --git a/kat/gui/mako.nix b/kat/sway/mako.nix similarity index 100% rename from kat/gui/mako.nix rename to kat/sway/mako.nix diff --git a/kat/gui/sway.nix b/kat/sway/sway.nix similarity index 100% rename from kat/gui/sway.nix rename to kat/sway/sway.nix diff --git a/kat/gui/swaylock.nix b/kat/sway/swaylock.nix similarity index 100% rename from kat/gui/swaylock.nix rename to kat/sway/swaylock.nix diff --git a/kat/gui/waybar.nix b/kat/sway/waybar.nix similarity index 100% rename from kat/gui/waybar.nix rename to kat/sway/waybar.nix diff --git a/kat/gui/waybar.sass b/kat/sway/waybar.sass similarity index 100% rename from kat/gui/waybar.sass rename to kat/sway/waybar.sass diff --git a/kat/gui/wofi.nix b/kat/sway/wofi.nix similarity index 100% rename from kat/gui/wofi.nix rename to kat/sway/wofi.nix diff --git a/kat/gui/wofi.sass b/kat/sway/wofi.sass similarity index 100% rename from kat/gui/wofi.sass rename to kat/sway/wofi.sass diff --git a/kat/gui/xdg.nix b/kat/sway/xdg.nix similarity index 100% rename from kat/gui/xdg.nix rename to kat/sway/xdg.nix diff --git a/kat/gui/xkb.nix b/kat/sway/xkb.nix similarity index 100% rename from kat/gui/xkb.nix rename to kat/sway/xkb.nix diff --git a/kat/user/nixos.nix b/kat/user/nixos.nix index 173e728c..88327ae8 100644 --- a/kat/user/nixos.nix +++ b/kat/user/nixos.nix @@ -9,6 +9,7 @@ "wheel" "video" "systemd-journal" + "networkmanager" "plugdev" "input" "uinput" diff --git a/kat/vscodium.nix b/kat/vscodium.nix index 690463e6..a6fc9f26 100644 --- a/kat/vscodium.nix +++ b/kat/vscodium.nix @@ -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"; diff --git a/modules/common/distributed.nix b/modules/common/distributed.nix deleted file mode 100644 index 87f45f32..00000000 --- a/modules/common/distributed.nix +++ /dev/null @@ -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; - }; - }; -} diff --git a/nixos/hardware/bluetooth.nix b/nixos/hardware/bluetooth.nix index 70f010b3..38a29980 100644 --- a/nixos/hardware/bluetooth.nix +++ b/nixos/hardware/bluetooth.nix @@ -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 = [ diff --git a/nixos/hardware/sound.nix b/nixos/hardware/sound.nix index 94b7bc41..80dc8190 100644 --- a/nixos/hardware/sound.nix +++ b/nixos/hardware/sound.nix @@ -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; diff --git a/nixos/roles/gaming/steam.nix b/nixos/roles/gaming/steam.nix new file mode 100644 index 00000000..85d50a10 --- /dev/null +++ b/nixos/roles/gaming/steam.nix @@ -0,0 +1,6 @@ +_: { + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + }; +} diff --git a/nixos/roles/gnome/gnome.nix b/nixos/roles/gnome/gnome.nix new file mode 100644 index 00000000..e304c649 --- /dev/null +++ b/nixos/roles/gnome/gnome.nix @@ -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; +} diff --git a/nixos/roles/graphical/sway.nix b/nixos/roles/sway/sway.nix similarity index 100% rename from nixos/roles/graphical/sway.nix rename to nixos/roles/sway/sway.nix diff --git a/nixos/roles/graphical/xdg-portals.nix b/nixos/roles/sway/xdg-portals.nix similarity index 100% rename from nixos/roles/graphical/xdg-portals.nix rename to nixos/roles/sway/xdg-portals.nix diff --git a/systems/default.nix b/systems/default.nix index 7258e117..d4a5854e 100644 --- a/systems/default.nix +++ b/systems/default.nix @@ -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 diff --git a/systems/goliath.nix b/systems/goliath.nix new file mode 100644 index 00000000..ed260a96 --- /dev/null +++ b/systems/goliath.nix @@ -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 + ]; +} diff --git a/systems/koishi.nix b/systems/koishi.nix index 68b9715f..4a3c78b4 100644 --- a/systems/koishi.nix +++ b/systems/koishi.nix @@ -5,10 +5,12 @@ _: let common-pc-laptop-ssd ] ++ (with tree.nixos.roles; [ graphical + sway laptop bootable ]) ++ (with tree; [ kat.gui + kat.sway ]); fileSystems = {