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
|
|
@ -17,7 +17,7 @@
|
|||
networking.hostName = "boline";
|
||||
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces.ens3.ipv4.addresses = [ {
|
||||
networking.interfaces.ens3.ipv4.addresses = [{
|
||||
address = "104.244.73.10";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
font-family: "Hack Nerd Font";
|
||||
font-size: 12px;
|
||||
min-height: 14px
|
||||
}
|
||||
}
|
||||
|
||||
#clock, #memory, #cpu, #temperature, #pulseaudio, #network, #mpd {
|
||||
#clock, #memory, #cpu, #temperature, #pulseaudio, #network, #mpd {
|
||||
margin-left: 8px;
|
||||
margin-right: 8px;
|
||||
padding-left: 8px;
|
||||
|
|
@ -17,19 +17,19 @@
|
|||
transition: none;
|
||||
border-bottom: 2px solid ${colors.base16.color7};
|
||||
color: ${colors.base16.color7}
|
||||
}
|
||||
}
|
||||
|
||||
window#waybar { background: ${hextorgba colors.base16.color0} }
|
||||
window#waybar { background: ${hextorgba colors.base16.color0} }
|
||||
|
||||
#window {
|
||||
#window {
|
||||
color: ${colors.base16.color7};
|
||||
padding-left: 16px;
|
||||
padding-right: 16px
|
||||
}
|
||||
}
|
||||
|
||||
#workspaces { padding: 0px 4px 0px 4px }
|
||||
#workspaces { padding: 0px 4px 0px 4px }
|
||||
|
||||
#workspaces button {
|
||||
#workspaces button {
|
||||
color: ${colors.base16.color7};
|
||||
background: ${hextorgba colors.base16.color11};
|
||||
font-size: 16px;
|
||||
|
|
@ -37,29 +37,29 @@ window#waybar { background: ${hextorgba colors.base16.color0} }
|
|||
border-bottom: 2px solid transparent;
|
||||
border-left: 1px solid ${colors.base16.color7};
|
||||
border-right: 1px solid ${colors.base16.color7}
|
||||
}
|
||||
}
|
||||
|
||||
#workspaces button:last-child { margin-right: 0px }
|
||||
#workspaces button:last-child { margin-right: 0px }
|
||||
|
||||
#workspaces button.focused {
|
||||
#workspaces button.focused {
|
||||
color: ${colors.base16.color1};
|
||||
border-bottom-color: ${colors.base16.color1}
|
||||
}
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
#workspaces button:hover {
|
||||
transition: none;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
color: ${colors.base16.color3};
|
||||
border-bottom-color: ${colors.base16.color3}
|
||||
}
|
||||
}
|
||||
|
||||
#mpd { border-color: #5af78e }
|
||||
#mpd.disconnected, #mpd.stopped { border-color: #282a36 }
|
||||
#network { border-color: ${colors.base16.color3} }
|
||||
#pulseaudio { border-color: ${colors.base16.color2} }
|
||||
#temperature { border-color: ${colors.base16.color4} }
|
||||
#cpu { border-color: ${colors.base16.color5} }
|
||||
#memory { border-color: ${colors.base16.color17} }
|
||||
#clock { border-color: ${colors.base16.color7} }
|
||||
#mpd { border-color: #5af78e }
|
||||
#mpd.disconnected, #mpd.stopped { border-color: #282a36 }
|
||||
#network { border-color: ${colors.base16.color3} }
|
||||
#pulseaudio { border-color: ${colors.base16.color2} }
|
||||
#temperature { border-color: ${colors.base16.color4} }
|
||||
#cpu { border-color: ${colors.base16.color5} }
|
||||
#memory { border-color: ${colors.base16.color17} }
|
||||
#clock { border-color: ${colors.base16.color7} }
|
||||
''
|
||||
|
|
|
|||
|
|
@ -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