nixdirfmt!

This commit is contained in:
kat witch 2021-03-02 22:32:02 +00:00
parent bfdd94bf7e
commit ad1faf2f24
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
18 changed files with 151 additions and 166 deletions

View file

@ -1,7 +1,6 @@
{ config, lib, pkgs, ... }:
let
sources = import ../../nix/sources.nix;
let sources = import ../../nix/sources.nix;
in {
imports = [ ../../modules ../users (sources.home-manager + "/nixos") ];

View file

@ -23,7 +23,7 @@
./matrix.nix
];
meta.deploy.profiles = [];
meta.deploy.profiles = [ ];
meta.deploy.ssh.host = "athame.kittywit.ch";
boot.loader.grub.enable = true;

View file

@ -2,22 +2,18 @@
let secrets = (import ../../../secrets.nix);
in {
security.acme = {
certs."kittywit.ch" = {
group = "kittywit-ch";
};
};
security.acme = { certs."kittywit.ch" = { group = "kittywit-ch"; }; };
users.groups."kittywit-ch".members = ["murmur" "nginx"];
users.groups."kittywit-ch".members = [ "murmur" "nginx" ];
services.murmur = {
enable = true;
services.murmur = {
enable = true;
hostName = "kittywit.ch";
hostName = "kittywit.ch";
extraConfig = ''
sslCert=/var/lib/acme/kittywit.ch/fullchain.pem
sslKey=/var/lib/acme/kittywit.ch/key.pem
'';
};
extraConfig = ''
sslCert=/var/lib/acme/kittywit.ch/fullchain.pem
sslKey=/var/lib/acme/kittywit.ch/key.pem
'';
};
}

View file

@ -6,7 +6,7 @@
#./wireguard.nix
];
meta.deploy.profiles = [];
meta.deploy.profiles = [ ];
meta.deploy.ssh.host = "boline.kittywit.ch";
boot.loader.grub.enable = true;

View file

@ -61,31 +61,31 @@ in {
SUBSYSTEM=="i2c-dev", GROUP="users", MODE="0660"
SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="fa58", ATTRS{idProduct}=="04d9", GROUP="users"
SUBSYSTEM=="misc", KERNEL=="uinput", OPTIONS+="static_node=uinput", MODE="0660", GROUP="uinput"
SUBSYSTEM=="input", ACTION=="add", DEVPATH=="/devices/virtual/input/*", MODE="0660", GROUP="qemu-libvirtd", RUN+="${pkgs.writeShellScript "mewdev" "${pkgs.coreutils}/bin/echo 'c 13:* rw' > /sys/fs/cgroup/devices/machine.slice/machine-qemu*/devices.allow"}"
SUBSYSTEM=="input", ACTION=="add", DEVPATH=="/devices/virtual/input/*", MODE="0660", GROUP="qemu-libvirtd", RUN+="${
pkgs.writeShellScript "mewdev"
"${pkgs.coreutils}/bin/echo 'c 13:* rw' > /sys/fs/cgroup/devices/machine.slice/machine-qemu*/devices.allow"
}"
'';
environment.systemPackages = [
# pkgs.nur.repos.arc.packages.screenstub # for DDC/CI and input forwarding (currently disabled due to using changed source)
pkgs.arc.pkgs.scream-arc # for audio forwarding
pkgs.screenstub # for input handling
pkgs.screenstub # for input handling
pkgs.ddcutil # for diagnostics on DDC/CI
pkgs.virt-manager # obvious reasons
];
home-manager.users.kat = {
# audio for vm on startup
# audio for vm on startup
systemd.user.services = {
scream = {
Unit = {
Description = "Scream - Audio forwarding from the VM.";
};
Unit = { Description = "Scream - Audio forwarding from the VM."; };
Service = {
ExecStart = "${pkgs.arc.pkgs.scream-arc}/bin/scream -i virbr0 -o pulse";
ExecStart =
"${pkgs.arc.pkgs.scream-arc}/bin/scream -i virbr0 -o pulse";
Restart = "always";
};
Install = {
WantedBy = [ "default.target" ];
};
Install = { WantedBy = [ "default.target" ]; };
};
};
};

@ -1 +1 @@
Subproject commit 49b90f76775092bf2545db515c15afe596e4d6eb
Subproject commit cd1e67c8404e20e043f7343b05b960b349fe3b55

View file

@ -4,6 +4,11 @@
imports = [ ./kat ];
users.users.root = {
openssh.authorizedKeys.keys = with pkgs.lib; concatLists (mapAttrsToList (name: user: if elem "wheel" user.extraGroups then user.openssh.authorizedKeys.keys else []) config.users.users);
openssh.authorizedKeys.keys = with pkgs.lib;
concatLists (mapAttrsToList (name: user:
if elem "wheel" user.extraGroups then
user.openssh.authorizedKeys.keys
else
[ ]) config.users.users);
};
}

View file

@ -21,18 +21,13 @@
];
shell = pkgs.fish;
extraGroups = [ "wheel" "video" ];
packages = with pkgs; [
git-crypt
gitAndTools.gitRemoteGcrypt
];
packages = with pkgs; [ git-crypt gitAndTools.gitRemoteGcrypt ];
};
home-manager.useGlobalPkgs = true;
home-manager.users.kat = {
imports = [
./modules
];
imports = [ ./modules ];
programs.fish = {
enable = true;
shellAliases = { nixdirfmt = "fd --color=never .nix | xargs nixfmt"; };
@ -57,9 +52,7 @@
package = pkgs.gitAndTools.gitFull;
userName = "kat witch";
userEmail = "kat@kittywit.ch";
extraConfig = {
protocol.gcrypt.allow = "always";
};
extraConfig = { protocol.gcrypt.allow = "always"; };
signing = {
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
signByDefault = true;

View file

@ -1,7 +1,6 @@
{ config, lib, pkgs, ... }:
let
sources = import ../../../nix/sources.nix;
let sources = import ../../../nix/sources.nix;
in {
imports = [ ./firefox ];

View file

@ -1,7 +1,3 @@
{ ... }:
let sources = import ../../../../nix/sources.nix;
in {
imports = [
(sources.tf-nix + "/modules/home/secrets.nix")
];
}
{ ... }:
let sources = import ../../../../nix/sources.nix;
in { imports = [ (sources.tf-nix + "/modules/home/secrets.nix") ]; }

View file

@ -3,12 +3,12 @@
{
config = lib.mkIf (lib.elem "desktop" config.meta.deploy.profiles) {
sound.extraConfig = ''
defaults.pcm.rate_converter "speexrate_best"
defaults.pcm.rate_converter "speexrate_best"
'';
hardware.pulseaudio.daemon.config = {
default-sample-format = "s24le";
default-sample-rate = 96000;
resample-method = "soxr-vhq";
default-sample-format = "s24le";
default-sample-rate = 96000;
resample-method = "soxr-vhq";
};
};
}

View file

@ -5,73 +5,77 @@ let
secrets = import ../../../../secrets.nix;
in {
config = lib.mkIf (lib.elem "sway" config.meta.deploy.profiles) {
home-manager.users.kat = {
programs.waybar = {
enable = true;
style = import ./waybar.css.nix {
inherit style;
hextorgba = pkgs.colorhelpers.hextorgba;
};
settings = [{
modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
modules-center = [ "clock" "custom/weather" ];
modules-right = [
"pulseaudio"
"network"
"cpu"
"memory"
"temperature"
"backlight"
"battery"
"tray"
];
modules = {
"custom/weather" = {
format = "{}";
interval = 3600;
on-click = "xdg-open 'https://google.com/search?q=weather'";
exec = "nix-shell --command 'python ${../../../../scripts/weather/weather.py} ${secrets.profiles.sway.city} ${secrets.profiles.sway.api_key}' ${../../../../scripts/weather}";
};
cpu = { format = " {usage}%"; };
memory = { format = " {percentage}%"; };
temperature = { format = " {temperatureC}°C"; };
backlight = {
format = "{icon} {percent}%";
format-icons = [ "" "" ];
on-scroll-up = "${pkgs.light}/bin/light -A 1";
on-scroll-down = "${pkgs.light}/bin/light -U 1";
};
battery = {
states = {
good = 90;
warning = 30;
critical = 15;
};
format = "{icon} {capacity}%";
format-charging = " {capacity}%";
format-plugged = " {capacity}%";
format-alt = "{icon} {time}";
format-icons = [ "" "" "" "" "" ];
};
pulseaudio = {
format = " {volume}%";
on-click = "pavucontrol";
};
network = {
format-wifi = " {essid} ({signalStrength}%)";
format-ethernet = " {ifname}: {ipaddr}/{cidr}";
format-linked = " {ifname} (No IP)";
format-disconnected = " Disconnected ";
format-alt = " {ifname}: {ipaddr}/{cidr}";
};
clock = {
format = " {:%A, %F %T %Z}";
interval = 1;
};
home-manager.users.kat = {
programs.waybar = {
enable = true;
style = import ./waybar.css.nix {
inherit style;
hextorgba = pkgs.colorhelpers.hextorgba;
};
}];
settings = [{
modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
modules-center = [ "clock" "custom/weather" ];
modules-right = [
"pulseaudio"
"network"
"cpu"
"memory"
"temperature"
"backlight"
"battery"
"tray"
];
modules = {
"custom/weather" = {
format = "{}";
interval = 3600;
on-click = "xdg-open 'https://google.com/search?q=weather'";
exec = "nix-shell --command 'python ${
../../../../scripts/weather/weather.py
} ${secrets.profiles.sway.city} ${secrets.profiles.sway.api_key}' ${
../../../../scripts/weather
}";
};
cpu = { format = " {usage}%"; };
memory = { format = " {percentage}%"; };
temperature = { format = " {temperatureC}°C"; };
backlight = {
format = "{icon} {percent}%";
format-icons = [ "" "" ];
on-scroll-up = "${pkgs.light}/bin/light -A 1";
on-scroll-down = "${pkgs.light}/bin/light -U 1";
};
battery = {
states = {
good = 90;
warning = 30;
critical = 15;
};
format = "{icon} {capacity}%";
format-charging = " {capacity}%";
format-plugged = " {capacity}%";
format-alt = "{icon} {time}";
format-icons = [ "" "" "" "" "" ];
};
pulseaudio = {
format = " {volume}%";
on-click = "pavucontrol";
};
network = {
format-wifi = " {essid} ({signalStrength}%)";
format-ethernet = " {ifname}: {ipaddr}/{cidr}";
format-linked = " {ifname} (No IP)";
format-disconnected = " Disconnected ";
format-alt = " {ifname}: {ipaddr}/{cidr}";
};
clock = {
format = " {:%A, %F %T %Z}";
interval = 1;
};
};
}];
};
};
};
};
}