mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
Move to recursiveMod, nixdirfmt
This commit is contained in:
parent
3a4458eae5
commit
76a479f14e
66 changed files with 313 additions and 335 deletions
|
|
@ -10,7 +10,7 @@ with lib; {
|
|||
|
||||
|
||||
nix.config = {
|
||||
extra-platforms = ["aarch64-linux" "armv6l-linux" "armv7l-linux"];
|
||||
extra-platforms = [ "aarch64-linux" "armv6l-linux" "armv7l-linux" ];
|
||||
#extra-sandbox-paths = with channels.cipkgs; map (package: builtins.unsafeDiscardStringContext "${package}?") [bash qemu "/run/binfmt"];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
channels.nixfiles.path = ../.;
|
||||
|
||||
nix.config = {
|
||||
extra-platforms = ["aarch64-linux" "armv6l-linux" "armv7l-linux"];
|
||||
extra-platforms = [ "aarch64-linux" "armv6l-linux" "armv7l-linux" ];
|
||||
#extra-sandbox-paths = with channels.cipkgs; map (package: builtins.unsafeDiscardStringContext "${package}?") [bash qemu "/run/binfmt"];
|
||||
};
|
||||
|
||||
|
|
|
|||
5
config/hosts/settings.nix
Normal file
5
config/hosts/settings.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }: {
|
||||
excludes = [
|
||||
"to-do"
|
||||
];
|
||||
}
|
||||
|
|
@ -13,15 +13,20 @@
|
|||
];
|
||||
|
||||
boot = {
|
||||
kernelModules = mkForce ["loop" "atkbd"];
|
||||
kernelModules = mkForce [ "loop" "atkbd" ];
|
||||
initrd = {
|
||||
includeDefaultModules = false;
|
||||
availableKernelModules = mkForce [
|
||||
"mmc_block"
|
||||
"usbhid"
|
||||
"ext4"
|
||||
"hid_generic" "hid_lenovo" "hid_apple" "hid_roccat"
|
||||
"hid_logitech_hidpp" "hid_logitech_dj" "hid_microsoft"
|
||||
"hid_generic"
|
||||
"hid_lenovo"
|
||||
"hid_apple"
|
||||
"hid_roccat"
|
||||
"hid_logitech_hidpp"
|
||||
"hid_logitech_dj"
|
||||
"hid_microsoft"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
{ sources, ... }: {
|
||||
external = [
|
||||
(import (sources.arcexprs + "/modules")).home-manager
|
||||
(import (sources.katexprs + "/modules")).home
|
||||
(import (sources.impermanence + "/home-manager.nix"))
|
||||
(import sources.anicca).modules.home
|
||||
(sources.tf-nix + "/modules/home/secrets.nix")
|
||||
];
|
||||
functor = {
|
||||
enable = true;
|
||||
external = [
|
||||
(import (sources.arcexprs + "/modules")).home-manager
|
||||
(import (sources.katexprs + "/modules")).home
|
||||
(import (sources.impermanence + "/home-manager.nix"))
|
||||
(import sources.anicca).modules.home
|
||||
(sources.tf-nix + "/modules/home/secrets.nix")
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ let
|
|||
visible = false;
|
||||
};
|
||||
in
|
||||
mapAttrs opt knownSettings;
|
||||
mapAttrs opt knownSettings;
|
||||
};
|
||||
|
||||
setExpr = name: value:
|
||||
|
|
@ -47,13 +47,13 @@ let
|
|||
v =
|
||||
if isBool value then (if value then "" else "no") + name
|
||||
else
|
||||
"${name}=${
|
||||
"${name}=${
|
||||
if isList value
|
||||
then concatStringsSep "," value
|
||||
else toString value
|
||||
}";
|
||||
in
|
||||
optionalString (value != null) ("set " + v);
|
||||
optionalString (value != null) ("set " + v);
|
||||
|
||||
in
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ in
|
|||
|
||||
settings = mkOption {
|
||||
type = vimSettingsType;
|
||||
default = {};
|
||||
default = { };
|
||||
example = literalExample ''
|
||||
{
|
||||
expandtab = true;
|
||||
|
|
@ -149,7 +149,8 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
in mkIf cfg.enable {
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
programs.vim.package = vim;
|
||||
home.packages = [ cfg.package ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ in
|
|||
config.tf = mkMerge (singleton
|
||||
{
|
||||
imports = [
|
||||
../../targets/common
|
||||
../../targets/common.nix
|
||||
];
|
||||
deps = {
|
||||
select.allProviders = true;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ with lib;
|
|||
options = {
|
||||
nixpkgs.crossOverlays = mkOption {
|
||||
type = types.listOf types.unspecified;
|
||||
default = [];
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
config = {
|
||||
|
|
@ -72,7 +72,7 @@ with lib;
|
|||
nixos = {
|
||||
extraModules = [
|
||||
"${toString sources.home-manager}/nixos"
|
||||
] ++ singleton meta.modules.nixos;
|
||||
] ++ lib.singleton meta.modules.nixos;
|
||||
specialArgs = {
|
||||
inherit (config.network) nodes;
|
||||
inherit sources meta;
|
||||
|
|
|
|||
5
config/modules/meta/settings.nix
Normal file
5
config/modules/meta/settings.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ sources, ... }: {
|
||||
functor = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,10 +1,13 @@
|
|||
{ sources, ... }: {
|
||||
external = [
|
||||
(import (sources.arcexprs + "/modules")).nixos
|
||||
(import (sources.katexprs + "/modules")).nixos
|
||||
(import (sources.impermanence + "/nixos.nix"))
|
||||
(import sources.anicca).modules.nixos
|
||||
(sources.tf-nix + "/modules/nixos/secrets.nix")
|
||||
(sources.tf-nix + "/modules/nixos/secrets-users.nix")
|
||||
];
|
||||
functor = {
|
||||
enable = true;
|
||||
external = [
|
||||
(import (sources.arcexprs + "/modules")).nixos
|
||||
(import (sources.katexprs + "/modules")).nixos
|
||||
(import (sources.impermanence + "/nixos.nix"))
|
||||
(import sources.anicca).modules.nixos
|
||||
(sources.tf-nix + "/modules/nixos/secrets.nix")
|
||||
(sources.tf-nix + "/modules/nixos/secrets-users.nix")
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
{
|
||||
base16 = {
|
||||
inherit (config.home-manager.users.kat.base16) schemes alias;
|
||||
console = {
|
||||
enable = true;
|
||||
scheme = config.home-manager.users.kat.base16.alias.default;
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
{ config, meta, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = with meta; [
|
||||
users.kat.base
|
||||
users.arc
|
||||
users.hexchen
|
||||
./system.nix
|
||||
./kitty.nix
|
||||
./home.nix
|
||||
./profiles.nix
|
||||
./shell.nix
|
||||
./base16.nix
|
||||
./network.nix
|
||||
./access.nix
|
||||
./locale.nix
|
||||
./nix.nix
|
||||
./ssh.nix
|
||||
./packages.nix
|
||||
./secrets.nix
|
||||
];
|
||||
}
|
||||
7
config/profiles/base/includes.nix
Normal file
7
config/profiles/base/includes.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ config, meta, ... }: {
|
||||
imports = with meta; [
|
||||
users.kat.base
|
||||
users.hexchen
|
||||
users.arc
|
||||
];
|
||||
}
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, meta, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = lib.optional (meta ? trusted) meta.trusted.secrets;
|
||||
|
||||
secrets = {
|
||||
root = "/var/lib/kat/secrets";
|
||||
persistentRoot = "/var/lib/kat/secrets";
|
||||
|
|
|
|||
|
|
@ -1,37 +1,35 @@
|
|||
rec {
|
||||
common = ./armvcommon.nix;
|
||||
armv7-base = ./armv7.nix;
|
||||
armv6-base = ./armv6.nix;
|
||||
aarch64-base = ./aarch64.nix;
|
||||
|
||||
|
||||
aarch64 = {
|
||||
deploy.profile.cross = {
|
||||
enable = true;
|
||||
aarch64 = true;
|
||||
{ lib, tree, ... }: with lib; let
|
||||
profiles = tree.dirs // tree.files;
|
||||
appendedProfiles = with profiles; {
|
||||
aarch64 = {
|
||||
deploy.profile.cross = {
|
||||
enable = true;
|
||||
aarch64 = true;
|
||||
};
|
||||
imports = [
|
||||
aarch64
|
||||
];
|
||||
};
|
||||
imports = [
|
||||
aarch64-base
|
||||
];
|
||||
};
|
||||
armv7l = {
|
||||
deploy.profile.cross = {
|
||||
enable = true;
|
||||
armv7l = true;
|
||||
armv7l = {
|
||||
deploy.profile.cross = {
|
||||
enable = true;
|
||||
armv7l = true;
|
||||
};
|
||||
imports = [
|
||||
arm-common
|
||||
armv7
|
||||
];
|
||||
};
|
||||
imports = [
|
||||
common
|
||||
armv7-base
|
||||
];
|
||||
};
|
||||
armv6l = {
|
||||
deploy.profile.cross = {
|
||||
enable = true;
|
||||
armv6l = true;
|
||||
armv6l = {
|
||||
deploy.profile.cross = {
|
||||
enable = true;
|
||||
armv6l = true;
|
||||
};
|
||||
imports = [
|
||||
arm-common
|
||||
armv6
|
||||
];
|
||||
};
|
||||
imports = [
|
||||
common
|
||||
armv6-base
|
||||
];
|
||||
};
|
||||
}
|
||||
in
|
||||
profiles // appendedProfiles
|
||||
|
|
|
|||
4
config/profiles/cross/settings.nix
Normal file
4
config/profiles/cross/settings.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{ ... }: {
|
||||
defaultOnly = true;
|
||||
includeFolders.default.enable = true;
|
||||
}
|
||||
9
config/profiles/default.nix
Normal file
9
config/profiles/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ lib, tree, ... }@args: with lib;
|
||||
let
|
||||
wrappedBase = base: mapAttrs
|
||||
(name: paths: {
|
||||
imports = if isAttrs paths then attrValues paths else singleton paths;
|
||||
})
|
||||
(base);
|
||||
in
|
||||
(wrappedBase (filterAttrs (n: v: ! v ? "default") tree.dirs)) // (mapAttrs (n: v: removeAttrs v [ "default" ]) (filterAttrs (n: v: v ? "default") tree.dirs)) // (removeAttrs tree.files [ "default" ])
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{ config, pkgs, meta, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
meta.services.dnscrypt-proxy
|
||||
./adb.nix
|
||||
./fonts.nix
|
||||
./sway.nix
|
||||
./filesystems.nix
|
||||
./qt.nix
|
||||
./gpg.nix
|
||||
./xdg-portals.nix
|
||||
./nfs.nix
|
||||
./mingetty.nix
|
||||
./sound.nix
|
||||
];
|
||||
|
||||
services.tumbler.enable = true;
|
||||
|
||||
deploy.profile.gui = true;
|
||||
}
|
||||
|
|
@ -1,28 +1,25 @@
|
|||
let hardwareProfiles = { lib }:
|
||||
let profiles = with profiles; lib.domainMerge
|
||||
{
|
||||
folder = ""; # not used in this usage
|
||||
folderPaths = [
|
||||
./.
|
||||
../../trusted/profiles/hardware
|
||||
];
|
||||
} // {
|
||||
{ lib, tree, ... }: with lib; let
|
||||
profiles = (filterAttrs (n: v: v ? "default") tree.dirs)
|
||||
// tree.defaultDirs
|
||||
// (mapAttrs (n: v: removeAttrs v [ "default" ]) (filterAttrs (n: v: v ? "default") tree.dirs))
|
||||
// tree.files;
|
||||
appendedProfiles = with profiles; {
|
||||
ms-7b86 = {
|
||||
imports = [
|
||||
ms-7b86-base
|
||||
ms-7b86
|
||||
ryzen
|
||||
amdgpu
|
||||
];
|
||||
};
|
||||
rm-310 = {
|
||||
imports = [
|
||||
rm-310-base
|
||||
rm-310
|
||||
intel
|
||||
];
|
||||
};
|
||||
v330-14arr = {
|
||||
imports = [
|
||||
v330-14arr-base
|
||||
v330-14arr
|
||||
ryzen
|
||||
amdgpu
|
||||
laptop
|
||||
|
|
@ -31,10 +28,11 @@ let hardwareProfiles = { lib }:
|
|||
};
|
||||
eeepc-1015pem = {
|
||||
imports = [
|
||||
eeepc-1015pem-base
|
||||
eeepc-1015pem
|
||||
intel
|
||||
laptop
|
||||
];
|
||||
};
|
||||
}; in profiles;
|
||||
in { __functor = self: hardwareProfiles; isModule = false; }
|
||||
};
|
||||
in
|
||||
profiles // appendedProfiles
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
deploy.profile.hardware.laptop = true;
|
||||
|
||||
{ ... }: {
|
||||
imports = [
|
||||
./light.nix
|
||||
({ config, ... }: {
|
||||
deploy.profile.hardware.laptop = true;
|
||||
|
||||
imports = [
|
||||
./light.nix
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
7
config/profiles/hardware/laptop/settings.nix
Normal file
7
config/profiles/hardware/laptop/settings.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }: {
|
||||
defaultOnly = true;
|
||||
includeFolders = {
|
||||
enable = true;
|
||||
default.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,26 +1,26 @@
|
|||
rec {
|
||||
common = ./common.nix;
|
||||
ubuntu-base = ./ubuntu.nix;
|
||||
oracle-base = ./oracle.nix;
|
||||
|
||||
ubuntu = {
|
||||
deploy.profile.hardware.oracle = {
|
||||
common = true;
|
||||
ubuntu = true;
|
||||
{ lib, sources, tree, ... }: with lib; let
|
||||
profiles = tree.dirs // tree.files;
|
||||
appendedProfiles = with profiles; {
|
||||
ubuntu = { config, ... }: {
|
||||
deploy.profile.hardware.oracle = {
|
||||
ubuntu = true;
|
||||
common = true;
|
||||
};
|
||||
imports = with import (sources.tf-nix + "/modules"); [
|
||||
nixos.ubuntu-linux
|
||||
common
|
||||
];
|
||||
};
|
||||
imports = [
|
||||
common
|
||||
ubuntu-base
|
||||
];
|
||||
};
|
||||
oracle = {
|
||||
deploy.profile.hardware.oracle = {
|
||||
common = true;
|
||||
oracle = true;
|
||||
oracle = { config, ... }: {
|
||||
deploy.profile.hardware.oracle = {
|
||||
oracle = true;
|
||||
common = true;
|
||||
};
|
||||
imports = with import (sources.tf-nix + "/modules"); [
|
||||
nixos.oracle-linux
|
||||
common
|
||||
];
|
||||
};
|
||||
imports = [
|
||||
common
|
||||
oracle-base
|
||||
];
|
||||
};
|
||||
}
|
||||
in
|
||||
profiles // appendedProfiles
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
{ config, sources, ... }: {
|
||||
imports = with import (sources.tf-nix + "/modules"); [
|
||||
nixos.oracle-linux
|
||||
];
|
||||
}
|
||||
4
config/profiles/hardware/oracle/settings.nix
Normal file
4
config/profiles/hardware/oracle/settings.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{ ... }: {
|
||||
defaultOnly = true;
|
||||
includeFolders.default.enable = true;
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ sources, ... }: {
|
||||
imports = with import (sources.tf-nix + "/modules"); [
|
||||
nixos.ubuntu-linux
|
||||
];
|
||||
}
|
||||
5
config/profiles/hardware/settings.nix
Normal file
5
config/profiles/hardware/settings.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }: {
|
||||
defaultOnly = true;
|
||||
includeFolders.enable = true;
|
||||
includeFolders.default.enable = true;
|
||||
}
|
||||
18
config/profiles/hardware/wifi.nix
Normal file
18
config/profiles/hardware/wifi.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ config, tf, lib, ... }: with lib;
|
||||
|
||||
{
|
||||
kw.secrets.variables = mapListToAttrs
|
||||
(field:
|
||||
nameValuePair "wireless-${field}" {
|
||||
path = "secrets/wifi";
|
||||
inherit field;
|
||||
}) [ "ssid" "password" ];
|
||||
|
||||
deploy.profile.hardware.wifi = true;
|
||||
networking.wireless = {
|
||||
enable = true;
|
||||
networks.${builtins.unsafeDiscardStringsContext tf.variables.wireless-ssid.get} = {
|
||||
pskRaw = tf.variables.wireless-password.get;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
deploy.profile.hardware.wifi = true;
|
||||
networking.wireless.enable = true;
|
||||
}
|
||||
5
config/profiles/settings.nix
Normal file
5
config/profiles/settings.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }: {
|
||||
defaultOnly = true;
|
||||
recursiveInclude = true;
|
||||
includeFolders.default.enable = true;
|
||||
}
|
||||
6
config/services/settings.nix
Normal file
6
config/services/settings.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ ... }: {
|
||||
includeFolders = {
|
||||
enable = true;
|
||||
default.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,12 +1,16 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ ... }: {
|
||||
imports = [
|
||||
({ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.arc = {
|
||||
uid = 1001;
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ8Z6briIboxIdedPGObEWB6QEQkvxKvnMW/UVU9t/ac mew-pgp"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
{
|
||||
users.users.arc = {
|
||||
uid = 1001;
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ8Z6briIboxIdedPGObEWB6QEQkvxKvnMW/UVU9t/ac mew-pgp"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
7
config/users/arc/settings.nix
Normal file
7
config/users/arc/settings.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }: {
|
||||
defaultOnly = true;
|
||||
includeFolders = {
|
||||
enable = true;
|
||||
default.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,38 +1,42 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ ... }: {
|
||||
imports = [
|
||||
({ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.hexchen = {
|
||||
uid = 1002;
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDNVUDKx9sukRkb6INny432+2HZBWx/qIEAOvngF1qcj hexchen@montasch"
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDI3T1eFS77URHZ/HVWkMOqx7W1U54zJtn9C7QWsHOtyH72i/4EVj8SxYqLllElh1kuKUXSUipPeEzVsipFVvfH0wEuTDgFffiSQ3a8lfUgdEBuoySwceEoPgc5deapkOmiDIDeeWlrRe3nqspLRrSWU1DirMxoFPbwqJXRvpl6qJPxRg+2IolDcXlZ6yxB4Vv48vzRfVzZNUz7Pjmy2ebU8PbDoFWL/S3m7yOzQpv3L7KYBz7+rkjuF3AU2vy6CAfIySkVpspZZLtkTGCIJF228ev0e8NvhuN6ZnjzXxVTQOy32HCdPdbBbicu0uHfZ5O7JX9DjGd8kk1r2dnZwwy/ hexchen@yubi5"
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4CLJ+mFfq5XiBXROKewmN9WYmj+79bj/AoaR6Iud2pirulot3tkrrLe2cMjiNWFX8CGVqrsAELKUA8EyUTJfStlcTE0/QNESTRmdDaC+lZL41pWUO9KOiD6/0axAhHXrSJ0ScvbqtD0CtpnCKKxtuOflVPoUGZsH9cLKJNRKfEka0H0GgeKb5Tp618R/WNAQOwaCcXzg/nG4Bgv3gJW4Nm9IKy/MwRZqtILi8Mtd+2diTqpMwyNRmbenmRHCQ1vRw46joYkledVqrmSlfSMFgIHI1zRSBXb/JkG2IvIyB5TGbTkC4N2fqJNpH8wnCKuOvs46xmgdiRA26P48C2em3 hexchen@yubi5c"
|
||||
];
|
||||
};
|
||||
{
|
||||
users.users.hexchen = {
|
||||
uid = 1002;
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDNVUDKx9sukRkb6INny432+2HZBWx/qIEAOvngF1qcj hexchen@montasch"
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDI3T1eFS77URHZ/HVWkMOqx7W1U54zJtn9C7QWsHOtyH72i/4EVj8SxYqLllElh1kuKUXSUipPeEzVsipFVvfH0wEuTDgFffiSQ3a8lfUgdEBuoySwceEoPgc5deapkOmiDIDeeWlrRe3nqspLRrSWU1DirMxoFPbwqJXRvpl6qJPxRg+2IolDcXlZ6yxB4Vv48vzRfVzZNUz7Pjmy2ebU8PbDoFWL/S3m7yOzQpv3L7KYBz7+rkjuF3AU2vy6CAfIySkVpspZZLtkTGCIJF228ev0e8NvhuN6ZnjzXxVTQOy32HCdPdbBbicu0uHfZ5O7JX9DjGd8kk1r2dnZwwy/ hexchen@yubi5"
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4CLJ+mFfq5XiBXROKewmN9WYmj+79bj/AoaR6Iud2pirulot3tkrrLe2cMjiNWFX8CGVqrsAELKUA8EyUTJfStlcTE0/QNESTRmdDaC+lZL41pWUO9KOiD6/0axAhHXrSJ0ScvbqtD0CtpnCKKxtuOflVPoUGZsH9cLKJNRKfEka0H0GgeKb5Tp618R/WNAQOwaCcXzg/nG4Bgv3gJW4Nm9IKy/MwRZqtILi8Mtd+2diTqpMwyNRmbenmRHCQ1vRw46joYkledVqrmSlfSMFgIHI1zRSBXb/JkG2IvIyB5TGbTkC4N2fqJNpH8wnCKuOvs46xmgdiRA26P48C2em3 hexchen@yubi5c"
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.hexchen = {
|
||||
programs.vim = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
set viminfo='20,<1000
|
||||
set mouse=a
|
||||
'';
|
||||
};
|
||||
home-manager.users.hexchen = {
|
||||
programs.vim = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
set viminfo='20,<1000
|
||||
set mouse=a
|
||||
'';
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "hexchen";
|
||||
userEmail = "hexchen@lilwit.ch";
|
||||
signing = {
|
||||
key = "B1DF5EAD";
|
||||
};
|
||||
extraConfig = {
|
||||
pull.rebase = true;
|
||||
};
|
||||
};
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "hexchen";
|
||||
userEmail = "hexchen@lilwit.ch";
|
||||
signing = {
|
||||
key = "B1DF5EAD";
|
||||
};
|
||||
extraConfig = {
|
||||
pull.rebase = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.bat.enable = true;
|
||||
programs.jq.enable = true;
|
||||
};
|
||||
programs.bat.enable = true;
|
||||
programs.jq.enable = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
7
config/users/hexchen/settings.nix
Normal file
7
config/users/hexchen/settings.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }: {
|
||||
defaultOnly = true;
|
||||
includeFolders = {
|
||||
enable = true;
|
||||
default.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./vim
|
||||
./shell.nix
|
||||
./git.nix
|
||||
./tmux.nix
|
||||
./base16.nix
|
||||
./xdg.nix
|
||||
./ssh.nix
|
||||
./packages.nix
|
||||
./weechat.nix
|
||||
./inputrc.nix
|
||||
./secrets.nix
|
||||
];
|
||||
|
||||
home.stateVersion = "20.09";
|
||||
}
|
||||
3
config/users/kat/base/state.nix
Normal file
3
config/users/kat/base/state.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{ config, ... }: {
|
||||
home.stateVersion = "20.09";
|
||||
}
|
||||
|
|
@ -1,28 +1,30 @@
|
|||
let katUser = { lib }:
|
||||
let
|
||||
userImport = profile: { config, ... }: {
|
||||
{ lib, tree, ... }: with lib; let
|
||||
wrapImports = imports: mapAttrs
|
||||
(name: paths: { config, ... }: {
|
||||
config.home-manager.users.kat = {
|
||||
imports = [
|
||||
(./. + "/${profile}")
|
||||
];
|
||||
imports = if isAttrs paths then attrValues paths else singleton paths;
|
||||
};
|
||||
};
|
||||
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") ]; };
|
||||
server = {};
|
||||
guiFull = { imports = [ gui sway dev media personal ]; };
|
||||
};
|
||||
in
|
||||
userProfiles;
|
||||
in { __functor = self: katUser; isModule = false; }
|
||||
})
|
||||
imports;
|
||||
dirImports = wrapImports tree.dirs;
|
||||
serviceImports = wrapImports tree.dirs.services;
|
||||
in
|
||||
(removeAttrs dirImports (singleton "base")) // {
|
||||
base = {
|
||||
imports = [
|
||||
dirImports.base
|
||||
tree.files.nixos
|
||||
];
|
||||
};
|
||||
server = { };
|
||||
guiFull = {
|
||||
imports = with dirImports; [
|
||||
gui
|
||||
sway
|
||||
dev
|
||||
media
|
||||
personal
|
||||
];
|
||||
};
|
||||
services = serviceImports;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./vim
|
||||
./rink.nix
|
||||
./shell.nix
|
||||
./rustfmt.nix
|
||||
./packages.nix
|
||||
./cookiecutter.nix
|
||||
];
|
||||
}
|
||||
5
config/users/kat/dev/settings.nix
Normal file
5
config/users/kat/dev/settings.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }: {
|
||||
excludes = [
|
||||
"emacs"
|
||||
];
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./firefox
|
||||
./packages.nix
|
||||
./gtk.nix
|
||||
./base16.nix
|
||||
./foot.nix
|
||||
./kitty.nix
|
||||
./xdg.nix
|
||||
./ranger.nix
|
||||
./fonts.nix
|
||||
./qt.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./mpv.nix
|
||||
./obs.nix
|
||||
./syncplay.nix
|
||||
./packages.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./gpg.nix
|
||||
./git.nix
|
||||
./packages.nix
|
||||
./weechat.nix
|
||||
./email.nix
|
||||
./shell.nix
|
||||
./pass.nix
|
||||
./taskwarrior.nix
|
||||
./bitw.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -7,6 +7,6 @@
|
|||
'';
|
||||
};
|
||||
programs.zsh = {
|
||||
shellAliases = mapListToAttrs (attr: nameValuePair "abby${attr}" "mpv $(bitw get secrets/abby -f ${attr})") ["radio" "tv"];
|
||||
shellAliases = mapListToAttrs (attr: nameValuePair "abby${attr}" "mpv $(bitw get secrets/abby -f ${attr})") [ "radio" "tv" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
{
|
||||
programs.neovim = {
|
||||
extraConfig = ''
|
||||
${source ./init.vim}
|
||||
source ${./init.vim}
|
||||
'';
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
notmuch-vim
|
||||
|
|
|
|||
7
config/users/kat/settings.nix
Normal file
7
config/users/kat/settings.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }: {
|
||||
defaultOnly = true;
|
||||
recursiveInclude = true;
|
||||
includeFolders = {
|
||||
default.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./xkb.nix
|
||||
./waybar
|
||||
./wofi
|
||||
./mako.nix
|
||||
./sway.nix
|
||||
./gammastep.nix
|
||||
./konawall.nix
|
||||
./packages.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -32,13 +32,7 @@ let
|
|||
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 modules" ] ++ lib.folderList ./config/trusted [ "pkgs" "tf" ]);
|
||||
xarg = (lib.mapListToAttrs
|
||||
(folder: lib.nameValuePair folder (lib.domainMerge {
|
||||
inherit folder;
|
||||
folderPaths = [ (./config + "/${folder}") (./config/trusted + "/${folder}") ];
|
||||
}))
|
||||
xargNames) // { modules = lib.recursiveMod { folder = ./config/modules; inherit sources; }; };
|
||||
xarg = lib.recursiveMod { folder = ./config; inherit sources lib; };
|
||||
/*
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -89,10 +89,10 @@
|
|||
"homepage": null,
|
||||
"owner": "kittywitch",
|
||||
"repo": "nixexprs",
|
||||
"rev": "da3150b0837cf75c0c0fe36369ce424b80ee18ce",
|
||||
"sha256": "0w43bih23d3iv95k4arm3xys679rr7rblr5a74isvzxz0m70w3kr",
|
||||
"rev": "05050726c147903a257c03bc454250cf0cb6b997",
|
||||
"sha256": "0fk4fyxvc4kivd5g6nnxrrwll51innx1dlx7wq7mvaarlm9vj5h0",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/kittywitch/nixexprs/archive/da3150b0837cf75c0c0fe36369ce424b80ee18ce.tar.gz",
|
||||
"url": "https://github.com/kittywitch/nixexprs/archive/05050726c147903a257c03bc454250cf0cb6b997.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"niv": {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit da3150b0837cf75c0c0fe36369ce424b80ee18ce
|
||||
Subproject commit 05050726c147903a257c03bc454250cf0cb6b997
|
||||
|
|
@ -68,9 +68,11 @@ with lib; pkgs.mkShell {
|
|||
nf-actions
|
||||
nf-actions-test
|
||||
] ++ config.runners.lazy.nativeBuildInputs
|
||||
++ (map (node: writeShellScriptBin "${node.networking.hostName}-img" ''
|
||||
++ (map
|
||||
(node: writeShellScriptBin "${node.networking.hostName}-img" ''
|
||||
nix build -f . network.nodes.${node.networking.hostName}.system.build.sdImage --show-trace
|
||||
'') (filter (node: node.system.build ? sdImage) (attrValues meta.network.nodes)));
|
||||
'')
|
||||
(filter (node: node.system.build ? sdImage) (attrValues meta.network.nodes)));
|
||||
shellHook = ''
|
||||
export HOME_HOSTNAME=$(hostname -s)
|
||||
export HOME_UID=$(id -u)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue