Skip to content

Commit

Permalink
treewide: snowfall-lib v3 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed May 23, 2024
1 parent 45a73f5 commit c560adf
Show file tree
Hide file tree
Showing 275 changed files with 1,641 additions and 3,231 deletions.
2,221 changes: 0 additions & 2,221 deletions CHANGELOG.md

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</h3>

<p align="center">
<a href="https://github.com/khaneliman/khanelinix/stargazers"><img src="https://img.shields.io/github/stars/khaneliman/khanelinix?colorA=363a4f&colorB=b7bdf8&style=for-the-badge"></a>
<a href="https://github.com/khaneliman/khanelinix/commits"><img src="https://img.shields.io/github/last-commit/khaneliman/khanelinix?colorA=363a4f&colorB=f5a97f&style=for-the-badge"></a>
<a href="https://github.com/khaneliman/khanelinix/stargazers"><img src="https://img.shields.io/github/stars/khaneliman/${namespace}?colorA=363a4f&colorB=b7bdf8&style=for-the-badge"></a>
<a href="https://github.com/khaneliman/khanelinix/commits"><img src="https://img.shields.io/github/last-commit/khaneliman/${namespace}?colorA=363a4f&colorB=f5a97f&style=for-the-badge"></a>
<a href="https://nixos.wiki/wiki/Flakes" target="_blank">
<img alt="Nix Flakes Ready" src="https://img.shields.io/static/v1?logo=nixos&logoColor=d8dee9&label=Nix%20Flakes&labelColor=5e81ac&message=Ready&color=d8dee9&style=for-the-badge">
</a>
Expand All @@ -16,7 +16,7 @@
</a>
</p>

Welcome to KhaneliNix, a personal Nix configuration repository. This repository
Welcome to khanelinix, a personal Nix configuration repository. This repository
contains my NixOS and Nixpkgs configurations, along with various tools and
customizations to enhance the Nix experience.

Expand Down
14 changes: 7 additions & 7 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@

# Snowfall Lib
snowfall-lib = {
url = "github:snowfallorg/lib/dev";
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};

Expand Down Expand Up @@ -153,11 +153,18 @@
lib = snowfall-lib.mkLib {
inherit inputs;
src = ./.;

snowfall = {
meta = {
name = "khanelinix";
title = "KhaneliNix";
};

namespace = "khanelinix";
};
};
in
lib.mkFlake {
package-namespace = "khanelinix";

channels-config = {
# allowBroken = true;
allowUnfree = true;
Expand Down
11 changes: 8 additions & 3 deletions homes/aarch64-darwin/khaneliman@khanelimac/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{ config, lib, ... }:
{
config,
lib,
namespace,
...
}:
let
inherit (lib) mkForce;
inherit (lib.internal) enabled disabled;
inherit (lib.${namespace}) enabled disabled;
in
{
khanelinix = {
Expand Down Expand Up @@ -57,7 +62,7 @@ in
services = {
sops = {
enable = true;
defaultSopsFile = ../../../secrets/khanelimac/khaneliman/default.yaml;
defaultSopsFile = lib.snowfall.fs.get-file "secrets/khanelimac/khaneliman/default.yaml";
sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
};
};
Expand Down
27 changes: 14 additions & 13 deletions homes/x86_64-linux/khaneliman@khanelinix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
config,
lib,
pkgs,
namespace,
...
}:
let
inherit (lib) getExe;
inherit (lib.internal) enabled;
inherit (lib.${namespace}) enabled;
in
{
khanelinix = {
Expand Down Expand Up @@ -44,7 +45,7 @@ in
enable = true;
appendConfig = # bash
''
exec-once = hyprctl setcursor ${config.khanelinix.theme.gtk.cursor.name} 32
exec-once = hyprctl setcursor ${config.${namespace}.theme.gtk.cursor.name} 32
'';

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

wallpapers = [
"${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"
"${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"
];
};

Expand All @@ -128,7 +129,7 @@ in

sops = {
enable = true;
defaultSopsFile = ../../../secrets/khanelinix/khaneliman/default.yaml;
defaultSopsFile = lib.snowfall.fs.get-file "secrets/khanelinix/khaneliman/default.yaml";
sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
};
};
Expand Down
9 changes: 7 additions & 2 deletions homes/x86_64-linux/khaneliman@nixos/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{ config, lib, ... }:
{
config,
lib,
namespace,
...
}:
let
inherit (lib.internal) enabled;
inherit (lib.${namespace}) enabled;
in
{
khanelinix = {
Expand Down
11 changes: 8 additions & 3 deletions homes/x86_64-linux/nixos@CORE-PW00LM92/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{ config, lib, ... }:
{
config,
lib,
namespace,
...
}:
let
inherit (lib) mkForce;
inherit (lib.internal) enabled disabled;
inherit (lib.${namespace}) enabled disabled;
in
{
khanelinix = {
Expand Down Expand Up @@ -48,7 +53,7 @@ in
services = {
sops = {
enable = true;
defaultSopsFile = ../../../secrets/CORE/nixos/default.yaml;
defaultSopsFile = lib.snowfall.fs.get-file "secrets/CORE/nixos/default.yaml";
sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
};
};
Expand Down
24 changes: 20 additions & 4 deletions lib/deploy/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
{ lib, inputs }:
{
lib,
inputs,
namespace,
}:
let
inherit (inputs) deploy-rs;
in
rec {
## Create deployment configuration for use with deploy-rs.
##
## ```nix
## mkDeploy {
## inherit self;
## overrides = {
## my-host.system.sudo = "doas -u";
## };
## }
## ```
##
#@ { self: Flake, overrides: Attrs ? {} } -> Attrs
mkDeploy =
{
self,
Expand All @@ -15,7 +31,7 @@ rec {
result: name:
let
host = hosts.${name};
user = host.config.khanelinix.user.name or null;
user = host.config.${namespace}.user.name or null;
inherit (host.pkgs) system;
in
result
Expand All @@ -31,8 +47,8 @@ rec {
// lib.optionalAttrs (user != null) {
user = "root";
sshUser = user;
}
// lib.optionalAttrs (host.config.khanelinix.security.doas.enable or false) { sudo = "doas -u"; };
};
# // lib.optionalAttrs (host.config.${namespace}.security.doas.enable or false) { sudo = "doas -u"; };
};
};
}
Expand Down
13 changes: 9 additions & 4 deletions modules/darwin/archetypes/personal/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
{ config, lib, ... }:
{
config,
lib,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.internal) mkBoolOpt enabled;
inherit (lib.${namespace}) mkBoolOpt enabled;

cfg = config.khanelinix.archetypes.personal;
cfg = config.${namespace}.archetypes.personal;
in
{
options.khanelinix.archetypes.personal = {
options.${namespace}.archetypes.personal = {
enable = mkBoolOpt false "Whether or not to enable the personal archetype.";
};

Expand Down
13 changes: 9 additions & 4 deletions modules/darwin/archetypes/vm/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
{ config, lib, ... }:
{
config,
lib,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.internal) mkBoolOpt enabled;
inherit (lib.${namespace}) mkBoolOpt enabled;

cfg = config.khanelinix.archetypes.vm;
cfg = config.${namespace}.archetypes.vm;
in
{
options.khanelinix.archetypes.vm = {
options.${namespace}.archetypes.vm = {
enable = mkBoolOpt false "Whether or not to enable the vm archetype.";
};

Expand Down
13 changes: 9 additions & 4 deletions modules/darwin/archetypes/workstation/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
{ config, lib, ... }:
{
config,
lib,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.internal) mkBoolOpt enabled;
inherit (lib.${namespace}) mkBoolOpt enabled;

cfg = config.khanelinix.archetypes.workstation;
cfg = config.${namespace}.archetypes.workstation;
in
{
options.khanelinix.archetypes.workstation = {
options.${namespace}.archetypes.workstation = {
enable = mkBoolOpt false "Whether or not to enable the workstation archetype.";
};

Expand Down
13 changes: 9 additions & 4 deletions modules/darwin/desktop/addons/barrier/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
{ config, lib, ... }:
{
config,
lib,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.internal) mkBoolOpt;
inherit (lib.${namespace}) mkBoolOpt;

cfg = config.khanelinix.desktop.addons.barrier;
cfg = config.${namespace}.desktop.addons.barrier;
in
{
options.khanelinix.desktop.addons.barrier = {
options.${namespace}.desktop.addons.barrier = {
enable = mkBoolOpt false "Whether or not to enable barrier.";
};

Expand Down
11 changes: 6 additions & 5 deletions modules/darwin/desktop/addons/jankyborders/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
config,
lib,
pkgs,
namespace,
...
}:
let
Expand All @@ -11,26 +12,26 @@ let
mkOption
literalExpression
;
inherit (lib.internal) mkBoolOpt;
inherit (lib.${namespace}) mkBoolOpt;

cfg = config.khanelinix.desktop.addons.jankyborders;
cfg = config.${namespace}.desktop.addons.jankyborders;
in
{
options.khanelinix.desktop.addons.jankyborders = {
options.${namespace}.desktop.addons.jankyborders = {
enable = mkBoolOpt false "Whether to enable jankyborders in the desktop environment.";
package = mkOption {
type = lib.types.package;
default = pkgs.jankyborders;
defaultText = literalExpression "pkgs.jankyborders";
description = "The jankyborders package to use.";
example = literalExpression "pkgs.khanelinix.jankyborders";
example = literalExpression "pkgs.${namespace}.jankyborders";
};
};

config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ jankyborders ];

khanelinix.home.configFile = {
${namespace}.home.configFile = {
"borders/bordersrc".source =
pkgs.writeShellScript "bordersrc" # bash
''
Expand Down
Loading

0 comments on commit c560adf

Please sign in to comment.