Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Jan 6, 2025
1 parent 7d59c14 commit 182de95
Show file tree
Hide file tree
Showing 321 changed files with 1,330 additions and 1,288 deletions.
6 changes: 3 additions & 3 deletions configurations/darwin/khanelimac/default.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
lib,
config,
namespace,

...
}:
let
inherit (lib.${namespace}) enabled;
inherit (lib.khanelinix) enabled;

cfg = config.${namespace}.user;
cfg = config.khanelinix.user;
in
{
khanelinix = {
Expand Down
4 changes: 2 additions & 2 deletions configurations/home/bruddy@bruddynix/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
lib,
namespace,

...
}:
let
inherit (lib.${namespace}) enabled disabled;
inherit (lib.khanelinix) enabled disabled;
in
{
khanelinix = {
Expand Down
8 changes: 4 additions & 4 deletions configurations/home/khaneliman@khanelimac/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
config,
lib,
namespace,

...
}:
let
inherit (lib) mkForce;
inherit (lib.${namespace}) enabled disabled;
inherit (lib.khanelinix) enabled disabled;
in
{
khanelinix = {
Expand All @@ -23,8 +23,8 @@ in
extraAccounts =
let
# Not super secret, just doesn't need to be scraped so easily.
outlook = lib.${namespace}.decode "a2hhbmVsaW1hbjEyQG91dGxvb2suY29t";
personal = lib.${namespace}.decode "YXVzdGluLm0uaG9yc3RtYW5AZ21haWwuY29t";
outlook = lib.khanelinix.decode "a2hhbmVsaW1hbjEyQG91dGxvb2suY29t";
personal = lib.khanelinix.decode "YXVzdGluLm0uaG9yc3RtYW5AZ21haWwuY29t";

in
{
Expand Down
32 changes: 16 additions & 16 deletions configurations/home/khaneliman@khanelinix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
config,
lib,
pkgs,
namespace,

...
}:
let
inherit (lib) getExe;
inherit (lib.${namespace}) enabled;
inherit (lib.khanelinix) enabled;
in
{
khanelinix = {
Expand All @@ -25,8 +25,8 @@ in
extraAccounts =
let
# Not super secret, just doesn't need to be scraped so easily.
outlook = lib.${namespace}.decode "a2hhbmVsaW1hbjEyQG91dGxvb2suY29t";
personal = lib.${namespace}.decode "YXVzdGluLm0uaG9yc3RtYW5AZ21haWwuY29t";
outlook = lib.khanelinix.decode "a2hhbmVsaW1hbjEyQG91dGxvb2suY29t";
personal = lib.khanelinix.decode "YXVzdGluLm0uaG9yc3RtYW5AZ21haWwuY29t";

in
{
Expand Down Expand Up @@ -74,8 +74,8 @@ in

appendConfig = # bash
''
exec-once = hyprctl setcursor ${config.${namespace}.theme.gtk.cursor.name} ${
builtins.toString config.${namespace}.theme.gtk.cursor.size
exec-once = hyprctl setcursor ${config.khanelinix.theme.gtk.cursor.name} ${
builtins.toString config.khanelinix.theme.gtk.cursor.size
}
'';

Expand Down Expand Up @@ -190,23 +190,23 @@ in
monitors = [
{
name = "DP-3";
wallpaper = "${pkgs.${namespace}.wallpapers}/share/wallpapers/cat_pacman.png";
wallpaper = "${pkgs.khanelinix.wallpapers}/share/wallpapers/cat_pacman.png";
}
{
name = "DP-1";
wallpaper = "${pkgs.${namespace}.wallpapers}/share/wallpapers/cat-sound.png";
wallpaper = "${pkgs.khanelinix.wallpapers}/share/wallpapers/cat-sound.png";
}
];

wallpapers = [
"${pkgs.${namespace}.wallpapers}/share/wallpapers/buttons.png"
"${pkgs.${namespace}.wallpapers}/share/wallpapers/cat_pacman.png"
"${pkgs.${namespace}.wallpapers}/share/wallpapers/cat-sound.png"
"${pkgs.${namespace}.wallpapers}/share/wallpapers/flatppuccin_macchiato.png"
"${pkgs.${namespace}.wallpapers}/share/wallpapers/hashtags-black.png"
"${pkgs.${namespace}.wallpapers}/share/wallpapers/hashtags-new.png"
"${pkgs.${namespace}.wallpapers}/share/wallpapers/hearts.png"
"${pkgs.${namespace}.wallpapers}/share/wallpapers/tetris.png"
"${pkgs.khanelinix.wallpapers}/share/wallpapers/buttons.png"
"${pkgs.khanelinix.wallpapers}/share/wallpapers/cat_pacman.png"
"${pkgs.khanelinix.wallpapers}/share/wallpapers/cat-sound.png"
"${pkgs.khanelinix.wallpapers}/share/wallpapers/flatppuccin_macchiato.png"
"${pkgs.khanelinix.wallpapers}/share/wallpapers/hashtags-black.png"
"${pkgs.khanelinix.wallpapers}/share/wallpapers/hashtags-new.png"
"${pkgs.khanelinix.wallpapers}/share/wallpapers/hearts.png"
"${pkgs.khanelinix.wallpapers}/share/wallpapers/tetris.png"
];
};

Expand Down
4 changes: 2 additions & 2 deletions configurations/home/khaneliman@nixos/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
config,
lib,
namespace,

...
}:
let
inherit (lib.${namespace}) enabled;
inherit (lib.khanelinix) enabled;
in
{
khanelinix = {
Expand Down
6 changes: 3 additions & 3 deletions configurations/home/nixos@CORE-PW00LM92/default.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
config,
lib,
namespace,

osConfig,
...
}:
let
inherit (lib) mkForce;
inherit (lib.${namespace}) enabled disabled;
inherit (lib.khanelinix) enabled disabled;
in
{
khanelinix = {
Expand Down Expand Up @@ -71,7 +71,7 @@ in
theme.catppuccin = enabled;
};

sops.secrets = lib.mkIf osConfig.${namespace}.security.sops.enable {
sops.secrets = lib.mkIf osConfig.khanelinix.security.sops.enable {
kubernetes = {
path = "${config.home.homeDirectory}/.kube/config";
};
Expand Down
4 changes: 2 additions & 2 deletions configurations/nixos/CORE-PW00LM92/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ lib, namespace, ... }:
{ lib, ... }:
let
inherit (lib) mkForce;
inherit (lib.${namespace}) enabled disabled;
inherit (lib.khanelinix) enabled disabled;
in
{
imports = [ ./hardware.nix ];
Expand Down
6 changes: 3 additions & 3 deletions configurations/nixos/bruddynix/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
config,
lib,
namespace,

...
}:
let
inherit (lib.${namespace}) enabled;
inherit (lib.khanelinix) enabled;
in
{
imports = [
Expand Down Expand Up @@ -80,7 +80,7 @@ in
# TODO: make part of ssh config proper
extraConfig = ''
Host server
User ${config.${namespace}.user.name}
User ${config.khanelinix.user.name}
Hostname austinserver.local
'';
};
Expand Down
4 changes: 2 additions & 2 deletions configurations/nixos/khanelilab/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
config,
lib,
namespace,

...
}:
let
inherit (lib.${namespace}) enabled;
inherit (lib.khanelinix) enabled;
in
{
imports = [
Expand Down
7 changes: 3 additions & 4 deletions configurations/nixos/khanelinix/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
config,
lib,
namespace,
...
}:
let
inherit (lib.${namespace}) enabled;
inherit (lib.khanelinix) enabled;
in
{
imports = [
Expand Down Expand Up @@ -138,7 +137,7 @@ in
# TODO: make part of ssh config proper
extraConfig = ''
Host server
User ${config.${namespace}.user.name}
User ${config.khanelinix.user.name}
Hostname austinserver.local
'';
};
Expand All @@ -151,7 +150,7 @@ in
browseable = true;
comment = "Home Public folder";
only-owner-editable = false;
path = "/home/${config.${namespace}.user.name}/Public/";
path = "/home/${config.khanelinix.user.name}/Public/";
public = true;
read-only = false;
};
Expand Down
4 changes: 2 additions & 2 deletions configurations/nixos/nixos/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ lib, namespace, ... }:
{ lib, ... }:
let
inherit (lib.${namespace}) enabled;
inherit (lib.khanelinix) enabled;
in
{
imports = [ ./hardware.nix ];
Expand Down
4 changes: 2 additions & 2 deletions configurations/systems/aarch64-linux/nixos/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ lib, namespace, ... }:
{ lib, ... }:
let
inherit (lib.${namespace}) enabled;
inherit (lib.khanelinix) enabled;
in
{
imports = [ ./hardware.nix ];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
pkgs,
lib,
namespace,

...
}:
let
inherit (lib) mkForce;
inherit (lib.${namespace}) enabled;
inherit (lib.khanelinix) enabled;
in
{
# `install-iso` adds wireless support that
Expand Down
4 changes: 2 additions & 2 deletions configurations/systems/x86_64-install-iso/minimal/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
pkgs,
lib,
namespace,

...
}:
let
inherit (lib) mkForce;
inherit (lib.${namespace}) enabled;
inherit (lib.khanelinix) enabled;
in
{
# `install-iso` adds wireless support that
Expand Down
4 changes: 2 additions & 2 deletions configurations/systems/x86_64-iso/isolated/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
lib,
pkgs,
namespace,

...
}:
let
inherit (lib) mkForce getExe getExe';
inherit (lib.${namespace}) enabled;
inherit (lib.khanelinix) enabled;

gpgConf = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/drduh/config/master/gpg.conf";
Expand Down
4 changes: 2 additions & 2 deletions configurations/systems/x86_64-iso/rescue/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
pkgs,
lib,
namespace,

...
}:
let
inherit (lib.${namespace}) enabled;
inherit (lib.khanelinix) enabled;
in
{
environment.systemPackages = with pkgs; [
Expand Down
44 changes: 37 additions & 7 deletions lib/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,37 @@
_: {
override-meta =
meta: package:
package.overrideAttrs (_: {
inherit meta;
});
}
{
lib,
flake,
}:
lib.makeExtensible (
self:
let
call = lib.callPackageWith {
inherit call self lib;
};
in
{
audio = call ./audio/default.nix { };
base64 = call ./base64/default.nix { };
deploy = call ./deploy/default.nix {
inherit (flake) inputs;
};
file = call ./file/default.nix { };
module = call ./module/default.nix { };
packages = call ./packages/default.nix { };
network = call ./network/default.nix {
inherit (flake) inputs;
};
theme = call ./theme/default.nix { };

inherit (self.module)
mkOpt
mkOpt'
mkBoolOpt
mkBoolOpt'
enabled
disabled
capitalize
boolToNum
;
}
)
6 changes: 3 additions & 3 deletions lib/deploy/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
lib,
inputs,
namespace,

}:
let
inherit (inputs) deploy-rs;
Expand Down Expand Up @@ -31,7 +31,7 @@ rec {
result: name:
let
host = hosts.${name};
user = host.config.${namespace}.user.name or null;
user = host.config.khanelinix.user.name or null;
inherit (host.pkgs) system;
in
result
Expand All @@ -48,7 +48,7 @@ rec {
user = "root";
sshUser = user;
};
# // lib.optionalAttrs (host.config.${namespace}.security.doas.enable or false) { sudo = "doas -u"; };
# // lib.optionalAttrs (host.config.khanelinix.security.doas.enable or false) { sudo = "doas -u"; };
};
};
}
Expand Down
Loading

0 comments on commit 182de95

Please sign in to comment.