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 = {
|
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"];
|
#extra-sandbox-paths = with channels.cipkgs; map (package: builtins.unsafeDiscardStringContext "${package}?") [bash qemu "/run/binfmt"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
channels.nixfiles.path = ../.;
|
channels.nixfiles.path = ../.;
|
||||||
|
|
||||||
nix.config = {
|
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"];
|
#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 = {
|
boot = {
|
||||||
kernelModules = mkForce ["loop" "atkbd"];
|
kernelModules = mkForce [ "loop" "atkbd" ];
|
||||||
initrd = {
|
initrd = {
|
||||||
includeDefaultModules = false;
|
includeDefaultModules = false;
|
||||||
availableKernelModules = mkForce [
|
availableKernelModules = mkForce [
|
||||||
"mmc_block"
|
"mmc_block"
|
||||||
"usbhid"
|
"usbhid"
|
||||||
"ext4"
|
"ext4"
|
||||||
"hid_generic" "hid_lenovo" "hid_apple" "hid_roccat"
|
"hid_generic"
|
||||||
"hid_logitech_hidpp" "hid_logitech_dj" "hid_microsoft"
|
"hid_lenovo"
|
||||||
|
"hid_apple"
|
||||||
|
"hid_roccat"
|
||||||
|
"hid_logitech_hidpp"
|
||||||
|
"hid_logitech_dj"
|
||||||
|
"hid_microsoft"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
{ sources, ... }: {
|
{ sources, ... }: {
|
||||||
external = [
|
functor = {
|
||||||
(import (sources.arcexprs + "/modules")).home-manager
|
enable = true;
|
||||||
(import (sources.katexprs + "/modules")).home
|
external = [
|
||||||
(import (sources.impermanence + "/home-manager.nix"))
|
(import (sources.arcexprs + "/modules")).home-manager
|
||||||
(import sources.anicca).modules.home
|
(import (sources.katexprs + "/modules")).home
|
||||||
(sources.tf-nix + "/modules/home/secrets.nix")
|
(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;
|
visible = false;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
mapAttrs opt knownSettings;
|
mapAttrs opt knownSettings;
|
||||||
};
|
};
|
||||||
|
|
||||||
setExpr = name: value:
|
setExpr = name: value:
|
||||||
|
|
@ -47,13 +47,13 @@ let
|
||||||
v =
|
v =
|
||||||
if isBool value then (if value then "" else "no") + name
|
if isBool value then (if value then "" else "no") + name
|
||||||
else
|
else
|
||||||
"${name}=${
|
"${name}=${
|
||||||
if isList value
|
if isList value
|
||||||
then concatStringsSep "," value
|
then concatStringsSep "," value
|
||||||
else toString value
|
else toString value
|
||||||
}";
|
}";
|
||||||
in
|
in
|
||||||
optionalString (value != null) ("set " + v);
|
optionalString (value != null) ("set " + v);
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
@ -74,7 +74,7 @@ in
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = vimSettingsType;
|
type = vimSettingsType;
|
||||||
default = {};
|
default = { };
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
{
|
{
|
||||||
expandtab = true;
|
expandtab = true;
|
||||||
|
|
@ -149,7 +149,8 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
in mkIf cfg.enable {
|
in
|
||||||
|
mkIf cfg.enable {
|
||||||
programs.vim.package = vim;
|
programs.vim.package = vim;
|
||||||
home.packages = [ cfg.package ];
|
home.packages = [ cfg.package ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ in
|
||||||
config.tf = mkMerge (singleton
|
config.tf = mkMerge (singleton
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../targets/common
|
../../targets/common.nix
|
||||||
];
|
];
|
||||||
deps = {
|
deps = {
|
||||||
select.allProviders = true;
|
select.allProviders = true;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ with lib;
|
||||||
options = {
|
options = {
|
||||||
nixpkgs.crossOverlays = mkOption {
|
nixpkgs.crossOverlays = mkOption {
|
||||||
type = types.listOf types.unspecified;
|
type = types.listOf types.unspecified;
|
||||||
default = [];
|
default = [ ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
|
|
@ -72,7 +72,7 @@ with lib;
|
||||||
nixos = {
|
nixos = {
|
||||||
extraModules = [
|
extraModules = [
|
||||||
"${toString sources.home-manager}/nixos"
|
"${toString sources.home-manager}/nixos"
|
||||||
] ++ singleton meta.modules.nixos;
|
] ++ lib.singleton meta.modules.nixos;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit (config.network) nodes;
|
inherit (config.network) nodes;
|
||||||
inherit sources meta;
|
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, ... }: {
|
{ sources, ... }: {
|
||||||
external = [
|
functor = {
|
||||||
(import (sources.arcexprs + "/modules")).nixos
|
enable = true;
|
||||||
(import (sources.katexprs + "/modules")).nixos
|
external = [
|
||||||
(import (sources.impermanence + "/nixos.nix"))
|
(import (sources.arcexprs + "/modules")).nixos
|
||||||
(import sources.anicca).modules.nixos
|
(import (sources.katexprs + "/modules")).nixos
|
||||||
(sources.tf-nix + "/modules/nixos/secrets.nix")
|
(import (sources.impermanence + "/nixos.nix"))
|
||||||
(sources.tf-nix + "/modules/nixos/secrets-users.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 = {
|
base16 = {
|
||||||
|
inherit (config.home-manager.users.kat.base16) schemes alias;
|
||||||
console = {
|
console = {
|
||||||
enable = true;
|
enable = true;
|
||||||
scheme = config.home-manager.users.kat.base16.alias.default;
|
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 = {
|
secrets = {
|
||||||
root = "/var/lib/kat/secrets";
|
root = "/var/lib/kat/secrets";
|
||||||
persistentRoot = "/var/lib/kat/secrets";
|
persistentRoot = "/var/lib/kat/secrets";
|
||||||
|
|
|
||||||
|
|
@ -1,37 +1,35 @@
|
||||||
rec {
|
{ lib, tree, ... }: with lib; let
|
||||||
common = ./armvcommon.nix;
|
profiles = tree.dirs // tree.files;
|
||||||
armv7-base = ./armv7.nix;
|
appendedProfiles = with profiles; {
|
||||||
armv6-base = ./armv6.nix;
|
aarch64 = {
|
||||||
aarch64-base = ./aarch64.nix;
|
deploy.profile.cross = {
|
||||||
|
enable = true;
|
||||||
|
aarch64 = true;
|
||||||
aarch64 = {
|
};
|
||||||
deploy.profile.cross = {
|
imports = [
|
||||||
enable = true;
|
aarch64
|
||||||
aarch64 = true;
|
];
|
||||||
};
|
};
|
||||||
imports = [
|
armv7l = {
|
||||||
aarch64-base
|
deploy.profile.cross = {
|
||||||
];
|
enable = true;
|
||||||
};
|
armv7l = true;
|
||||||
armv7l = {
|
};
|
||||||
deploy.profile.cross = {
|
imports = [
|
||||||
enable = true;
|
arm-common
|
||||||
armv7l = true;
|
armv7
|
||||||
|
];
|
||||||
};
|
};
|
||||||
imports = [
|
armv6l = {
|
||||||
common
|
deploy.profile.cross = {
|
||||||
armv7-base
|
enable = true;
|
||||||
];
|
armv6l = true;
|
||||||
};
|
};
|
||||||
armv6l = {
|
imports = [
|
||||||
deploy.profile.cross = {
|
arm-common
|
||||||
enable = true;
|
armv6
|
||||||
armv6l = true;
|
];
|
||||||
};
|
};
|
||||||
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 }:
|
{ lib, tree, ... }: with lib; let
|
||||||
let profiles = with profiles; lib.domainMerge
|
profiles = (filterAttrs (n: v: v ? "default") tree.dirs)
|
||||||
{
|
// tree.defaultDirs
|
||||||
folder = ""; # not used in this usage
|
// (mapAttrs (n: v: removeAttrs v [ "default" ]) (filterAttrs (n: v: v ? "default") tree.dirs))
|
||||||
folderPaths = [
|
// tree.files;
|
||||||
./.
|
appendedProfiles = with profiles; {
|
||||||
../../trusted/profiles/hardware
|
|
||||||
];
|
|
||||||
} // {
|
|
||||||
ms-7b86 = {
|
ms-7b86 = {
|
||||||
imports = [
|
imports = [
|
||||||
ms-7b86-base
|
ms-7b86
|
||||||
ryzen
|
ryzen
|
||||||
amdgpu
|
amdgpu
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
rm-310 = {
|
rm-310 = {
|
||||||
imports = [
|
imports = [
|
||||||
rm-310-base
|
rm-310
|
||||||
intel
|
intel
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
v330-14arr = {
|
v330-14arr = {
|
||||||
imports = [
|
imports = [
|
||||||
v330-14arr-base
|
v330-14arr
|
||||||
ryzen
|
ryzen
|
||||||
amdgpu
|
amdgpu
|
||||||
laptop
|
laptop
|
||||||
|
|
@ -31,10 +28,11 @@ let hardwareProfiles = { lib }:
|
||||||
};
|
};
|
||||||
eeepc-1015pem = {
|
eeepc-1015pem = {
|
||||||
imports = [
|
imports = [
|
||||||
eeepc-1015pem-base
|
eeepc-1015pem
|
||||||
intel
|
intel
|
||||||
laptop
|
laptop
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}; in profiles;
|
};
|
||||||
in { __functor = self: hardwareProfiles; isModule = false; }
|
in
|
||||||
|
profiles // appendedProfiles
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
{ config, ... }:
|
{ ... }: {
|
||||||
|
|
||||||
{
|
|
||||||
deploy.profile.hardware.laptop = true;
|
|
||||||
|
|
||||||
imports = [
|
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 {
|
{ lib, sources, tree, ... }: with lib; let
|
||||||
common = ./common.nix;
|
profiles = tree.dirs // tree.files;
|
||||||
ubuntu-base = ./ubuntu.nix;
|
appendedProfiles = with profiles; {
|
||||||
oracle-base = ./oracle.nix;
|
ubuntu = { config, ... }: {
|
||||||
|
deploy.profile.hardware.oracle = {
|
||||||
ubuntu = {
|
ubuntu = true;
|
||||||
deploy.profile.hardware.oracle = {
|
common = true;
|
||||||
common = true;
|
};
|
||||||
ubuntu = true;
|
imports = with import (sources.tf-nix + "/modules"); [
|
||||||
|
nixos.ubuntu-linux
|
||||||
|
common
|
||||||
|
];
|
||||||
};
|
};
|
||||||
imports = [
|
oracle = { config, ... }: {
|
||||||
common
|
deploy.profile.hardware.oracle = {
|
||||||
ubuntu-base
|
oracle = true;
|
||||||
];
|
common = true;
|
||||||
};
|
};
|
||||||
oracle = {
|
imports = with import (sources.tf-nix + "/modules"); [
|
||||||
deploy.profile.hardware.oracle = {
|
nixos.oracle-linux
|
||||||
common = true;
|
common
|
||||||
oracle = true;
|
];
|
||||||
};
|
};
|
||||||
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 = {
|
users.users.arc = {
|
||||||
uid = 1001;
|
uid = 1001;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ8Z6briIboxIdedPGObEWB6QEQkvxKvnMW/UVU9t/ac mew-pgp"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ8Z6briIboxIdedPGObEWB6QEQkvxKvnMW/UVU9t/ac mew-pgp"
|
||||||
];
|
];
|
||||||
shell = pkgs.zsh;
|
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 = {
|
users.users.hexchen = {
|
||||||
uid = 1002;
|
uid = 1002;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDNVUDKx9sukRkb6INny432+2HZBWx/qIEAOvngF1qcj hexchen@montasch"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDNVUDKx9sukRkb6INny432+2HZBWx/qIEAOvngF1qcj hexchen@montasch"
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDI3T1eFS77URHZ/HVWkMOqx7W1U54zJtn9C7QWsHOtyH72i/4EVj8SxYqLllElh1kuKUXSUipPeEzVsipFVvfH0wEuTDgFffiSQ3a8lfUgdEBuoySwceEoPgc5deapkOmiDIDeeWlrRe3nqspLRrSWU1DirMxoFPbwqJXRvpl6qJPxRg+2IolDcXlZ6yxB4Vv48vzRfVzZNUz7Pjmy2ebU8PbDoFWL/S3m7yOzQpv3L7KYBz7+rkjuF3AU2vy6CAfIySkVpspZZLtkTGCIJF228ev0e8NvhuN6ZnjzXxVTQOy32HCdPdbBbicu0uHfZ5O7JX9DjGd8kk1r2dnZwwy/ hexchen@yubi5"
|
"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"
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4CLJ+mFfq5XiBXROKewmN9WYmj+79bj/AoaR6Iud2pirulot3tkrrLe2cMjiNWFX8CGVqrsAELKUA8EyUTJfStlcTE0/QNESTRmdDaC+lZL41pWUO9KOiD6/0axAhHXrSJ0ScvbqtD0CtpnCKKxtuOflVPoUGZsH9cLKJNRKfEka0H0GgeKb5Tp618R/WNAQOwaCcXzg/nG4Bgv3gJW4Nm9IKy/MwRZqtILi8Mtd+2diTqpMwyNRmbenmRHCQ1vRw46joYkledVqrmSlfSMFgIHI1zRSBXb/JkG2IvIyB5TGbTkC4N2fqJNpH8wnCKuOvs46xmgdiRA26P48C2em3 hexchen@yubi5c"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.hexchen = {
|
home-manager.users.hexchen = {
|
||||||
programs.vim = {
|
programs.vim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set viminfo='20,<1000
|
set viminfo='20,<1000
|
||||||
set mouse=a
|
set mouse=a
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "hexchen";
|
userName = "hexchen";
|
||||||
userEmail = "hexchen@lilwit.ch";
|
userEmail = "hexchen@lilwit.ch";
|
||||||
signing = {
|
signing = {
|
||||||
key = "B1DF5EAD";
|
key = "B1DF5EAD";
|
||||||
};
|
};
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
pull.rebase = true;
|
pull.rebase = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.bat.enable = true;
|
programs.bat.enable = true;
|
||||||
programs.jq.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 }:
|
{ lib, tree, ... }: with lib; let
|
||||||
let
|
wrapImports = imports: mapAttrs
|
||||||
userImport = profile: { config, ... }: {
|
(name: paths: { config, ... }: {
|
||||||
config.home-manager.users.kat = {
|
config.home-manager.users.kat = {
|
||||||
imports = [
|
imports = if isAttrs paths then attrValues paths else singleton paths;
|
||||||
(./. + "/${profile}")
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
})
|
||||||
serviceImport = profile: { config, ... }: {
|
imports;
|
||||||
config.home-manager.users.kat = {
|
dirImports = wrapImports tree.dirs;
|
||||||
imports = [
|
serviceImports = wrapImports tree.dirs.services;
|
||||||
(./services + "/${profile}")
|
in
|
||||||
];
|
(removeAttrs dirImports (singleton "base")) // {
|
||||||
};
|
base = {
|
||||||
};
|
imports = [
|
||||||
profileNames = lib.folderList ./. [ "base" "services" ];
|
dirImports.base
|
||||||
serviceNames = lib.folderList ./services [ ];
|
tree.files.nixos
|
||||||
userProfiles = with userProfiles;
|
];
|
||||||
lib.genAttrs profileNames userImport // {
|
};
|
||||||
services = lib.genAttrs serviceNames serviceImport;
|
server = { };
|
||||||
base = { imports = [ ./nixos.nix (userImport "base") ]; };
|
guiFull = {
|
||||||
server = {};
|
imports = with dirImports; [
|
||||||
guiFull = { imports = [ gui sway dev media personal ]; };
|
gui
|
||||||
};
|
sway
|
||||||
in
|
dev
|
||||||
userProfiles;
|
media
|
||||||
in { __functor = self: katUser; isModule = false; }
|
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 = {
|
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 = {
|
programs.neovim = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
${source ./init.vim}
|
source ${./init.vim}
|
||||||
'';
|
'';
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
notmuch-vim
|
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.
|
If only one exists, the path for that one is returned.
|
||||||
Otherwise a module is generated which contains both import paths.
|
Otherwise a module is generated which contains both import paths.
|
||||||
*/
|
*/
|
||||||
xargNames = lib.unique (lib.folderList ./config [ "trusted modules" ] ++ lib.folderList ./config/trusted [ "pkgs" "tf" ]);
|
xarg = lib.recursiveMod { folder = ./config; inherit sources lib; };
|
||||||
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; }; };
|
|
||||||
/*
|
/*
|
||||||
We provide the runners with this file this way. We also provide our nix args here.
|
We provide the runners with this file this way. We also provide our nix args here.
|
||||||
This is also where pkgs are passed through to the meta config.
|
This is also where pkgs are passed through to the meta config.
|
||||||
|
|
|
||||||
|
|
@ -89,10 +89,10 @@
|
||||||
"homepage": null,
|
"homepage": null,
|
||||||
"owner": "kittywitch",
|
"owner": "kittywitch",
|
||||||
"repo": "nixexprs",
|
"repo": "nixexprs",
|
||||||
"rev": "da3150b0837cf75c0c0fe36369ce424b80ee18ce",
|
"rev": "05050726c147903a257c03bc454250cf0cb6b997",
|
||||||
"sha256": "0w43bih23d3iv95k4arm3xys679rr7rblr5a74isvzxz0m70w3kr",
|
"sha256": "0fk4fyxvc4kivd5g6nnxrrwll51innx1dlx7wq7mvaarlm9vj5h0",
|
||||||
"type": "tarball",
|
"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"
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||||
},
|
},
|
||||||
"niv": {
|
"niv": {
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit da3150b0837cf75c0c0fe36369ce424b80ee18ce
|
Subproject commit 05050726c147903a257c03bc454250cf0cb6b997
|
||||||
|
|
@ -68,9 +68,11 @@ with lib; pkgs.mkShell {
|
||||||
nf-actions
|
nf-actions
|
||||||
nf-actions-test
|
nf-actions-test
|
||||||
] ++ config.runners.lazy.nativeBuildInputs
|
] ++ 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
|
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 = ''
|
shellHook = ''
|
||||||
export HOME_HOSTNAME=$(hostname -s)
|
export HOME_HOSTNAME=$(hostname -s)
|
||||||
export HOME_UID=$(id -u)
|
export HOME_UID=$(id -u)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue