mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
ops: tewi init
This commit is contained in:
parent
3f2422b20f
commit
67c2e70205
10 changed files with 154 additions and 50 deletions
|
|
@ -1,9 +1,9 @@
|
||||||
{ config, pkgs, lib, inputs, meta, ... }: {
|
{ config, pkgs, lib, inputs, meta, ... }: {
|
||||||
imports = with meta; [
|
imports = with meta; [
|
||||||
hardware.aarch64-darwin
|
hardware.aarch64-darwin
|
||||||
darwin.base
|
darwin.base
|
||||||
darwin.kat
|
darwin.kat
|
||||||
home.emacs
|
home.work
|
||||||
];
|
];
|
||||||
|
|
||||||
security.pam.enableSudoTouchIdAuth = true;
|
security.pam.enableSudoTouchIdAuth = true;
|
||||||
|
|
@ -26,27 +26,27 @@
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
envVars = {
|
envVars = {
|
||||||
"SSH_AUTH_SOCK" = "/Users/kat/.gnupg/S.gpg-agent.ssh";
|
"SSH_AUTH_SOCK" = "/Users/kat/.gnupg/S.gpg-agent.ssh";
|
||||||
};
|
};
|
||||||
buildMachines = [
|
buildMachines = [
|
||||||
{
|
{
|
||||||
hostName = "renko-build";
|
hostName = "renko-build";
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
maxJobs = 100;
|
maxJobs = 100;
|
||||||
speedFactor = 1;
|
speedFactor = 1;
|
||||||
supportedFeatures = [ "benchmark" "big-parallel" "kvm" ];
|
supportedFeatures = [ "benchmark" "big-parallel" "kvm" ];
|
||||||
mandatoryFeatures = [ ];
|
mandatoryFeatures = [ ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
hostName = "daiyousei-build";
|
hostName = "daiyousei-build";
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
maxJobs = 100;
|
maxJobs = 100;
|
||||||
speedFactor = 1;
|
speedFactor = 1;
|
||||||
supportedFeatures = [ "benchmark" "big-parallel" "kvm" ];
|
supportedFeatures = [ "benchmark" "big-parallel" "kvm" ];
|
||||||
mandatoryFeatures = [ ];
|
mandatoryFeatures = [ ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
distributedBuilds = true;
|
distributedBuilds = true;
|
||||||
};
|
};
|
||||||
|
|
@ -54,29 +54,30 @@
|
||||||
homebrew = {
|
homebrew = {
|
||||||
brewPrefix = "/opt/homebrew/bin";
|
brewPrefix = "/opt/homebrew/bin";
|
||||||
casks = [
|
casks = [
|
||||||
"element"
|
|
||||||
"visual-studio-code"
|
|
||||||
"firefox"
|
|
||||||
"telegram"
|
|
||||||
"discord"
|
|
||||||
"utm"
|
"utm"
|
||||||
"mullvadvpn"
|
"mullvadvpn"
|
||||||
"bitwarden"
|
"android-studio"
|
||||||
"gimp"
|
"bitwarden"
|
||||||
"cyberduck"
|
"telegram"
|
||||||
];
|
"deluge"
|
||||||
masApps = {
|
"element"
|
||||||
Tailscale = 1475387142;
|
"discord"
|
||||||
};
|
"firefox"
|
||||||
|
"gimp"
|
||||||
|
"cyberduck"
|
||||||
|
"docker"
|
||||||
|
"google-chrome"
|
||||||
|
"android-studio"
|
||||||
|
"linear-linear"
|
||||||
|
"pycharm-ce"
|
||||||
|
"parsec"
|
||||||
|
"nextcloud"
|
||||||
|
"slack"
|
||||||
|
];
|
||||||
|
masApps = {
|
||||||
|
Tailscale = 1475387142;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
terraform
|
|
||||||
yt-dlp
|
|
||||||
k2tf
|
|
||||||
awscli
|
|
||||||
jq
|
|
||||||
];
|
|
||||||
|
|
||||||
system.stateVersion = 4;
|
system.stateVersion = 4;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,14 @@ in
|
||||||
gtk
|
gtk
|
||||||
qt
|
qt
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
work = {
|
||||||
|
imports = with dirImports; [
|
||||||
|
work
|
||||||
|
wezterm
|
||||||
|
emacs
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
services = serviceImports;
|
services = serviceImports;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ opt.hlsearch = true -- Highlight matches with last sea
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
-- Tabs, indent
|
-- Tabs, indent
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
opt.expandtab = false -- Use spaces instead of tabs
|
opt.expandtab = true -- Use spaces instead of tabs
|
||||||
opt.shiftwidth = 2 -- Shift 2 spaces when tab
|
opt.shiftwidth = 2 -- Shift 2 spaces when tab
|
||||||
opt.tabstop = 2 -- 1 tab == 2 spaces
|
opt.tabstop = 2 -- 1 tab == 2 spaces
|
||||||
opt.smartindent = true -- Autoindent new lines
|
opt.smartindent = true -- Autoindent new lines
|
||||||
|
|
|
||||||
4
home/work/packages.nix
Normal file
4
home/work/packages.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
];
|
||||||
|
}
|
||||||
13
modules/darwin/applications.nix
Normal file
13
modules/darwin/applications.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{config, pkgs, ... }: {
|
||||||
|
system.activationScripts.applications.text = pkgs.lib.mkForce (
|
||||||
|
''
|
||||||
|
echo "setting up ~/Applications..." >&2
|
||||||
|
rm -rf ~/Applications/Nix\ Apps
|
||||||
|
mkdir -p ~/Applications/Nix\ Apps
|
||||||
|
for app in $(find ${config.system.build.applications}/Applications -maxdepth 1 -type l); do
|
||||||
|
src="$(/usr/bin/stat -f%Y "$app")"
|
||||||
|
cp -r "$src" ~/Applications/Nix\ Apps
|
||||||
|
done
|
||||||
|
''
|
||||||
|
);
|
||||||
|
}
|
||||||
71
nixos/systems/tewi.nix
Normal file
71
nixos/systems/tewi.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
||||||
|
{ meta, config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
deploy.tf = {
|
||||||
|
resources.tewi = {
|
||||||
|
provider = "null";
|
||||||
|
type = "resource";
|
||||||
|
connection = {
|
||||||
|
port = lib.head config.services.openssh.ports;
|
||||||
|
host = config.network.addresses.private.nixos.ipv4.address;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
useDHCP = false;
|
||||||
|
interfaces = {
|
||||||
|
eno1 = {
|
||||||
|
useDHCP = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
network = {
|
||||||
|
addresses = {
|
||||||
|
private = {
|
||||||
|
enable = true;
|
||||||
|
nixos = {
|
||||||
|
ipv4.address = "10.1.1.38";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
efi = {
|
||||||
|
canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
initrd = {
|
||||||
|
availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
};
|
||||||
|
kernelModules = [ "kvm-intel" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "/dev/disk/by-uuid/6c5d82b1-5d11-4c72-96c6-5f90e6ce57f5";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
"/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/85DC-72FA";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = lib.singleton ({
|
||||||
|
device = "/dev/disk/by-uuid/137605d3-5e3f-47c8-8070-6783ce651932";
|
||||||
|
});
|
||||||
|
|
||||||
|
system.stateVersion = "21.05";
|
||||||
|
}
|
||||||
|
|
@ -12,6 +12,6 @@ final: prev: {
|
||||||
gensokyoZone = final.callPackage ./gensokyoZone { };
|
gensokyoZone = final.callPackage ./gensokyoZone { };
|
||||||
oomox = final.callPackage ./oomox.nix { };
|
oomox = final.callPackage ./oomox.nix { };
|
||||||
wezterm = final.callPackage ./wezterm {
|
wezterm = final.callPackage ./wezterm {
|
||||||
inherit (final.darwin.apple_sdk.frameworks) Cocoa CoreGraphics Foundation;
|
inherit (final.darwin.apple_sdk.frameworks) Cocoa CoreGraphics Foundation UserNotifications;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
, CoreGraphics
|
, CoreGraphics
|
||||||
, Cocoa
|
, Cocoa
|
||||||
, Foundation
|
, Foundation
|
||||||
|
, UserNotifications
|
||||||
, libiconv
|
, libiconv
|
||||||
, nixosTests
|
, nixosTests
|
||||||
, runCommand
|
, runCommand
|
||||||
|
|
@ -69,6 +70,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
] ++ lib.optionals stdenv.isDarwin [
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
Cocoa
|
Cocoa
|
||||||
CoreGraphics
|
CoreGraphics
|
||||||
|
UserNotifications
|
||||||
Foundation
|
Foundation
|
||||||
libiconv
|
libiconv
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,14 @@
|
||||||
users.users.tvheadend.group = "tvheadend";
|
users.users.tvheadend.group = "tvheadend";
|
||||||
users.groups.tvheadend = {};
|
users.groups.tvheadend = {};
|
||||||
|
|
||||||
network.firewall.public = {
|
network.firewall = {
|
||||||
|
private = {
|
||||||
tcp.ports = [ 9981 9982 ];
|
tcp.ports = [ 9981 9982 ];
|
||||||
};
|
};
|
||||||
|
public = {
|
||||||
|
tcp.ports = [ 9981 9982 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services.antennas = {
|
systemd.services.antennas = {
|
||||||
wantedBy = [ "plex.service" ];
|
wantedBy = [ "plex.service" ];
|
||||||
|
|
|
||||||
2
tf
2
tf
|
|
@ -1 +1 @@
|
||||||
Subproject commit f16be2a91179d35803e30d3f4a8233156a8faa3f
|
Subproject commit 68e0630db630afab4152e4a3ae8a6837675c016f
|
||||||
Loading…
Add table
Add a link
Reference in a new issue