mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
Reformatting with nixfmt. Was this a bad idea? Who knows.
This commit is contained in:
parent
da58d0eb98
commit
4d55f43328
23 changed files with 275 additions and 470 deletions
|
|
@ -1,19 +1,19 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
let unstable = import <nixos-unstable> {}; in {
|
let unstable = import <nixos-unstable> { };
|
||||||
imports =
|
in {
|
||||||
[
|
imports = [
|
||||||
../../profiles/common
|
../../profiles/common
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
#./services/postgres.nix
|
#./services/postgres.nix
|
||||||
./services/znc.nix
|
./services/znc.nix
|
||||||
./services/weechat.nix
|
./services/weechat.nix
|
||||||
#./services/gitea.nix
|
#./services/gitea.nix
|
||||||
#./services/matrix.nix
|
#./services/matrix.nix
|
||||||
#./services/nextcloud.nix
|
#./services/nextcloud.nix
|
||||||
#./services/bitwarden.nix
|
#./services/bitwarden.nix
|
||||||
./services/nginx.nix
|
./services/nginx.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
boot.loader.grub.version = 2;
|
boot.loader.grub.version = 2;
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,21 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ <nixpkgs/nixos/modules/profiles/qemu-guest.nix> ];
|
||||||
[ <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sd_mod" "sr_mod" ];
|
boot.initrd.availableKernelModules =
|
||||||
|
[ "ahci" "xhci_pci" "virtio_pci" "sd_mod" "sr_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ ];
|
boot.kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/126049c0-34bd-4d96-a8db-276c5d172abe";
|
device = "/dev/disk/by-uuid/126049c0-34bd-4d96-a8db-276c5d172abe";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/disk/by-uuid/1f19daed-1c51-4b14-bfe8-bd7ea075ed96"; }
|
[{ device = "/dev/disk/by-uuid/1f19daed-1c51-4b14-bfe8-bd7ea075ed96"; }];
|
||||||
];
|
|
||||||
|
|
||||||
nix.maxJobs = lib.mkDefault 3;
|
nix.maxJobs = lib.mkDefault 3;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,15 @@ let
|
||||||
groups = [ "desktop" "personal" ];
|
groups = [ "desktop" "personal" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
pkgs = import <nixpkgs> {};
|
pkgs = import <nixpkgs> { };
|
||||||
evalConfig = import <nixpkgs/nixos/lib/eval-config.nix>;
|
evalConfig = import <nixpkgs/nixos/lib/eval-config.nix>;
|
||||||
lib = pkgs.lib;
|
lib = pkgs.lib;
|
||||||
in lib.mapAttrs (name: host: host // {
|
in lib.mapAttrs (name: host:
|
||||||
config = if (host ? config) then host.config else (evalConfig {
|
host // {
|
||||||
modules = [
|
config = if (host ? config) then
|
||||||
(import "${toString ./.}/${name}/configuration.nix")
|
host.config
|
||||||
];
|
else
|
||||||
}).config;
|
(evalConfig {
|
||||||
}) hosts
|
modules = [ (import "${toString ./.}/${name}/configuration.nix") ];
|
||||||
|
}).config;
|
||||||
|
}) hosts
|
||||||
|
|
|
||||||
|
|
@ -5,25 +5,24 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ # Include the results of the hardware scan.
|
||||||
[ # Include the results of the hardware scan.
|
./hardware-configuration.nix
|
||||||
./hardware-configuration.nix
|
../../profiles/common
|
||||||
../../profiles/common
|
../../profiles/desktop
|
||||||
../../profiles/desktop
|
../../profiles/xfce
|
||||||
../../profiles/xfce
|
../../profiles/network
|
||||||
../../profiles/network
|
../../profiles/yubikey
|
||||||
../../profiles/yubikey
|
];
|
||||||
];
|
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking.hostName = "litha";
|
networking.hostName = "litha";
|
||||||
|
|
||||||
networking.useDHCP = false;
|
networking.useDHCP = false;
|
||||||
networking.interfaces.enp34s0.useDHCP = true;
|
networking.interfaces.enp34s0.useDHCP = true;
|
||||||
|
|
||||||
system.stateVersion = "20.09";
|
system.stateVersion = "20.09";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,28 +4,26 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "usb_storage" "sd_mod" "sdhci_acpi" ];
|
boot.initrd.availableKernelModules =
|
||||||
|
[ "xhci_pci" "usb_storage" "sd_mod" "sdhci_acpi" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/fa06ba90-ffc9-4ca6-b1cf-1205340a975e";
|
device = "/dev/disk/by-uuid/fa06ba90-ffc9-4ca6-b1cf-1205340a975e";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/BF39-2AA3";
|
device = "/dev/disk/by-uuid/BF39-2AA3";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/disk/by-uuid/9c88235e-9705-4b80-a988-e95eda06124f"; }
|
[{ device = "/dev/disk/by-uuid/9c88235e-9705-4b80-a988-e95eda06124f"; }];
|
||||||
];
|
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,27 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[
|
./hardware-configuration.nix
|
||||||
./hardware-configuration.nix
|
../../profiles/common
|
||||||
../../profiles/common
|
../../profiles/desktop
|
||||||
../../profiles/desktop
|
../../profiles/gnome
|
||||||
../../profiles/gnome
|
../../profiles/gaming
|
||||||
../../profiles/gaming
|
../../profiles/development
|
||||||
../../profiles/development
|
../../profiles/network
|
||||||
../../profiles/network
|
../../profiles/yubikey
|
||||||
../../profiles/yubikey
|
];
|
||||||
];
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
home-manager.users.kat = {
|
|
||||||
imports = [
|
|
||||||
./dconf.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "samhain";
|
networking.hostName = "samhain";
|
||||||
networking.hostId = "617050fc";
|
networking.hostId = "617050fc";
|
||||||
|
|
||||||
networking.useDHCP = false;
|
networking.useDHCP = false;
|
||||||
networking.interfaces.enp34s0.useDHCP = true;
|
networking.interfaces.enp34s0.useDHCP = true;
|
||||||
|
|
||||||
system.stateVersion = "20.09";
|
system.stateVersion = "20.09";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,143 +0,0 @@
|
||||||
# Generated via dconf2nix: https://github.com/gvolpe/dconf2nix
|
|
||||||
{ lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
mkTuple = lib.hm.gvariant.mkTuple;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
dconf.settings = {
|
|
||||||
"org/gnome/control-center" = {
|
|
||||||
"last-panel" = "network";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/input-sources" = {
|
|
||||||
"current" = "uint32 0";
|
|
||||||
"sources" = [ (mkTuple [ "xkb" "gb" ]) ];
|
|
||||||
"xkb-options" = [ "terminate:ctrl_alt_bksp" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/interface" = {
|
|
||||||
"clock-show-seconds" = true;
|
|
||||||
"clock-show-weekday" = true;
|
|
||||||
"enable-hot-corners" = false;
|
|
||||||
"gtk-im-module" = "gtk-im-context-simple";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/notifications" = {
|
|
||||||
"application-children" = [ "im-dino-dino" "telegramdesktop" "discord" "mumble" "firefox" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/notifications/application/discord" = {
|
|
||||||
"application-id" = "discord.desktop";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/notifications/application/firefox" = {
|
|
||||||
"application-id" = "firefox.desktop";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/notifications/application/im-dino-dino" = {
|
|
||||||
"application-id" = "im.dino.Dino.desktop";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/notifications/application/mumble" = {
|
|
||||||
"application-id" = "mumble.desktop";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/notifications/application/telegramdesktop" = {
|
|
||||||
"application-id" = "telegramdesktop.desktop";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/privacy" = {
|
|
||||||
"report-technical-problems" = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/wm/keybindings" = {
|
|
||||||
"panel-main-menu" = [ "<Alt>F1" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/wm/preferences" = {
|
|
||||||
"button-layout" = "appmenu:minimize,maximize,close";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/evolution-data-server" = {
|
|
||||||
"migrated" = true;
|
|
||||||
"network-monitor-gio-name" = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/mutter" = {
|
|
||||||
"attach-modal-dialogs" = true;
|
|
||||||
"dynamic-workspaces" = true;
|
|
||||||
"edge-tiling" = true;
|
|
||||||
"focus-change-on-pointer-rest" = true;
|
|
||||||
"overlay-key" = "Super_L";
|
|
||||||
"workspaces-only-on-primary" = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/nautilus/preferences" = {
|
|
||||||
"default-folder-viewer" = "icon-view";
|
|
||||||
"search-filter-time-type" = "last_modified";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/nautilus/window-state" = {
|
|
||||||
"initial-size" = mkTuple [ 890 550 ];
|
|
||||||
"maximized" = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/settings-daemon/plugins/color" = {
|
|
||||||
#"night-light-last-coordinates" = mkTuple [ 51.579800719942405 -2.47e-2 ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/settings-daemon/plugins/xsettings" = {
|
|
||||||
"antialiasing" = "grayscale";
|
|
||||||
"hinting" = "slight";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/shell" = {
|
|
||||||
"disabled-extensions" = "@as []";
|
|
||||||
"enabled-extensions" = [ "arc-menu@linxgem33.com" "caffeine@patapon.info" "dash-to-panel@jderose9.github.com" "emoji-selector@maestroschan.fr" "appindicatorsupport@rgcjonas.gmail.com" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/shell/extensions/arc-menu" = {
|
|
||||||
"arc-menu-icon" = 3;
|
|
||||||
"dtp-dtd-state" = [ true false ];
|
|
||||||
"menu-button-icon" = "Arc_Menu_Icon";
|
|
||||||
"menu-hotkey" = "Super_L";
|
|
||||||
"pinned-app-list" = [ "Firefox" "firefox" "firefox.desktop" "Terminal" "utilities-terminal" "org.gnome.Terminal.desktop" "Arc Menu Settings" "ArcMenu_ArcMenuIcon" "gnome-extensions prefs arc-menu@linxgem33.com" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/shell/extensions/dash-to-panel" = {
|
|
||||||
"available-monitors" = [ 1 0 2 ];
|
|
||||||
"group-apps" = false;
|
|
||||||
"hotkeys-overlay-combo" = "TEMPORARILY";
|
|
||||||
"multi-monitors" = false;
|
|
||||||
#"panel-element-positions" = "'{"0":[{"element":"showAppsButton","visible":false,"position":"stackedTL"},{"element":"activitiesButton","visible":false,"position":"stackedTL"},{"element":"leftBox","visible":true,"position":"stackedTL"},{"element":"taskbar","visible":true,"position":"stackedTL"},{"element":"centerBox","visible":true,"position":"stackedBR"},{"element":"rightBox","visible":true,"position":"stackedBR"},{"element":"dateMenu","visible":true,"position":"stackedBR"},{"element":"systemMenu","visible":true,"position":"stackedBR"},{"element":"desktopButton","visible":true,"position":"stackedBR"}],"1":[{"element":"showAppsButton","visible":false,"position":"stackedTL"},{"element":"activitiesButton","visible":false,"position":"stackedTL"},{"element":"leftBox","visible":true,"position":"stackedTL"},{"element":"taskbar","visible":true,"position":"stackedTL"},{"element":"centerBox","visible":true,"position":"stackedBR"},{"element":"rightBox","visible":true,"position":"stackedBR"},{"element":"dateMenu","visible":true,"position":"stackedBR"},{"element":"systemMenu","visible":true,"position":"stackedBR"},{"element":"desktopButton","visible":true,"position":"stackedBR"}],"2":[{"element":"showAppsButton","visible":false,"position":"stackedTL"},{"element":"activitiesButton","visible":false,"position":"stackedTL"},{"element":"leftBox","visible":true,"position":"stackedTL"},{"element":"taskbar","visible":true,"position":"stackedTL"},{"element":"centerBox","visible":true,"position":"stackedBR"},{"element":"rightBox","visible":true,"position":"stackedBR"},{"element":"dateMenu","visible":true,"position":"stackedBR"},{"element":"systemMenu","visible":true,"position":"stackedBR"},{"element":"desktopButton","visible":true,"position":"stackedBR"}]}'";
|
|
||||||
#"panel-positions" = "'{"0":"TOP","1":"TOP","2":"TOP"}'";
|
|
||||||
"panel-size" = 32;
|
|
||||||
"primary-monitor" = 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/shell/world-clocks" = {
|
|
||||||
"locations" = "@av []";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/system/location" = {
|
|
||||||
"enabled" = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gtk/settings/file-chooser" = {
|
|
||||||
"date-format" = "regular";
|
|
||||||
"location-mode" = "path-bar";
|
|
||||||
"show-hidden" = false;
|
|
||||||
"show-size-column" = true;
|
|
||||||
"show-type-column" = true;
|
|
||||||
"sidebar-width" = 164;
|
|
||||||
"sort-column" = "name";
|
|
||||||
"sort-directories-first" = false;
|
|
||||||
"sort-order" = "ascending";
|
|
||||||
"type-format" = "category";
|
|
||||||
"window-position" = mkTuple [ 358 907 ];
|
|
||||||
"window-size" = mkTuple [ 1203 902 ];
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -4,32 +4,30 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
boot.initrd.availableKernelModules =
|
||||||
|
[ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "zroot/safe/root";
|
device = "zroot/safe/root";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{ device = "zroot/safe/home";
|
device = "zroot/safe/home";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/50C3-BE99";
|
device = "/dev/disk/by-uuid/50C3-BE99";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/disk/by-uuid/88595373-9566-401b-8c9b-03bbc8314f1b"; }
|
[{ device = "/dev/disk/by-uuid/88595373-9566-401b-8c9b-03bbc8314f1b"; }];
|
||||||
];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,20 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[
|
./hardware-configuration.nix
|
||||||
./hardware-configuration.nix
|
../../profiles/common
|
||||||
../../profiles/common
|
../../profiles/desktop
|
||||||
../../profiles/desktop
|
../../profiles/gnome
|
||||||
../../profiles/gnome
|
../../profiles/gaming
|
||||||
../../profiles/gaming
|
../../profiles/development
|
||||||
../../profiles/development
|
../../profiles/network
|
||||||
../../profiles/network
|
../../profiles/yubikey
|
||||||
../../profiles/yubikey
|
];
|
||||||
];
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking.hostId = "dddbb888";
|
networking.hostId = "dddbb888";
|
||||||
networking.hostName = "yule";
|
networking.hostName = "yule";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,33 +4,30 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules =
|
||||||
|
[ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "zpool/safe/root";
|
device = "zpool/safe/root";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{ device = "zpool/safe/home";
|
device = "zpool/safe/home";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/4683-4139";
|
device = "/dev/disk/by-uuid/4683-4139";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/disk/by-uuid/7e6f47fd-bedb-4012-8072-5e3a556e2f45"; }
|
[{ device = "/dev/disk/by-uuid/7e6f47fd-bedb-4012-8072-5e3a556e2f45"; }];
|
||||||
];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,36 +1,27 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
home-manager = fetchGit {
|
home-manager = fetchGit {
|
||||||
url = "https://github.com/nix-community/home-manager";
|
url = "https://github.com/nix-community/home-manager";
|
||||||
rev = "a98ec6ec158686387d66654ea96153ec06be33d7";
|
rev = "a98ec6ec158686387d66654ea96153ec06be33d7";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [ ../../../modules "${home-manager}/nixos" ./pbb.nix ./users.nix ];
|
||||||
../../../modules
|
|
||||||
"${home-manager}/nixos"
|
|
||||||
./pbb.nix
|
|
||||||
./users.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays =
|
||||||
(self: super: import ../../../pkgs { nixpkgs = super.path; })
|
[ (self: super: import ../../../pkgs { nixpkgs = super.path; }) ];
|
||||||
];
|
|
||||||
|
|
||||||
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||||
#boot.kernelParams = [ "quiet" ];
|
#boot.kernelParams = [ "quiet" ];
|
||||||
|
|
||||||
nixpkgs.config = {
|
nixpkgs.config = { allowUnfree = true; };
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.journald.extraConfig = "SystemMaxUse=512M";
|
services.journald.extraConfig = "SystemMaxUse=512M";
|
||||||
nix.gc.automatic = lib.mkDefault true;
|
nix.gc.automatic = lib.mkDefault true;
|
||||||
nix.gc.options = lib.mkDefault "--delete-older-than 1w";
|
nix.gc.options = lib.mkDefault "--delete-older-than 1w";
|
||||||
nix.trustedUsers = [ "root" "@wheel" ];
|
nix.trustedUsers = [ "root" "@wheel" ];
|
||||||
environment.variables.EDITOR = "neovim";
|
environment.variables.EDITOR = "neovim";
|
||||||
|
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
services.openssh.ports = lib.mkDefault [ 62954 ];
|
services.openssh.ports = lib.mkDefault [ 62954 ];
|
||||||
services.openssh.passwordAuthentication = false;
|
services.openssh.passwordAuthentication = false;
|
||||||
|
|
@ -38,7 +29,6 @@ in {
|
||||||
services.openssh.permitRootLogin = lib.mkDefault "prohibit-password";
|
services.openssh.permitRootLogin = lib.mkDefault "prohibit-password";
|
||||||
services.openssh.extraConfig = "StreamLocalBindUnlink yes";
|
services.openssh.extraConfig = "StreamLocalBindUnlink yes";
|
||||||
security.sudo.wheelNeedsPassword = lib.mkForce false;
|
security.sudo.wheelNeedsPassword = lib.mkForce false;
|
||||||
|
|
||||||
|
|
||||||
i18n.defaultLocale = "en_GB.UTF-8";
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
time.timeZone = "Europe/London";
|
time.timeZone = "Europe/London";
|
||||||
|
|
@ -48,15 +38,15 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
smartmontools
|
smartmontools
|
||||||
lm_sensors
|
lm_sensors
|
||||||
htop
|
htop
|
||||||
neovim
|
neovim
|
||||||
ripgrep
|
ripgrep
|
||||||
git
|
git
|
||||||
wget
|
wget
|
||||||
rsync
|
rsync
|
||||||
pv
|
pv
|
||||||
progress
|
progress
|
||||||
bc
|
bc
|
||||||
zstd
|
zstd
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,7 @@ let
|
||||||
rev = "4b0275db7842fda45dcc007d87b6274c4e63382b";
|
rev = "4b0275db7842fda45dcc007d87b6274c4e63382b";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [ "${pbbNixfiles}/modules" ];
|
||||||
"${pbbNixfiles}/modules"
|
nixpkgs.overlays =
|
||||||
];
|
[ (self: super: import "${pbbNixfiles}/pkgs" { nixpkgs = super.path; }) ];
|
||||||
nixpkgs.overlays = [
|
|
||||||
(self: super: import "${pbbNixfiles}/pkgs" { nixpkgs = super.path; })
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,12 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
users.users.root = {
|
users.users.root = {
|
||||||
openssh.authorizedKeys.keys = with pkgs.lib; concatLists (mapAttrsToList (name: user: if elem "wheel" user.extraGroups then user.openssh.authorizedKeys.keys else []) config.users.users);
|
openssh.authorizedKeys.keys = with pkgs.lib;
|
||||||
|
concatLists (mapAttrsToList (name: user:
|
||||||
|
if elem "wheel" user.extraGroups then
|
||||||
|
user.openssh.authorizedKeys.keys
|
||||||
|
else
|
||||||
|
[ ]) config.users.users);
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.kat = {
|
users.users.kat = {
|
||||||
|
|
@ -17,23 +22,19 @@
|
||||||
|
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.users.kat = {
|
home-manager.users.kat = {
|
||||||
programs.firefox = {
|
programs.firefox = { enable = true; };
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [
|
plugins = [{
|
||||||
{
|
name = "bass";
|
||||||
name = "bass";
|
src = pkgs.fetchFromGitHub {
|
||||||
src = pkgs.fetchFromGitHub {
|
owner = "edc";
|
||||||
owner = "edc";
|
repo = "bass";
|
||||||
repo = "bass";
|
rev = "d63054b24c2f63aaa3a08fb9ec9d0da4c70ab922";
|
||||||
rev = "d63054b24c2f63aaa3a08fb9ec9d0da4c70ab922";
|
sha256 = "0pwci5xxm8308nrb52s5nyxijk0svar8nqrdfvkk2y34z1cg319b";
|
||||||
sha256 = "0pwci5xxm8308nrb52s5nyxijk0svar8nqrdfvkk2y34z1cg319b";
|
};
|
||||||
};
|
}];
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
|
|
@ -47,9 +48,7 @@
|
||||||
userEmail = "me@dork.dev";
|
userEmail = "me@dork.dev";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.kakoune = {
|
programs.kakoune = { enable = true; };
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -60,27 +59,20 @@
|
||||||
kat = {
|
kat = {
|
||||||
forwardAgent = true;
|
forwardAgent = true;
|
||||||
extraOptions = {
|
extraOptions = {
|
||||||
RemoteForward = "/run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra";
|
RemoteForward =
|
||||||
|
"/run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra";
|
||||||
};
|
};
|
||||||
port = 62954;
|
port = 62954;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
"beltane" = {
|
"beltane" = { hostname = "beltane.dork.dev"; } // kat;
|
||||||
hostname = "beltane.dork.dev";
|
"samhain" = { hostname = "192.168.1.135"; } // kat;
|
||||||
} // kat;
|
"litha" = { hostname = "192.168.1.240"; } // kat;
|
||||||
"samhain" = {
|
"yule" = { hostname = "192.168.1.92"; } // kat;
|
||||||
hostname = "192.168.1.135";
|
|
||||||
} // kat;
|
|
||||||
"litha" = {
|
|
||||||
hostname = "192.168.1.240";
|
|
||||||
} // kat;
|
|
||||||
"yule" = {
|
|
||||||
hostname = "192.168.1.92";
|
|
||||||
} // kat;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.bat.enable = true;
|
programs.bat.enable = true;
|
||||||
programs.tmux.enable = true;
|
programs.tmux.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let unstable = import ( fetchTarball https://github.com/NixOS/nixpkgs/archive/master.tar.gz ) {}; in {
|
let
|
||||||
nixpkgs.config = {
|
unstable = import
|
||||||
mumble.speechdSupport = true;
|
(fetchTarball "https://github.com/NixOS/nixpkgs/archive/master.tar.gz") { };
|
||||||
};
|
in {
|
||||||
|
nixpkgs.config = { mumble.speechdSupport = true; };
|
||||||
|
|
||||||
home-manager.users.kat = {
|
home-manager.users.kat = {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
|
|
@ -46,10 +47,7 @@ let unstable = import ( fetchTarball https://github.com/NixOS/nixpkgs/archive/ma
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
fonts.fonts = [
|
fonts.fonts = [ pkgs.nerdfonts pkgs.corefonts ];
|
||||||
pkgs.nerdfonts
|
|
||||||
pkgs.corefonts
|
|
||||||
];
|
|
||||||
|
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
hardware.pulseaudio.enable = true;
|
hardware.pulseaudio.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,16 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
{ config, lib, pkgs, ... }:
|
environment.systemPackages = [ pkgs.php pkgs.php74Packages.composer2 ];
|
||||||
{
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.php
|
|
||||||
pkgs.php74Packages.composer2
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.users.kat = {
|
home-manager.users.kat = {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.jetbrains.clion
|
pkgs.jetbrains.clion
|
||||||
pkgs.jetbrains.idea-ultimate
|
pkgs.jetbrains.idea-ultimate
|
||||||
pkgs.jetbrains.goland
|
pkgs.jetbrains.goland
|
||||||
pkgs.jetbrains.phpstorm
|
pkgs.jetbrains.phpstorm
|
||||||
pkgs.carnix
|
pkgs.nixfmt
|
||||||
pkgs.rustc
|
pkgs.carnix
|
||||||
pkgs.cargo
|
pkgs.rustc
|
||||||
|
pkgs.cargo
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,7 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
hardware.opengl.driSupport32Bit = true;
|
hardware.opengl.driSupport32Bit = true;
|
||||||
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
|
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
|
||||||
hardware.pulseaudio.support32Bit = true;
|
hardware.pulseaudio.support32Bit = true;
|
||||||
|
|
||||||
home-manager.users.kat = {
|
home-manager.users.kat = { home.packages = [ pkgs.steam pkgs.steam-run ]; };
|
||||||
home.packages = [
|
}
|
||||||
pkgs.steam
|
|
||||||
pkgs.steam-run
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,19 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
services.xserver.displayManager.gdm.enable = true;
|
||||||
services.xserver.desktopManager.gnome3.enable = true;
|
services.xserver.desktopManager.gnome3.enable = true;
|
||||||
|
|
||||||
home-manager.users.kat = {
|
home-manager.users.kat = {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.dconf2nix
|
pkgs.dconf2nix
|
||||||
pkgs.gnome3.gnome-tweak-tool
|
pkgs.gnome3.gnome-tweak-tool
|
||||||
pkgs.gnomeExtensions.caffeine
|
pkgs.gnomeExtensions.caffeine
|
||||||
pkgs.gnomeExtensions.emoji-selector
|
pkgs.gnomeExtensions.emoji-selector
|
||||||
pkgs.gnomeExtensions.gsconnect
|
pkgs.gnomeExtensions.gsconnect
|
||||||
pkgs.gnomeExtensions.dash-to-panel
|
pkgs.gnomeExtensions.dash-to-panel
|
||||||
pkgs.gnomeExtensions.appindicator
|
pkgs.gnomeExtensions.appindicator
|
||||||
pkgs.gnomeExtensions.dash-to-dock
|
pkgs.gnomeExtensions.dash-to-dock
|
||||||
pkgs.gnomeExtensions.arc-menu
|
pkgs.gnomeExtensions.arc-menu
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -23,4 +21,4 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.gnome3.gvfs;
|
package = pkgs.gnome3.gvfs;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,41 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
networking = {
|
||||||
|
networkmanager.enable = true;
|
||||||
|
resolvconf.useLocalResolver = true;
|
||||||
|
networkmanager.dns = "none";
|
||||||
|
};
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
services.dnscrypt-proxy2 = {
|
||||||
{
|
enable = true;
|
||||||
networking = {
|
settings = {
|
||||||
networkmanager.enable = true;
|
ipv6_servers = true;
|
||||||
resolvconf.useLocalResolver = true;
|
require_dnssec = true;
|
||||||
networkmanager.dns = "none";
|
|
||||||
|
sources.public-resolvers = {
|
||||||
|
urls = [
|
||||||
|
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v2/public-resolvers.md"
|
||||||
|
"https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md"
|
||||||
|
];
|
||||||
|
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
|
||||||
|
minisign_key =
|
||||||
|
"RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
||||||
|
};
|
||||||
|
|
||||||
|
# You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v2/public-resolvers.md
|
||||||
|
server_names = [
|
||||||
|
"acsacsar-ams-ipv4"
|
||||||
|
"acsacsar-ams-ipv6"
|
||||||
|
"dnscrypt.eu-dk"
|
||||||
|
"dnscrypt.eu-dk-ipv6"
|
||||||
|
"dnscrypt.eu-nl"
|
||||||
|
"dnscrypt.eu-nl-ipv6"
|
||||||
|
"meganerd"
|
||||||
|
"meganerd-ipv6"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.dnscrypt-proxy2 = {
|
systemd.services.dnscrypt-proxy2.serviceConfig = {
|
||||||
enable = true;
|
StateDirectory = "dnscrypt-proxy2";
|
||||||
settings = {
|
};
|
||||||
ipv6_servers = true;
|
}
|
||||||
require_dnssec = true;
|
|
||||||
|
|
||||||
sources.public-resolvers = {
|
|
||||||
urls = [
|
|
||||||
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v2/public-resolvers.md"
|
|
||||||
"https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md"
|
|
||||||
];
|
|
||||||
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
|
|
||||||
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
|
||||||
};
|
|
||||||
|
|
||||||
# You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v2/public-resolvers.md
|
|
||||||
server_names = [ "acsacsar-ams-ipv4" "acsacsar-ams-ipv6" "dnscrypt.eu-dk" "dnscrypt.eu-dk-ipv6" "dnscrypt.eu-nl" "dnscrypt.eu-nl-ipv6" "meganerd" "meganerd-ipv6" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.dnscrypt-proxy2.serviceConfig = {
|
|
||||||
StateDirectory = "dnscrypt-proxy2";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
services.xserver.displayManager.lightdm.enable = true;
|
services.xserver.displayManager.lightdm.enable = true;
|
||||||
services.xserver.desktopManager.xfce.enable = true;
|
services.xserver.desktopManager.xfce.enable = true;
|
||||||
|
|
@ -9,7 +7,7 @@
|
||||||
package = lib.mkForce pkgs.gnome3.gvfs;
|
package = lib.mkForce pkgs.gnome3.gvfs;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.kat = {
|
home-manager.users.kat = {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.xfce.xfce4-terminal
|
pkgs.xfce.xfce4-terminal
|
||||||
pkgs.xfce.thunar
|
pkgs.xfce.thunar
|
||||||
|
|
@ -20,5 +18,5 @@
|
||||||
pkgs.xfce.xfce4-whiskermenu-plugin
|
pkgs.xfce.xfce4-whiskermenu-plugin
|
||||||
pkgs.xfce.xfce4-screenshooter
|
pkgs.xfce.xfce4-screenshooter
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
services.pcscd.enable = true;
|
||||||
|
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
programs.gnupg.agent = {
|
||||||
{
|
enable = true;
|
||||||
services.pcscd.enable = true;
|
enableSSHSupport = true;
|
||||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
pinentryFlavor = "curses";
|
||||||
|
};
|
||||||
programs.gnupg.agent = {
|
}
|
||||||
enable = true;
|
|
||||||
enableSSHSupport = true;
|
|
||||||
pinentryFlavor = "curses";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,27 @@
|
||||||
let
|
let
|
||||||
pkgs = import <nixpkgs> {};
|
pkgs = import <nixpkgs> { };
|
||||||
lib = pkgs.lib;
|
lib = pkgs.lib;
|
||||||
|
|
||||||
hosts = import ../configuration/hosts;
|
hosts = import ../configuration/hosts;
|
||||||
nixosHosts = lib.filterAttrs (name: host: host ? ssh) hosts;
|
nixosHosts = lib.filterAttrs (name: host: host ? ssh) hosts;
|
||||||
|
|
||||||
allGroups = lib.unique (
|
allGroups = lib.unique
|
||||||
lib.flatten (
|
(lib.flatten (lib.mapAttrsToList (name: host: host.groups) hosts));
|
||||||
lib.mapAttrsToList (
|
|
||||||
name: host: host.groups
|
|
||||||
) hosts
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
hostsInGroup = group:
|
hostsInGroup = group:
|
||||||
lib.filterAttrs (
|
lib.filterAttrs (k: v: builtins.elem group v.groups) hosts;
|
||||||
k: v: builtins.elem group v.groups
|
|
||||||
) hosts;
|
|
||||||
|
|
||||||
hostsInAllGroups = lib.listToAttrs (
|
hostsInAllGroups = lib.listToAttrs
|
||||||
map (
|
(map (group: lib.nameValuePair group (lib.attrNames (hostsInGroup group)))
|
||||||
group: lib.nameValuePair group (
|
allGroups);
|
||||||
lib.attrNames (hostsInGroup group)
|
|
||||||
)
|
|
||||||
) allGroups );
|
|
||||||
|
|
||||||
mkDeploy = hostnames: pkgs.writeScript "deploy-${lib.concatStringsSep "-" hostnames}" ''
|
mkDeploy = hostnames:
|
||||||
#!${pkgs.stdenv.shell}
|
pkgs.writeScript "deploy-${lib.concatStringsSep "-" hostnames}" ''
|
||||||
set -e -o pipefail
|
#!${pkgs.stdenv.shell}
|
||||||
export PATH=/run/wrappers/bin/:${with pkgs; lib.makeBinPath [
|
set -e -o pipefail
|
||||||
|
export PATH=/run/wrappers/bin/:${
|
||||||
|
with pkgs;
|
||||||
|
lib.makeBinPath [
|
||||||
coreutils
|
coreutils
|
||||||
openssh
|
openssh
|
||||||
nix
|
nix
|
||||||
|
|
@ -37,21 +30,24 @@
|
||||||
nettools
|
nettools
|
||||||
gzip
|
gzip
|
||||||
git
|
git
|
||||||
]}
|
]
|
||||||
|
}
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
shift || true
|
shift || true
|
||||||
ARGS=$@
|
ARGS=$@
|
||||||
|
|
||||||
[ "$MODE" == "" ] && MODE="switch"
|
[ "$MODE" == "" ] && MODE="switch"
|
||||||
|
|
||||||
${lib.concatMapStrings (hostname: let
|
${lib.concatMapStrings (hostname:
|
||||||
|
let
|
||||||
hostAttrs = nixosHosts.${hostname};
|
hostAttrs = nixosHosts.${hostname};
|
||||||
nixosSystem = (import <nixpkgs/nixos/lib/eval-config.nix> {
|
nixosSystem = (import <nixpkgs/nixos/lib/eval-config.nix> {
|
||||||
modules = [
|
modules = [
|
||||||
"${toString ../configuration}/hosts/${hostname}/configuration.nix"
|
"${toString ../configuration}/hosts/${hostname}/configuration.nix"
|
||||||
];
|
];
|
||||||
system = if hostAttrs ? system then hostAttrs.system else "x86_64-linux";
|
system =
|
||||||
|
if hostAttrs ? system then hostAttrs.system else "x86_64-linux";
|
||||||
}).config.system.build.toplevel;
|
}).config.system.build.toplevel;
|
||||||
in ''
|
in ''
|
||||||
(
|
(
|
||||||
|
|
@ -63,14 +59,16 @@
|
||||||
PID_LIST+=" $!"
|
PID_LIST+=" $!"
|
||||||
'') hostnames}
|
'') hostnames}
|
||||||
|
|
||||||
echo "deploys started, waiting for them to finish..."
|
echo "deploys started, waiting for them to finish..."
|
||||||
|
|
||||||
trap "kill $PID_LIST" SIGINT
|
trap "kill $PID_LIST" SIGINT
|
||||||
wait $PID_LIST
|
wait $PID_LIST
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in {
|
in {
|
||||||
deploy = (lib.mapAttrs (hostname: hostAttrs: mkDeploy [ hostname ]) nixosHosts)
|
deploy =
|
||||||
// (lib.mapAttrs (group: hosts: mkDeploy hosts) hostsInAllGroups)
|
(lib.mapAttrs (hostname: hostAttrs: mkDeploy [ hostname ]) nixosHosts)
|
||||||
// { all = mkDeploy (lib.attrNames nixosHosts); };
|
// (lib.mapAttrs (group: hosts: mkDeploy hosts) hostsInAllGroups) // {
|
||||||
}
|
all = mkDeploy (lib.attrNames nixosHosts);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [ ];
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
{ nixpkgs ? <nixpkgs>, ... }:
|
{ nixpkgs ? <nixpkgs>, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {};
|
pkgs = import nixpkgs { };
|
||||||
callPackage = pkgs.lib.callPackageWith (pkgs // newpkgs);
|
callPackage = pkgs.lib.callPackageWith (pkgs // newpkgs);
|
||||||
|
|
||||||
newpkgs = {
|
newpkgs = { };
|
||||||
};
|
|
||||||
|
|
||||||
in newpkgs
|
in newpkgs
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue