nixpkgs-fmt for no particular reason

This commit is contained in:
kat witch 2021-08-19 17:42:50 +01:00
parent 6c74d503fd
commit c5e4be592c
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
57 changed files with 1211 additions and 1118 deletions

View file

@ -8,22 +8,25 @@ with lib; {
gh-actions.env.CACHIX_SIGNING_KEY = "\${{ secrets.CACHIX_SIGNING_KEY }}"; gh-actions.env.CACHIX_SIGNING_KEY = "\${{ secrets.CACHIX_SIGNING_KEY }}";
gh-actions = { gh-actions = {
on = let on =
paths = [ let
"default.nix" # sourceCache paths = [
"ci/niv-cron.nix" config.ci.gh-actions.path "default.nix" # sourceCache
]; "ci/niv-cron.nix"
in { config.ci.gh-actions.path
push = { ];
inherit paths; in
{
push = {
inherit paths;
};
pull_request = {
inherit paths;
};
schedule = [{
cron = "0 0 * * *";
}];
}; };
pull_request = {
inherit paths;
};
schedule = [ {
cron = "0 0 * * *";
} ];
};
}; };
channels = { channels = {
@ -37,22 +40,25 @@ with lib; {
}; };
jobs.niv-update = { jobs.niv-update = {
tasks.niv-build.inputs = with channels.cipkgs; tasks.niv-build.inputs = with channels.cipkgs;
ci.command { ci.command {
name = "niv-update-build"; name = "niv-update-build";
allowSubstitutes = false; allowSubstitutes = false;
cache = { cache = {
enable = false; enable = false;
}; };
displayName = "niv update build"; displayName = "niv update build";
environment = [ "OPENSSH_PRIVATE_KEY" "CACHIX_SIGNING_KEY" "GITHUB_REF" ]; environment = [ "OPENSSH_PRIVATE_KEY" "CACHIX_SIGNING_KEY" "GITHUB_REF" ];
command = let main = (import ../.); command =
let
main = (import ../.);
hosts = main.network.nodes; hosts = main.network.nodes;
targets = main.deploy.targets; targets = main.deploy.targets;
enabledTargets = filterAttrs (_: v: v.enable) main.deploy.targets; enabledTargets = filterAttrs (_: v: v.enable) main.deploy.targets;
enabledHosts = concatLists (mapAttrsToList (targetName: target: target.nodeNames) enabledTargets); enabledHosts = concatLists (mapAttrsToList (targetName: target: target.nodeNames) enabledTargets);
hostBuildString = concatMapStringsSep " && " (host: "nix build -Lf . network.nodes.${host}.deploy.system -o result-${host} && nix-collect-garbage -d") enabledHosts; hostBuildString = concatMapStringsSep " && " (host: "nix build -Lf . network.nodes.${host}.deploy.system -o result-${host} && nix-collect-garbage -d") enabledHosts;
in '' in
''
# ${toString builtins.currentTime} # ${toString builtins.currentTime}
if [[ -n $OPENSSH_PRIVATE_KEY ]]; then if [[ -n $OPENSSH_PRIVATE_KEY ]]; then
mkdir ~/.ssh mkdir ~/.ssh
@ -106,9 +112,9 @@ with lib; {
echo "no source changes" >&2 echo "no source changes" >&2
fi fi
''; '';
impure = true; impure = true;
}; };
}; };
ci.gh-actions.checkoutOptions.submodules = false; ci.gh-actions.checkoutOptions.submodules = false;

View file

@ -6,22 +6,26 @@
# ensure sources are fetched and available in the local store before evaluating host configs # ensure sources are fetched and available in the local store before evaluating host configs
environment.bootstrap = { environment.bootstrap = {
sourceCache = channels.cipkgs.runCommand "sources" { sourceCache = channels.cipkgs.runCommand "sources"
srcs = attrNames channels.nixfiles.sourceCache.local; {
} '' srcs = attrNames channels.nixfiles.sourceCache.local;
} ''
mkdir -p $out/share/sources mkdir -p $out/share/sources
ln -s $srcs $out/share/sources/ ln -s $srcs $out/share/sources/
''; '';
}; };
jobs = let main = (import ../.); jobs =
hosts = main.network.nodes; let
targets = main.deploy.targets; main = (import ../.);
enabledTargets = filterAttrs (_: v: v.enable) main.deploy.targets; hosts = main.network.nodes;
enabledHosts = concatLists (mapAttrsToList (targetName: target: target.nodeNames) enabledTargets); targets = main.deploy.targets;
in mapAttrs' (k: nameValuePair "${k}") (genAttrs enabledHosts (host: { enabledTargets = filterAttrs (_: v: v.enable) main.deploy.targets;
enabledHosts = concatLists (mapAttrsToList (targetName: target: target.nodeNames) enabledTargets);
in
mapAttrs' (k: nameValuePair "${k}") (genAttrs enabledHosts (host: {
tasks.${host}.inputs = channels.nixfiles.network.nodes.${host}.deploy.system; tasks.${host}.inputs = channels.nixfiles.network.nodes.${host}.deploy.system;
})); }));
ci.gh-actions.checkoutOptions.submodules = false; ci.gh-actions.checkoutOptions.submodules = false;
cache.cachix.arc = { cache.cachix.arc = {

View file

@ -1,4 +1,4 @@
{ meta, config, lib, pkgs, ... }: { meta, config, lib, pkgs, ... }:
with lib; with lib;

View file

@ -14,5 +14,5 @@ with lib;
{ {
"VGA-1" = middle; "VGA-1" = middle;
}; };
}; };
} }

View file

@ -5,25 +5,26 @@ with lib;
{ {
wayland.windowManager.sway = { wayland.windowManager.sway = {
config = { config = {
output = let output =
left = { let
res = "1920x1080"; left = {
pos = "0 0"; res = "1920x1080";
pos = "0 0";
};
middle = {
res = "1920x1200";
pos = "1920 0";
};
right = {
res = "1920x1080";
pos = "3840 0";
};
in
{
"DP-1" = right;
"DVI-D-1" = middle;
"HDMI-A-1" = left;
}; };
middle = {
res = "1920x1200";
pos = "1920 0";
};
right = {
res = "1920x1080";
pos = "3840 0";
};
in
{
"DP-1" = right;
"DVI-D-1" = middle;
"HDMI-A-1" = left;
};
input = { input = {
"5426:103:Razer_Razer_Naga_Trinity" = { "5426:103:Razer_Razer_Naga_Trinity" = {
@ -47,9 +48,9 @@ with lib;
}; };
}; };
extraConfig = '' extraConfig = ''
workspace "1" output "DP-1" workspace "1" output "DP-1"
workspace "11:F1" output "DVI-1" workspace "11:F1" output "DVI-1"
workspace "12:F2" output "HDMI-A-1" workspace "12:F2" output "HDMI-A-1"
''; '';
}; };
} }

View file

@ -6,7 +6,8 @@ let
hexchen = (import sources.hexchen) { }; hexchen = (import sources.hexchen) { };
hexYgg = filterAttrs (_: c: c.enable) hexYgg = filterAttrs (_: c: c.enable)
(mapAttrs (_: host: host.config.network.yggdrasil) hexchen.hosts); (mapAttrs (_: host: host.config.network.yggdrasil) hexchen.hosts);
in { in
{
# Imports # Imports
imports = with meta; [ imports = with meta; [
@ -72,15 +73,18 @@ in {
environment.systemPackages = [ pkgs.razergenie ]; environment.systemPackages = [ pkgs.razergenie ];
boot.modprobe.modules = { boot.modprobe.modules = {
vfio-pci = let vfio-pci =
vfio-pci-ids = [ let
"1002:67df" "1002:aaf0" # RX 580 vfio-pci-ids = [
"1912:0014" # Renesas USB 3 "1002:67df"
"1022:149c" # CPU USB 3 "1002:aaf0" # RX 580
]; "1912:0014" # Renesas USB 3
in mkIf (vfio-pci-ids != [ ]) { "1022:149c" # CPU USB 3
options.ids = concatStringsSep "," vfio-pci-ids; ];
}; in
mkIf (vfio-pci-ids != [ ]) {
options.ids = concatStringsSep "," vfio-pci-ids;
};
}; };
services.udev.extraRules = '' services.udev.extraRules = ''
@ -108,7 +112,7 @@ in {
}; };
networks.br = { networks.br = {
matchConfig.Name = "br"; matchConfig.Name = "br";
address = singleton "${config.network.addresses.private.ipv4.address}/24" ; address = singleton "${config.network.addresses.private.ipv4.address}/24";
gateway = singleton config.network.privateGateway; gateway = singleton config.network.privateGateway;
}; };
netdevs.br = { netdevs.br = {

View file

@ -4,13 +4,14 @@ with lib;
{ {
wayland.windowManager.sway.config = { wayland.windowManager.sway.config = {
output = let output =
laptop = { let
res = "1920x1080"; laptop = {
pos = "0 0"; res = "1920x1080";
}; pos = "0 0";
in };
{ "eDP-1" = laptop; }; in
{ "eDP-1" = laptop; };
input = { input = {
"1739:33362:Synaptics_TM3336-002" = { "1739:33362:Synaptics_TM3336-002" = {

View file

@ -1,7 +1,7 @@
{ config, lib, ... }: { config, lib, ... }:
/* /*
This module: This module:
* Provides in-scope TF config for home-manager. * Provides in-scope TF config for home-manager.
*/ */

View file

@ -1,13 +1,14 @@
{ config, lib, ... }: { config, lib, ... }:
/* /*
This module: This module:
* provides a central way to change the font my system uses. * provides a central way to change the font my system uses.
*/ */
with lib; with lib;
let cfg = config.kw; in { let cfg = config.kw; in
{
options.kw = { options.kw = {
hexColors = mkOption { hexColors = mkOption {
type = types.attrsOf types.str; type = types.attrsOf types.str;

View file

@ -1,10 +1,10 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
/* /*
This module: This module:
* is from an unmerged PR from home-manager. * is from an unmerged PR from home-manager.
See: https://github.com/nix-community/home-manager/pull/1745 See: https://github.com/nix-community/home-manager/pull/1745
*/ */
with lib; with lib;

View file

@ -1,7 +1,7 @@
{ sources, config, pkgs, lib, ... }: { sources, config, pkgs, lib, ... }:
/* /*
This module: This module:
* makes tf-nix a part of the meta config * makes tf-nix a part of the meta config
* handles the trusted import for tf-nix * handles the trusted import for tf-nix
* provides the target interface * provides the target interface
@ -25,7 +25,8 @@ let
./secrets.nix ./secrets.nix
]; ];
}; };
in { in
{
imports = [ imports = [
(toString (sources.tf-nix + "/modules/run.nix")) (toString (sources.tf-nix + "/modules/run.nix"))
] ++ (optional (builtins.pathExists ../../trusted/tf/tf.nix) (../../trusted/tf/tf.nix)); ] ++ (optional (builtins.pathExists ../../trusted/tf/tf.nix) (../../trusted/tf/tf.nix));
@ -41,82 +42,97 @@ in {
}; };
hostName = mkOption { hostName = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = let default =
hostName = builtins.getEnv "HOME_HOSTNAME"; let
in if hostName == "" then null else hostName; hostName = builtins.getEnv "HOME_HOSTNAME";
in
if hostName == "" then null else hostName;
}; };
}; };
targets = let targets =
type = types.submodule ({ config, name, ... }: { let
options = { type = types.submodule ({ config, name, ... }: {
enable = mkEnableOption "Enable the target" // { default = true; }; options = {
name = mkOption { enable = mkEnableOption "Enable the target" // { default = true; };
type = types.str; name = mkOption {
default = name; type = types.str;
}; default = name;
nodeNames = mkOption {
type = types.listOf types.str;
default = [ ];
};
tf = mkOption {
type = tfType;
default = { };
};
};
config.tf = mkMerge (singleton {
imports = [
../../targets/common
];
deps = {
select.allProviders = true;
enable = true;
};
terraform = {
version = "1.0";
logPath = cfg.dataDir + "/terraform-${config.name}.log";
dataDir = cfg.dataDir + "/tfdata/${config.name}";
environment.TF_CLI_ARGS_apply = "-backup=-";
environment.TF_CLI_ARGS_taint = "-backup=-";
};
state = {
file = cfg.dataDir + "/terraform-${config.name}.tfstate";
};
runners = {
lazy = {
inherit (meta.runners.lazy) file args;
attrPrefix = "deploy.targets.${name}.tf.runners.run.";
}; };
run = { nodeNames = mkOption {
apply.name = "${name}-apply"; type = types.listOf types.str;
terraform.name = "${name}-tf"; default = [ ];
};
tf = mkOption {
type = tfType;
default = { };
}; };
}; };
continue.envVar = "TF_NIX_CONTINUE_${replaceStrings [ "-" ] [ "_" ] config.name}"; config.tf = mkMerge (singleton
} ++ map (nodeName: mapAttrs (_: mkMerge) meta.network.nodes.${nodeName}.deploy.tf.out.set) config.nodeNames); {
}); imports = [
in mkOption { ../../targets/common
type = types.attrsOf type; ];
default = { }; deps = {
}; select.allProviders = true;
enable = true;
};
terraform = {
version = "1.0";
logPath = cfg.dataDir + "/terraform-${config.name}.log";
dataDir = cfg.dataDir + "/tfdata/${config.name}";
environment.TF_CLI_ARGS_apply = "-backup=-";
environment.TF_CLI_ARGS_taint = "-backup=-";
};
state = {
file = cfg.dataDir + "/terraform-${config.name}.tfstate";
};
runners = {
lazy = {
inherit (meta.runners.lazy) file args;
attrPrefix = "deploy.targets.${name}.tf.runners.run.";
};
run = {
apply.name = "${name}-apply";
terraform.name = "${name}-tf";
};
};
continue.envVar = "TF_NIX_CONTINUE_${replaceStrings [ "-" ] [ "_" ] config.name}";
} ++ map (nodeName: mapAttrs (_: mkMerge) meta.network.nodes.${nodeName}.deploy.tf.out.set) config.nodeNames);
});
in
mkOption {
type = types.attrsOf type;
default = { };
};
}; };
}; };
config = { config = {
deploy.targets = let deploy.targets =
nodeNames = attrNames config.network.nodes; let
targets = config.deploy.targets; nodeNames = attrNames config.network.nodes;
explicitlyDefinedHosts = concatLists (mapAttrsToList (targetName: target: remove targetName target.nodeNames) config.deploy.targets); targets = config.deploy.targets;
in genAttrs nodeNames ( nodeName: { explicitlyDefinedHosts = concatLists (mapAttrsToList (targetName: target: remove targetName target.nodeNames) config.deploy.targets);
enable = mkDefault (! elem nodeName explicitlyDefinedHosts); in
nodeNames = singleton nodeName; genAttrs nodeNames (nodeName: {
}); enable = mkDefault (! elem nodeName explicitlyDefinedHosts);
nodeNames = singleton nodeName;
});
runners = { runners = {
run = mkMerge (mapAttrsToList (targetName: target: mapAttrs' (k: run: run = mkMerge (mapAttrsToList
nameValuePair run.name run.set (targetName: target: mapAttrs'
) target.tf.runners.run) (filterAttrs (_: v: v.enable) cfg.targets)); (k: run:
lazy.run = mkMerge (mapAttrsToList (targetName: target: mapAttrs' (k: run: nameValuePair run.name run.set
nameValuePair run.name run.set )
) target.tf.runners.lazy.run) (filterAttrs (_: v: v.enable) cfg.targets)); target.tf.runners.run)
(filterAttrs (_: v: v.enable) cfg.targets));
lazy.run = mkMerge (mapAttrsToList
(targetName: target: mapAttrs'
(k: run:
nameValuePair run.name run.set
)
target.tf.runners.lazy.run)
(filterAttrs (_: v: v.enable) cfg.targets));
}; };
}; };
} }

View file

@ -1,7 +1,7 @@
{ pkgs, sources, lib, meta, config, ... }: { pkgs, sources, lib, meta, config, ... }:
/* /*
This module: This module:
* Makes hosts nixosModules. * Makes hosts nixosModules.
* Manages module imports and specialArgs. * Manages module imports and specialArgs.
* Builds network.nodes. * Builds network.nodes.
@ -25,31 +25,35 @@ with lib;
default = toString (pkgs.path + "/nixos/modules"); default = toString (pkgs.path + "/nixos/modules");
}; };
}; };
nodes = let nodes =
nixosModule = { name, config, meta, modulesPath, lib, ... }: with lib; { let
config = { nixosModule = { name, config, meta, modulesPath, lib, ... }: with lib; {
nixpkgs = { config = {
system = mkDefault pkgs.system; nixpkgs = {
pkgs = mkDefault pkgs; system = mkDefault pkgs.system;
pkgs = mkDefault pkgs;
};
}; };
}; };
}; nixosType =
nixosType = let let
baseModules = import (config.network.nixos.modulesPath + "/module-list.nix"); baseModules = import (config.network.nixos.modulesPath + "/module-list.nix");
in types.submoduleWith { in
modules = baseModules types.submoduleWith {
++ singleton nixosModule modules = baseModules
++ config.network.nixos.extraModules; ++ singleton nixosModule
++ config.network.nixos.extraModules;
specialArgs = { specialArgs = {
inherit baseModules; inherit baseModules;
inherit (config.network.nixos) modulesPath; inherit (config.network.nixos) modulesPath;
} // config.network.nixos.specialArgs; } // config.network.nixos.specialArgs;
};
in
mkOption {
type = types.attrsOf nixosType;
default = { };
}; };
in mkOption {
type = types.attrsOf nixosType;
default = { };
};
}; };
config.network = { config.network = {
nixos = { nixos = {

View file

@ -3,28 +3,29 @@
with lib; with lib;
{ {
options = let tf = config; in { options = let tf = config; in
variables = mkOption { {
type = types.attrsOf (types.submodule ({ name, config, ... }: { variables = mkOption {
options.externalSecret = mkEnableOption "Is ths secret to be templated into a command provided?"; type = types.attrsOf (types.submodule ({ name, config, ... }: {
config = mkIf config.externalSecret { options.externalSecret = mkEnableOption "Is ths secret to be templated into a command provided?";
type = "string"; config = mkIf config.externalSecret {
value.shellCommand = "${tf.commandPrefix} ${tf.folderPrefix}${tf.folderDivider}${escapeShellArg name}"; type = "string";
sensitive = true; value.shellCommand = "${tf.commandPrefix} ${tf.folderPrefix}${tf.folderDivider}${escapeShellArg name}";
}; sensitive = true;
})); };
}));
};
commandPrefix = mkOption {
type = types.nullOr types.str;
default = null;
};
folderPrefix = mkOption {
type = types.str;
default = "";
};
folderDivider = mkOption {
type = types.str;
default = "";
};
}; };
commandPrefix = mkOption {
type = types.nullOr types.str;
default = null;
};
folderPrefix = mkOption {
type = types.str;
default = "";
};
folderDivider = mkOption {
type = types.str;
default = "";
};
};
} }

View file

@ -13,13 +13,13 @@
(sources.hexchen + "/modules/network/yggdrasil") (sources.hexchen + "/modules/network/yggdrasil")
]; ];
options.hexchen.dns = lib.mkOption { }; options.hexchen.dns = lib.mkOption { };
options.hexchen.deploy = lib.mkOption { }; options.hexchen.deploy = lib.mkOption { };
/* /*
This maps hosts to network.nodes from the meta config. This is required for hexchen's yggdrasil network module. This maps hosts to network.nodes from the meta config. This is required for hexchen's yggdrasil network module.
*/ */
config = { config = {
_module.args.hosts = lib.mapAttrs (_: config: { inherit config; } ) meta.network.nodes; _module.args.hosts = lib.mapAttrs (_: config: { inherit config; }) meta.network.nodes;
}; };
} }

View file

@ -1,7 +1,7 @@
{ tf, target, name, meta, config, lib, ... }: { tf, target, name, meta, config, lib, ... }:
/* /*
This module: This module:
* aliases <hostname>.system.build.toplevel to <hostname>.deploy.system for ease of use. * aliases <hostname>.system.build.toplevel to <hostname>.deploy.system for ease of use.
* marries meta config to NixOS configs for each host. * marries meta config to NixOS configs for each host.
* provides in-scope TF config in NixOS and home-manager, instead of only as a part of meta config. * provides in-scope TF config in NixOS and home-manager, instead of only as a part of meta config.
@ -52,12 +52,13 @@ in
config = { config = {
deploy = { deploy = {
system = config.system.build.toplevel; system = config.system.build.toplevel;
targetName = let targetsList = attrNames ( filterAttrs (_: target: target.enable && elem name target.nodeNames) meta.deploy.targets ); in targetName = let targetsList = attrNames (filterAttrs (_: target: target.enable && elem name target.nodeNames) meta.deploy.targets); in
if (builtins.length targetsList == 0) then null if (builtins.length targetsList == 0) then null
else lib.warnIf (builtins.length targetsList > 1) "The host ${name} is assigned to several targets: ${concatMapStrings (x: "${x},") targetsList}." (head targetsList); else lib.warnIf (builtins.length targetsList > 1) "The host ${name} is assigned to several targets: ${concatMapStrings (x: "${x},") targetsList}." (head targetsList);
}; };
deploy.tf = mkMerge (singleton (lib.mkIf (config.deploy.targetName != null) { deploy.tf = mkMerge (singleton
(lib.mkIf (config.deploy.targetName != null) {
attrs = [ "import" "imports" "out" "attrs" ]; attrs = [ "import" "imports" "out" "attrs" ];
import = genAttrs cfg.tf.imports (target: meta.deploy.targets.${target}.tf); import = genAttrs cfg.tf.imports (target: meta.deploy.targets.${target}.tf);
out.set = removeAttrs cfg.tf cfg.tf.attrs; out.set = removeAttrs cfg.tf cfg.tf.attrs;

View file

@ -24,23 +24,24 @@ with lib;
systemd.services.kat-glauca-dns = systemd.services.kat-glauca-dns =
let updater = pkgs.writeShellScriptBin "glauca-dyndns" '' let updater = pkgs.writeShellScriptBin "glauca-dyndns" ''
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu set -eu
ip4=$(${pkgs.curl}/bin/curl -s --ipv4 https://dns.glauca.digital/checkip) ip4=$(${pkgs.curl}/bin/curl -s --ipv4 https://dns.glauca.digital/checkip)
ip6=$(${pkgs.curl}/bin/curl -s --ipv6 https://dns.glauca.digital/checkip) ip6=$(${pkgs.curl}/bin/curl -s --ipv6 https://dns.glauca.digital/checkip)
source $passFile source $passFile
echo "$ip4, $ip6" echo "$ip4, $ip6"
${pkgs.curl}/bin/curl -u ''${user}:''${pass} --data-urlencode "hostname=''${hostname}" --data-urlencode "myip=''${ip4}" "https://dns.glauca.digital/nic/update" ${pkgs.curl}/bin/curl -u ''${user}:''${pass} --data-urlencode "hostname=''${hostname}" --data-urlencode "myip=''${ip4}" "https://dns.glauca.digital/nic/update"
echo "" echo ""
${pkgs.curl}/bin/curl -u ''${user}:''${pass} --data-urlencode "hostname=''${hostname}" --data-urlencode "myip=''${ip6}" "https://dns.glauca.digital/nic/update" ${pkgs.curl}/bin/curl -u ''${user}:''${pass} --data-urlencode "hostname=''${hostname}" --data-urlencode "myip=''${ip6}" "https://dns.glauca.digital/nic/update"
''; in { ''; in
serviceConfig = { {
ExecStart = "${updater}/bin/glauca-dyndns"; serviceConfig = {
ExecStart = "${updater}/bin/glauca-dyndns";
};
environment = { passFile = config.secrets.files.kat-glauca-dns.path; };
wantedBy = [ "default.target" ];
}; };
environment = { passFile = config.secrets.files.kat-glauca-dns.path; };
wantedBy = [ "default.target" ];
};
systemd.timers.kat-glauca-dns = { systemd.timers.kat-glauca-dns = {
timerConfig = { timerConfig = {

View file

@ -7,7 +7,7 @@
boot.zfs.enableUnstable = true; boot.zfs.enableUnstable = true;
boot.kernel.sysctl = { boot.kernel.sysctl = {
"net.core.rmem_max" = "16777216"; "net.core.rmem_max" = "16777216";
"net.core.wmem_max" ="16777216"; "net.core.wmem_max" = "16777216";
"net.ipv4.tcp_rmem" = "4096 87380 16777216"; "net.ipv4.tcp_rmem" = "4096 87380 16777216";
"net.ipv4.tcp_wmem" = "4096 65536 16777216"; "net.ipv4.tcp_wmem" = "4096 65536 16777216";
}; };

View file

@ -16,7 +16,7 @@
}; };
fonts.fonts = with pkgs; [ fonts.fonts = with pkgs; [
cozette cozette
twitter-color-emoji twitter-color-emoji
]; ];
} }

View file

@ -6,17 +6,17 @@
fileSystems."/mnt/kat-nas" = lib.mkIf (config.networking.hostName != "beltane") { fileSystems."/mnt/kat-nas" = lib.mkIf (config.networking.hostName != "beltane") {
device = "${meta.network.nodes.beltane.network.addresses.private.domain}:/mnt/zraw/media"; device = "${meta.network.nodes.beltane.network.addresses.private.domain}:/mnt/zraw/media";
fsType = "nfs"; fsType = "nfs";
options = [ "x-systemd.automount" "noauto" "nfsvers=4" "soft" "retrans=2" "timeo=60"]; options = [ "x-systemd.automount" "noauto" "nfsvers=4" "soft" "retrans=2" "timeo=60" ];
}; };
/* /*
fileSystems."/mnt/hex-corn" = { fileSystems."/mnt/hex-corn" = {
device = "storah.net.lilwit.ch:/data/cornbox"; device = "storah.net.lilwit.ch:/data/cornbox";
fsType = "nfs"; fsType = "nfs";
options = [ "x-systemd.automount" "noauto" ]; options = [ "x-systemd.automount" "noauto" ];
}; };
fileSystems."/mnt/hex-tor" = { fileSystems."/mnt/hex-tor" = {
device = "storah.net.lilwit.ch:/data/torrents"; device = "storah.net.lilwit.ch:/data/torrents";
fsType = "nfs"; fsType = "nfs";
options = [ "x-systemd.automount" "noauto" ]; options = [ "x-systemd.automount" "noauto" ];

View file

@ -1,35 +1,36 @@
let hardwareProfiles = { lib }: let hardwareProfiles = { lib }:
let profiles = with profiles; lib.domainMerge { let profiles = with profiles; lib.domainMerge
folder = ""; # not used in this usage {
folderPaths = [ folder = ""; # not used in this usage
./. folderPaths = [
../../trusted/profiles/hardware ./.
]; ../../trusted/profiles/hardware
} // { ];
ms-7b86 = { } // {
imports = [ ms-7b86 = {
ms-7b86-base imports = [
ryzen ms-7b86-base
amdgpu ryzen
]; amdgpu
}; ];
rm-310 = { };
imports = [ rm-310 = {
rm-310-base imports = [
intel rm-310-base
]; intel
}; ];
v330-14arr = { };
imports = [ v330-14arr = {
v330-14arr-base imports = [
ryzen v330-14arr-base
amdgpu ryzen
laptop amdgpu
wifi laptop
]; wifi
}; ];
eeepc-1015pem = { };
imports = [ eeepc-1015pem = {
imports = [
eeepc-1015pem-base eeepc-1015pem-base
intel intel
laptop laptop

View file

@ -1,7 +1,7 @@
{ config, lib, sources, ... }: { config, lib, sources, ... }:
/* /*
This hardware profile corresponds with the imperatively provisioned hetzner cloud box. This hardware profile corresponds with the imperatively provisioned hetzner cloud box.
*/ */
with lib; with lib;

View file

@ -1,7 +1,7 @@
{ config, ... }: { config, ... }:
/* /*
This hardware profile corresponds to any machine which has an Intel processor. This hardware profile corresponds to any machine which has an Intel processor.
*/ */
{ {

View file

@ -1,7 +1,7 @@
{ config, lib, ... }: { config, lib, ... }:
/* /*
This hardware profile corresponds to the MSI B450-A PRO MAX system. This hardware profile corresponds to the MSI B450-A PRO MAX system.
*/ */
with lib; with lib;

View file

@ -1,7 +1,7 @@
{ config, ... }: { config, ... }:
/* /*
This hardware profile corresponds with the RM DESKTOP 310 system, which is actually just an Intel DQ67OW motherboard. This hardware profile corresponds with the RM DESKTOP 310 system, which is actually just an Intel DQ67OW motherboard.
*/ */
{ {

View file

@ -1,7 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
/* /*
This hardware profile corresponds to any machine which has an AMD Ryzen processor. This hardware profile corresponds to any machine which has an AMD Ryzen processor.
*/ */
{ {

View file

@ -1,7 +1,7 @@
{ config, ... }: { config, ... }:
/* /*
This hardware profile corresponds to the Lenovo IdeaPad v330-14ARR. This hardware profile corresponds to the Lenovo IdeaPad v330-14ARR.
*/ */
{ {

View file

@ -9,7 +9,8 @@ let
win10-diskmapper = pkgs.writeShellScriptBin "win10-diskmapper" '' win10-diskmapper = pkgs.writeShellScriptBin "win10-diskmapper" ''
sudo ${pkgs.disk-mapper}/bin/disk-mapper /dev/disk/by-id/ata-ST2000DM008-2FR102_WK301C3H-part2 sudo ${pkgs.disk-mapper}/bin/disk-mapper /dev/disk/by-id/ata-ST2000DM008-2FR102_WK301C3H-part2
''; '';
in { in
{
deploy.profile.vfio = true; deploy.profile.vfio = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -23,25 +24,27 @@ in {
users.users.kat.extraGroups = [ "vfio" "input" "uinput" ]; users.users.kat.extraGroups = [ "vfio" "input" "uinput" ];
users.groups = { uinput = { }; vfio = { }; }; users.groups = { uinput = { }; vfio = { }; };
boot = lib.mkMerge [ { boot = lib.mkMerge [{
initrd.kernelModules = mkBefore ["vfio" "vfio_iommu_type1" "vfio_pci" "vfio_virqfd"]; initrd.kernelModules = mkBefore [ "vfio" "vfio_iommu_type1" "vfio_pci" "vfio_virqfd" ];
kernelModules = [ "i2c-dev" ]; # i2c-dev is required for DDC/CI for screenstub kernelModules = [ "i2c-dev" ]; # i2c-dev is required for DDC/CI for screenstub
kernelPatches = with pkgs.kernelPatches; [ kernelPatches = with pkgs.kernelPatches; [
(mkIf config.deploy.profile.hardware.acs-override acs-override) (mkIf config.deploy.profile.hardware.acs-override acs-override)
]; ];
} (mkIf (config.deploy.profile.hardware.amdgpu) { }
kernelParams = [ (mkIf (config.deploy.profile.hardware.amdgpu) {
"video=efifb:off" kernelParams = [
]; "video=efifb:off"
extraModulePackages = [ ];
(pkgs.linuxPackagesFor config.boot.kernelPackages.kernel).vendor-reset extraModulePackages = [
]; (pkgs.linuxPackagesFor config.boot.kernelPackages.kernel).vendor-reset
}) ( mkIf (config.deploy.profile.hardware.acs-override) { ];
kernelParams = [ })
"pci=noats" (mkIf (config.deploy.profile.hardware.acs-override) {
"pcie_acs_override=downstream,multifunction" kernelParams = [
]; "pci=noats"
}) ]; "pcie_acs_override=downstream,multifunction"
];
})];
environment.etc."qemu/bridge.conf".text = "allow br"; environment.etc."qemu/bridge.conf".text = "allow br";

View file

@ -14,7 +14,7 @@
services.grafana.security.adminPasswordFile = services.grafana.security.adminPasswordFile =
config.secrets.files.grafana-admin-pass.path; config.secrets.files.grafana-admin-pass.path;
services.postgresql = { services.postgresql = {
ensureDatabases = [ "grafana" ]; ensureDatabases = [ "grafana" ];
ensureUsers = [{ ensureUsers = [{
name = "grafana"; name = "grafana";

View file

@ -4,13 +4,13 @@
services.nginx.virtualHosts = kw.virtualHostGen { services.nginx.virtualHosts = kw.virtualHostGen {
networkFilter = [ "private" "yggdrasil" ]; networkFilter = [ "private" "yggdrasil" ];
block.locations = { block.locations = {
"/jellyfin/".proxyPass = "http://127.0.0.1:8096/jellyfin/"; "/jellyfin/".proxyPass = "http://127.0.0.1:8096/jellyfin/";
"/jellyfin/socket" = { "/jellyfin/socket" = {
proxyPass = "http://127.0.0.1:8096/jellyfin/"; proxyPass = "http://127.0.0.1:8096/jellyfin/";
extraConfig = '' extraConfig = ''
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";
''; '';
}; };
}; };
}; };

View file

@ -1,8 +1,9 @@
{ config, pkgs, kw, ... }: { config, pkgs, kw, ... }:
let splashy = pkgs.host-splash-site config.networking.hostName; in { let splashy = pkgs.host-splash-site config.networking.hostName; in
{
services.nginx.virtualHosts = kw.virtualHostGen { services.nginx.virtualHosts = kw.virtualHostGen {
networkFilter = ["private"]; networkFilter = [ "private" ];
block.locations."/" = { root = splashy; }; block.locations."/" = { root = splashy; };
}; };
} }

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib , ... }: { config, pkgs, lib, ... }:
with lib; with lib;
@ -94,19 +94,20 @@ let
rtmpsink rtmpsink
]; ];
in { in
{
services.nginx.appendConfig = '' services.nginx.appendConfig = ''
rtmp { rtmp {
server { server {
listen [::]:1935 ipv6only=off; listen [::]:1935 ipv6only=off;
application stream { application stream {
live on; live on;
allow publish all; allow publish all;
allow play all; allow play all;
}
} }
} }
}
''; '';
network.firewall = { network.firewall = {

View file

@ -41,7 +41,8 @@ let
}; };
} }
]; ];
in { in
{
services.udev.extraRules = '' services.udev.extraRules = ''
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", SUBSYSTEMS=="usb", ATTR{index}=="0", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="0779", SYMLINK+="videomew", TAG+="systemd" KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", SUBSYSTEMS=="usb", ATTR{index}=="0", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="0779", SYMLINK+="videomew", TAG+="systemd"
''; '';

View file

@ -48,31 +48,31 @@ with lib;
enable = true; enable = true;
max_upload_size = "512M"; max_upload_size = "512M";
logConfig = '' logConfig = ''
version: 1 version: 1
# In systemd's journal, loglevel is implicitly stored, so let's omit it # In systemd's journal, loglevel is implicitly stored, so let's omit it
# from the message text. # from the message text.
formatters: formatters:
journal_fmt: journal_fmt:
format: '%(name)s: [%(request)s] %(message)s' format: '%(name)s: [%(request)s] %(message)s'
filters: filters:
context: context:
(): synapse.util.logcontext.LoggingContextFilter (): synapse.util.logcontext.LoggingContextFilter
request: "" request: ""
handlers: handlers:
journal: journal:
class: systemd.journal.JournalHandler class: systemd.journal.JournalHandler
formatter: journal_fmt formatter: journal_fmt
filters: [context] filters: [context]
SYSLOG_IDENTIFIER: synapse SYSLOG_IDENTIFIER: synapse
root: root:
level: WARNING level: WARNING
handlers: [journal] handlers: [journal]
disable_existing_loggers: False disable_existing_loggers: False
''; '';
server_name = config.network.dns.domain; server_name = config.network.dns.domain;
app_service_config_files = [ app_service_config_files = [

View file

@ -5,7 +5,8 @@ with lib;
let let
cfg = config.services.murmur; cfg = config.services.murmur;
forking = (cfg.logFile != null); forking = (cfg.logFile != null);
in { in
{
network.firewall = { network.firewall = {
public = { public = {
tcp.ports = singleton 64738; tcp.ports = singleton 64738;
@ -66,40 +67,40 @@ in {
# Service Replacement # Service Replacement
users.users.murmur = { users.users.murmur = {
description = "Murmur Service user"; description = "Murmur Service user";
home = "/var/lib/murmur"; home = "/var/lib/murmur";
createHome = true; createHome = true;
uid = config.ids.uids.murmur; uid = config.ids.uids.murmur;
group = "murmur"; group = "murmur";
}; };
users.groups.murmur = { users.groups.murmur = {
gid = config.ids.gids.murmur; gid = config.ids.gids.murmur;
}; };
systemd.services.murmur = { systemd.services.murmur = {
description = "Murmur Chat Service"; description = "Murmur Chat Service";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network-online.target "]; after = [ "network-online.target " ];
serviceConfig = { serviceConfig = {
# murmurd doesn't fork when logging to the console. # murmurd doesn't fork when logging to the console.
Type = if forking then "forking" else "simple"; Type = if forking then "forking" else "simple";
PIDFile = mkIf forking "/run/murmur/murmurd.pid"; PIDFile = mkIf forking "/run/murmur/murmurd.pid";
EnvironmentFile = mkIf (cfg.environmentFile != null) cfg.environmentFile; EnvironmentFile = mkIf (cfg.environmentFile != null) cfg.environmentFile;
ExecStart = "${cfg.package}/bin/murmurd -ini ${config.secrets.files.murmur-config.path}"; ExecStart = "${cfg.package}/bin/murmurd -ini ${config.secrets.files.murmur-config.path}";
Restart = "always"; Restart = "always";
RuntimeDirectory = "murmur"; RuntimeDirectory = "murmur";
RuntimeDirectoryMode = "0700"; RuntimeDirectoryMode = "0700";
User = "murmur"; User = "murmur";
Group = "murmur"; Group = "murmur";
};
}; };
};
# Certs # Certs
network.extraCerts."services_murmur" = "voice.${config.network.dns.domain}"; network.extraCerts."services_murmur" = "voice.${config.network.dns.domain}";
users.groups."voice-cert".members = [ "nginx" "murmur" ]; users.groups."voice-cert".members = [ "nginx" "murmur" ];
security.acme.certs = { "services_murmur" = { group = "voice-cert"; }; }; security.acme.certs = { "services_murmur" = { group = "voice-cert"; }; };
# DNS # DNS

View file

@ -21,27 +21,27 @@
systemd.services.tvheadend-kat = { systemd.services.tvheadend-kat = {
description = "Tvheadend TV streaming server"; description = "Tvheadend TV streaming server";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network.target" ]; after = [ "network.target" ];
script = '' script = ''
${pkgs.tvheadend}/bin/tvheadend \ ${pkgs.tvheadend}/bin/tvheadend \
--http_root /tvheadend \ --http_root /tvheadend \
--http_port 9981 \ --http_port 9981 \
--htsp_port 9982 \ --htsp_port 9982 \
-f \ -f \
-C \ -C \
-p ${config.users.users.tvheadend.home}/tvheadend.pid \ -p ${config.users.users.tvheadend.home}/tvheadend.pid \
-u tvheadend \ -u tvheadend \
-g video -g video
''; '';
serviceConfig = { serviceConfig = {
Type = "forking"; Type = "forking";
PIDFile = "${config.users.users.tvheadend.home}/tvheadend.pid"; PIDFile = "${config.users.users.tvheadend.home}/tvheadend.pid";
Restart = "always"; Restart = "always";
RestartSec = 5; RestartSec = 5;
User = "tvheadend"; User = "tvheadend";
Group = "video"; Group = "video";
ExecStop = "${pkgs.coreutils}/bin/rm ${config.users.users.tvheadend.home}/tvheadend.pid"; ExecStop = "${pkgs.coreutils}/bin/rm ${config.users.users.tvheadend.home}/tvheadend.pid";
}; };
}; };
} }

View file

@ -2,7 +2,7 @@
{ {
deploy.targets.personal = { deploy.targets.personal = {
nodeNames = [ "samhain" "yule"]; nodeNames = [ "samhain" "yule" ];
tf = { config, ... }: { tf = { config, ... }: {
dns.records.ygg_grimoire = { dns.records.ygg_grimoire = {
tld = "kittywit.ch."; tld = "kittywit.ch.";

View file

@ -10,5 +10,5 @@
kw.hexColors = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}") kw.hexColors = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}")
(lib.filterAttrs (n: _: lib.hasInfix "base" n) config.lib.arc.base16.schemeForAlias.default); (lib.filterAttrs (n: _: lib.hasInfix "base" n) config.lib.arc.base16.schemeForAlias.default);
} }

View file

@ -17,8 +17,9 @@
port = 62954; port = 62954;
}; };
in in
(lib.foldAttrList (map (network: (lib.foldAttrList (map
lib.mapAttrs (_: v: { hostname = v.address; } // common) (lib.filterAttrs (_: v: v.enable ) (lib.mapAttrs (_: v: v.network.addresses.${network}.ipv4) meta.network.nodes)) (network:
) ["private" "public"])); lib.mapAttrs (_: v: { hostname = v.address; } // common) (lib.filterAttrs (_: v: v.enable) (lib.mapAttrs (_: v: v.network.addresses.${network}.ipv4) meta.network.nodes))
) [ "private" "public" ]));
}; };
} }

View file

@ -12,41 +12,41 @@ with lib;
keyMode = "vi"; keyMode = "vi";
baseIndex = 1; baseIndex = 1;
extraConfig = with mapAttrs (_: v: "colour${toString v}") pkgs.base16.shell.shell256; '' extraConfig = with mapAttrs (_: v: "colour${toString v}") pkgs.base16.shell.shell256; ''
# proper title handling # proper title handling
set -g set-titles on set -g set-titles on
set -g set-titles-string "#T" set -g set-titles-string "#T"
set -ga terminal-overrides ",xterm-256color:Tc" set -ga terminal-overrides ",xterm-256color:Tc"
# modes # modes
setw -g clock-mode-colour colour8 setw -g clock-mode-colour colour8
setw -g mode-style 'fg=${base07} bg=${base02} bold' setw -g mode-style 'fg=${base07} bg=${base02} bold'
# panes # panes
set -g pane-border-style 'fg=${base06} bg=${base02}' set -g pane-border-style 'fg=${base06} bg=${base02}'
set -g pane-active-border-style 'bg=${base0D} fg=${base07}' set -g pane-active-border-style 'bg=${base0D} fg=${base07}'
# statusbar # statusbar
set -g status-position bottom set -g status-position bottom
set -g status-justify left set -g status-justify left
set -g status-style 'bg=${base00} fg=${base06}' set -g status-style 'bg=${base00} fg=${base06}'
set -g status-left '#[fg=${base06} bg=${base01}] #S@#h ' set -g status-left '#[fg=${base06} bg=${base01}] #S@#h '
set -g status-right '#[fg=${base07},bg=${base01}] %F #[fg=${base07},bg=${base02}] %H:%M:%S %Z ' set -g status-right '#[fg=${base07},bg=${base01}] %F #[fg=${base07},bg=${base02}] %H:%M:%S %Z '
set -g status-right-length 50 set -g status-right-length 50
set -g status-left-length 20 set -g status-left-length 20
setw -g window-status-current-style 'fg=${base07} bg=${base0D} bold' setw -g window-status-current-style 'fg=${base07} bg=${base0D} bold'
setw -g window-status-current-format ' #I#[fg=${base07}]:#[fg=${base07}]#W#[fg=${base07}]#F ' setw -g window-status-current-format ' #I#[fg=${base07}]:#[fg=${base07}]#W#[fg=${base07}]#F '
setw -g window-status-style 'fg=${base06} bg=${base03}' setw -g window-status-style 'fg=${base06} bg=${base03}'
setw -g window-status-format ' #I#[fg=${base07}]:#[fg=${base06}]#W#[${base06}]#F ' setw -g window-status-format ' #I#[fg=${base07}]:#[fg=${base06}]#W#[${base06}]#F '
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold' setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
# messages # messages
set -g message-style 'fg=colour232 bg=colour16 bold' set -g message-style 'fg=colour232 bg=colour16 bold'
# mouse # mouse
set -g mouse on set -g mouse on
''; '';
}; };
} }

View file

@ -4,7 +4,7 @@
home.sessionVariables.EDITOR = "vim"; home.sessionVariables.EDITOR = "vim";
programs.vim = { programs.vim = {
enable = true; enable = true;
settings = {}; settings = { };
package = pkgs.vim_configurable-pynvim; package = pkgs.vim_configurable-pynvim;
#withPython3 = true; #withPython3 = true;
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [

View file

@ -11,7 +11,8 @@ let
fi fi
''; '';
shellFunAliases = mapAttrs shellFunAlias; shellFunAliases = mapAttrs shellFunAlias;
in { in
{
home.shell.functions = { home.shell.functions = {
genmac = '' genmac = ''
nix run nixpkgs.openssl -c openssl rand -hex 6 | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1:\2:\3:\4:\5:\6/' nix run nixpkgs.openssl -c openssl rand -hex 6 | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1:\2:\3:\4:\5:\6/'
@ -29,35 +30,53 @@ in {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableAutosuggestions = true; enableAutosuggestions = true;
initExtra = let initExtra =
zshOpts= [ let
"auto_pushd" "pushd_ignore_dups" "pushdminus" zshOpts = [
"rmstarsilent" "nonomatch" "long_list_jobs" "interactivecomments" "auto_pushd"
"append_history" "hist_ignore_space" "hist_verify" "inc_append_history" "nosharehistory" "pushd_ignore_dups"
"nomenu_complete" "auto_menu" "no_auto_remove_slash" "complete_in_word" "always_to_end" "nolistbeep" "autolist" "listrowsfirst" "pushdminus"
]; in '' "rmstarsilent"
zmodload -i zsh/complist "nonomatch"
zstyle ':completion:*' list-colors "" "long_list_jobs"
zstyle ':completion:*:*:*:*:*' menu select "interactivecomments"
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories "append_history"
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' "hist_ignore_space"
zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" "hist_verify"
zstyle ':completion:*:complete:pass:*:*' matcher 'r:|[./_-]=** r:|=*' 'l:|=* r:|=*' "inc_append_history"
${lib.concatStringsSep "\n" (map (opt: "setopt ${opt}") zshOpts)} "nosharehistory"
source ${./zshrc-vimode} "nomenu_complete"
bindkey '^ ' autosuggest-accept "auto_menu"
autoload -Uz history-search-end "no_auto_remove_slash"
autoload -Uz history-beginning-search-menu "complete_in_word"
zle -N history-beginning-search-menu "always_to_end"
zle -N history-beginning-search-backward-end \ "nolistbeep"
history-search-end "autolist"
zle -N history-beginning-search-forward-end \ "listrowsfirst"
history-search-end ]; in
bindkey "\e[5~" history-beginning-search-backward-end ''
bindkey "\e[6~" history-beginning-search-forward-end zmodload -i zsh/complist
bindkey "^p" history-beginning-search-menu zstyle ':completion:*' list-colors ""
echo ""; akiflags -rb; zstyle ':completion:*:*:*:*:*' menu select
''; zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w"
zstyle ':completion:*:complete:pass:*:*' matcher 'r:|[./_-]=** r:|=*' 'l:|=* r:|=*'
${lib.concatStringsSep "\n" (map (opt: "setopt ${opt}") zshOpts)}
source ${./zshrc-vimode}
bindkey '^ ' autosuggest-accept
autoload -Uz history-search-end
autoload -Uz history-beginning-search-menu
zle -N history-beginning-search-menu
zle -N history-beginning-search-backward-end \
history-search-end
zle -N history-beginning-search-forward-end \
history-search-end
bindkey "\e[5~" history-beginning-search-backward-end
bindkey "\e[6~" history-beginning-search-forward-end
bindkey "^p" history-beginning-search-menu
echo ""; akiflags -rb;
'';
shellAliases = { shellAliases = {
nixdirfmt = "fd --color=never .nix | xargs nixpkgs-fmt"; nixdirfmt = "fd --color=never .nix | xargs nixpkgs-fmt";
exa = "exa --time-style long-iso"; exa = "exa --time-style long-iso";
@ -69,7 +88,7 @@ bindkey "^p" history-beginning-search-menu
log = "journalctl"; log = "journalctl";
dmesg = "dmesg -HP"; dmesg = "dmesg -HP";
lg = "log --no-pager | grep"; lg = "log --no-pager | grep";
hg = "history 0 | grep"; hg = "history 0 | grep";
}; };
localVariables = { localVariables = {
_Z_DATA = "${config.xdg.dataHome}/z/data"; _Z_DATA = "${config.xdg.dataHome}/z/data";

View file

@ -1,27 +1,33 @@
let katUser = { lib }: let let katUser = { lib }:
trustedImport = { let
config.home-manager.users.kat = { trustedImport = {
imports = lib.optional (builtins.pathExists ../../trusted/users/kat) (import ../../trusted/users/kat/home.nix); config.home-manager.users.kat = {
imports = lib.optional (builtins.pathExists ../../trusted/users/kat) (import ../../trusted/users/kat/home.nix);
};
}; };
}; userImport = profile: { config, ... }: { userImport = profile: { config, ... }: {
config.home-manager.users.kat = { config.home-manager.users.kat = {
imports = [ imports = [
(./. + "/${profile}") (./. + "/${profile}")
]; ];
}; };
}; serviceImport = profile: { config, ... }: { };
config.home-manager.users.kat = { serviceImport = profile: { config, ... }: {
imports = [ config.home-manager.users.kat = {
(./services + "/${profile}") imports = [
]; (./services + "/${profile}")
}; ];
}; profileNames = lib.folderList ./. ["base" "services"]; };
serviceNames = lib.folderList ./services []; };
userProfiles = with userProfiles; profileNames = lib.folderList ./. [ "base" "services" ];
lib.genAttrs profileNames userImport // { serviceNames = lib.folderList ./services [ ];
services = lib.genAttrs serviceNames serviceImport; userProfiles = with userProfiles;
base = { imports = [ ./nixos.nix (userImport "base") trustedImport ]; }; lib.genAttrs profileNames userImport // {
server = { imports = [ personal ]; }; services = lib.genAttrs serviceNames serviceImport;
guiFull = { imports = [ gui sway dev media personal ]; }; base = { imports = [ ./nixos.nix (userImport "base") trustedImport ]; };
}; in userProfiles; server = { imports = [ personal ]; };
guiFull = { imports = [ gui sway dev media personal ]; };
};
in
userProfiles;
in { __functor = self: katUser; isModule = false; } in { __functor = self: katUser; isModule = false; }

View file

@ -4,6 +4,6 @@
home.packages = with pkgs; [ cookiecutter ]; home.packages = with pkgs; [ cookiecutter ];
home.shell.functions.katenv = '' home.shell.functions.katenv = ''
cookiecutter cookiecutters --directory $1 cookiecutter cookiecutters --directory $1
''; '';
} }

View file

@ -1,127 +1,128 @@
{ config, ... }: { config, ... }:
{ {
home.file.".mozilla/tst.css".text = let base16 = config.kw.hexColors; in '' home.file.".mozilla/tst.css".text = let base16 = config.kw.hexColors; in
/* Hide border on tab bar, force its state to 'scroll', adjust margin-left for width of scrollbar. */ ''
#tabbar { border: 0; overflow-y: scroll !important; } /* Hide border on tab bar, force its state to 'scroll', adjust margin-left for width of scrollbar. */
#tabbar { border: 0; overflow-y: scroll !important; }
/* Hide .twisty and adjust margins so favicons have 7px on left. */ /* Hide .twisty and adjust margins so favicons have 7px on left. */
.tab .twisty { .tab .twisty {
margin-left: -16px; margin-left: -16px;
} }
/* Push tab labels slightly to the right so they're completely hidden in collapsed state */ /* Push tab labels slightly to the right so they're completely hidden in collapsed state */
.tab .label { .tab .label {
margin-left: 7px; margin-left: 7px;
} }
/* Hide close buttons on tabs. */ /* Hide close buttons on tabs. */
.tab .closebox { .tab .closebox {
visibility: collapse; visibility: collapse;
} }
/* Hide sound playing/muted button. */ /* Hide sound playing/muted button. */
.sound-button::before { .sound-button::before {
display: none !important; display: none !important;
} }
/* Hide 'new tab' button. */ /* Hide 'new tab' button. */
.newtab-button { .newtab-button {
display: none; display: none;
} }
/* ################################################ */ /* ################################################ */
/* ##### COLOR THEME ############################## */ /* ##### COLOR THEME ############################## */
/* ################################################ */ /* ################################################ */
@keyframes spin { @keyframes spin {
0% { 0% {
transform: rotate(0deg); transform: rotate(0deg);
} }
100% { 100% {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
@keyframes pulse { @keyframes pulse {
0% { 0% {
opacity: 0.75; opacity: 0.75;
} }
100% { 100% {
opacity: 0.25; opacity: 0.25;
} }
} }
* { * {
font-family: "Cozette", monospace !important; font-family: "Cozette", monospace !important;
} }
:root { :root {
background-color: ${base16.base00} !important; background-color: ${base16.base00} !important;
} }
#tabbar { #tabbar {
background-color: ${base16.base00} !important; background-color: ${base16.base00} !important;
border-right: 1px solid ${base16.base01}; border-right: 1px solid ${base16.base01};
box-shadow: none !important; box-shadow: none !important;
} }
.tab { .tab {
background-color: ${base16.base01}; background-color: ${base16.base01};
color: ${base16.base05} !important; color: ${base16.base05} !important;
box-shadow: none !important; box-shadow: none !important;
margin: 0.125em; margin: 0.125em;
border-radius: 0.125em; border-radius: 0.125em;
} }
.tab .favicon { .tab .favicon {
margin-left: 0.25em; margin-left: 0.25em;
} }
.tab .label { .tab .label {
margin: 0.25em; margin: 0.25em;
} }
.tab:hover { .tab:hover {
background-color: ${base16.base0C}FF !important; background-color: ${base16.base0C}FF !important;
color: ${base16.base07} !important; color: ${base16.base07} !important;
} }
.tab.discarded { .tab.discarded {
background-color: ${base16.base00}; background-color: ${base16.base00};
color: ${base16.base02} !important; color: ${base16.base02} !important;
} }
.tab.discarded:hover { .tab.discarded:hover {
background-color: ${base16.base01} !important; background-color: ${base16.base01} !important;
color: ${base16.base03} !important; color: ${base16.base03} !important;
} }
:root .tab .highlighter::before { :root .tab .highlighter::before {
display: none; display: none;
} }
.tab.active { .tab.active {
background-color: ${base16.base0D}FF; background-color: ${base16.base0D}FF;
color: ${base16.base07} !important; color: ${base16.base07} !important;
} }
.tab.active:hover { .tab.active:hover {
background-color: ${base16.base0D}FF !important; background-color: ${base16.base0D}FF !important;
} }
@keyframes rainbow_animation { @keyframes rainbow_animation {
0% { 0% {
background-position: 0 0; background-position: 0 0;
} }
100% { 100% {
background-position: 100% 0; background-position: 100% 0;
} }
} }
/* Adjust style for tab that has sound playing. */ /* Adjust style for tab that has sound playing. */
.tab.sound-playing .label { .tab.sound-playing .label {
background: linear-gradient(to right, #6666ff, #0099ff , #00ff00, #ff3399, #6666ff); background: linear-gradient(to right, #6666ff, #0099ff , #00ff00, #ff3399, #6666ff);
-webkit-background-clip: text; -webkit-background-clip: text;
background-clip: text; background-clip: text;
color: transparent; color: transparent;
animation: rainbow_animation 3s linear infinite; animation: rainbow_animation 3s linear infinite;
animation-direction: alternate-reverse; animation-direction: alternate-reverse;
background-size: 400% 100%; background-size: 400% 100%;
} }
/* Adjust style for tab that is muted. */ /* Adjust style for tab that is muted. */
.tab.muted { .tab.muted {
opacity: 0.5; opacity: 0.5;
} }
''; '';
} }

View file

@ -1,106 +1,106 @@
{ profile, base16 }: { profile, base16 }:
'' ''
* { * {
font-family: "Cozette", monospace; font-family: "Cozette", monospace;
}
:root {
--animationSpeed : 0.15s;
}
/* Hide main tabs toolbar */
#TabsToolbar {
visibility: collapse;
}
/* Hide splitter, when using Tree Style Tab. */
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] + #sidebar-splitter {
display: none !important;
}
/* Hide sidebar header, when using Tree Style Tab. */
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
visibility: collapse;
} }
:root {
--animationSpeed : 0.15s; #back-button { display: none !important }
#forward-button { display: none !important }
#urlbar-search-mode-indicator { display: none !important }
#urlbar *|input::placeholder { opacity: 0 !important; }
#nav-bar, toolbar-menubar, #menubar-items, #main-menubar {
background: ${base16.base00} !important;
} }
/* Hide main tabs toolbar */ #urlbar-background {
#TabsToolbar { background: ${base16.base01} !important;
visibility: collapse;
}
/* Hide splitter, when using Tree Style Tab. */
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] + #sidebar-splitter {
display: none !important;
}
/* Hide sidebar header, when using Tree Style Tab. */
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
visibility: collapse;
}
#back-button { display: none !important }
#forward-button { display: none !important }
#urlbar-search-mode-indicator { display: none !important }
#urlbar *|input::placeholder { opacity: 0 !important; }
#nav-bar, toolbar-menubar, #menubar-items, #main-menubar {
background: ${base16.base00} !important;
}
#urlbar-background {
background: ${base16.base01} !important;
}
#urlbar {
text-align: center;
}
#urlbar-container {
width: 50vw !important;
} }
#star-button{ #urlbar {
display:none; text-align: center;
} }
#navigator-toolbox { #urlbar-container {
border : none !important; width: 50vw !important;
} }
.titlebar-spacer { #star-button{
display : none !important; display:none;
} }
#urlbar:not(:hover):not([breakout][breakout-extend]) > #urlbar-background { #navigator-toolbox {
box-shadow : none !important; border : none !important;
background : ${base16.base01} !important; }
}
.urlbar-icon, #userContext-indicator, #userContext-label { .titlebar-spacer {
fill : transparent !important; display : none !important;
background : transparent !important; }
color : transparent !important;
}
#nav-bar-customization-target > toolbarspring { max-width: none !important } #urlbar:not(:hover):not([breakout][breakout-extend]) > #urlbar-background {
box-shadow : none !important;
background : ${base16.base01} !important;
}
#urlbar:hover .urlbar-icon, .urlbar-icon, #userContext-indicator, #userContext-label {
#urlbar:active .urlbar-icon, fill : transparent !important;
#urlbar[focused] .urlbar-icon { background : transparent !important;
fill : var(--toolbar-color) !important; color : transparent !important;
} }
#urlbar-container { #nav-bar-customization-target > toolbarspring { max-width: none !important }
-moz-box-pack: center !important;
}
/* animations */ #urlbar:hover .urlbar-icon,
toolbarbutton, #urlbar:active .urlbar-icon,
.toolbarbutton-icon, #urlbar[focused] .urlbar-icon {
.subviewbutton, fill : var(--toolbar-color) !important;
#urlbar-background, }
.urlbar-icon,
#userContext-indicator, #urlbar-container {
#userContext-label, -moz-box-pack: center !important;
.urlbar-input-box, }
#identity-box,
#tracking-protection-icon-container, /* animations */
[anonid=urlbar-go-button], toolbarbutton,
.urlbar-icon-wrapper, .toolbarbutton-icon,
#tracking-protection-icon, .subviewbutton,
#identity-box image, #urlbar-background,
stack, .urlbar-icon,
vbox, #userContext-indicator,
tab:not(:active) .tab-background, #userContext-label,
tab:not([beforeselected-visible])::after, .urlbar-input-box,
tab[visuallyselected] .tab-background::before, #identity-box,
tab[visuallyselected] .tab-background::before, #tracking-protection-icon-container,
.tab-close-button { [anonid=urlbar-go-button],
transition : var(--animationSpeed) !important; .urlbar-icon-wrapper,
} #tracking-protection-icon,
#identity-box image,
stack,
vbox,
tab:not(:active) .tab-background,
tab:not([beforeselected-visible])::after,
tab[visuallyselected] .tab-background::before,
tab[visuallyselected] .tab-background::before,
.tab-close-button {
transition : var(--animationSpeed) !important;
}
'' ''

View file

@ -77,35 +77,37 @@
"m" = vim."`"; "m" = vim."`";
"WHEEL_UP" = vim."L"; "WHEEL_UP" = vim."L";
"WHEEL_DOWN" = vim."H"; "WHEEL_DOWN" = vim."H";
}; in vim // other;
config = {
no-input-default-bindings = "";
profile = "gpu-hq";
gpu-context = "wayland";
hwdec = "auto";
vo = "gpu";
volume-max = 200;
keep-open = true;
opengl-waitvsync = true;
demuxer-max-bytes = "2000MiB";
demuxer-max-back-bytes = "250MiB";
osd-scale-by-window = false;
osd-bar-h = 2.5; # 3.125 default
osd-border-size = 2; # font border pixels, default 3
term-osd-bar = true;
script-opts = lib.concatStringsSep ","
(lib.mapAttrsToList (k: v: "${k}=${toString v}") {
osc-layout = "slimbox";
osc-vidscale = "no";
osc-deadzonesize = 0.75;
osc-minmousemove = 4;
osc-hidetimeout = 2000;
osc-valign = 0.9;
osc-timems = "yes";
osc-seekbarstyle = "knob";
osc-seekbarkeyframes = "no";
osc-seekrangestyle = "slider";
});
}; };
}; in
} vim // other;
config = {
no-input-default-bindings = "";
profile = "gpu-hq";
gpu-context = "wayland";
hwdec = "auto";
vo = "gpu";
volume-max = 200;
keep-open = true;
opengl-waitvsync = true;
demuxer-max-bytes = "2000MiB";
demuxer-max-back-bytes = "250MiB";
osd-scale-by-window = false;
osd-bar-h = 2.5; # 3.125 default
osd-border-size = 2; # font border pixels, default 3
term-osd-bar = true;
script-opts = lib.concatStringsSep ","
(lib.mapAttrsToList (k: v: "${k}=${toString v}") {
osc-layout = "slimbox";
osc-vidscale = "no";
osc-deadzonesize = 0.75;
osc-minmousemove = 4;
osc-hidetimeout = 2000;
osc-valign = 0.9;
osc-timems = "yes";
osc-seekbarstyle = "knob";
osc-seekbarkeyframes = "no";
osc-seekrangestyle = "slider";
});
};
};
}

View file

@ -11,9 +11,9 @@
extraGroups = [ "wheel" "video" "systemd-journal" "plugdev" ]; extraGroups = [ "wheel" "video" "systemd-journal" "plugdev" ];
hashedPassword = hashedPassword =
"$6$i28yOXoo$/WokLdKds5ZHtJHcuyGrH2WaDQQk/2Pj0xRGLgS8UcmY2oMv3fw2j/85PRpsJJwCB2GBRYRK5LlvdTleHd3mB."; "$6$i28yOXoo$/WokLdKds5ZHtJHcuyGrH2WaDQQk/2Pj0xRGLgS8UcmY2oMv3fw2j/85PRpsJJwCB2GBRYRK5LlvdTleHd3mB.";
}; };
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"f /var/lib/systemd/linger/kat" "f /var/lib/systemd/linger/kat"
]; ];
} }

View file

@ -26,11 +26,11 @@
imap.host = "athame.kittywit.ch"; imap.host = "athame.kittywit.ch";
smtp.host = "athame.kittywit.ch"; smtp.host = "athame.kittywit.ch";
passwordCommand = "${pkgs.pass}/bin/pass email/kittywitch"; passwordCommand = "${pkgs.pass}/bin/pass email/kittywitch";
gpg = { gpg = {
signByDefault = true; signByDefault = true;
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE"; key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
};
}; };
}; };
}; };
};
} }

View file

@ -3,35 +3,35 @@
{ {
home.file = { home.file = {
".local/share/weechat/sec.conf".text = '' ".local/share/weechat/sec.conf".text = ''
# #
# weechat -- sec.conf # weechat -- sec.conf
# #
# WARNING: It is NOT recommended to edit this file by hand, # WARNING: It is NOT recommended to edit this file by hand,
# especially if WeeChat is running. # especially if WeeChat is running.
# #
# Use /set or similar command to change settings in WeeChat. # Use /set or similar command to change settings in WeeChat.
# #
# For more info, see: https://weechat.org/doc/quickstart # For more info, see: https://weechat.org/doc/quickstart
# #
[crypt] [crypt]
cipher = aes256 cipher = aes256
hash_algo = sha512 hash_algo = sha512
passphrase_command = "${pkgs.pass}/bin/pass secrets/weechat-pass" passphrase_command = "${pkgs.pass}/bin/pass secrets/weechat-pass"
salt = on salt = on
[data] [data]
__passphrase__ = on __passphrase__ = on
znc = "552E98A5111B986C1003CF86C67DF2AF4B3FDE88E5762FC01EB4A00E31B8363ABFCBBE7A702CB72C298F61D4005D1C5AABB30602BBFCE9E4013CBE88D3D3DB66B18C551743D7816C4F0C9DA44B83DB5807BBB02A48B66D" znc = "552E98A5111B986C1003CF86C67DF2AF4B3FDE88E5762FC01EB4A00E31B8363ABFCBBE7A702CB72C298F61D4005D1C5AABB30602BBFCE9E4013CBE88D3D3DB66B18C551743D7816C4F0C9DA44B83DB5807BBB02A48B66D"
matrix = "CC989DF79CDAECC1CE32F10FA9B42B6AE9FA63B41C0B3FCCCD4A309AB798CDEE695E0B4A2E0C975C6364927C76D4FEB25BC84C7AF8989DC418A205A5D62E9330E142E4F11AB59E0720867915DEEFCA70E80102C639D35B" matrix = "CC989DF79CDAECC1CE32F10FA9B42B6AE9FA63B41C0B3FCCCD4A309AB798CDEE695E0B4A2E0C975C6364927C76D4FEB25BC84C7AF8989DC418A205A5D62E9330E142E4F11AB59E0720867915DEEFCA70E80102C639D35B"
''; '';
}; };
programs.weechat = { programs.weechat = {
enable = true; enable = true;
init = lib.mkBefore '' init = lib.mkBefore ''
/server add softnet athame.kittywit.ch/5001 -ssl -autoconnect /server add softnet athame.kittywit.ch/5001 -ssl -autoconnect
/server add liberachat athame.kittywit.ch/5001 -ssl -autoconnect /server add liberachat athame.kittywit.ch/5001 -ssl -autoconnect
''; '';
scripts = with pkgs.weechatScripts; [ scripts = with pkgs.weechatScripts; [
weechat-notify-send weechat-notify-send

View file

@ -8,26 +8,26 @@
secrets.files.weechat-sec = { secrets.files.weechat-sec = {
text = '' text = ''
# #
# weechat -- sec.conf # weechat -- sec.conf
# #
# WARNING: It is NOT recommended to edit this file by hand, # WARNING: It is NOT recommended to edit this file by hand,
# especially if WeeChat is running. # especially if WeeChat is running.
# #
# Use /set or similar command to change settings in WeeChat. # Use /set or similar command to change settings in WeeChat.
# #
# For more info, see: https://weechat.org/doc/quickstart # For more info, see: https://weechat.org/doc/quickstart
# #
[crypt] [crypt]
cipher = aes256 cipher = aes256
hash_algo = sha512 hash_algo = sha512
salt = off salt = off
[data] [data]
__passphrase__ = off __passphrase__ = off
znc = "${tf.variables.znc-pass.ref}" znc = "${tf.variables.znc-pass.ref}"
matrix = "${tf.variables.matrix-pass.ref}" matrix = "${tf.variables.matrix-pass.ref}"
''; '';
owner = "kat"; owner = "kat";
group = "users"; group = "users";
@ -39,30 +39,31 @@
services.weechat.enable = true; services.weechat.enable = true;
systemd.user.services.weechat-tmux = let scfg = config.services.weechat; in lib.mkForce { systemd.user.services.weechat-tmux = let scfg = config.services.weechat; in
Unit = { lib.mkForce {
Description = "Weechat tmux session"; Unit = {
After = [ "network.target" ]; Description = "Weechat tmux session";
After = [ "network.target" ];
};
Service = {
Type = "oneshot";
Environment = [
"TMUX_TMPDIR=%t"
"WEECHAT_HOME=${toString config.programs.weechat.homeDirectory}"
];
RemainAfterExit = true;
X-RestartIfChanged = false;
ExecStart = "${scfg.tmuxPackage}/bin/tmux -2 new-session -d -s ${scfg.sessionName} ${scfg.binary}";
ExecStop = "${scfg.tmuxPackage}/bin/tmux kill-session -t ${scfg.sessionName}";
};
Install.WantedBy = [ "default.target" ];
}; };
Service = {
Type = "oneshot";
Environment=[
"TMUX_TMPDIR=%t"
"WEECHAT_HOME=${toString config.programs.weechat.homeDirectory}"
];
RemainAfterExit = true;
X-RestartIfChanged = false;
ExecStart = "${scfg.tmuxPackage}/bin/tmux -2 new-session -d -s ${scfg.sessionName} ${scfg.binary}";
ExecStop = "${scfg.tmuxPackage}/bin/tmux kill-session -t ${scfg.sessionName}";
};
Install.WantedBy = [ "default.target" ];
};
programs.weechat = { programs.weechat = {
enable = true; enable = true;
init = lib.mkBefore '' init = lib.mkBefore ''
/server add softnet athame.kittywit.ch/5001 -ssl -autoconnect /server add softnet athame.kittywit.ch/5001 -ssl -autoconnect
/server add liberachat athame.kittywit.ch/5001 -ssl -autoconnect /server add liberachat athame.kittywit.ch/5001 -ssl -autoconnect
''; '';
scripts = with pkgs.weechatScripts; [ scripts = with pkgs.weechatScripts; [
weechat-notify-send weechat-notify-send

View file

@ -5,11 +5,12 @@ let
exec foot "$2" exec foot "$2"
''; '';
lockCommand = "${pkgs.swaylock-fancy}/bin/swaylock-fancy -d -t ''"; lockCommand = "${pkgs.swaylock-fancy}/bin/swaylock-fancy -d -t ''";
in { in
{
home.sessionVariables = { home.sessionVariables = {
XDG_CURRENT_DESKTOP = "sway"; XDG_CURRENT_DESKTOP = "sway";
XDG_SESSION_TYPE = "wayland"; XDG_SESSION_TYPE = "wayland";
WLR_DRM_DEVICES="/dev/dri/card0"; WLR_DRM_DEVICES = "/dev/dri/card0";
}; };
home.packages = with pkgs; [ grim slurp swaylock-fancy wl-clipboard jq quintom-cursor-theme gsettings-desktop-schemas glib wofi wmctrl ]; home.packages = with pkgs; [ grim slurp swaylock-fancy wl-clipboard jq quintom-cursor-theme gsettings-desktop-schemas glib wofi wmctrl ];
@ -26,11 +27,11 @@ in {
Service = { Service = {
Type = "simple"; Type = "simple";
ExecStart = '' ExecStart = ''
${pkgs.swayidle}/bin/swayidle -w \ ${pkgs.swayidle}/bin/swayidle -w \
timeout 300 '${lockCommand} \ timeout 300 '${lockCommand} \
timeout 600 'swaymsg "output * dpms off"' \ timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \ resume 'swaymsg "output * dpms on"' \
before-sleep '${lockCommand}' before-sleep '${lockCommand}'
''; '';
RestartSec = 3; RestartSec = 3;
Restart = "always"; Restart = "always";
@ -55,119 +56,123 @@ in {
fi fi
''; '';
wayland.windowManager.sway = let wayland.windowManager.sway =
cfg = config.wayland.windowManager.sway.config; let
bindsym = k: v: "bindsym ${k} ${v}"; cfg = config.wayland.windowManager.sway.config;
bindWorkspace = key: workspace: { bindsym = k: v: "bindsym ${k} ${v}";
"${cfg.modifier}+${key}" = "workspace number ${workspace}"; bindWorkspace = key: workspace: {
"${cfg.modifier}+shift+${key}" = "move container to workspace number ${workspace}"; "${cfg.modifier}+${key}" = "workspace number ${workspace}";
}; "${cfg.modifier}+shift+${key}" = "move container to workspace number ${workspace}";
workspaceBindings = map (v: bindWorkspace v "${v}:${v}") [ };
"1" workspaceBindings = map (v: bindWorkspace v "${v}:${v}") [
"2" "1"
"3" "2"
"4" "3"
"5" "4"
"6" "5"
"7" "6"
"8" "7"
"9" "8"
] "9"
++ [ (bindWorkspace "0" "10:10") ] ]
++ lib.imap1 (i: v: bindWorkspace v "${toString (10 + i)}:${v}") [ ++ [ (bindWorkspace "0" "10:10") ]
"F1" ++ lib.imap1 (i: v: bindWorkspace v "${toString (10 + i)}:${v}") [
"F2" "F1"
"F3" "F2"
"F4" "F3"
"F5" "F4"
"F6" "F5"
"F7" "F6"
"F8" "F7"
"F9" "F8"
"F10" "F9"
"F11" "F10"
"F12" "F11"
]; "F12"
workspaceBindings' = map (lib.mapAttrsToList bindsym) workspaceBindings; ];
workspaceBindingsStr = lib.concatStringsSep "\n" (lib.flatten workspaceBindings'); workspaceBindings' = map (lib.mapAttrsToList bindsym) workspaceBindings;
in { workspaceBindingsStr = lib.concatStringsSep "\n" (lib.flatten workspaceBindings');
enable = true; in
config = let {
pactl = "${config.home.nixosConfig.hardware.pulseaudio.package or pkgs.pulseaudio}/bin/pactl"; enable = true;
dmenu = "${pkgs.wofi}/bin/wofi -idbt ${footwrap}/bin/footwrap -s ~/.config/wofi/wofi.css -p '' -W 25%"; config =
in { let
pactl = "${config.home.nixosConfig.hardware.pulseaudio.package or pkgs.pulseaudio}/bin/pactl";
dmenu = "${pkgs.wofi}/bin/wofi -idbt ${footwrap}/bin/footwrap -s ~/.config/wofi/wofi.css -p '' -W 25%";
in
{
modes = { modes = {
"System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown" = "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown" =
{ {
"l" = "exec ${lockCommand}, mode default"; "l" = "exec ${lockCommand}, mode default";
"e" = "exec swaymsg exit, mode default"; "e" = "exec swaymsg exit, mode default";
"s" = "exec systemctl suspend, mode default"; "s" = "exec systemctl suspend, mode default";
"h" = "exec systemctl hibernate, mode default"; "h" = "exec systemctl hibernate, mode default";
"r" = "exec systemctl reboot, mode default"; "r" = "exec systemctl reboot, mode default";
"Shift+s" = "exec systemctl shutdown, mode default"; "Shift+s" = "exec systemctl shutdown, mode default";
"Return" = "mode default"; "Return" = "mode default";
"Escape" = "mode default"; "Escape" = "mode default";
};
}; };
}; bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
input = { input = {
"*" = { "*" = {
xkb_layout = "us_gbp_map"; xkb_layout = "us_gbp_map";
xkb_options = "compose:rctrl,ctrl:nocaps"; xkb_options = "compose:rctrl,ctrl:nocaps";
};
}; };
}; fonts = {
fonts = { names = [ config.kw.font.name ];
names = [ config.kw.font.name ]; style = "Medium";
style = "Medium"; size = config.kw.font.size;
size = config.kw.font.size; };
}; terminal = "${pkgs.foot}/bin/foot";
terminal = "${pkgs.foot}/bin/foot"; menu = "${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --no-generic --dmenu=\"${dmenu}\" --term='${footwrap}/bin/footwrap'";
menu = "${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --no-generic --dmenu=\"${dmenu}\" --term='${footwrap}/bin/footwrap'"; modifier = "Mod4";
modifier = "Mod4";
assigns = { "12:F2" = [{ class = "screenstub"; }]; }; assigns = { "12:F2" = [{ class = "screenstub"; }]; };
startup = [ startup = [
{ {
command = "gsettings set org.gnome.desktop.interface cursor-theme 'Quintom_Snow'"; command = "gsettings set org.gnome.desktop.interface cursor-theme 'Quintom_Snow'";
} }
{ {
command = "systemctl --user restart mako"; command = "systemctl --user restart mako";
always = true; always = true;
} }
{ {
command = "systemctl --user restart konawall.service"; command = "systemctl --user restart konawall.service";
always = true; always = true;
} }
]; ];
modes.resize = { modes.resize = {
"a" = "resize shrink width 4 px or 4 ppt"; "a" = "resize shrink width 4 px or 4 ppt";
"s" = "resize shrink height 4 px or 4 ppt"; "s" = "resize shrink height 4 px or 4 ppt";
"w" = "resize grow height 4 px or 4 ppt"; "w" = "resize grow height 4 px or 4 ppt";
"d" = "resize grow width 4 px or 4 ppt"; "d" = "resize grow width 4 px or 4 ppt";
"Left" = "resize shrink width 4 px or 4 ppt"; "Left" = "resize shrink width 4 px or 4 ppt";
"Down" = "resize shrink height 4 px or 4 ppt"; "Down" = "resize shrink height 4 px or 4 ppt";
"Up" = "resize grow height 4 px or 4 ppt"; "Up" = "resize grow height 4 px or 4 ppt";
"Right" = "resize grow width 4 px or 4 ppt"; "Right" = "resize grow width 4 px or 4 ppt";
Return = ''mode "default"''; Return = ''mode "default"'';
Escape = ''mode "default"''; Escape = ''mode "default"'';
"${cfg.modifier}+z" = ''mode "default"''; "${cfg.modifier}+z" = ''mode "default"'';
}; };
window = { window = {
border = 1; border = 1;
titlebar = false; titlebar = false;
}; };
floating = { floating = {
border = 1; border = 1;
titlebar = false; titlebar = false;
}; };
keybindings = { keybindings = {
"${cfg.modifier}+Return" = "exec ${cfg.terminal}"; "${cfg.modifier}+Return" = "exec ${cfg.terminal}";
"${cfg.modifier}+x" = "exec ${lockCommand}"; "${cfg.modifier}+x" = "exec ${lockCommand}";
# focus windows - regular # focus windows - regular
"${cfg.modifier}+Left" = "focus left"; "${cfg.modifier}+Left" = "focus left";
@ -279,84 +284,85 @@ in {
# mode triggers # mode triggers
"${cfg.modifier}+Shift+r" = "mode resize"; "${cfg.modifier}+Shift+r" = "mode resize";
"${cfg.modifier}+Delete" = ''mode "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown"''; "${cfg.modifier}+Delete" = ''mode "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown"'';
}; };
colors = let base16 = config.kw.hexColors; in { colors = let base16 = config.kw.hexColors; in
focused = { {
border = base16.base01; focused = {
background = base16.base0D; border = base16.base01;
text = base16.base07; background = base16.base0D;
indicator = base16.base0D; text = base16.base07;
childBorder = base16.base0D; indicator = base16.base0D;
childBorder = base16.base0D;
};
focusedInactive = {
border = base16.base02;
background = base16.base04;
text = base16.base00;
indicator = base16.base04;
childBorder = base16.base04;
};
unfocused = {
border = base16.base01;
background = base16.base02;
text = base16.base06;
indicator = base16.base02;
childBorder = base16.base02;
};
urgent = {
border = base16.base03;
background = base16.base08;
text = base16.base00;
indicator = base16.base08;
childBorder = base16.base08;
};
}; };
focusedInactive = { };
border = base16.base02; wrapperFeatures.gtk = true;
background = base16.base04; extraConfig = ''
text = base16.base00; hide_edge_borders smart_no_gaps
indicator = base16.base04; smart_borders no_gaps
childBorder = base16.base04; title_align center
}; seat seat0 xcursor_theme Quintom_Snow 20
unfocused = { workspace_auto_back_and_forth yes
border = base16.base01; set $mode_gaps Gaps: (o) outer, (i) inner
background = base16.base02; set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
text = base16.base06; set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
indicator = base16.base02; bindsym ${cfg.modifier}+Shift+g mode "$mode_gaps"
childBorder = base16.base02;
};
urgent = {
border = base16.base03;
background = base16.base08;
text = base16.base00;
indicator = base16.base08;
childBorder = base16.base08;
};
};
};
wrapperFeatures.gtk = true;
extraConfig = ''
hide_edge_borders smart_no_gaps
smart_borders no_gaps
title_align center
seat seat0 xcursor_theme Quintom_Snow 20
workspace_auto_back_and_forth yes
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym ${cfg.modifier}+Shift+g mode "$mode_gaps"
mode "$mode_gaps" { mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer" bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner" bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
} }
mode "$mode_gaps_inner" { mode "$mode_gaps_inner" {
bindsym equal gaps inner current plus 5 bindsym equal gaps inner current plus 5
bindsym minus gaps inner current minus 5 bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0 bindsym 0 gaps inner current set 0
bindsym plus gaps inner all plus 5 bindsym plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5 bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0 bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
} }
mode "$mode_gaps_outer" { mode "$mode_gaps_outer" {
bindsym equal gaps outer current plus 5 bindsym equal gaps outer current plus 5
bindsym minus gaps outer current minus 5 bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0 bindsym 0 gaps outer current set 0
bindsym plus gaps outer all plus 5 bindsym plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5 bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0 bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
} }
${workspaceBindingsStr} ${workspaceBindingsStr}
''; '';
}; };
} }

View file

@ -5,7 +5,8 @@ let
color: ${color}; color: ${color};
border-color: ${color}; border-color: ${color};
''; '';
in '' in
''
* { * {
border: none; border: none;
border-radius: 0; border-radius: 0;

View file

@ -3,131 +3,131 @@
let let
base16 = config.kw.hexColors; base16 = config.kw.hexColors;
in in
{ {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
style = import ./waybar.css.nix { style = import ./waybar.css.nix {
inherit base16; inherit base16;
inherit (lib) hextorgba; inherit (lib) hextorgba;
font = config.kw.font; font = config.kw.font;
}; };
settings = [{ settings = [{
modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ]; modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
modules-center = ["clock" "clock#arc" "clock#miku" "clock#hex" ]; modules-center = [ "clock" "clock#arc" "clock#miku" "clock#hex" ];
modules-right = [ modules-right = [
"pulseaudio" "pulseaudio"
"cpu" "cpu"
"memory" "memory"
"temperature" "temperature"
"battery" "battery"
"network" "network"
"idle_inhibitor" "idle_inhibitor"
"custom/konawall" "custom/konawall"
"custom/gpg-status" "custom/gpg-status"
"tray" "tray"
]; ];
modules = { modules = {
"sway/workspaces" = { format = "{name}"; }; "sway/workspaces" = { format = "{name}"; };
"sway/window" = { "sway/window" = {
format = " {}"; format = " {}";
max-length = 50; max-length = 50;
}; };
tray = { tray = {
icon-size = 12; icon-size = 12;
spacing = 2; spacing = 2;
}; };
"custom/gpg-status" = { "custom/gpg-status" = {
format = "{}"; format = "{}";
interval = 300; interval = 300;
return-type = "json"; return-type = "json";
exec = "${pkgs.waybar-gpg}/bin/kat-gpg-status"; exec = "${pkgs.waybar-gpg}/bin/kat-gpg-status";
}; };
"custom/konawall" = { "custom/konawall" = {
format = "{}"; format = "{}";
interval = "once"; interval = "once";
return-type = "json"; return-type = "json";
exec = "${pkgs.waybar-konawall}/bin/konawall-status"; exec = "${pkgs.waybar-konawall}/bin/konawall-status";
exec-on-event = true; exec-on-event = true;
on-click = "${pkgs.waybar-konawall}/bin/konawall-toggle"; on-click = "${pkgs.waybar-konawall}/bin/konawall-toggle";
on-click-right = "systemctl --user restart konawall"; on-click-right = "systemctl --user restart konawall";
}; };
cpu = { format = " {usage}%"; }; cpu = { format = " {usage}%"; };
memory = { format = " {percentage}%"; }; memory = { format = " {percentage}%"; };
temperature = { temperature = {
format = " {temperatureC}°C"; format = " {temperatureC}°C";
hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp2_input"; hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp2_input";
}; };
idle_inhibitor = { idle_inhibitor = {
format = "{icon}"; format = "{icon}";
format-icons = { format-icons = {
activated = ""; activated = "";
deactivated = ""; deactivated = "";
};
};
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 = "{icon} {volume}%";
format-muted = "";
on-click = "foot pulsemixer";
format-icons = {
default = [
""
""
""
];
};
};
network = {
format-wifi = "";
format-ethernet = "";
format-linked = " {ifname} (NO IP)";
format-disconnected = " DC";
format-alt = "{ifname}: {ipaddr}/{cidr}";
tooltip-format-wifi = "{essid} ({signalStrength}%)";
};
clock = {
format = "{:%a, %F %T}";
tooltip = true;
tooltip-format = "{:%A, %F %T %z (%Z)}";
timezones = [
"Europe/London"
"America/Vancouver"
"Europe/Berlin"
"Pacific/Auckland"
];
interval = 1;
};
"clock#arc" = {
format = "-{:%H}";
tooltip = true;
timezone = "America/Vancouver";
tooltip-format = "{:%A, %F %R %z (%Z)}";
};
"clock#miku" = {
format = "+{:%H}";
tooltip = true;
timezone = "Pacific/Auckland";
tooltip-format = "{:%A, %F %R %z (%Z)}";
};
"clock#hex" = {
format = "+{:%H}";
tooltip = true;
timezone = "Europe/Berlin";
tooltip-format = "{:%A, %F %R %z (%Z)}";
}; };
}; };
}]; 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 = "{icon} {volume}%";
format-muted = "";
on-click = "foot pulsemixer";
format-icons = {
default = [
""
""
""
];
};
};
network = {
format-wifi = "";
format-ethernet = "";
format-linked = " {ifname} (NO IP)";
format-disconnected = " DC";
format-alt = "{ifname}: {ipaddr}/{cidr}";
tooltip-format-wifi = "{essid} ({signalStrength}%)";
};
clock = {
format = "{:%a, %F %T}";
tooltip = true;
tooltip-format = "{:%A, %F %T %z (%Z)}";
timezones = [
"Europe/London"
"America/Vancouver"
"Europe/Berlin"
"Pacific/Auckland"
];
interval = 1;
};
"clock#arc" = {
format = "-{:%H}";
tooltip = true;
timezone = "America/Vancouver";
tooltip-format = "{:%A, %F %R %z (%Z)}";
};
"clock#miku" = {
format = "+{:%H}";
tooltip = true;
timezone = "Pacific/Auckland";
tooltip-format = "{:%A, %F %R %z (%Z)}";
};
"clock#hex" = {
format = "+{:%H}";
tooltip = true;
timezone = "Europe/Berlin";
tooltip-format = "{:%A, %F %R %z (%Z)}";
};
};
}];
};
}

View file

@ -1,41 +1,42 @@
{ config, lib, ... }: { config, lib, ... }:
{ {
xdg.configFile."wofi/wofi.css".text = let base16 = config.kw.hexColors; in '' xdg.configFile."wofi/wofi.css".text = let base16 = config.kw.hexColors; in
#scroll, #input { ''
background: ${base16.base01}; #scroll, #input {
} background: ${base16.base01};
}
window { window {
font-family: ${config.kw.font.name}; font-family: ${config.kw.font.name};
background: ${lib.hextorgba base16.base00 0.75}; background: ${lib.hextorgba base16.base00 0.75};
border-radius: 1em; border-radius: 1em;
font-size: ${config.kw.font.size_css}; font-size: ${config.kw.font.size_css};
color: ${base16.base07}; color: ${base16.base07};
} }
#outer-box { #outer-box {
margin: 1em; margin: 1em;
} }
#scroll { #scroll {
border: 1px solid ${base16.base03}; border: 1px solid ${base16.base03};
} }
#input { #input {
border: 1px solid ${base16.base0C}; border: 1px solid ${base16.base0C};
margin: 1em; margin: 1em;
background: ${base16.base02}; background: ${base16.base02};
color: ${base16.base04}; color: ${base16.base04};
} }
#entry { #entry {
border-bottom: 1px dashed ${base16.base04}; border-bottom: 1px dashed ${base16.base04};
padding: .75em; padding: .75em;
} }
#entry:selected { #entry:selected {
background-color: ${base16.base0D}; background-color: ${base16.base0D};
} }
''; '';
} }

View file

@ -10,9 +10,10 @@ let
getSources = sources: removeAttrs sources [ "__functor" "dorkfiles" ]; getSources = sources: removeAttrs sources [ "__functor" "dorkfiles" ];
source2drv = value: if isDerivation value.outPath then value.outPath else value; source2drv = value: if isDerivation value.outPath then value.outPath else value;
sources2drvs = sources: mapAttrs (_: source2drv) (getSources sources); sources2drvs = sources: mapAttrs (_: source2drv) (getSources sources);
in recurseIntoAttrs rec { in
recurseIntoAttrs rec {
local = sources2drvs sources; local = sources2drvs sources;
hexchen = sources2drvs (import sources.hexchen {}).sources; hexchen = sources2drvs (import sources.hexchen { }).sources;
all = attrValues local ++ attrValues hexchen; all = attrValues local ++ attrValues hexchen;
allStr = toString all; allStr = toString all;
}; };
@ -20,21 +21,23 @@ let
root = ./.; root = ./.;
/* /*
This is used to generate specialArgs + the like. It works as such: This is used to generate specialArgs + the like. It works as such:
* A <xargName> can exist at config/<subconfigName>. * A <xargName> can exist at config/<subconfigName>.
* A <xargName> can exist at config/trusted/<subconfigName>. * A <xargName> can exist at config/trusted/<subconfigName>.
If only one exists, the path for that one is returned. If only one exists, the path for that one is returned.
Otherwise a module is generated which contains both import paths. Otherwise a module is generated which contains both import paths.
*/ */
xargNames = lib.unique (lib.folderList ./config ["trusted"] ++ lib.folderList ./config/trusted ["pkgs" "tf"]); xargNames = lib.unique (lib.folderList ./config [ "trusted" ] ++ lib.folderList ./config/trusted [ "pkgs" "tf" ]);
xarg = lib.mapListToAttrs (folder: lib.nameValuePair folder (lib.domainMerge { xarg = lib.mapListToAttrs
inherit folder; (folder: lib.nameValuePair folder (lib.domainMerge {
folderPaths = [ (./config + "/${folder}") (./config/trusted + "/${folder}") ]; inherit folder;
})) xargNames; folderPaths = [ (./config + "/${folder}") (./config/trusted + "/${folder}") ];
}))
xargNames;
/* /*
We provide the runners with this file this way. We also provide our nix args here. We provide the runners with this file this way. We also provide our nix args here.
This is also where pkgs are passed through to the meta config. This is also where pkgs are passed through to the meta config.
*/ */
metaConfig = { metaConfig = {
config = { config = {
@ -53,9 +56,9 @@ let
# This is where the meta config is evaluated. # This is where the meta config is evaluated.
eval = lib.evalModules { eval = lib.evalModules {
modules = lib.singleton metaConfig modules = lib.singleton metaConfig
++ lib.attrValues (removeAttrs xarg.targets ["common"]) ++ lib.attrValues (removeAttrs xarg.targets [ "common" ])
++ lib.attrValues xarg.hosts ++ lib.attrValues xarg.hosts
++ lib.singleton ./config/modules/meta/default.nix; ++ lib.singleton ./config/modules/meta/default.nix;
specialArgs = { specialArgs = {
inherit sources root; inherit sources root;
@ -66,18 +69,19 @@ let
# The evaluated meta config. # The evaluated meta config.
inherit (eval) config; inherit (eval) config;
/* /*
Please note all specialArg generated specifications use the folder common to both import paths. Please note all specialArg generated specifications use the folder common to both import paths.
Those import paths are as mentioned above next to `xargNames`. Those import paths are as mentioned above next to `xargNames`.
This provides us with a ./. that contains (most relevantly): This provides us with a ./. that contains (most relevantly):
* deploy.targets -> a mapping of target name to host names * deploy.targets -> a mapping of target name to host names
* network.nodes -> host names to host NixOS + home-manager configs * network.nodes -> host names to host NixOS + home-manager configs
* profiles -> the specialArg generated from profiles/ * profiles -> the specialArg generated from profiles/
* users -> the specialArg generated from users/ * users -> the specialArg generated from users/
* targets -> the specialArg generated from targets/ * targets -> the specialArg generated from targets/
* do not use common, it is tf-nix specific config ingested at line 66 of config/modules/meta/deploy.nix for every target. * do not use common, it is tf-nix specific config ingested at line 66 of config/modules/meta/deploy.nix for every target.
* services -> the specialArg generated from services/ * services -> the specialArg generated from services/
*/ */
self = config // { inherit pkgs lib sourceCache sources; } // xarg; self = config // { inherit pkgs lib sourceCache sources; } // xarg;
in self in
self

View file

@ -23,4 +23,5 @@ let
]; ];
}; };
}; };
in pkgs in
pkgs

View file

@ -1,4 +1,5 @@
{ }: let {}:
let
meta = import ./default.nix; meta = import ./default.nix;
config = meta; config = meta;
inherit (meta) pkgs; inherit (meta) pkgs;
@ -58,7 +59,8 @@
done done
cd $START_DIR cd $START_DIR
''; '';
in pkgs.mkShell { in
pkgs.mkShell {
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
inetutils inetutils
nf-update nf-update