Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions flake.lock

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

34 changes: 4 additions & 30 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -194,37 +194,11 @@

nixpkgs.follows = "unstable";

den.url = "github:vic/den";
import-tree.url = "github:vic/import-tree";

};
outputs =
inputs@{
self,
flake-parts,
...
}:
flake-parts.lib.mkFlake { inherit inputs; } (
top@{
config,
withSystem,
moduleWithSystem,
...
}:
{
imports = [
# Optional: use external flake logic, e.g.
# inputs.foo.flakeModules.default
./flake
inputs.nix-topology.flakeModule
];
systems = [
# systems for which you want to build the `perSystem` attributes
"aarch64-darwin"
"x86_64-linux"
"aarch64-linux"
# ...
];

}
);
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./flake);
nixConfig = {
extra-substituters = [
"https://nixos-raspberrypi.cachix.org"
Expand Down
4 changes: 4 additions & 0 deletions flake/_dev/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{ inputs, ... }:
{

}
File renamed without changes.
File renamed without changes.
34 changes: 34 additions & 0 deletions flake/aspects/auscyber.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{ den, ... }:
let
# Enable <angle-bracket> syntax for den aspect references in this file.
__findFile = den.lib.__findFile;
in
{
den.aspects.auscyber = {
# Base home-manager configuration shared across all hosts where auscyber
# lives. Per-host additions are delivered by each host's provides.auscyber
# (see e.g. flake/aspects/auspc.nix).
homeManager =
{ pkgs, ... }:
{
home = {
username = "auscyber";
homeDirectory = "/home/auscyber";
};
programs.home-manager.enable = true;
};

# Feature aspects included for all auscyber homes (Linux hosts).
includes = [
<shell>
<editors>
<browsers>
<terminal>
<gpg>
<keybinds>
<media>
<languages>
<wm-linux>
];
};
}
15 changes: 15 additions & 0 deletions flake/aspects/auspc.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{ ... }:
{
den.aspects.auspc = {
# NixOS configuration for the auspc host.
nixos = { ... }: {
imports = [ ../../systems/x86_64-linux/auspc ];
};

# Per-host home-manager additions for auscyber on auspc, delivered via
# the mutual-provider battery (host.provides.user).
provides.auscyber = { ... }: {
homeManager.imports = [ (../../homes/x86_64-linux + "/auscyber@auspc") ];
};
};
}
18 changes: 18 additions & 0 deletions flake/aspects/bootlogo.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{ den, ... }:
{
# ── Boot logo aspect ──────────────────────────────────────────────────────────
# NixOS: Plymouth boot splash screen.
# Include in a host aspect to enable a graphical boot screen.
den.aspects.bootlogo = {
nixos =
{ config, lib, ... }:
{
options.auscybernix.bootlogo.enable =
lib.mkEnableOption "AusCyberNix plymouth boot logo";

config = lib.mkIf config.auscybernix.bootlogo.enable {
boot.plymouth.enable = true;
};
};
};
}
143 changes: 143 additions & 0 deletions flake/aspects/browsers.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
{ den, ... }:
{
# ── Browsers aspect ───────────────────────────────────────────────────────────
# Home-manager: Zen browser (privacy-focused Firefox fork), Helium browser.
# Include in a user aspect; enable individual browsers via option flags.
den.aspects.browsers = {
homeManager =
{ config, lib, pkgs, ... }:
let
cfgZen = config.auscybernix.browsers.zen-browser;
cfgHelium = config.auscybernix.browsers.helium;
stdenv = pkgs.stdenv;
policies = {
DisableAppUpdate = true;
DisableTelemetry = true;
};
in
{
options.auscybernix.browsers.zen-browser = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable Zen Browser.";
};
profileName = lib.mkOption {
type = lib.types.str;
default = "ivy (Default)";
description = "Name of the default Zen Browser profile.";
};
};
options.auscybernix.browsers.helium.enable =
lib.mkEnableOption "Helium browser";

config = lib.mkMerge [
# ── Zen browser ──────────────────────────────────────────────────
(lib.mkIf cfgZen.enable {
stylix.targets.zen-browser.profileNames = [ cfgZen.profileName ];
programs.zen-browser = {
enable = true;
nativeMessagingHosts = [ pkgs._1password-gui-beta ];
darwinDefaultsId = "app.zen-browser.zen";
package = lib.mkForce (
if stdenv.isDarwin then
null
else
pkgs.wrapFirefox
(pkgs.zen-browser.override { inherit policies; })
{
extraPrefs = config.programs.zen-browser.extraPrefs;
extraPrefsFiles = config.programs.zen-browser.extraPrefsFiles;
nativeMessagingHosts = config.programs.zen-browser.nativeMessagingHosts;
}
);
inherit policies;
profiles."${cfgZen.profileName}" = {
search = {
force = true;
engines = {
kagi = {
name = "Kagi Search";
urls = [ { template = "https://kagi.com/search"; params = [ { name = "q"; value = "{searchTerms}"; } ]; } ];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/kagi-search.svg";
definedAliases = [ "@kagi" ];
};
nix-packages = {
name = "Nix Packages";
urls = [ { template = "https://search.nixos.org/packages"; params = [ { name = "type"; value = "packages"; } { name = "query"; value = "{searchTerms}"; } ]; } ];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
unduck = {
name = "UnDuck";
urls = [ { template = "https://unduck.link"; params = [ { name = "q"; value = "{searchTerms}"; } ]; } ];
};
scholar = {
name = "Google Scholar";
urls = [ { template = "https://scholar.google.com/scholar"; params = [ { name = "q"; value = "{searchTerms}"; } ]; } ];
definedAliases = [ "@sch" ];
};
"Home-Manager-Options" = {
urls = [ { template = "https://home-manager-options.extranix.com"; params = [ { name = "query"; value = "{searchTerms}"; } { name = "release"; value = "master"; } ]; } ];
definedAliases = [ "@hm" ];
};
};
default = "kagi";
privateDefault = "kagi";
};
isDefault = true;
settings = {
"extensions.autoDisableScopes" = 0;
"zen.welcome-screen.seen" = true;
};
containers = {
Queer = { id = 3; color = "pink"; };
Uni = { color = "green"; icon = "fruit"; id = 2; };
Shopping = { color = "blue"; icon = "cart"; id = 1; };
};
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
auto-tab-discard
libkey-nomad
onepassword-password-manager
zotero-connector
kagi-search
ublock-origin
];
};
};
home.activation = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
zen-browser =
let
profiles-ini =
if stdenv.hostPlatform.isLinux then
"${config.xdg.configHome}/zen/profiles.ini"
else
"${config.home.homeDirectory}/Library/\"Application Support\"/zen/profiles.ini";
in
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
rm ${profiles-ini}.backup
mv ${profiles-ini} ${profiles-ini}.generate
cat ${profiles-ini}.generate > ${profiles-ini}
echo ZenAvatarPath=chrome://browser/content/zen-avatars/avatar-01.svg >> ${profiles-ini}
'';
};
})

# ── Helium ────────────────────────────────────────────────────────
(lib.mkIf cfgHelium.enable {
home.packages = with pkgs; [ helium ];
programs.helium = {
enable = true;
extensions = [
{ id = "cdglnehniifkbagbbombnjghhcihifij"; }
{ id = "aeblfdkhhhdcdjpifhhbdiojplfjncoa"; } # 1Password
{ id = "ekhagklcjbdpajgpjgmbionohlpdbjgc"; } # Zotero
{ id = "lkoeejijapdihgbegpljiehpnlkadljb"; } # libKey nomad
{ id = "hghakoefmnkhamdhenpbogkeopjlkpoa"; } # Lean library
];
};
})
];
};
};
}
Loading