mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
Ran nixfmt.
This commit is contained in:
parent
4fddb23df3
commit
7e4b442fd9
14 changed files with 148 additions and 159 deletions
|
|
@ -1,22 +1,20 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/e0a9f76a-5eed-4dd3-a5a6-a93006f7d526";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/e0a9f76a-5eed-4dd3-a5a6-a93006f7d526";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/cf122d6d-eca9-44f5-b655-85aaf5b2e6af"; }
|
||||
];
|
||||
[{ device = "/dev/disk/by-uuid/cf122d6d-eca9-44f5-b655-85aaf5b2e6af"; }];
|
||||
|
||||
}
|
||||
|
|
@ -5,9 +5,7 @@
|
|||
networking.nat.externalInterface = "ens3";
|
||||
networking.nat.internalInterfaces = [ "wg0" ];
|
||||
|
||||
networking.firewall = {
|
||||
allowedUDPPorts = [ 51820 ];
|
||||
};
|
||||
networking.firewall = { allowedUDPPorts = [ 51820 ]; };
|
||||
|
||||
networking.wireguard.interfaces = {
|
||||
wg0 = {
|
||||
|
|
@ -24,12 +22,10 @@
|
|||
|
||||
privateKeyFile = "/var/secrets/wireguard-private";
|
||||
|
||||
peers = [
|
||||
{
|
||||
peers = [{
|
||||
publicKey = "{client public key}";
|
||||
allowedIPs = [ "10.100.0.2/32" ];
|
||||
}
|
||||
];
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -9,7 +9,8 @@
|
|||
./services/torrenting.nix
|
||||
];
|
||||
|
||||
meta.deploy.profiles = [ "desktop" "development" "sway" "gaming" "network" "yubikey" ];
|
||||
meta.deploy.profiles =
|
||||
[ "desktop" "development" "sway" "gaming" "network" "yubikey" ];
|
||||
meta.deploy.ssh.host = "192.168.1.135";
|
||||
|
||||
# libvirtd is used for our virtual machine
|
||||
|
|
@ -22,7 +23,8 @@
|
|||
};
|
||||
|
||||
# required for guest reboots with the 580
|
||||
boot.extraModulePackages = [ (pkgs.linuxPackagesFor config.boot.kernelPackages.kernel).vendor-reset ];
|
||||
boot.extraModulePackages =
|
||||
[ (pkgs.linuxPackagesFor config.boot.kernelPackages.kernel).vendor-reset ];
|
||||
|
||||
# required groups for various intentions
|
||||
users.users.kat.extraGroups = [ "libvirtd" "input" "qemu-libvirtd" ];
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
meta.deploy.profiles = [ "desktop" "development" "sway" "gaming" "network" "yubikey" ];
|
||||
meta.deploy.profiles =
|
||||
[ "desktop" "development" "sway" "gaming" "network" "yubikey" ];
|
||||
meta.deploy.ssh.host = "192.168.1.92";
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
|
|
|||
|
|
@ -4,37 +4,35 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [ (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.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "rpool/safe/root";
|
||||
fileSystems."/" = {
|
||||
device = "rpool/safe/root";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "rpool/safe/home";
|
||||
fileSystems."/home" = {
|
||||
device = "rpool/safe/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "rpool/local/nix";
|
||||
fileSystems."/nix" = {
|
||||
device = "rpool/local/nix";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/D680-ED0E";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/D680-ED0E";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/87ff4f68-cc00-494e-8eba-050469c3bf03"; }
|
||||
];
|
||||
[{ device = "/dev/disk/by-uuid/87ff4f68-cc00-494e-8eba-050469c3bf03"; }];
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,10 @@ let
|
|||
in {
|
||||
config = lib.mkIf (lib.elem "desktop" config.meta.deploy.profiles) {
|
||||
|
||||
nixpkgs.config = { mumble.speechdSupport = true; pulseaudio = true;};
|
||||
nixpkgs.config = {
|
||||
mumble.speechdSupport = true;
|
||||
pulseaudio = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.redshift ];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let colors = import ./colors.nix; in {
|
||||
let colors = import ./colors.nix;
|
||||
in {
|
||||
config = lib.mkIf (lib.elem "sway" config.meta.deploy.profiles) {
|
||||
fonts.fonts = with pkgs; [
|
||||
font-awesome
|
||||
|
|
@ -253,7 +254,10 @@ let colors = import ./colors.nix; in {
|
|||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
style = import ./waybar.css.nix { inherit colors; hextorgba = pkgs.colorhelpers.hextorgba; };
|
||||
style = import ./waybar.css.nix {
|
||||
inherit colors;
|
||||
hextorgba = pkgs.colorhelpers.hextorgba;
|
||||
};
|
||||
settings = [{
|
||||
modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
|
||||
modules-center = [ "clock" ];
|
||||
|
|
@ -268,18 +272,10 @@ let colors = import ./colors.nix; in {
|
|||
];
|
||||
|
||||
modules = {
|
||||
cpu = {
|
||||
format = " {usage}%";
|
||||
};
|
||||
memory = {
|
||||
format = " {percentage}%";
|
||||
};
|
||||
battery = {
|
||||
format = " {capacity}%";
|
||||
};
|
||||
temperature = {
|
||||
format = "﨎 {temperatureC}°C";
|
||||
};
|
||||
cpu = { format = " {usage}%"; };
|
||||
memory = { format = " {percentage}%"; };
|
||||
battery = { format = " {capacity}%"; };
|
||||
temperature = { format = "﨎 {temperatureC}°C"; };
|
||||
pulseaudio = {
|
||||
format = " {volume}%";
|
||||
on-click = "pavucontrol";
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./emacs.nix
|
||||
];
|
||||
imports = [ ./emacs.nix ];
|
||||
|
||||
users.users.kat = {
|
||||
uid = 1000;
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@ let
|
|||
emacs = pkgs.callPackage sources.nix-doom-emacs {
|
||||
doomPrivateDir = "${./doom.d}";
|
||||
emacsPackagesOverlay = self: super: {
|
||||
magit-delta = super.magit-delta.overrideAttrs (esuper: {
|
||||
buildInputs = esuper.buildInputs ++ [ pkgs.git ];
|
||||
});
|
||||
magit-delta = super.magit-delta.overrideAttrs
|
||||
(esuper: { buildInputs = esuper.buildInputs ++ [ pkgs.git ]; });
|
||||
};
|
||||
};
|
||||
in {
|
||||
|
|
|
|||
|
|
@ -1,19 +1,21 @@
|
|||
{ lib }:
|
||||
rec {
|
||||
hexChars = [ "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "a" "b" "c" "d" "e" "f" ];
|
||||
hexCharToInt = char: let
|
||||
{ lib }: rec {
|
||||
hexChars =
|
||||
[ "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "a" "b" "c" "d" "e" "f" ];
|
||||
hexCharToInt = char:
|
||||
let
|
||||
pairs = lib.imap0 (lib.flip lib.nameValuePair) hexChars;
|
||||
idx = builtins.listToAttrs pairs;
|
||||
in idx.${lib.toLower char};
|
||||
hexToInt = str:
|
||||
lib.foldl (value: chr: value * 16 + hexCharToInt chr) 0 (lib.stringToCharacters str);
|
||||
hextorgba = hex: (
|
||||
let r_hex = lib.substring 1 2 hex;
|
||||
lib.foldl (value: chr: value * 16 + hexCharToInt chr) 0
|
||||
(lib.stringToCharacters str);
|
||||
hextorgba = hex:
|
||||
(let
|
||||
r_hex = lib.substring 1 2 hex;
|
||||
g_hex = lib.substring 3 2 hex;
|
||||
b_hex = lib.substring 5 2 hex;
|
||||
r_dec = hexToInt r_hex;
|
||||
g_dec = hexToInt g_hex;
|
||||
b_dec = hexToInt b_hex;
|
||||
in "rgba(${toString r_dec}, ${toString g_dec}, ${toString b_dec}, 0.75)"
|
||||
);
|
||||
in "rgba(${toString r_dec}, ${toString g_dec}, ${toString b_dec}, 0.75)");
|
||||
}
|
||||
|
|
@ -11,9 +11,7 @@ let
|
|||
inherit (pkgs) dino;
|
||||
};
|
||||
|
||||
discord = pkgs.discord.override {
|
||||
nss = pkgs.nss_latest;
|
||||
};
|
||||
discord = pkgs.discord.override { nss = pkgs.nss_latest; };
|
||||
|
||||
linuxPackagesFor = kernel:
|
||||
(pkgs.linuxPackagesFor kernel).extend (_: ksuper: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue