swaylock-effects fix, rinnosuke reformat, domain prefix

This commit is contained in:
kat witch 2021-08-29 05:46:55 +01:00
parent ce2e502696
commit ae8dba970d
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
6 changed files with 93 additions and 39 deletions

View file

@ -2,6 +2,8 @@
[![nodes][]][1]
[This repository on our self hosted git.][7]
These are the NixOS configurations for my systems. I run nothing other than NixOS on my hardware, aside from virtual machines.
## Contents
@ -231,3 +233,4 @@ Please use `nix-shell` or [direnv/direnv][]. The shell is not compatible with [n
[vlaci/nix-doom-emacs]: https://github.com/vlaci/nix-doom-emacs
[direnv/direnv]: https://github.com/direnv/direnv
[nix-community/nix-direnv]: https://github.com/nix-community/nix-direnv
[7]: https://git.kittywit.ch/kat/nixfiles

View file

@ -95,8 +95,8 @@ in
};
lifecycle.ignoreChanges = [
"source_details[0].source_id"
];
connection = {
];
connection = {
type = "ssh";
user = "root";
host = tf.lib.tf.terraformSelf "public_ip";
@ -113,31 +113,31 @@ in
};
};
}
(
let
protoValues = {
TCP = 6;
UDP = 17;
};
inherit (config.networking) firewall;
ipv4 = "0.0.0.0/0";
ipv6 = "::/0";
mapPort = source: protocol: port: {
provider = "oci";
type = "core_network_security_group_security_rule";
inputs = {
network_security_group_id = tf.resources.firewall_group.refAttr "id";
inherit protocol source;
direction = "INGRESS";
${if protocol == protoValues.TCP then "tcp_options" else "udp_options"} = {
destination_port_range =
if isAttrs port then {
min = port.from;
max = port.to;
} else {
min = port;
max = port;
};
(
let
protoValues = {
TCP = 6;
UDP = 17;
};
inherit (config.networking) firewall;
ipv4 = "0.0.0.0/0";
ipv6 = "::/0";
mapPort = source: protocol: port: {
provider = "oci";
type = "core_network_security_group_security_rule";
inputs = {
network_security_group_id = tf.resources.firewall_group.refAttr "id";
inherit protocol source;
direction = "INGRESS";
${if protocol == protoValues.TCP then "tcp_options" else "udp_options"} = {
destination_port_range =
if isAttrs port then {
min = port.from;
max = port.to;
} else {
min = port;
max = port;
};
};
};
};
@ -148,10 +148,10 @@ in
types = [ "Ports" "PortRanges" ];
in
interface: concatMap (type: concatMap (proto: (concatMap (port: (mapAll protoValues.${proto}) port) interface."allowed${proto}${type}")) protos) types;
rules = concatMap mapAllForInterface ([ firewall ] ++ map (interface: firewall.interfaces.${interface}) config.network.firewall.public.interfaces);
# TODO: use `count` and index into a fancy json or something?
in
listToAttrs (imap0 (i: rule: nameValuePair "firewall${toString i}" rule) rules)
rules = concatMap mapAllForInterface ([ firewall ] ++ map (interface: firewall.interfaces.${interface}) config.network.firewall.public.interfaces);
# TODO: use `count` and index into a fancy json or something?
in
listToAttrs (imap0 (i: rule: nameValuePair "firewall${toString i}" rule) rules)
)];
};
}
};
}

View file

@ -5,13 +5,13 @@
tf = { config, ... }: {
dns.records.ygg_grimoire = {
tld = "kittywit.ch.";
domain = "grimoire.net";
domain = "grimoire.ygg";
aaaa.address = "200:c87d:7960:916:bf0e:a0e1:3da7:4fc6";
};
dns.records.ygg_boline = {
tld = "kittywit.ch.";
domain = "boline.net";
domain = "boline.ygg";
aaaa.address = "200:474d:14f7:1d21:f171:4e85:a3fa:9393";
};
};

View file

@ -16,11 +16,10 @@ let
--indicator \
--indicator-radius 110 \
--indicator-thickness 8 \
--font ${config.kw.theme.font.name} \
--font-size ${toString config.kw.theme.font.size} \
--clock --timestr '%H:%M:%S' --datestr '%Y-%m-%d' \
--effect-scale 0.5 \
--effect-vignette 0.5:0.5 \
--effect-blur 12x4 \
--effect-scale 2 \
--effect-blur 3x2 \
--fade-in 0.2 \
--key-hl-color ${base16.base0C} \
--separator-color ${base16.base01} \

View file

@ -1,6 +1,8 @@
{
akiflags = import ./akiflags;
swaylock-effects = import ./swaylock-effects;
fusionpbx = import ./fusionpbx;
fusionpbx-apps = import ./fusionpbx-apps;

View file

@ -0,0 +1,50 @@
{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
, pkg-config
, scdoc
, wayland
, wayland-protocols
, libxkbcommon
, cairo
, gdk-pixbuf
, pam
}:
stdenv.mkDerivation rec {
pname = "swaylock-effects";
version = "2021-05-23";
src = fetchFromGitHub {
owner = "mortie";
repo = "swaylock-effects";
rev = "5cb9579faaf5662b111f5722311b701eff1c1d00";
sha256 = "036dkhfqgk7g9vbr5pxgrs66h5fz0rwdsc67i1w51aa9v01r35ca";
};
postPatch = ''
sed -iE "s/version: '1\.3',/version: '${version}',/" meson.build
'';
nativeBuildInputs = [ meson ninja pkg-config scdoc ];
buildInputs = [ wayland wayland-protocols libxkbcommon cairo gdk-pixbuf pam ];
mesonFlags = [
"-Dpam=enabled"
"-Dgdk-pixbuf=enabled"
"-Dman-pages=enabled"
];
meta = with lib; {
description = "Screen locker for Wayland";
longDescription = ''
Swaylock, with fancy effects
'';
inherit (src.meta) homepage;
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ gnxlxnxx ];
};
}