mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
New host, beltane
This commit is contained in:
parent
acdb3c4a04
commit
85226f016e
7 changed files with 181 additions and 0 deletions
1
config/hosts/beltane/home/default.nix
Normal file
1
config/hosts/beltane/home/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{ ... }: { imports = [ ./sway ]; }
|
||||||
46
config/hosts/beltane/home/sway/default.nix
Normal file
46
config/hosts/beltane/home/sway/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./swayidle.nix ];
|
||||||
|
|
||||||
|
wayland.windowManager.sway = {
|
||||||
|
config =
|
||||||
|
let
|
||||||
|
lockCommand = "swaylock -i VGA-1:${../../../../users/kat/sway/wallpapers/main.png} -s fill";
|
||||||
|
cfg = config.wayland.windowManager.sway.config;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
#startup = [{ command = "${pkgs.ckb-next}/bin/ckb-next -b"; }];
|
||||||
|
|
||||||
|
output =
|
||||||
|
let
|
||||||
|
middle = {
|
||||||
|
res = "1280x1024@75Hz";
|
||||||
|
pos = "1920 0";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
"VGA-1" = middle;
|
||||||
|
};
|
||||||
|
|
||||||
|
keybindings = {
|
||||||
|
"${cfg.modifier}+x" = "exec ${lockCommand}";
|
||||||
|
};
|
||||||
|
|
||||||
|
modes = {
|
||||||
|
"System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown" =
|
||||||
|
{
|
||||||
|
"l" = "exec ${lockCommand}, mode default";
|
||||||
|
"e" = "exec swaymsg exit, mode default";
|
||||||
|
"s" = "exec systemctl suspend, mode default";
|
||||||
|
"h" = "exec systemctl hibernate, mode default";
|
||||||
|
"r" = "exec systemctl reboot, mode default";
|
||||||
|
"Shift+s" = "exec systemctl shutdown, mode default";
|
||||||
|
"Return" = "mode default";
|
||||||
|
"Escape" = "mode default";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
28
config/hosts/beltane/home/sway/swayidle.nix
Normal file
28
config/hosts/beltane/home/sway/swayidle.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
systemd.user.services.swayidle = {
|
||||||
|
Unit = {
|
||||||
|
Description = "swayidle";
|
||||||
|
Documentation = [ "man:swayidle(1)" ];
|
||||||
|
PartOf = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.swayidle}/bin/swayidle -w \
|
||||||
|
timeout 300 '${pkgs.swaylock}/bin/swaylock -f -i VGA-1:${
|
||||||
|
../../../../users/kat/sway/wallpapers/main.png
|
||||||
|
} \
|
||||||
|
timeout 600 'swaymsg "output * dpms off"' \
|
||||||
|
resume 'swaymsg "output * dpms on"' \
|
||||||
|
before-sleep '${pkgs.swaylock}/bin/swaylock -f -i VGA-1:${
|
||||||
|
../../../../users/kat/sway/wallpapers/main.png
|
||||||
|
}'
|
||||||
|
'';
|
||||||
|
RestartSec = 3;
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||||
|
};
|
||||||
|
}
|
||||||
24
config/hosts/beltane/meta.nix
Normal file
24
config/hosts/beltane/meta.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
{ lib, config, ... }: with lib; {
|
||||||
|
config = {
|
||||||
|
deploy.targets.beltane = {
|
||||||
|
nodeNames = lib.singleton "beltane";
|
||||||
|
tf = {
|
||||||
|
resources.beltane = {
|
||||||
|
provider = "null";
|
||||||
|
type = "resource";
|
||||||
|
connection = {
|
||||||
|
port = 62954;
|
||||||
|
host = "192.168.1.223";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
network.nodes.beltane = {
|
||||||
|
imports = lib.hostImport "beltane";
|
||||||
|
networking = {
|
||||||
|
hostName = "beltane";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
36
config/hosts/beltane/nixos/default.nix
Normal file
36
config/hosts/beltane/nixos/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
{ config, pkgs, profiles, users, tf, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hw.nix
|
||||||
|
profiles.gui
|
||||||
|
profiles.sway
|
||||||
|
users.kat.guiFull
|
||||||
|
../../../services/zfs.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.kat = {
|
||||||
|
imports = [
|
||||||
|
../home
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.loader.grub.enable = true;
|
||||||
|
boot.loader.grub.efiSupport = true;
|
||||||
|
boot.loader.grub.device = "nodev";
|
||||||
|
boot.loader.grub.mirroredBoots = [
|
||||||
|
{ devices = [ "/dev/disk/by-uuid/4520-4E5F" ];
|
||||||
|
path = "/boot-fallback"; }
|
||||||
|
];
|
||||||
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
networking.hostName = "beltane";
|
||||||
|
networking.hostId = "3ef9a419";
|
||||||
|
|
||||||
|
networking.useDHCP = false;
|
||||||
|
networking.interfaces.eno1.useDHCP = true;
|
||||||
|
|
||||||
|
system.stateVersion = "21.05";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
45
config/hosts/beltane/nixos/hw.nix
Normal file
45
config/hosts/beltane/nixos/hw.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
# 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 = [ "ata_generic" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "zroot/safe/root";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/nix" =
|
||||||
|
{ device = "zroot/local/nix";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "zroot/safe/home";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/44CC-7137";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot-fallback" =
|
||||||
|
{ device = "/dev/disk/by-uuid/4520-4E5F";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/682df001-bad8-4d94-a86b-9068ce5eee4c"; }
|
||||||
|
{ device = "/dev/disk/by-uuid/1ee2d322-235c-41de-b272-7ceded4e2624"; }
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -32,6 +32,7 @@ let
|
||||||
./config/modules/meta/default.nix
|
./config/modules/meta/default.nix
|
||||||
./config/hosts/dummy/meta.nix
|
./config/hosts/dummy/meta.nix
|
||||||
./config/hosts/athame/meta.nix
|
./config/hosts/athame/meta.nix
|
||||||
|
./config/hosts/beltane/meta.nix
|
||||||
./config/hosts/samhain/meta.nix
|
./config/hosts/samhain/meta.nix
|
||||||
./config/hosts/yule/meta.nix
|
./config/hosts/yule/meta.nix
|
||||||
./config/hosts/mabon/meta.nix
|
./config/hosts/mabon/meta.nix
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue