Ran nixfmt.

This commit is contained in:
kat witch 2021-02-08 22:03:38 +00:00 committed by kat
parent 4fddb23df3
commit 7e4b442fd9
14 changed files with 148 additions and 159 deletions

View file

@ -8,7 +8,7 @@
#meta.deploy.profiles = [];
meta.deploy.ssh.host = "boline.kittywit.ch";
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/vda";
@ -17,9 +17,9 @@
networking.hostName = "boline";
networking.useDHCP = false;
networking.interfaces.ens3.ipv4.addresses = [ {
address = "104.244.73.10";
prefixLength = 24;
networking.interfaces.ens3.ipv4.addresses = [{
address = "104.244.73.10";
prefixLength = 24;
}];
networking.defaultGateway = "104.244.73.1";
networking.nameservers = [ "1.1.1.1" ];

View file

@ -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";
fsType = "ext4";
};
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"; }];
}
}

View file

@ -1,15 +1,13 @@
{ config, pkgs, ... }:
{
networking.nat.enable = true;
networking.nat.externalInterface = "ens3";
networking.nat.internalInterfaces = [ "wg0" ];
networking.nat.enable = true;
networking.nat.externalInterface = "ens3";
networking.nat.internalInterfaces = [ "wg0" ];
networking.firewall = {
allowedUDPPorts = [ 51820 ];
};
networking.firewall = { allowedUDPPorts = [ 51820 ]; };
networking.wireguard.interfaces = {
networking.wireguard.interfaces = {
wg0 = {
ips = [ "10.100.0.1/24" ];
@ -24,12 +22,10 @@
privateKeyFile = "/var/secrets/wireguard-private";
peers = [
{
publicKey = "{client public key}";
allowedIPs = [ "10.100.0.2/32" ];
}
];
peers = [{
publicKey = "{client public key}";
allowedIPs = [ "10.100.0.2/32" ];
}];
};
};
}
}

View file

@ -9,9 +9,10 @@
./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
virtualisation.libvirtd = {
enable = true;
@ -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" ];

View file

@ -1,13 +1,12 @@
{ 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;
boot.loader.efi.canTouchEfiVariables = true;
boot.supportedFilesystems = [ "zfs" ];

View file

@ -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";
fsType = "zfs";
};
fileSystems."/" = {
device = "rpool/safe/root";
fsType = "zfs";
};
fileSystems."/home" =
{ device = "rpool/safe/home";
fsType = "zfs";
};
fileSystems."/home" = {
device = "rpool/safe/home";
fsType = "zfs";
};
fileSystems."/nix" =
{ device = "rpool/local/nix";
fsType = "zfs";
};
fileSystems."/nix" = {
device = "rpool/local/nix";
fsType = "zfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D680-ED0E";
fsType = "vfat";
};
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"; }];
}

View file

@ -29,7 +29,7 @@ in {
EDITOR = "emacs";
TERMINFO_DIRS = "${pkgs.kitty.terminfo.outPath}/share/terminfo";
};
services.openssh.enable = true;
services.openssh.ports = lib.mkDefault [ 62954 ];
services.openssh.passwordAuthentication = false;

View file

@ -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 ];
@ -52,7 +55,7 @@ in {
programs.fish = { interactiveShellInit = "set -g fish_greeting ''"; };
programs.firefox = { enable = true; };
services.kdeconnect = {
enable = true;
indicator = true;

View file

@ -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,10 +254,13 @@ 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" ];
modules-center = [ "clock" ];
modules-right = [
"pulseaudio"
"network"
@ -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";

View file

@ -1,65 +1,65 @@
{ hextorgba, colors }:
''
* {
border: none;
border-radius: 0;
font-family: "Hack Nerd Font";
font-size: 12px;
min-height: 14px
}
* {
border: none;
border-radius: 0;
font-family: "Hack Nerd Font";
font-size: 12px;
min-height: 14px
}
#clock, #memory, #cpu, #temperature, #pulseaudio, #network, #mpd {
margin-left: 8px;
margin-right: 8px;
padding-left: 8px;
padding-right: 8px;
transition: none;
border-bottom: 2px solid ${colors.base16.color7};
color: ${colors.base16.color7}
}
#clock, #memory, #cpu, #temperature, #pulseaudio, #network, #mpd {
margin-left: 8px;
margin-right: 8px;
padding-left: 8px;
padding-right: 8px;
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 {
color: ${colors.base16.color7};
padding-left: 16px;
padding-right: 16px
}
#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 {
color: ${colors.base16.color7};
background: ${hextorgba colors.base16.color11};
font-size: 16px;
margin: 0px 4px 0px 4px;
border-bottom: 2px solid transparent;
border-left: 1px solid ${colors.base16.color7};
border-right: 1px solid ${colors.base16.color7}
}
#workspaces button {
color: ${colors.base16.color7};
background: ${hextorgba colors.base16.color11};
font-size: 16px;
margin: 0px 4px 0px 4px;
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 {
color: ${colors.base16.color1};
border-bottom-color: ${colors.base16.color1}
}
#workspaces button.focused {
color: ${colors.base16.color1};
border-bottom-color: ${colors.base16.color1}
}
#workspaces button:hover {
transition: none;
box-shadow: inherit;
text-shadow: inherit;
color: ${colors.base16.color3};
border-bottom-color: ${colors.base16.color3}
}
#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} }
''

View file

@ -1,10 +1,8 @@
{ config, pkgs, ... }:
{
imports = [
./emacs.nix
];
imports = [ ./emacs.nix ];
users.users.kat = {
uid = 1000;
isNormalUser = true;

View file

@ -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 {

View file

@ -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
pairs = lib.imap0 (lib.flip lib.nameValuePair) hexChars;
idx = builtins.listToAttrs pairs;
in idx.${lib.toLower char};
{ 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;
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)"
);
}
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)");
}

View file

@ -10,10 +10,8 @@ let
dino = callPackage "${sources.qyliss-nixlib}/overlays/patches/dino" {
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: {
@ -22,7 +20,7 @@ let
});
colorhelpers = import ../lib/colorhelpers.nix { inherit (pkgs) lib; };
inherit callPackage;
appendOverlays = overlays: (pkgs.appendOverlays overlays) // newpkgs;
};