mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
nixpkgs-fmt for no particular reason
This commit is contained in:
parent
6c74d503fd
commit
c5e4be592c
57 changed files with 1211 additions and 1118 deletions
|
|
@ -8,22 +8,25 @@ with lib; {
|
|||
gh-actions.env.CACHIX_SIGNING_KEY = "\${{ secrets.CACHIX_SIGNING_KEY }}";
|
||||
|
||||
gh-actions = {
|
||||
on = let
|
||||
paths = [
|
||||
"default.nix" # sourceCache
|
||||
"ci/niv-cron.nix" config.ci.gh-actions.path
|
||||
];
|
||||
in {
|
||||
push = {
|
||||
inherit paths;
|
||||
on =
|
||||
let
|
||||
paths = [
|
||||
"default.nix" # sourceCache
|
||||
"ci/niv-cron.nix"
|
||||
config.ci.gh-actions.path
|
||||
];
|
||||
in
|
||||
{
|
||||
push = {
|
||||
inherit paths;
|
||||
};
|
||||
pull_request = {
|
||||
inherit paths;
|
||||
};
|
||||
schedule = [{
|
||||
cron = "0 0 * * *";
|
||||
}];
|
||||
};
|
||||
pull_request = {
|
||||
inherit paths;
|
||||
};
|
||||
schedule = [ {
|
||||
cron = "0 0 * * *";
|
||||
} ];
|
||||
};
|
||||
};
|
||||
|
||||
channels = {
|
||||
|
|
@ -37,22 +40,25 @@ with lib; {
|
|||
};
|
||||
|
||||
jobs.niv-update = {
|
||||
tasks.niv-build.inputs = with channels.cipkgs;
|
||||
ci.command {
|
||||
name = "niv-update-build";
|
||||
allowSubstitutes = false;
|
||||
cache = {
|
||||
enable = false;
|
||||
};
|
||||
displayName = "niv update build";
|
||||
environment = [ "OPENSSH_PRIVATE_KEY" "CACHIX_SIGNING_KEY" "GITHUB_REF" ];
|
||||
command = let main = (import ../.);
|
||||
tasks.niv-build.inputs = with channels.cipkgs;
|
||||
ci.command {
|
||||
name = "niv-update-build";
|
||||
allowSubstitutes = false;
|
||||
cache = {
|
||||
enable = false;
|
||||
};
|
||||
displayName = "niv update build";
|
||||
environment = [ "OPENSSH_PRIVATE_KEY" "CACHIX_SIGNING_KEY" "GITHUB_REF" ];
|
||||
command =
|
||||
let
|
||||
main = (import ../.);
|
||||
hosts = main.network.nodes;
|
||||
targets = main.deploy.targets;
|
||||
enabledTargets = filterAttrs (_: v: v.enable) main.deploy.targets;
|
||||
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;
|
||||
in ''
|
||||
in
|
||||
''
|
||||
# ${toString builtins.currentTime}
|
||||
if [[ -n $OPENSSH_PRIVATE_KEY ]]; then
|
||||
mkdir ~/.ssh
|
||||
|
|
@ -106,9 +112,9 @@ with lib; {
|
|||
echo "no source changes" >&2
|
||||
fi
|
||||
'';
|
||||
impure = true;
|
||||
};
|
||||
};
|
||||
impure = true;
|
||||
};
|
||||
};
|
||||
|
||||
ci.gh-actions.checkoutOptions.submodules = false;
|
||||
|
||||
|
|
|
|||
24
ci/nodes.nix
24
ci/nodes.nix
|
|
@ -6,22 +6,26 @@
|
|||
|
||||
# ensure sources are fetched and available in the local store before evaluating host configs
|
||||
environment.bootstrap = {
|
||||
sourceCache = channels.cipkgs.runCommand "sources" {
|
||||
srcs = attrNames channels.nixfiles.sourceCache.local;
|
||||
} ''
|
||||
sourceCache = channels.cipkgs.runCommand "sources"
|
||||
{
|
||||
srcs = attrNames channels.nixfiles.sourceCache.local;
|
||||
} ''
|
||||
mkdir -p $out/share/sources
|
||||
ln -s $srcs $out/share/sources/
|
||||
'';
|
||||
};
|
||||
|
||||
jobs = let main = (import ../.);
|
||||
hosts = main.network.nodes;
|
||||
targets = main.deploy.targets;
|
||||
enabledTargets = filterAttrs (_: v: v.enable) main.deploy.targets;
|
||||
enabledHosts = concatLists (mapAttrsToList (targetName: target: target.nodeNames) enabledTargets);
|
||||
in mapAttrs' (k: nameValuePair "${k}") (genAttrs enabledHosts (host: {
|
||||
jobs =
|
||||
let
|
||||
main = (import ../.);
|
||||
hosts = main.network.nodes;
|
||||
targets = main.deploy.targets;
|
||||
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;
|
||||
}));
|
||||
}));
|
||||
|
||||
ci.gh-actions.checkoutOptions.submodules = false;
|
||||
cache.cachix.arc = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ meta, config, lib, pkgs, ... }:
|
||||
{ meta, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,5 +14,5 @@ with lib;
|
|||
{
|
||||
"VGA-1" = middle;
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,25 +5,26 @@ with lib;
|
|||
{
|
||||
wayland.windowManager.sway = {
|
||||
config = {
|
||||
output = let
|
||||
left = {
|
||||
res = "1920x1080";
|
||||
pos = "0 0";
|
||||
output =
|
||||
let
|
||||
left = {
|
||||
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 = {
|
||||
"5426:103:Razer_Razer_Naga_Trinity" = {
|
||||
|
|
@ -47,9 +48,9 @@ with lib;
|
|||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
workspace "1" output "DP-1"
|
||||
workspace "11:F1" output "DVI-1"
|
||||
workspace "12:F2" output "HDMI-A-1"
|
||||
workspace "1" output "DP-1"
|
||||
workspace "11:F1" output "DVI-1"
|
||||
workspace "12:F2" output "HDMI-A-1"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ let
|
|||
hexchen = (import sources.hexchen) { };
|
||||
hexYgg = filterAttrs (_: c: c.enable)
|
||||
(mapAttrs (_: host: host.config.network.yggdrasil) hexchen.hosts);
|
||||
in {
|
||||
in
|
||||
{
|
||||
# Imports
|
||||
|
||||
imports = with meta; [
|
||||
|
|
@ -72,15 +73,18 @@ in {
|
|||
environment.systemPackages = [ pkgs.razergenie ];
|
||||
|
||||
boot.modprobe.modules = {
|
||||
vfio-pci = let
|
||||
vfio-pci-ids = [
|
||||
"1002:67df" "1002:aaf0" # RX 580
|
||||
"1912:0014" # Renesas USB 3
|
||||
"1022:149c" # CPU USB 3
|
||||
];
|
||||
in mkIf (vfio-pci-ids != [ ]) {
|
||||
options.ids = concatStringsSep "," vfio-pci-ids;
|
||||
};
|
||||
vfio-pci =
|
||||
let
|
||||
vfio-pci-ids = [
|
||||
"1002:67df"
|
||||
"1002:aaf0" # RX 580
|
||||
"1912:0014" # Renesas USB 3
|
||||
"1022:149c" # CPU USB 3
|
||||
];
|
||||
in
|
||||
mkIf (vfio-pci-ids != [ ]) {
|
||||
options.ids = concatStringsSep "," vfio-pci-ids;
|
||||
};
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
|
|
@ -108,7 +112,7 @@ in {
|
|||
};
|
||||
networks.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;
|
||||
};
|
||||
netdevs.br = {
|
||||
|
|
|
|||
|
|
@ -4,13 +4,14 @@ with lib;
|
|||
|
||||
{
|
||||
wayland.windowManager.sway.config = {
|
||||
output = let
|
||||
laptop = {
|
||||
res = "1920x1080";
|
||||
pos = "0 0";
|
||||
};
|
||||
in
|
||||
{ "eDP-1" = laptop; };
|
||||
output =
|
||||
let
|
||||
laptop = {
|
||||
res = "1920x1080";
|
||||
pos = "0 0";
|
||||
};
|
||||
in
|
||||
{ "eDP-1" = laptop; };
|
||||
|
||||
input = {
|
||||
"1739:33362:Synaptics_TM3336-002" = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
/*
|
||||
This module:
|
||||
This module:
|
||||
* Provides in-scope TF config for home-manager.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
/*
|
||||
This module:
|
||||
This module:
|
||||
* provides a central way to change the font my system uses.
|
||||
*/
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.kw; in {
|
||||
let cfg = config.kw; in
|
||||
{
|
||||
options.kw = {
|
||||
hexColors = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
/*
|
||||
This module:
|
||||
This module:
|
||||
* 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;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ sources, config, pkgs, lib, ... }:
|
||||
|
||||
/*
|
||||
This module:
|
||||
This module:
|
||||
* makes tf-nix a part of the meta config
|
||||
* handles the trusted import for tf-nix
|
||||
* provides the target interface
|
||||
|
|
@ -25,7 +25,8 @@ let
|
|||
./secrets.nix
|
||||
];
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(toString (sources.tf-nix + "/modules/run.nix"))
|
||||
] ++ (optional (builtins.pathExists ../../trusted/tf/tf.nix) (../../trusted/tf/tf.nix));
|
||||
|
|
@ -41,82 +42,97 @@ in {
|
|||
};
|
||||
hostName = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = let
|
||||
hostName = builtins.getEnv "HOME_HOSTNAME";
|
||||
in if hostName == "" then null else hostName;
|
||||
default =
|
||||
let
|
||||
hostName = builtins.getEnv "HOME_HOSTNAME";
|
||||
in
|
||||
if hostName == "" then null else hostName;
|
||||
};
|
||||
};
|
||||
targets = let
|
||||
type = types.submodule ({ config, name, ... }: {
|
||||
options = {
|
||||
enable = mkEnableOption "Enable the target" // { default = true; };
|
||||
name = mkOption {
|
||||
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.";
|
||||
targets =
|
||||
let
|
||||
type = types.submodule ({ config, name, ... }: {
|
||||
options = {
|
||||
enable = mkEnableOption "Enable the target" // { default = true; };
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = name;
|
||||
};
|
||||
run = {
|
||||
apply.name = "${name}-apply";
|
||||
terraform.name = "${name}-tf";
|
||||
nodeNames = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
};
|
||||
tf = mkOption {
|
||||
type = tfType;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
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.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 = {
|
||||
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 = {
|
||||
deploy.targets = let
|
||||
nodeNames = attrNames config.network.nodes;
|
||||
targets = config.deploy.targets;
|
||||
explicitlyDefinedHosts = concatLists (mapAttrsToList (targetName: target: remove targetName target.nodeNames) config.deploy.targets);
|
||||
in genAttrs nodeNames ( nodeName: {
|
||||
enable = mkDefault (! elem nodeName explicitlyDefinedHosts);
|
||||
nodeNames = singleton nodeName;
|
||||
});
|
||||
deploy.targets =
|
||||
let
|
||||
nodeNames = attrNames config.network.nodes;
|
||||
targets = config.deploy.targets;
|
||||
explicitlyDefinedHosts = concatLists (mapAttrsToList (targetName: target: remove targetName target.nodeNames) config.deploy.targets);
|
||||
in
|
||||
genAttrs nodeNames (nodeName: {
|
||||
enable = mkDefault (! elem nodeName explicitlyDefinedHosts);
|
||||
nodeNames = singleton nodeName;
|
||||
});
|
||||
|
||||
runners = {
|
||||
run = mkMerge (mapAttrsToList (targetName: target: mapAttrs' (k: run:
|
||||
nameValuePair run.name run.set
|
||||
) 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));
|
||||
run = mkMerge (mapAttrsToList
|
||||
(targetName: target: mapAttrs'
|
||||
(k: run:
|
||||
nameValuePair run.name run.set
|
||||
)
|
||||
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));
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, sources, lib, meta, config, ... }:
|
||||
|
||||
/*
|
||||
This module:
|
||||
This module:
|
||||
* Makes hosts nixosModules.
|
||||
* Manages module imports and specialArgs.
|
||||
* Builds network.nodes.
|
||||
|
|
@ -25,31 +25,35 @@ with lib;
|
|||
default = toString (pkgs.path + "/nixos/modules");
|
||||
};
|
||||
};
|
||||
nodes = let
|
||||
nixosModule = { name, config, meta, modulesPath, lib, ... }: with lib; {
|
||||
config = {
|
||||
nixpkgs = {
|
||||
system = mkDefault pkgs.system;
|
||||
pkgs = mkDefault pkgs;
|
||||
nodes =
|
||||
let
|
||||
nixosModule = { name, config, meta, modulesPath, lib, ... }: with lib; {
|
||||
config = {
|
||||
nixpkgs = {
|
||||
system = mkDefault pkgs.system;
|
||||
pkgs = mkDefault pkgs;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
nixosType = let
|
||||
baseModules = import (config.network.nixos.modulesPath + "/module-list.nix");
|
||||
in types.submoduleWith {
|
||||
modules = baseModules
|
||||
++ singleton nixosModule
|
||||
++ config.network.nixos.extraModules;
|
||||
nixosType =
|
||||
let
|
||||
baseModules = import (config.network.nixos.modulesPath + "/module-list.nix");
|
||||
in
|
||||
types.submoduleWith {
|
||||
modules = baseModules
|
||||
++ singleton nixosModule
|
||||
++ config.network.nixos.extraModules;
|
||||
|
||||
specialArgs = {
|
||||
inherit baseModules;
|
||||
inherit (config.network.nixos) modulesPath;
|
||||
} // config.network.nixos.specialArgs;
|
||||
specialArgs = {
|
||||
inherit baseModules;
|
||||
inherit (config.network.nixos) modulesPath;
|
||||
} // config.network.nixos.specialArgs;
|
||||
};
|
||||
in
|
||||
mkOption {
|
||||
type = types.attrsOf nixosType;
|
||||
default = { };
|
||||
};
|
||||
in mkOption {
|
||||
type = types.attrsOf nixosType;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
config.network = {
|
||||
nixos = {
|
||||
|
|
|
|||
|
|
@ -3,28 +3,29 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
options = let tf = config; in {
|
||||
variables = mkOption {
|
||||
type = types.attrsOf (types.submodule ({ name, config, ... }: {
|
||||
options.externalSecret = mkEnableOption "Is ths secret to be templated into a command provided?";
|
||||
config = mkIf config.externalSecret {
|
||||
type = "string";
|
||||
value.shellCommand = "${tf.commandPrefix} ${tf.folderPrefix}${tf.folderDivider}${escapeShellArg name}";
|
||||
sensitive = true;
|
||||
};
|
||||
}));
|
||||
options = let tf = config; in
|
||||
{
|
||||
variables = mkOption {
|
||||
type = types.attrsOf (types.submodule ({ name, config, ... }: {
|
||||
options.externalSecret = mkEnableOption "Is ths secret to be templated into a command provided?";
|
||||
config = mkIf config.externalSecret {
|
||||
type = "string";
|
||||
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 = "";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@
|
|||
(sources.hexchen + "/modules/network/yggdrasil")
|
||||
];
|
||||
|
||||
options.hexchen.dns = lib.mkOption { };
|
||||
options.hexchen.deploy = lib.mkOption { };
|
||||
options.hexchen.dns = 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.
|
||||
*/
|
||||
config = {
|
||||
_module.args.hosts = lib.mapAttrs (_: config: { inherit config; } ) meta.network.nodes;
|
||||
};
|
||||
}
|
||||
*/
|
||||
config = {
|
||||
_module.args.hosts = lib.mapAttrs (_: config: { inherit config; }) meta.network.nodes;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ tf, target, name, meta, config, lib, ... }:
|
||||
|
||||
/*
|
||||
This module:
|
||||
This module:
|
||||
* aliases <hostname>.system.build.toplevel to <hostname>.deploy.system for ease of use.
|
||||
* 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.
|
||||
|
|
@ -52,12 +52,13 @@ in
|
|||
|
||||
config = {
|
||||
deploy = {
|
||||
system = config.system.build.toplevel;
|
||||
targetName = let targetsList = attrNames ( filterAttrs (_: target: target.enable && elem name target.nodeNames) meta.deploy.targets ); in
|
||||
system = config.system.build.toplevel;
|
||||
targetName = let targetsList = attrNames (filterAttrs (_: target: target.enable && elem name target.nodeNames) meta.deploy.targets); in
|
||||
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);
|
||||
};
|
||||
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" ];
|
||||
import = genAttrs cfg.tf.imports (target: meta.deploy.targets.${target}.tf);
|
||||
out.set = removeAttrs cfg.tf cfg.tf.attrs;
|
||||
|
|
|
|||
|
|
@ -24,23 +24,24 @@ with lib;
|
|||
|
||||
systemd.services.kat-glauca-dns =
|
||||
let updater = pkgs.writeShellScriptBin "glauca-dyndns" ''
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
ip4=$(${pkgs.curl}/bin/curl -s --ipv4 https://dns.glauca.digital/checkip)
|
||||
ip6=$(${pkgs.curl}/bin/curl -s --ipv6 https://dns.glauca.digital/checkip)
|
||||
source $passFile
|
||||
echo "$ip4, $ip6"
|
||||
${pkgs.curl}/bin/curl -u ''${user}:''${pass} --data-urlencode "hostname=''${hostname}" --data-urlencode "myip=''${ip4}" "https://dns.glauca.digital/nic/update"
|
||||
echo ""
|
||||
${pkgs.curl}/bin/curl -u ''${user}:''${pass} --data-urlencode "hostname=''${hostname}" --data-urlencode "myip=''${ip6}" "https://dns.glauca.digital/nic/update"
|
||||
''; in {
|
||||
serviceConfig = {
|
||||
ExecStart = "${updater}/bin/glauca-dyndns";
|
||||
ip4=$(${pkgs.curl}/bin/curl -s --ipv4 https://dns.glauca.digital/checkip)
|
||||
ip6=$(${pkgs.curl}/bin/curl -s --ipv6 https://dns.glauca.digital/checkip)
|
||||
source $passFile
|
||||
echo "$ip4, $ip6"
|
||||
${pkgs.curl}/bin/curl -u ''${user}:''${pass} --data-urlencode "hostname=''${hostname}" --data-urlencode "myip=''${ip4}" "https://dns.glauca.digital/nic/update"
|
||||
echo ""
|
||||
${pkgs.curl}/bin/curl -u ''${user}:''${pass} --data-urlencode "hostname=''${hostname}" --data-urlencode "myip=''${ip6}" "https://dns.glauca.digital/nic/update"
|
||||
''; in
|
||||
{
|
||||
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 = {
|
||||
timerConfig = {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
boot.zfs.enableUnstable = true;
|
||||
boot.kernel.sysctl = {
|
||||
"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_wmem" = "4096 65536 16777216";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
};
|
||||
|
||||
fonts.fonts = with pkgs; [
|
||||
cozette
|
||||
twitter-color-emoji
|
||||
cozette
|
||||
twitter-color-emoji
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,17 +6,17 @@
|
|||
fileSystems."/mnt/kat-nas" = lib.mkIf (config.networking.hostName != "beltane") {
|
||||
device = "${meta.network.nodes.beltane.network.addresses.private.domain}:/mnt/zraw/media";
|
||||
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";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."/mnt/hex-tor" = {
|
||||
fileSystems."/mnt/hex-tor" = {
|
||||
device = "storah.net.lilwit.ch:/data/torrents";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
|
|
|
|||
|
|
@ -1,35 +1,36 @@
|
|||
let hardwareProfiles = { lib }:
|
||||
let profiles = with profiles; lib.domainMerge {
|
||||
folder = ""; # not used in this usage
|
||||
folderPaths = [
|
||||
./.
|
||||
../../trusted/profiles/hardware
|
||||
];
|
||||
} // {
|
||||
ms-7b86 = {
|
||||
imports = [
|
||||
ms-7b86-base
|
||||
ryzen
|
||||
amdgpu
|
||||
];
|
||||
};
|
||||
rm-310 = {
|
||||
imports = [
|
||||
rm-310-base
|
||||
intel
|
||||
];
|
||||
};
|
||||
v330-14arr = {
|
||||
imports = [
|
||||
v330-14arr-base
|
||||
ryzen
|
||||
amdgpu
|
||||
laptop
|
||||
wifi
|
||||
];
|
||||
};
|
||||
eeepc-1015pem = {
|
||||
imports = [
|
||||
let profiles = with profiles; lib.domainMerge
|
||||
{
|
||||
folder = ""; # not used in this usage
|
||||
folderPaths = [
|
||||
./.
|
||||
../../trusted/profiles/hardware
|
||||
];
|
||||
} // {
|
||||
ms-7b86 = {
|
||||
imports = [
|
||||
ms-7b86-base
|
||||
ryzen
|
||||
amdgpu
|
||||
];
|
||||
};
|
||||
rm-310 = {
|
||||
imports = [
|
||||
rm-310-base
|
||||
intel
|
||||
];
|
||||
};
|
||||
v330-14arr = {
|
||||
imports = [
|
||||
v330-14arr-base
|
||||
ryzen
|
||||
amdgpu
|
||||
laptop
|
||||
wifi
|
||||
];
|
||||
};
|
||||
eeepc-1015pem = {
|
||||
imports = [
|
||||
eeepc-1015pem-base
|
||||
intel
|
||||
laptop
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ 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;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ 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.
|
||||
*/
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ 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;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ 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.
|
||||
*/
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ 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.
|
||||
*/
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ config, ... }:
|
||||
|
||||
/*
|
||||
This hardware profile corresponds to the Lenovo IdeaPad v330-14ARR.
|
||||
This hardware profile corresponds to the Lenovo IdeaPad v330-14ARR.
|
||||
*/
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@ let
|
|||
win10-diskmapper = pkgs.writeShellScriptBin "win10-diskmapper" ''
|
||||
sudo ${pkgs.disk-mapper}/bin/disk-mapper /dev/disk/by-id/ata-ST2000DM008-2FR102_WK301C3H-part2
|
||||
'';
|
||||
in {
|
||||
in
|
||||
{
|
||||
deploy.profile.vfio = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
@ -23,25 +24,27 @@ in {
|
|||
users.users.kat.extraGroups = [ "vfio" "input" "uinput" ];
|
||||
users.groups = { uinput = { }; vfio = { }; };
|
||||
|
||||
boot = lib.mkMerge [ {
|
||||
initrd.kernelModules = mkBefore ["vfio" "vfio_iommu_type1" "vfio_pci" "vfio_virqfd"];
|
||||
boot = lib.mkMerge [{
|
||||
initrd.kernelModules = mkBefore [ "vfio" "vfio_iommu_type1" "vfio_pci" "vfio_virqfd" ];
|
||||
kernelModules = [ "i2c-dev" ]; # i2c-dev is required for DDC/CI for screenstub
|
||||
kernelPatches = with pkgs.kernelPatches; [
|
||||
(mkIf config.deploy.profile.hardware.acs-override acs-override)
|
||||
];
|
||||
} (mkIf (config.deploy.profile.hardware.amdgpu) {
|
||||
kernelParams = [
|
||||
"video=efifb:off"
|
||||
];
|
||||
extraModulePackages = [
|
||||
(pkgs.linuxPackagesFor config.boot.kernelPackages.kernel).vendor-reset
|
||||
];
|
||||
}) ( mkIf (config.deploy.profile.hardware.acs-override) {
|
||||
kernelParams = [
|
||||
"pci=noats"
|
||||
"pcie_acs_override=downstream,multifunction"
|
||||
];
|
||||
}) ];
|
||||
}
|
||||
(mkIf (config.deploy.profile.hardware.amdgpu) {
|
||||
kernelParams = [
|
||||
"video=efifb:off"
|
||||
];
|
||||
extraModulePackages = [
|
||||
(pkgs.linuxPackagesFor config.boot.kernelPackages.kernel).vendor-reset
|
||||
];
|
||||
})
|
||||
(mkIf (config.deploy.profile.hardware.acs-override) {
|
||||
kernelParams = [
|
||||
"pci=noats"
|
||||
"pcie_acs_override=downstream,multifunction"
|
||||
];
|
||||
})];
|
||||
|
||||
environment.etc."qemu/bridge.conf".text = "allow br";
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
services.grafana.security.adminPasswordFile =
|
||||
config.secrets.files.grafana-admin-pass.path;
|
||||
|
||||
services.postgresql = {
|
||||
services.postgresql = {
|
||||
ensureDatabases = [ "grafana" ];
|
||||
ensureUsers = [{
|
||||
name = "grafana";
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@
|
|||
services.nginx.virtualHosts = kw.virtualHostGen {
|
||||
networkFilter = [ "private" "yggdrasil" ];
|
||||
block.locations = {
|
||||
"/jellyfin/".proxyPass = "http://127.0.0.1:8096/jellyfin/";
|
||||
"/jellyfin/socket" = {
|
||||
proxyPass = "http://127.0.0.1:8096/jellyfin/";
|
||||
extraConfig = ''
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
'';
|
||||
"/jellyfin/".proxyPass = "http://127.0.0.1:8096/jellyfin/";
|
||||
"/jellyfin/socket" = {
|
||||
proxyPass = "http://127.0.0.1:8096/jellyfin/";
|
||||
extraConfig = ''
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
{ 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 {
|
||||
networkFilter = ["private"];
|
||||
networkFilter = [ "private" ];
|
||||
block.locations."/" = { root = splashy; };
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib , ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
@ -94,19 +94,20 @@ let
|
|||
|
||||
rtmpsink
|
||||
];
|
||||
in {
|
||||
in
|
||||
{
|
||||
services.nginx.appendConfig = ''
|
||||
rtmp {
|
||||
server {
|
||||
listen [::]:1935 ipv6only=off;
|
||||
application stream {
|
||||
live on;
|
||||
rtmp {
|
||||
server {
|
||||
listen [::]:1935 ipv6only=off;
|
||||
application stream {
|
||||
live on;
|
||||
|
||||
allow publish all;
|
||||
allow play all;
|
||||
}
|
||||
allow publish all;
|
||||
allow play all;
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
|
||||
network.firewall = {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ let
|
|||
};
|
||||
}
|
||||
];
|
||||
in {
|
||||
in
|
||||
{
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", SUBSYSTEMS=="usb", ATTR{index}=="0", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="0779", SYMLINK+="videomew", TAG+="systemd"
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -48,31 +48,31 @@ with lib;
|
|||
enable = true;
|
||||
max_upload_size = "512M";
|
||||
logConfig = ''
|
||||
version: 1
|
||||
version: 1
|
||||
|
||||
# In systemd's journal, loglevel is implicitly stored, so let's omit it
|
||||
# from the message text.
|
||||
formatters:
|
||||
journal_fmt:
|
||||
format: '%(name)s: [%(request)s] %(message)s'
|
||||
# In systemd's journal, loglevel is implicitly stored, so let's omit it
|
||||
# from the message text.
|
||||
formatters:
|
||||
journal_fmt:
|
||||
format: '%(name)s: [%(request)s] %(message)s'
|
||||
|
||||
filters:
|
||||
context:
|
||||
(): synapse.util.logcontext.LoggingContextFilter
|
||||
request: ""
|
||||
filters:
|
||||
context:
|
||||
(): synapse.util.logcontext.LoggingContextFilter
|
||||
request: ""
|
||||
|
||||
handlers:
|
||||
journal:
|
||||
class: systemd.journal.JournalHandler
|
||||
formatter: journal_fmt
|
||||
filters: [context]
|
||||
SYSLOG_IDENTIFIER: synapse
|
||||
handlers:
|
||||
journal:
|
||||
class: systemd.journal.JournalHandler
|
||||
formatter: journal_fmt
|
||||
filters: [context]
|
||||
SYSLOG_IDENTIFIER: synapse
|
||||
|
||||
root:
|
||||
level: WARNING
|
||||
handlers: [journal]
|
||||
root:
|
||||
level: WARNING
|
||||
handlers: [journal]
|
||||
|
||||
disable_existing_loggers: False
|
||||
disable_existing_loggers: False
|
||||
'';
|
||||
server_name = config.network.dns.domain;
|
||||
app_service_config_files = [
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ with lib;
|
|||
let
|
||||
cfg = config.services.murmur;
|
||||
forking = (cfg.logFile != null);
|
||||
in {
|
||||
in
|
||||
{
|
||||
network.firewall = {
|
||||
public = {
|
||||
tcp.ports = singleton 64738;
|
||||
|
|
@ -66,40 +67,40 @@ in {
|
|||
|
||||
# Service Replacement
|
||||
users.users.murmur = {
|
||||
description = "Murmur Service user";
|
||||
home = "/var/lib/murmur";
|
||||
createHome = true;
|
||||
uid = config.ids.uids.murmur;
|
||||
group = "murmur";
|
||||
description = "Murmur Service user";
|
||||
home = "/var/lib/murmur";
|
||||
createHome = true;
|
||||
uid = config.ids.uids.murmur;
|
||||
group = "murmur";
|
||||
};
|
||||
users.groups.murmur = {
|
||||
gid = config.ids.gids.murmur;
|
||||
gid = config.ids.gids.murmur;
|
||||
};
|
||||
|
||||
systemd.services.murmur = {
|
||||
description = "Murmur Chat Service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network-online.target "];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network-online.target " ];
|
||||
|
||||
serviceConfig = {
|
||||
# murmurd doesn't fork when logging to the console.
|
||||
Type = if forking then "forking" else "simple";
|
||||
PIDFile = mkIf forking "/run/murmur/murmurd.pid";
|
||||
EnvironmentFile = mkIf (cfg.environmentFile != null) cfg.environmentFile;
|
||||
ExecStart = "${cfg.package}/bin/murmurd -ini ${config.secrets.files.murmur-config.path}";
|
||||
Restart = "always";
|
||||
RuntimeDirectory = "murmur";
|
||||
RuntimeDirectoryMode = "0700";
|
||||
User = "murmur";
|
||||
Group = "murmur";
|
||||
};
|
||||
# murmurd doesn't fork when logging to the console.
|
||||
Type = if forking then "forking" else "simple";
|
||||
PIDFile = mkIf forking "/run/murmur/murmurd.pid";
|
||||
EnvironmentFile = mkIf (cfg.environmentFile != null) cfg.environmentFile;
|
||||
ExecStart = "${cfg.package}/bin/murmurd -ini ${config.secrets.files.murmur-config.path}";
|
||||
Restart = "always";
|
||||
RuntimeDirectory = "murmur";
|
||||
RuntimeDirectoryMode = "0700";
|
||||
User = "murmur";
|
||||
Group = "murmur";
|
||||
};
|
||||
};
|
||||
|
||||
# Certs
|
||||
|
||||
network.extraCerts."services_murmur" = "voice.${config.network.dns.domain}";
|
||||
users.groups."voice-cert".members = [ "nginx" "murmur" ];
|
||||
security.acme.certs = { "services_murmur" = { group = "voice-cert"; }; };
|
||||
network.extraCerts."services_murmur" = "voice.${config.network.dns.domain}";
|
||||
users.groups."voice-cert".members = [ "nginx" "murmur" ];
|
||||
security.acme.certs = { "services_murmur" = { group = "voice-cert"; }; };
|
||||
|
||||
# DNS
|
||||
|
||||
|
|
|
|||
|
|
@ -21,27 +21,27 @@
|
|||
|
||||
systemd.services.tvheadend-kat = {
|
||||
description = "Tvheadend TV streaming server";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
script = ''
|
||||
${pkgs.tvheadend}/bin/tvheadend \
|
||||
--http_root /tvheadend \
|
||||
--http_port 9981 \
|
||||
--htsp_port 9982 \
|
||||
-f \
|
||||
-C \
|
||||
-p ${config.users.users.tvheadend.home}/tvheadend.pid \
|
||||
-u tvheadend \
|
||||
-g video
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
script = ''
|
||||
${pkgs.tvheadend}/bin/tvheadend \
|
||||
--http_root /tvheadend \
|
||||
--http_port 9981 \
|
||||
--htsp_port 9982 \
|
||||
-f \
|
||||
-C \
|
||||
-p ${config.users.users.tvheadend.home}/tvheadend.pid \
|
||||
-u tvheadend \
|
||||
-g video
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
PIDFile = "${config.users.users.tvheadend.home}/tvheadend.pid";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
User = "tvheadend";
|
||||
Group = "video";
|
||||
ExecStop = "${pkgs.coreutils}/bin/rm ${config.users.users.tvheadend.home}/tvheadend.pid";
|
||||
Type = "forking";
|
||||
PIDFile = "${config.users.users.tvheadend.home}/tvheadend.pid";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
User = "tvheadend";
|
||||
Group = "video";
|
||||
ExecStop = "${pkgs.coreutils}/bin/rm ${config.users.users.tvheadend.home}/tvheadend.pid";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{
|
||||
deploy.targets.personal = {
|
||||
nodeNames = [ "samhain" "yule"];
|
||||
nodeNames = [ "samhain" "yule" ];
|
||||
tf = { config, ... }: {
|
||||
dns.records.ygg_grimoire = {
|
||||
tld = "kittywit.ch.";
|
||||
|
|
|
|||
|
|
@ -10,5 +10,5 @@
|
|||
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,8 +17,9 @@
|
|||
port = 62954;
|
||||
};
|
||||
in
|
||||
(lib.foldAttrList (map (network:
|
||||
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"]));
|
||||
(lib.foldAttrList (map
|
||||
(network:
|
||||
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" ]));
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,41 +12,41 @@ with lib;
|
|||
keyMode = "vi";
|
||||
baseIndex = 1;
|
||||
extraConfig = with mapAttrs (_: v: "colour${toString v}") pkgs.base16.shell.shell256; ''
|
||||
# proper title handling
|
||||
set -g set-titles on
|
||||
set -g set-titles-string "#T"
|
||||
set -ga terminal-overrides ",xterm-256color:Tc"
|
||||
# proper title handling
|
||||
set -g set-titles on
|
||||
set -g set-titles-string "#T"
|
||||
set -ga terminal-overrides ",xterm-256color:Tc"
|
||||
|
||||
# modes
|
||||
setw -g clock-mode-colour colour8
|
||||
setw -g mode-style 'fg=${base07} bg=${base02} bold'
|
||||
# modes
|
||||
setw -g clock-mode-colour colour8
|
||||
setw -g mode-style 'fg=${base07} bg=${base02} bold'
|
||||
|
||||
# panes
|
||||
set -g pane-border-style 'fg=${base06} bg=${base02}'
|
||||
set -g pane-active-border-style 'bg=${base0D} fg=${base07}'
|
||||
# panes
|
||||
set -g pane-border-style 'fg=${base06} bg=${base02}'
|
||||
set -g pane-active-border-style 'bg=${base0D} fg=${base07}'
|
||||
|
||||
# statusbar
|
||||
set -g status-position bottom
|
||||
set -g status-justify left
|
||||
set -g status-style 'bg=${base00} fg=${base06}'
|
||||
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-length 50
|
||||
set -g status-left-length 20
|
||||
# statusbar
|
||||
set -g status-position bottom
|
||||
set -g status-justify left
|
||||
set -g status-style 'bg=${base00} fg=${base06}'
|
||||
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-length 50
|
||||
set -g status-left-length 20
|
||||
|
||||
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-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-style 'fg=${base06} bg=${base03}'
|
||||
setw -g window-status-format ' #I#[fg=${base07}]:#[fg=${base06}]#W#[${base06}]#F '
|
||||
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-bell-style 'fg=colour255 bg=colour1 bold'
|
||||
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
|
||||
|
||||
# messages
|
||||
set -g message-style 'fg=colour232 bg=colour16 bold'
|
||||
# messages
|
||||
set -g message-style 'fg=colour232 bg=colour16 bold'
|
||||
|
||||
# mouse
|
||||
set -g mouse on
|
||||
# mouse
|
||||
set -g mouse on
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
home.sessionVariables.EDITOR = "vim";
|
||||
programs.vim = {
|
||||
enable = true;
|
||||
settings = {};
|
||||
settings = { };
|
||||
package = pkgs.vim_configurable-pynvim;
|
||||
#withPython3 = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ let
|
|||
fi
|
||||
'';
|
||||
shellFunAliases = mapAttrs shellFunAlias;
|
||||
in {
|
||||
in
|
||||
{
|
||||
home.shell.functions = {
|
||||
genmac = ''
|
||||
nix run nixpkgs.openssl -c openssl rand -hex 6 | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1:\2:\3:\4:\5:\6/'
|
||||
|
|
@ -29,35 +30,53 @@ in {
|
|||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
initExtra = let
|
||||
zshOpts= [
|
||||
"auto_pushd" "pushd_ignore_dups" "pushdminus"
|
||||
"rmstarsilent" "nonomatch" "long_list_jobs" "interactivecomments"
|
||||
"append_history" "hist_ignore_space" "hist_verify" "inc_append_history" "nosharehistory"
|
||||
"nomenu_complete" "auto_menu" "no_auto_remove_slash" "complete_in_word" "always_to_end" "nolistbeep" "autolist" "listrowsfirst"
|
||||
]; in ''
|
||||
zmodload -i zsh/complist
|
||||
zstyle ':completion:*' list-colors ""
|
||||
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;
|
||||
'';
|
||||
initExtra =
|
||||
let
|
||||
zshOpts = [
|
||||
"auto_pushd"
|
||||
"pushd_ignore_dups"
|
||||
"pushdminus"
|
||||
"rmstarsilent"
|
||||
"nonomatch"
|
||||
"long_list_jobs"
|
||||
"interactivecomments"
|
||||
"append_history"
|
||||
"hist_ignore_space"
|
||||
"hist_verify"
|
||||
"inc_append_history"
|
||||
"nosharehistory"
|
||||
"nomenu_complete"
|
||||
"auto_menu"
|
||||
"no_auto_remove_slash"
|
||||
"complete_in_word"
|
||||
"always_to_end"
|
||||
"nolistbeep"
|
||||
"autolist"
|
||||
"listrowsfirst"
|
||||
]; in
|
||||
''
|
||||
zmodload -i zsh/complist
|
||||
zstyle ':completion:*' list-colors ""
|
||||
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 = {
|
||||
nixdirfmt = "fd --color=never .nix | xargs nixpkgs-fmt";
|
||||
exa = "exa --time-style long-iso";
|
||||
|
|
@ -69,7 +88,7 @@ bindkey "^p" history-beginning-search-menu
|
|||
log = "journalctl";
|
||||
dmesg = "dmesg -HP";
|
||||
lg = "log --no-pager | grep";
|
||||
hg = "history 0 | grep";
|
||||
hg = "history 0 | grep";
|
||||
};
|
||||
localVariables = {
|
||||
_Z_DATA = "${config.xdg.dataHome}/z/data";
|
||||
|
|
|
|||
|
|
@ -1,27 +1,33 @@
|
|||
let katUser = { lib }: let
|
||||
trustedImport = {
|
||||
config.home-manager.users.kat = {
|
||||
imports = lib.optional (builtins.pathExists ../../trusted/users/kat) (import ../../trusted/users/kat/home.nix);
|
||||
let katUser = { lib }:
|
||||
let
|
||||
trustedImport = {
|
||||
config.home-manager.users.kat = {
|
||||
imports = lib.optional (builtins.pathExists ../../trusted/users/kat) (import ../../trusted/users/kat/home.nix);
|
||||
};
|
||||
};
|
||||
}; userImport = profile: { config, ... }: {
|
||||
config.home-manager.users.kat = {
|
||||
imports = [
|
||||
(./. + "/${profile}")
|
||||
];
|
||||
};
|
||||
}; serviceImport = profile: { config, ... }: {
|
||||
config.home-manager.users.kat = {
|
||||
imports = [
|
||||
(./services + "/${profile}")
|
||||
];
|
||||
};
|
||||
}; profileNames = lib.folderList ./. ["base" "services"];
|
||||
serviceNames = lib.folderList ./services [];
|
||||
userProfiles = with userProfiles;
|
||||
lib.genAttrs profileNames userImport // {
|
||||
services = lib.genAttrs serviceNames serviceImport;
|
||||
base = { imports = [ ./nixos.nix (userImport "base") trustedImport ]; };
|
||||
server = { imports = [ personal ]; };
|
||||
guiFull = { imports = [ gui sway dev media personal ]; };
|
||||
}; in userProfiles;
|
||||
userImport = profile: { config, ... }: {
|
||||
config.home-manager.users.kat = {
|
||||
imports = [
|
||||
(./. + "/${profile}")
|
||||
];
|
||||
};
|
||||
};
|
||||
serviceImport = profile: { config, ... }: {
|
||||
config.home-manager.users.kat = {
|
||||
imports = [
|
||||
(./services + "/${profile}")
|
||||
];
|
||||
};
|
||||
};
|
||||
profileNames = lib.folderList ./. [ "base" "services" ];
|
||||
serviceNames = lib.folderList ./services [ ];
|
||||
userProfiles = with userProfiles;
|
||||
lib.genAttrs profileNames userImport // {
|
||||
services = lib.genAttrs serviceNames serviceImport;
|
||||
base = { imports = [ ./nixos.nix (userImport "base") trustedImport ]; };
|
||||
server = { imports = [ personal ]; };
|
||||
guiFull = { imports = [ gui sway dev media personal ]; };
|
||||
};
|
||||
in
|
||||
userProfiles;
|
||||
in { __functor = self: katUser; isModule = false; }
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@
|
|||
home.packages = with pkgs; [ cookiecutter ];
|
||||
|
||||
home.shell.functions.katenv = ''
|
||||
cookiecutter cookiecutters --directory $1
|
||||
cookiecutter cookiecutters --directory $1
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,127 +1,128 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
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; }
|
||||
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 .twisty and adjust margins so favicons have 7px on left. */
|
||||
.tab .twisty {
|
||||
margin-left: -16px;
|
||||
}
|
||||
/* Hide .twisty and adjust margins so favicons have 7px on left. */
|
||||
.tab .twisty {
|
||||
margin-left: -16px;
|
||||
}
|
||||
|
||||
/* Push tab labels slightly to the right so they're completely hidden in collapsed state */
|
||||
.tab .label {
|
||||
margin-left: 7px;
|
||||
}
|
||||
/* Hide close buttons on tabs. */
|
||||
.tab .closebox {
|
||||
visibility: collapse;
|
||||
}
|
||||
/* Push tab labels slightly to the right so they're completely hidden in collapsed state */
|
||||
.tab .label {
|
||||
margin-left: 7px;
|
||||
}
|
||||
/* Hide close buttons on tabs. */
|
||||
.tab .closebox {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
/* Hide sound playing/muted button. */
|
||||
.sound-button::before {
|
||||
display: none !important;
|
||||
}
|
||||
/* Hide sound playing/muted button. */
|
||||
.sound-button::before {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Hide 'new tab' button. */
|
||||
.newtab-button {
|
||||
display: none;
|
||||
}
|
||||
/* Hide 'new tab' button. */
|
||||
.newtab-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ################################################ */
|
||||
/* ##### COLOR THEME ############################## */
|
||||
/* ################################################ */
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
opacity: 0.75;
|
||||
}
|
||||
100% {
|
||||
opacity: 0.25;
|
||||
}
|
||||
}
|
||||
* {
|
||||
font-family: "Cozette", monospace !important;
|
||||
}
|
||||
:root {
|
||||
background-color: ${base16.base00} !important;
|
||||
}
|
||||
#tabbar {
|
||||
background-color: ${base16.base00} !important;
|
||||
border-right: 1px solid ${base16.base01};
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.tab {
|
||||
background-color: ${base16.base01};
|
||||
color: ${base16.base05} !important;
|
||||
box-shadow: none !important;
|
||||
margin: 0.125em;
|
||||
border-radius: 0.125em;
|
||||
}
|
||||
/* ################################################ */
|
||||
/* ##### COLOR THEME ############################## */
|
||||
/* ################################################ */
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
opacity: 0.75;
|
||||
}
|
||||
100% {
|
||||
opacity: 0.25;
|
||||
}
|
||||
}
|
||||
* {
|
||||
font-family: "Cozette", monospace !important;
|
||||
}
|
||||
:root {
|
||||
background-color: ${base16.base00} !important;
|
||||
}
|
||||
#tabbar {
|
||||
background-color: ${base16.base00} !important;
|
||||
border-right: 1px solid ${base16.base01};
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.tab {
|
||||
background-color: ${base16.base01};
|
||||
color: ${base16.base05} !important;
|
||||
box-shadow: none !important;
|
||||
margin: 0.125em;
|
||||
border-radius: 0.125em;
|
||||
}
|
||||
|
||||
.tab .favicon {
|
||||
margin-left: 0.25em;
|
||||
}
|
||||
.tab .favicon {
|
||||
margin-left: 0.25em;
|
||||
}
|
||||
|
||||
.tab .label {
|
||||
margin: 0.25em;
|
||||
}
|
||||
.tab:hover {
|
||||
background-color: ${base16.base0C}FF !important;
|
||||
color: ${base16.base07} !important;
|
||||
}
|
||||
.tab.discarded {
|
||||
background-color: ${base16.base00};
|
||||
color: ${base16.base02} !important;
|
||||
}
|
||||
.tab.discarded:hover {
|
||||
background-color: ${base16.base01} !important;
|
||||
color: ${base16.base03} !important;
|
||||
}
|
||||
.tab .label {
|
||||
margin: 0.25em;
|
||||
}
|
||||
.tab:hover {
|
||||
background-color: ${base16.base0C}FF !important;
|
||||
color: ${base16.base07} !important;
|
||||
}
|
||||
.tab.discarded {
|
||||
background-color: ${base16.base00};
|
||||
color: ${base16.base02} !important;
|
||||
}
|
||||
.tab.discarded:hover {
|
||||
background-color: ${base16.base01} !important;
|
||||
color: ${base16.base03} !important;
|
||||
}
|
||||
|
||||
:root .tab .highlighter::before {
|
||||
display: none;
|
||||
}
|
||||
:root .tab .highlighter::before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tab.active {
|
||||
background-color: ${base16.base0D}FF;
|
||||
color: ${base16.base07} !important;
|
||||
}
|
||||
.tab.active:hover {
|
||||
background-color: ${base16.base0D}FF !important;
|
||||
}
|
||||
.tab.active {
|
||||
background-color: ${base16.base0D}FF;
|
||||
color: ${base16.base07} !important;
|
||||
}
|
||||
.tab.active:hover {
|
||||
background-color: ${base16.base0D}FF !important;
|
||||
}
|
||||
|
||||
@keyframes rainbow_animation {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
@keyframes rainbow_animation {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: 100% 0;
|
||||
}
|
||||
}
|
||||
/* Adjust style for tab that has sound playing. */
|
||||
.tab.sound-playing .label {
|
||||
background: linear-gradient(to right, #6666ff, #0099ff , #00ff00, #ff3399, #6666ff);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
animation: rainbow_animation 3s linear infinite;
|
||||
animation-direction: alternate-reverse;
|
||||
background-size: 400% 100%;
|
||||
}
|
||||
100% {
|
||||
background-position: 100% 0;
|
||||
}
|
||||
}
|
||||
/* Adjust style for tab that has sound playing. */
|
||||
.tab.sound-playing .label {
|
||||
background: linear-gradient(to right, #6666ff, #0099ff , #00ff00, #ff3399, #6666ff);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
animation: rainbow_animation 3s linear infinite;
|
||||
animation-direction: alternate-reverse;
|
||||
background-size: 400% 100%;
|
||||
}
|
||||
|
||||
/* Adjust style for tab that is muted. */
|
||||
.tab.muted {
|
||||
opacity: 0.5;
|
||||
}
|
||||
'';
|
||||
/* Adjust style for tab that is muted. */
|
||||
.tab.muted {
|
||||
opacity: 0.5;
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,106 +1,106 @@
|
|||
{ 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 */
|
||||
#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;
|
||||
}
|
||||
|
||||
|
||||
#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;
|
||||
#urlbar-background {
|
||||
background: ${base16.base01} !important;
|
||||
}
|
||||
|
||||
#star-button{
|
||||
display:none;
|
||||
}
|
||||
#urlbar {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#navigator-toolbox {
|
||||
border : none !important;
|
||||
}
|
||||
#urlbar-container {
|
||||
width: 50vw !important;
|
||||
}
|
||||
|
||||
.titlebar-spacer {
|
||||
display : none !important;
|
||||
}
|
||||
#star-button{
|
||||
display:none;
|
||||
}
|
||||
|
||||
#urlbar:not(:hover):not([breakout][breakout-extend]) > #urlbar-background {
|
||||
box-shadow : none !important;
|
||||
background : ${base16.base01} !important;
|
||||
}
|
||||
#navigator-toolbox {
|
||||
border : none !important;
|
||||
}
|
||||
|
||||
.urlbar-icon, #userContext-indicator, #userContext-label {
|
||||
fill : transparent !important;
|
||||
background : transparent !important;
|
||||
color : transparent !important;
|
||||
}
|
||||
.titlebar-spacer {
|
||||
display : none !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:active .urlbar-icon,
|
||||
#urlbar[focused] .urlbar-icon {
|
||||
fill : var(--toolbar-color) !important;
|
||||
}
|
||||
.urlbar-icon, #userContext-indicator, #userContext-label {
|
||||
fill : transparent !important;
|
||||
background : transparent !important;
|
||||
color : transparent !important;
|
||||
}
|
||||
|
||||
#urlbar-container {
|
||||
-moz-box-pack: center !important;
|
||||
}
|
||||
#nav-bar-customization-target > toolbarspring { max-width: none !important }
|
||||
|
||||
/* animations */
|
||||
toolbarbutton,
|
||||
.toolbarbutton-icon,
|
||||
.subviewbutton,
|
||||
#urlbar-background,
|
||||
.urlbar-icon,
|
||||
#userContext-indicator,
|
||||
#userContext-label,
|
||||
.urlbar-input-box,
|
||||
#identity-box,
|
||||
#tracking-protection-icon-container,
|
||||
[anonid=urlbar-go-button],
|
||||
.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;
|
||||
}
|
||||
#urlbar:hover .urlbar-icon,
|
||||
#urlbar:active .urlbar-icon,
|
||||
#urlbar[focused] .urlbar-icon {
|
||||
fill : var(--toolbar-color) !important;
|
||||
}
|
||||
|
||||
#urlbar-container {
|
||||
-moz-box-pack: center !important;
|
||||
}
|
||||
|
||||
/* animations */
|
||||
toolbarbutton,
|
||||
.toolbarbutton-icon,
|
||||
.subviewbutton,
|
||||
#urlbar-background,
|
||||
.urlbar-icon,
|
||||
#userContext-indicator,
|
||||
#userContext-label,
|
||||
.urlbar-input-box,
|
||||
#identity-box,
|
||||
#tracking-protection-icon-container,
|
||||
[anonid=urlbar-go-button],
|
||||
.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;
|
||||
}
|
||||
''
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
"Ctrl+R" = "video-reload";
|
||||
"d" = "drop-buffers";
|
||||
"Ctrl+d" = "quit";
|
||||
};
|
||||
};
|
||||
other = {
|
||||
"RIGHT" = vim."l";
|
||||
"LEFT" = vim."h";
|
||||
|
|
@ -77,35 +77,37 @@
|
|||
"m" = vim."`";
|
||||
"WHEEL_UP" = vim."L";
|
||||
"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";
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@
|
|||
extraGroups = [ "wheel" "video" "systemd-journal" "plugdev" ];
|
||||
hashedPassword =
|
||||
"$6$i28yOXoo$/WokLdKds5ZHtJHcuyGrH2WaDQQk/2Pj0xRGLgS8UcmY2oMv3fw2j/85PRpsJJwCB2GBRYRK5LlvdTleHd3mB.";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"f /var/lib/systemd/linger/kat"
|
||||
];
|
||||
systemd.tmpfiles.rules = [
|
||||
"f /var/lib/systemd/linger/kat"
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,11 +26,11 @@
|
|||
imap.host = "athame.kittywit.ch";
|
||||
smtp.host = "athame.kittywit.ch";
|
||||
passwordCommand = "${pkgs.pass}/bin/pass email/kittywitch";
|
||||
gpg = {
|
||||
signByDefault = true;
|
||||
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
|
||||
};
|
||||
gpg = {
|
||||
signByDefault = true;
|
||||
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,35 +3,35 @@
|
|||
{
|
||||
home.file = {
|
||||
".local/share/weechat/sec.conf".text = ''
|
||||
#
|
||||
# weechat -- sec.conf
|
||||
#
|
||||
# WARNING: It is NOT recommended to edit this file by hand,
|
||||
# especially if WeeChat is running.
|
||||
#
|
||||
# Use /set or similar command to change settings in WeeChat.
|
||||
#
|
||||
# For more info, see: https://weechat.org/doc/quickstart
|
||||
#
|
||||
#
|
||||
# weechat -- sec.conf
|
||||
#
|
||||
# WARNING: It is NOT recommended to edit this file by hand,
|
||||
# especially if WeeChat is running.
|
||||
#
|
||||
# Use /set or similar command to change settings in WeeChat.
|
||||
#
|
||||
# For more info, see: https://weechat.org/doc/quickstart
|
||||
#
|
||||
|
||||
[crypt]
|
||||
cipher = aes256
|
||||
hash_algo = sha512
|
||||
passphrase_command = "${pkgs.pass}/bin/pass secrets/weechat-pass"
|
||||
salt = on
|
||||
[crypt]
|
||||
cipher = aes256
|
||||
hash_algo = sha512
|
||||
passphrase_command = "${pkgs.pass}/bin/pass secrets/weechat-pass"
|
||||
salt = on
|
||||
|
||||
[data]
|
||||
__passphrase__ = on
|
||||
znc = "552E98A5111B986C1003CF86C67DF2AF4B3FDE88E5762FC01EB4A00E31B8363ABFCBBE7A702CB72C298F61D4005D1C5AABB30602BBFCE9E4013CBE88D3D3DB66B18C551743D7816C4F0C9DA44B83DB5807BBB02A48B66D"
|
||||
matrix = "CC989DF79CDAECC1CE32F10FA9B42B6AE9FA63B41C0B3FCCCD4A309AB798CDEE695E0B4A2E0C975C6364927C76D4FEB25BC84C7AF8989DC418A205A5D62E9330E142E4F11AB59E0720867915DEEFCA70E80102C639D35B"
|
||||
[data]
|
||||
__passphrase__ = on
|
||||
znc = "552E98A5111B986C1003CF86C67DF2AF4B3FDE88E5762FC01EB4A00E31B8363ABFCBBE7A702CB72C298F61D4005D1C5AABB30602BBFCE9E4013CBE88D3D3DB66B18C551743D7816C4F0C9DA44B83DB5807BBB02A48B66D"
|
||||
matrix = "CC989DF79CDAECC1CE32F10FA9B42B6AE9FA63B41C0B3FCCCD4A309AB798CDEE695E0B4A2E0C975C6364927C76D4FEB25BC84C7AF8989DC418A205A5D62E9330E142E4F11AB59E0720867915DEEFCA70E80102C639D35B"
|
||||
'';
|
||||
};
|
||||
|
||||
programs.weechat = {
|
||||
enable = true;
|
||||
init = lib.mkBefore ''
|
||||
/server add softnet athame.kittywit.ch/5001 -ssl -autoconnect
|
||||
/server add liberachat athame.kittywit.ch/5001 -ssl -autoconnect
|
||||
/server add softnet athame.kittywit.ch/5001 -ssl -autoconnect
|
||||
/server add liberachat athame.kittywit.ch/5001 -ssl -autoconnect
|
||||
'';
|
||||
scripts = with pkgs.weechatScripts; [
|
||||
weechat-notify-send
|
||||
|
|
|
|||
|
|
@ -8,26 +8,26 @@
|
|||
|
||||
secrets.files.weechat-sec = {
|
||||
text = ''
|
||||
#
|
||||
# weechat -- sec.conf
|
||||
#
|
||||
# WARNING: It is NOT recommended to edit this file by hand,
|
||||
# especially if WeeChat is running.
|
||||
#
|
||||
# Use /set or similar command to change settings in WeeChat.
|
||||
#
|
||||
# For more info, see: https://weechat.org/doc/quickstart
|
||||
#
|
||||
#
|
||||
# weechat -- sec.conf
|
||||
#
|
||||
# WARNING: It is NOT recommended to edit this file by hand,
|
||||
# especially if WeeChat is running.
|
||||
#
|
||||
# Use /set or similar command to change settings in WeeChat.
|
||||
#
|
||||
# For more info, see: https://weechat.org/doc/quickstart
|
||||
#
|
||||
|
||||
[crypt]
|
||||
cipher = aes256
|
||||
hash_algo = sha512
|
||||
salt = off
|
||||
[crypt]
|
||||
cipher = aes256
|
||||
hash_algo = sha512
|
||||
salt = off
|
||||
|
||||
[data]
|
||||
__passphrase__ = off
|
||||
znc = "${tf.variables.znc-pass.ref}"
|
||||
matrix = "${tf.variables.matrix-pass.ref}"
|
||||
[data]
|
||||
__passphrase__ = off
|
||||
znc = "${tf.variables.znc-pass.ref}"
|
||||
matrix = "${tf.variables.matrix-pass.ref}"
|
||||
'';
|
||||
owner = "kat";
|
||||
group = "users";
|
||||
|
|
@ -39,30 +39,31 @@
|
|||
|
||||
services.weechat.enable = true;
|
||||
|
||||
systemd.user.services.weechat-tmux = let scfg = config.services.weechat; in lib.mkForce {
|
||||
Unit = {
|
||||
Description = "Weechat tmux session";
|
||||
After = [ "network.target" ];
|
||||
systemd.user.services.weechat-tmux = let scfg = config.services.weechat; in
|
||||
lib.mkForce {
|
||||
Unit = {
|
||||
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 = {
|
||||
enable = true;
|
||||
init = lib.mkBefore ''
|
||||
/server add softnet athame.kittywit.ch/5001 -ssl -autoconnect
|
||||
/server add liberachat athame.kittywit.ch/5001 -ssl -autoconnect
|
||||
/server add softnet athame.kittywit.ch/5001 -ssl -autoconnect
|
||||
/server add liberachat athame.kittywit.ch/5001 -ssl -autoconnect
|
||||
'';
|
||||
scripts = with pkgs.weechatScripts; [
|
||||
weechat-notify-send
|
||||
|
|
|
|||
|
|
@ -5,11 +5,12 @@ let
|
|||
exec foot "$2"
|
||||
'';
|
||||
lockCommand = "${pkgs.swaylock-fancy}/bin/swaylock-fancy -d -t ''";
|
||||
in {
|
||||
in
|
||||
{
|
||||
home.sessionVariables = {
|
||||
XDG_CURRENT_DESKTOP = "sway";
|
||||
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 ];
|
||||
|
|
@ -26,11 +27,11 @@ in {
|
|||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = ''
|
||||
${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 300 '${lockCommand} \
|
||||
timeout 600 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep '${lockCommand}'
|
||||
${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 300 '${lockCommand} \
|
||||
timeout 600 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep '${lockCommand}'
|
||||
'';
|
||||
RestartSec = 3;
|
||||
Restart = "always";
|
||||
|
|
@ -55,119 +56,123 @@ in {
|
|||
fi
|
||||
'';
|
||||
|
||||
wayland.windowManager.sway = let
|
||||
cfg = config.wayland.windowManager.sway.config;
|
||||
bindsym = k: v: "bindsym ${k} ${v}";
|
||||
bindWorkspace = key: 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"
|
||||
"2"
|
||||
"3"
|
||||
"4"
|
||||
"5"
|
||||
"6"
|
||||
"7"
|
||||
"8"
|
||||
"9"
|
||||
]
|
||||
++ [ (bindWorkspace "0" "10:10") ]
|
||||
++ lib.imap1 (i: v: bindWorkspace v "${toString (10 + i)}:${v}") [
|
||||
"F1"
|
||||
"F2"
|
||||
"F3"
|
||||
"F4"
|
||||
"F5"
|
||||
"F6"
|
||||
"F7"
|
||||
"F8"
|
||||
"F9"
|
||||
"F10"
|
||||
"F11"
|
||||
"F12"
|
||||
];
|
||||
workspaceBindings' = map (lib.mapAttrsToList bindsym) workspaceBindings;
|
||||
workspaceBindingsStr = lib.concatStringsSep "\n" (lib.flatten workspaceBindings');
|
||||
in {
|
||||
enable = true;
|
||||
config = 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 {
|
||||
wayland.windowManager.sway =
|
||||
let
|
||||
cfg = config.wayland.windowManager.sway.config;
|
||||
bindsym = k: v: "bindsym ${k} ${v}";
|
||||
bindWorkspace = key: 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"
|
||||
"2"
|
||||
"3"
|
||||
"4"
|
||||
"5"
|
||||
"6"
|
||||
"7"
|
||||
"8"
|
||||
"9"
|
||||
]
|
||||
++ [ (bindWorkspace "0" "10:10") ]
|
||||
++ lib.imap1 (i: v: bindWorkspace v "${toString (10 + i)}:${v}") [
|
||||
"F1"
|
||||
"F2"
|
||||
"F3"
|
||||
"F4"
|
||||
"F5"
|
||||
"F6"
|
||||
"F7"
|
||||
"F8"
|
||||
"F9"
|
||||
"F10"
|
||||
"F11"
|
||||
"F12"
|
||||
];
|
||||
workspaceBindings' = map (lib.mapAttrsToList bindsym) workspaceBindings;
|
||||
workspaceBindingsStr = lib.concatStringsSep "\n" (lib.flatten workspaceBindings');
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
config =
|
||||
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 = {
|
||||
"System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown" =
|
||||
{
|
||||
"l" = "exec ${lockCommand}, mode default";
|
||||
"e" = "exec swaymsg exit, mode default";
|
||||
"s" = "exec systemctl suspend, mode default";
|
||||
"h" = "exec systemctl hibernate, mode default";
|
||||
"r" = "exec systemctl reboot, mode default";
|
||||
"Shift+s" = "exec systemctl shutdown, mode default";
|
||||
"Return" = "mode default";
|
||||
"Escape" = "mode default";
|
||||
modes = {
|
||||
"System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown" =
|
||||
{
|
||||
"l" = "exec ${lockCommand}, mode default";
|
||||
"e" = "exec swaymsg exit, mode default";
|
||||
"s" = "exec systemctl suspend, mode default";
|
||||
"h" = "exec systemctl hibernate, mode default";
|
||||
"r" = "exec systemctl reboot, mode default";
|
||||
"Shift+s" = "exec systemctl shutdown, mode default";
|
||||
"Return" = "mode default";
|
||||
"Escape" = "mode default";
|
||||
};
|
||||
};
|
||||
};
|
||||
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
|
||||
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
|
||||
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "us_gbp_map";
|
||||
xkb_options = "compose:rctrl,ctrl:nocaps";
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "us_gbp_map";
|
||||
xkb_options = "compose:rctrl,ctrl:nocaps";
|
||||
};
|
||||
};
|
||||
};
|
||||
fonts = {
|
||||
names = [ config.kw.font.name ];
|
||||
style = "Medium";
|
||||
size = config.kw.font.size;
|
||||
};
|
||||
terminal = "${pkgs.foot}/bin/foot";
|
||||
menu = "${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --no-generic --dmenu=\"${dmenu}\" --term='${footwrap}/bin/footwrap'";
|
||||
modifier = "Mod4";
|
||||
fonts = {
|
||||
names = [ config.kw.font.name ];
|
||||
style = "Medium";
|
||||
size = config.kw.font.size;
|
||||
};
|
||||
terminal = "${pkgs.foot}/bin/foot";
|
||||
menu = "${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --no-generic --dmenu=\"${dmenu}\" --term='${footwrap}/bin/footwrap'";
|
||||
modifier = "Mod4";
|
||||
|
||||
assigns = { "12:F2" = [{ class = "screenstub"; }]; };
|
||||
startup = [
|
||||
{
|
||||
command = "gsettings set org.gnome.desktop.interface cursor-theme 'Quintom_Snow'";
|
||||
}
|
||||
{
|
||||
command = "systemctl --user restart mako";
|
||||
always = true;
|
||||
}
|
||||
{
|
||||
command = "systemctl --user restart konawall.service";
|
||||
always = true;
|
||||
}
|
||||
];
|
||||
assigns = { "12:F2" = [{ class = "screenstub"; }]; };
|
||||
startup = [
|
||||
{
|
||||
command = "gsettings set org.gnome.desktop.interface cursor-theme 'Quintom_Snow'";
|
||||
}
|
||||
{
|
||||
command = "systemctl --user restart mako";
|
||||
always = true;
|
||||
}
|
||||
{
|
||||
command = "systemctl --user restart konawall.service";
|
||||
always = true;
|
||||
}
|
||||
];
|
||||
|
||||
modes.resize = {
|
||||
"a" = "resize shrink width 4 px or 4 ppt";
|
||||
"s" = "resize shrink height 4 px or 4 ppt";
|
||||
"w" = "resize grow height 4 px or 4 ppt";
|
||||
"d" = "resize grow width 4 px or 4 ppt";
|
||||
"Left" = "resize shrink width 4 px or 4 ppt";
|
||||
"Down" = "resize shrink height 4 px or 4 ppt";
|
||||
"Up" = "resize grow height 4 px or 4 ppt";
|
||||
"Right" = "resize grow width 4 px or 4 ppt";
|
||||
Return = ''mode "default"'';
|
||||
Escape = ''mode "default"'';
|
||||
"${cfg.modifier}+z" = ''mode "default"'';
|
||||
modes.resize = {
|
||||
"a" = "resize shrink width 4 px or 4 ppt";
|
||||
"s" = "resize shrink height 4 px or 4 ppt";
|
||||
"w" = "resize grow height 4 px or 4 ppt";
|
||||
"d" = "resize grow width 4 px or 4 ppt";
|
||||
"Left" = "resize shrink width 4 px or 4 ppt";
|
||||
"Down" = "resize shrink height 4 px or 4 ppt";
|
||||
"Up" = "resize grow height 4 px or 4 ppt";
|
||||
"Right" = "resize grow width 4 px or 4 ppt";
|
||||
Return = ''mode "default"'';
|
||||
Escape = ''mode "default"'';
|
||||
"${cfg.modifier}+z" = ''mode "default"'';
|
||||
};
|
||||
window = {
|
||||
border = 1;
|
||||
titlebar = false;
|
||||
border = 1;
|
||||
titlebar = false;
|
||||
};
|
||||
|
||||
floating = {
|
||||
border = 1;
|
||||
titlebar = false;
|
||||
border = 1;
|
||||
titlebar = false;
|
||||
};
|
||||
|
||||
keybindings = {
|
||||
"${cfg.modifier}+Return" = "exec ${cfg.terminal}";
|
||||
"${cfg.modifier}+x" = "exec ${lockCommand}";
|
||||
"${cfg.modifier}+Return" = "exec ${cfg.terminal}";
|
||||
"${cfg.modifier}+x" = "exec ${lockCommand}";
|
||||
|
||||
# focus windows - regular
|
||||
"${cfg.modifier}+Left" = "focus left";
|
||||
|
|
@ -279,84 +284,85 @@ in {
|
|||
# mode triggers
|
||||
"${cfg.modifier}+Shift+r" = "mode resize";
|
||||
"${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 {
|
||||
focused = {
|
||||
border = base16.base01;
|
||||
background = base16.base0D;
|
||||
text = base16.base07;
|
||||
indicator = base16.base0D;
|
||||
childBorder = base16.base0D;
|
||||
colors = let base16 = config.kw.hexColors; in
|
||||
{
|
||||
focused = {
|
||||
border = base16.base01;
|
||||
background = base16.base0D;
|
||||
text = base16.base07;
|
||||
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;
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
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"
|
||||
};
|
||||
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" {
|
||||
bindsym o mode "$mode_gaps_outer"
|
||||
bindsym i mode "$mode_gaps_inner"
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
mode "$mode_gaps" {
|
||||
bindsym o mode "$mode_gaps_outer"
|
||||
bindsym i mode "$mode_gaps_inner"
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
mode "$mode_gaps_inner" {
|
||||
bindsym equal gaps inner current plus 5
|
||||
bindsym minus gaps inner current minus 5
|
||||
bindsym 0 gaps inner current set 0
|
||||
mode "$mode_gaps_inner" {
|
||||
bindsym equal gaps inner current plus 5
|
||||
bindsym minus gaps inner current minus 5
|
||||
bindsym 0 gaps inner current set 0
|
||||
|
||||
bindsym plus gaps inner all plus 5
|
||||
bindsym Shift+minus gaps inner all minus 5
|
||||
bindsym Shift+0 gaps inner all set 0
|
||||
bindsym plus gaps inner all plus 5
|
||||
bindsym Shift+minus gaps inner all minus 5
|
||||
bindsym Shift+0 gaps inner all set 0
|
||||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
mode "$mode_gaps_outer" {
|
||||
bindsym equal gaps outer current plus 5
|
||||
bindsym minus gaps outer current minus 5
|
||||
bindsym 0 gaps outer current set 0
|
||||
mode "$mode_gaps_outer" {
|
||||
bindsym equal gaps outer current plus 5
|
||||
bindsym minus gaps outer current minus 5
|
||||
bindsym 0 gaps outer current set 0
|
||||
|
||||
bindsym plus gaps outer all plus 5
|
||||
bindsym Shift+minus gaps outer all minus 5
|
||||
bindsym Shift+0 gaps outer all set 0
|
||||
bindsym plus gaps outer all plus 5
|
||||
bindsym Shift+minus gaps outer all minus 5
|
||||
bindsym Shift+0 gaps outer all set 0
|
||||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
${workspaceBindingsStr}
|
||||
'';
|
||||
};
|
||||
}
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
${workspaceBindingsStr}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ let
|
|||
color: ${color};
|
||||
border-color: ${color};
|
||||
'';
|
||||
in ''
|
||||
in
|
||||
''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
|
|
|
|||
|
|
@ -3,131 +3,131 @@
|
|||
let
|
||||
base16 = config.kw.hexColors;
|
||||
in
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
style = import ./waybar.css.nix {
|
||||
inherit base16;
|
||||
inherit (lib) hextorgba;
|
||||
font = config.kw.font;
|
||||
};
|
||||
settings = [{
|
||||
modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
|
||||
modules-center = ["clock" "clock#arc" "clock#miku" "clock#hex" ];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
"memory"
|
||||
"temperature"
|
||||
"battery"
|
||||
"network"
|
||||
"idle_inhibitor"
|
||||
"custom/konawall"
|
||||
"custom/gpg-status"
|
||||
"tray"
|
||||
];
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
style = import ./waybar.css.nix {
|
||||
inherit base16;
|
||||
inherit (lib) hextorgba;
|
||||
font = config.kw.font;
|
||||
};
|
||||
settings = [{
|
||||
modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
|
||||
modules-center = [ "clock" "clock#arc" "clock#miku" "clock#hex" ];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
"memory"
|
||||
"temperature"
|
||||
"battery"
|
||||
"network"
|
||||
"idle_inhibitor"
|
||||
"custom/konawall"
|
||||
"custom/gpg-status"
|
||||
"tray"
|
||||
];
|
||||
|
||||
modules = {
|
||||
"sway/workspaces" = { format = "{name}"; };
|
||||
"sway/window" = {
|
||||
format = " {}";
|
||||
max-length = 50;
|
||||
};
|
||||
tray = {
|
||||
icon-size = 12;
|
||||
spacing = 2;
|
||||
};
|
||||
"custom/gpg-status" = {
|
||||
format = "{}";
|
||||
interval = 300;
|
||||
return-type = "json";
|
||||
exec = "${pkgs.waybar-gpg}/bin/kat-gpg-status";
|
||||
};
|
||||
"custom/konawall" = {
|
||||
format = "{}";
|
||||
interval = "once";
|
||||
return-type = "json";
|
||||
exec = "${pkgs.waybar-konawall}/bin/konawall-status";
|
||||
exec-on-event = true;
|
||||
on-click = "${pkgs.waybar-konawall}/bin/konawall-toggle";
|
||||
on-click-right = "systemctl --user restart konawall";
|
||||
};
|
||||
cpu = { format = " {usage}%"; };
|
||||
memory = { format = " {percentage}%"; };
|
||||
temperature = {
|
||||
format = " {temperatureC}°C";
|
||||
hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp2_input";
|
||||
};
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
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)}";
|
||||
modules = {
|
||||
"sway/workspaces" = { format = "{name}"; };
|
||||
"sway/window" = {
|
||||
format = " {}";
|
||||
max-length = 50;
|
||||
};
|
||||
tray = {
|
||||
icon-size = 12;
|
||||
spacing = 2;
|
||||
};
|
||||
"custom/gpg-status" = {
|
||||
format = "{}";
|
||||
interval = 300;
|
||||
return-type = "json";
|
||||
exec = "${pkgs.waybar-gpg}/bin/kat-gpg-status";
|
||||
};
|
||||
"custom/konawall" = {
|
||||
format = "{}";
|
||||
interval = "once";
|
||||
return-type = "json";
|
||||
exec = "${pkgs.waybar-konawall}/bin/konawall-status";
|
||||
exec-on-event = true;
|
||||
on-click = "${pkgs.waybar-konawall}/bin/konawall-toggle";
|
||||
on-click-right = "systemctl --user restart konawall";
|
||||
};
|
||||
cpu = { format = " {usage}%"; };
|
||||
memory = { format = " {percentage}%"; };
|
||||
temperature = {
|
||||
format = " {temperatureC}°C";
|
||||
hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp2_input";
|
||||
};
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
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)}";
|
||||
};
|
||||
};
|
||||
}];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,41 +1,42 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."wofi/wofi.css".text = let base16 = config.kw.hexColors; in ''
|
||||
#scroll, #input {
|
||||
background: ${base16.base01};
|
||||
}
|
||||
xdg.configFile."wofi/wofi.css".text = let base16 = config.kw.hexColors; in
|
||||
''
|
||||
#scroll, #input {
|
||||
background: ${base16.base01};
|
||||
}
|
||||
|
||||
window {
|
||||
font-family: ${config.kw.font.name};
|
||||
background: ${lib.hextorgba base16.base00 0.75};
|
||||
border-radius: 1em;
|
||||
font-size: ${config.kw.font.size_css};
|
||||
color: ${base16.base07};
|
||||
}
|
||||
window {
|
||||
font-family: ${config.kw.font.name};
|
||||
background: ${lib.hextorgba base16.base00 0.75};
|
||||
border-radius: 1em;
|
||||
font-size: ${config.kw.font.size_css};
|
||||
color: ${base16.base07};
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
margin: 1em;
|
||||
}
|
||||
#outer-box {
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
#scroll {
|
||||
border: 1px solid ${base16.base03};
|
||||
}
|
||||
#scroll {
|
||||
border: 1px solid ${base16.base03};
|
||||
}
|
||||
|
||||
#input {
|
||||
border: 1px solid ${base16.base0C};
|
||||
margin: 1em;
|
||||
background: ${base16.base02};
|
||||
color: ${base16.base04};
|
||||
}
|
||||
#input {
|
||||
border: 1px solid ${base16.base0C};
|
||||
margin: 1em;
|
||||
background: ${base16.base02};
|
||||
color: ${base16.base04};
|
||||
}
|
||||
|
||||
#entry {
|
||||
border-bottom: 1px dashed ${base16.base04};
|
||||
padding: .75em;
|
||||
}
|
||||
#entry {
|
||||
border-bottom: 1px dashed ${base16.base04};
|
||||
padding: .75em;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
background-color: ${base16.base0D};
|
||||
}
|
||||
'';
|
||||
#entry:selected {
|
||||
background-color: ${base16.base0D};
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
50
default.nix
50
default.nix
|
|
@ -10,9 +10,10 @@ let
|
|||
getSources = sources: removeAttrs sources [ "__functor" "dorkfiles" ];
|
||||
source2drv = value: if isDerivation value.outPath then value.outPath else value;
|
||||
sources2drvs = sources: mapAttrs (_: source2drv) (getSources sources);
|
||||
in recurseIntoAttrs rec {
|
||||
in
|
||||
recurseIntoAttrs rec {
|
||||
local = sources2drvs sources;
|
||||
hexchen = sources2drvs (import sources.hexchen {}).sources;
|
||||
hexchen = sources2drvs (import sources.hexchen { }).sources;
|
||||
all = attrValues local ++ attrValues hexchen;
|
||||
allStr = toString all;
|
||||
};
|
||||
|
|
@ -20,21 +21,23 @@ let
|
|||
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/trusted/<subconfigName>.
|
||||
If only one exists, the path for that one is returned.
|
||||
Otherwise a module is generated which contains both import paths.
|
||||
If only one exists, the path for that one is returned.
|
||||
Otherwise a module is generated which contains both import paths.
|
||||
*/
|
||||
xargNames = lib.unique (lib.folderList ./config ["trusted"] ++ lib.folderList ./config/trusted ["pkgs" "tf"]);
|
||||
xarg = lib.mapListToAttrs (folder: lib.nameValuePair folder (lib.domainMerge {
|
||||
inherit folder;
|
||||
folderPaths = [ (./config + "/${folder}") (./config/trusted + "/${folder}") ];
|
||||
})) xargNames;
|
||||
xargNames = lib.unique (lib.folderList ./config [ "trusted" ] ++ lib.folderList ./config/trusted [ "pkgs" "tf" ]);
|
||||
xarg = lib.mapListToAttrs
|
||||
(folder: lib.nameValuePair folder (lib.domainMerge {
|
||||
inherit folder;
|
||||
folderPaths = [ (./config + "/${folder}") (./config/trusted + "/${folder}") ];
|
||||
}))
|
||||
xargNames;
|
||||
|
||||
/*
|
||||
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.
|
||||
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.
|
||||
*/
|
||||
metaConfig = {
|
||||
config = {
|
||||
|
|
@ -53,9 +56,9 @@ let
|
|||
# This is where the meta config is evaluated.
|
||||
eval = lib.evalModules {
|
||||
modules = lib.singleton metaConfig
|
||||
++ lib.attrValues (removeAttrs xarg.targets ["common"])
|
||||
++ lib.attrValues xarg.hosts
|
||||
++ lib.singleton ./config/modules/meta/default.nix;
|
||||
++ lib.attrValues (removeAttrs xarg.targets [ "common" ])
|
||||
++ lib.attrValues xarg.hosts
|
||||
++ lib.singleton ./config/modules/meta/default.nix;
|
||||
|
||||
specialArgs = {
|
||||
inherit sources root;
|
||||
|
|
@ -66,18 +69,19 @@ let
|
|||
# The evaluated meta config.
|
||||
inherit (eval) config;
|
||||
|
||||
/*
|
||||
Please note all specialArg generated specifications use the folder common to both import paths.
|
||||
Those import paths are as mentioned above next to `xargNames`.
|
||||
/*
|
||||
Please note all specialArg generated specifications use the folder common to both import paths.
|
||||
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
|
||||
* network.nodes -> host names to host NixOS + home-manager configs
|
||||
* profiles -> the specialArg generated from profiles/
|
||||
* users -> the specialArg generated from users/
|
||||
* 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/
|
||||
*/
|
||||
self = config // { inherit pkgs lib sourceCache sources; } // xarg;
|
||||
in self
|
||||
*/
|
||||
self = config // { inherit pkgs lib sourceCache sources; } // xarg;
|
||||
in
|
||||
self
|
||||
|
|
|
|||
|
|
@ -23,4 +23,5 @@ let
|
|||
];
|
||||
};
|
||||
};
|
||||
in pkgs
|
||||
in
|
||||
pkgs
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{ }: let
|
||||
{}:
|
||||
let
|
||||
meta = import ./default.nix;
|
||||
config = meta;
|
||||
inherit (meta) pkgs;
|
||||
|
|
@ -58,7 +59,8 @@
|
|||
done
|
||||
cd $START_DIR
|
||||
'';
|
||||
in pkgs.mkShell {
|
||||
in
|
||||
pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
inetutils
|
||||
nf-update
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue