diff --git a/flake.nix b/flake.nix
index dc82b5f..5c9a851 100644
--- a/flake.nix
+++ b/flake.nix
@@ -89,7 +89,7 @@
forSystems = nixpkgs.lib.genAttrs systems;
pkgsFor = system: (import nixpkgs {inherit system;}).extend overlays.default;
genPkgs = func: (forSystems (system: func (pkgsFor system)));
- pkg = callee: overrides: genPkgs (pkgs: pkgs.callPackage callee overrides);
+ # pkg = callee: overrides: genPkgs (pkgs: pkgs.callPackage callee overrides);
unstable = {
forSystems = nixpkgs-unstable.lib.genAttrs systems;
diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix
index 2c0102b..6452b8c 100644
--- a/modules/home-manager/default.nix
+++ b/modules/home-manager/default.nix
@@ -39,7 +39,7 @@
emacs = {pkgs, ...}: {
programs.emacs = {
- enable = true;
+ enable = false;
/*
extraConfig = ''
'';
@@ -84,6 +84,7 @@
bat
homeManagerModules.helix
git
+ jujutsu
zellij
htop
@@ -112,7 +113,7 @@
packages = with pkgs; [
# tools I use when editing nix code
- kanidm
+ # kanidm
nil
alejandra
gnupg
@@ -132,7 +133,7 @@
# https://github.com/lotabout/skim/issues/494
enable = false;
enableFishIntegration = true;
- defaultOptions = ["--no-clear-start" "--color=16"];
+ defaultOptions = ["--no-clear-start" "--color=16" "--height=20"];
};
programs.atuin = {
@@ -362,6 +363,18 @@
};
};
+ jujutsu = {...}: {
+ programs.jujutsu = {
+ enable = true;
+ settings = {
+ user = {
+ email = "daniel@lyte.dev";
+ name = "Daniel Flanagan";
+ };
+ };
+ };
+ };
+
git = {lib, ...}: let
email = lib.mkDefault "daniel@lyte.dev";
in {
diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix
index c0f1311..a3bc043 100644
--- a/modules/nixos/default.nix
+++ b/modules/nixos/default.nix
@@ -107,8 +107,6 @@
environment = {
variables = {
VISUAL = "hx";
- PAGER = "less";
- MANPAGER = "less";
};
systemPackages = with pkgs; [
@@ -197,22 +195,9 @@
};
};
- less-pager = {pkgs, ...}: {
- environment = {
- systemPackages = [
- pkgs.less
- ];
- variables = {
- PAGER = "less";
- MANPAGER = "less";
- };
- };
- };
-
helix-text-editor = {pkgs, ...}: {
environment = {
systemPackages = [
- pkgs.less
helix.packages.${pkgs.system}.helix
];
variables = {
@@ -252,30 +237,36 @@
my-favorite-default-system-apps = {pkgs, ...}: {
imports = with nixosModules; [
- less-pager
helix-text-editor
zellij-multiplexer
fish-shell
];
- environment.systemPackages = with pkgs; [
- curl
- dua
- eza # TODO: needs shell aliases
- fd
- file
- iputils
- nettools
- /*
- nodePackages.bash-language-server # just pull in as needed?
- shellcheck
- shfmt
- */
- killall
- ripgrep
- rsync
- sd
- ];
+ environment = {
+ variables = {
+ PAGER = "bat --style=plain";
+ MANPAGER = "bat --style=plain";
+ };
+ systemPackages = with pkgs; [
+ curl
+ dua
+ bat
+ eza
+ fd
+ file
+ iputils
+ nettools
+ /*
+ nodePackages.bash-language-server # just pull in as needed?
+ shellcheck
+ shfmt
+ */
+ killall
+ ripgrep
+ rsync
+ sd
+ ];
+ };
programs = {
traceroute.enable = true;
@@ -462,7 +453,11 @@
};
};
- development-tools = {pkgs, ...}: {
+ development-tools = {
+ pkgs,
+ lib,
+ ...
+ }: {
imports = with nixosModules; [
postgres
podman
@@ -543,7 +538,7 @@
};
programs.jujutsu = {
- enable = false; # disabling for now due to CVE
+ enable = lib.mkDefault true;
};
programs.k9s = {
diff --git a/nixos/beefcake.nix b/nixos/beefcake.nix
index 3fa383c..ca178e5 100644
--- a/nixos/beefcake.nix
+++ b/nixos/beefcake.nix
@@ -816,9 +816,113 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00
({...}: let
theme = pkgs.fetchzip {
url = "https://github.com/catppuccin/gitea/releases/download/v1.0.1/catppuccin-gitea.tar.gz";
- sha256 = "sha256-HqVLW58lKPn81p3gTSjzkACHSBbmqPqeobAlJMubb8Y=";
- stripRoot = false;
+ sha256 = "sha256-et5luA3SI7iOcEIQ3CVIu0+eiLs8C/8mOitYlWQa/uI=";
};
+ logos = {
+ png = pkgs.fetchurl {
+ url = "https://lyte.dev/icon.png";
+ sha256 = "sha256-o/iZDohzXBGbpJ2PR1z23IF4FZignTAK88QwrfgTwlk=";
+ };
+ svg = pkgs.fetchurl {
+ url = "https://lyte.dev/img/logo.svg";
+ sha256 = "sha256-G9leVXNanoaCizXJaXn++JzaVcYOgRc3dJKhTQsMhVs=";
+ };
+ svg-with-background = pkgs.fetchurl {
+ url = "https://lyte.dev/img/logo-with-background.svg";
+ sha256 = "sha256-CdMTRXoQ3AI76aHW/sTqvZo1q/0XQdnQs9V1vGmiffY=";
+ };
+ };
+ forgejoCustomCss =
+ pkgs.writeText "iosevkalyte.css"
+ ''
+ @font-face {
+ font-family: ldiosevka;
+ font-style: normal;
+ font-weight: 300;
+ src: local("Iosevka"), url("//lyte.dev/font/iosevkalytewebmin/iosevkalyteweb-regular.subset.woff2");
+ font-display: swap
+ }
+
+ @font-face {
+ font-family: ldiosevka;
+ font-style: italic;
+ font-weight: 300;
+ src: local("Iosevka"), url("//lyte.dev/font/iosevkalytewebmin/iosevkalyteweb-italic.subset.woff2");
+ font-display: swap
+ }
+
+ @font-face {
+ font-family: ldiosevka;
+ font-style: italic;
+ font-weight: 500;
+ src: local("Iosevka"), url("//lyte.dev/font/iosevkalytewebmin/iosevkalyteweb-bolditalic.woff2");
+ font-display: swap
+ }
+ :root {
+ --fonts-monospace: ldiosevka, ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, var(--fonts-emoji);
+ }
+ '';
+ forgejoCustomHeaderTmpl =
+ pkgs.writeText "header.tmpl"
+ ''
+
+
+ '';
+ forgejoCustomHomeTmpl =
+ pkgs.writeText "home.tmpl"
+ ''
+ {{template "base/head" .}}
+
+
+
+
+
+
+
{{ctx.Locale.Tr "startpage.app_desc"}}
+
+
+
+
+
+
+
+ {{ctx.Locale.Tr "startpage.install_desc" "https://forgejo.org/download/#installation-from-binary" "https://forgejo.org/download/#container-image" "https://forgejo.org/download"}}
+
+
+
+
+
+ {{ctx.Locale.Tr "startpage.platform_desc"}}
+
+
+
+
+
+
+
+ {{ctx.Locale.Tr "startpage.lightweight_desc"}}
+
+
+
+
+
+ {{ctx.Locale.Tr "startpage.license_desc" "https://forgejo.org/download" "https://codeberg.org/forgejo/forgejo"}}
+
+
+
+
+ {{template "base/footer" .}}
+ '';
in {
# systemd.tmpfiles.settings = {
# "10-forgejo" = {
@@ -833,6 +937,7 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00
# };
services.forgejo = {
enable = true;
+ package = pkgs.unstable-packages.forgejo;
stateDir = "/storage/forgejo";
settings = {
DEFAULT = {
@@ -860,8 +965,8 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00
# LEVEL = "Debug";
};
ui = {
- THEMES = "forgejo-auto,forgejo-light,forgejo-dark";
- DEFAULT_THEME = "forgejo-auto";
+ THEMES = "catppuccin-mocha-sapphire,forgejo-auto,forgejo-light,forgejo-dark";
+ DEFAULT_THEME = "catppuccin-mocha-sapphire";
};
indexer = {
REPO_INDEXER_ENABLED = "true";
@@ -900,8 +1005,19 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00
systemd.services.forgejo = {
preStart = lib.mkAfter ''
rm -rf ${config.services.forgejo.stateDir}/custom/public
- mkdir -p ${config.services.forgejo.stateDir}/custom/public
- ln -sf ${theme} ${config.services.forgejo.stateDir}/custom/public/css
+ mkdir -p ${config.services.forgejo.stateDir}/custom/public/
+ mkdir -p ${config.services.forgejo.stateDir}/custom/public/assets/
+ mkdir -p ${config.services.forgejo.stateDir}/custom/public/assets/img/
+ mkdir -p ${config.services.forgejo.stateDir}/custom/public/assets/css/
+ mkdir -p ${config.services.forgejo.stateDir}/custom/templates/custom/
+ ln -sf ${logos.png} ${config.services.forgejo.stateDir}/custom/public/assets/img/logo.png
+ ln -sf ${logos.svg} ${config.services.forgejo.stateDir}/custom/public/assets/img/logo.svg
+ ln -sf ${logos.png} ${config.services.forgejo.stateDir}/custom/public/assets/img/favicon.png
+ ln -sf ${logos.svg-with-background} ${config.services.forgejo.stateDir}/custom/public/assets/img/favicon.svg
+ ln -sf ${theme}/theme-catppuccin-mocha-sapphire.css ${config.services.forgejo.stateDir}/custom/public/assets/css/
+ ln -sf ${forgejoCustomCss} ${config.services.forgejo.stateDir}/custom/public/assets/css/iosevkalyte.css
+ ln -sf ${forgejoCustomHeaderTmpl} ${config.services.forgejo.stateDir}/custom/templates/custom/header.tmpl
+ ln -sf ${forgejoCustomHomeTmpl} ${config.services.forgejo.stateDir}/custom/templates/home.tmpl
'';
};
diff --git a/templates/elixir/flake.lock b/templates/elixir/flake.lock
new file mode 100644
index 0000000..9055d38
--- /dev/null
+++ b/templates/elixir/flake.lock
@@ -0,0 +1,27 @@
+{
+ "nodes": {
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1734435836,
+ "narHash": "sha256-kMBQ5PRiFLagltK0sH+08aiNt3zGERC2297iB6vrvlU=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "4989a246d7a390a859852baddb1013f825435cee",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "nixpkgs": "nixpkgs"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/templates/elixir/flake.nix b/templates/elixir/flake.nix
index ec7904f..aaeea38 100644
--- a/templates/elixir/flake.nix
+++ b/templates/elixir/flake.nix
@@ -3,79 +3,11 @@
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
- outputs = {
- self,
- nixpkgs,
- ...
- }: let
- inherit (self) outputs;
-
- supportedSystems = [
- "aarch64-linux"
- "x86_64-linux"
-
- "x86_64-darwin"
- "aarch64-darwin"
- ];
-
- forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
-
- overlay = final: prev: {
- erlangPackages = prev.beam.packagesWith prev.erlang_26;
- erlang = final.erlangPackages.erlang;
- elixir = final.erlangPackages.elixir_1_16;
-
- mixRelease = final.erlangPackages.mixRelease.override {
- elixir = final.elixir;
- };
- fetchMixDeps = final.erlangPackages.fetchMixDeps.override {
- elixir = final.elixir;
- };
-
- elixir-ls = prev.elixir-ls.override {elixir = final.elixir;};
- };
-
- nixpkgsFor = system: ((import nixpkgs {inherit system;}).extend overlay);
+ outputs = inputs: let
+ inherit (import nix/boilerplate.nix inputs) call;
in {
- packages = forAllSystems (system: let
- pkgs = nixpkgsFor system;
-
- inherit (pkgs) beamPackages;
- inherit (beamPackages) mixRelease fetchMixDeps;
-
- version = "0.1.0";
- src = ./.;
- pname = "api.lyte.dev";
- in {
- /*
- this-package = mixRelease {
- inherit pname version src;
- mixFodDeps = fetchMixDeps {
- inherit version src;
- pname = "mix-deps-${pname}";
- hash = pkgs.lib.fakeSha256;
- };
- buildInputs = with pkgs; [sqlite];
- HOME = "$(pwd)";
- MIX_XDG = "$HOME";
- };
-
- default = outputs.packages.${system}.this-package;
- */
- });
-
- devShells = forAllSystems (system: let
- pkgs = nixpkgsFor system;
- in {
- default = pkgs.mkShell {
- shellHook = "export LOCALE_ARCHIVE=/usr/lib/locale/locale-archive";
- buildInputs = with pkgs; [
- elixir
- elixir-ls
-
- inotify-tools
- ];
- };
- });
+ overlays = import nix/overlays.nix;
+ packages = call (import nix/packages.nix);
+ devShells = call (import nix/shells.nix);
};
}
diff --git a/templates/elixir/nix/boilerplate.nix b/templates/elixir/nix/boilerplate.nix
new file mode 100644
index 0000000..2778326
--- /dev/null
+++ b/templates/elixir/nix/boilerplate.nix
@@ -0,0 +1,16 @@
+inputs @ {
+ nixpkgs,
+ self,
+ ...
+}: let
+ forSelfOverlay =
+ if builtins.hasAttr "forSelf" self.overlays
+ then self.overlays.forSelf
+ else (_: p: p);
+in rec {
+ systems = ["aarch64-linux" "x86_64-linux" "x86_64-darwin" "aarch64-darwin"];
+ forSystems = nixpkgs.lib.genAttrs systems;
+ pkgsFor = system: ((import nixpkgs {inherit system;}).extend forSelfOverlay);
+ genPkgs = func: (forSystems (system: func (pkgsFor system)));
+ call = imported: genPkgs (pkgs: imported (inputs // {inherit pkgs;}));
+}
diff --git a/templates/elixir/nix/overlays.nix b/templates/elixir/nix/overlays.nix
new file mode 100644
index 0000000..912427f
--- /dev/null
+++ b/templates/elixir/nix/overlays.nix
@@ -0,0 +1,16 @@
+{
+ forrSelf = final: prev: {
+ erlangPackages = prev.beam.packagesWith prev.erlang_28;
+ erlang = final.erlangPackages.erlang;
+ elixir = final.erlangPackages.elixir_1_17;
+
+ mixRelease = final.erlangPackages.mixRelease.override {
+ elixir = final.elixir;
+ };
+ fetchMixDeps = final.erlangPackages.fetchMixDeps.override {
+ elixir = final.elixir;
+ };
+
+ elixir-ls = prev.elixir-ls.override {elixir = final.elixir;};
+ };
+}
diff --git a/templates/elixir/nix/packages.nix b/templates/elixir/nix/packages.nix
new file mode 100644
index 0000000..42e6288
--- /dev/null
+++ b/templates/elixir/nix/packages.nix
@@ -0,0 +1,24 @@
+{
+ pkgs,
+ self,
+ ...
+}: {
+ my-package = let
+ version = "1.0.0";
+ src = ./.;
+ pname = "my-package";
+ in
+ pkgs.beamPackages.mixRelease {
+ inherit pname version src;
+ mixFodDeps = pkgs.beamPackages.fetchMixDeps {
+ inherit version src;
+ pname = "mix-deps-${pname}";
+ hash = pkgs.lib.fakeSha256;
+ };
+ # buildInputs = with pkgs; [];
+ # HOME = "$(pwd)";
+ # MIX_XDG = "$HOME";
+ };
+
+ default = self.packages.${pkgs.system}.my-package;
+}
diff --git a/templates/elixir/nix/shells.nix b/templates/elixir/nix/shells.nix
new file mode 100644
index 0000000..7a7512a
--- /dev/null
+++ b/templates/elixir/nix/shells.nix
@@ -0,0 +1,15 @@
+{
+ pkgs,
+ # self,
+ ...
+}: {
+ elixir-dev = pkgs.mkShell {
+ shellHook = "export LOCALE_ARCHIVE=/usr/lib/locale/locale-archive";
+ # inputsFrom = [self.packages.${pkgs.system}.my-package];
+ buildInputs = with pkgs; [
+ elixir
+ elixir-ls
+ inotify-tools
+ ];
+ };
+}
diff --git a/templates/rust/flake.nix b/templates/rust/flake.nix
index b053683..03a065f 100644
--- a/templates/rust/flake.nix
+++ b/templates/rust/flake.nix
@@ -20,16 +20,12 @@
src = ./.;
hooks = {
alejandra.enable = true;
- # NOTE: These do not work well with `nix flake check` due to pure environments
- # https://github.com/cachix/git-hooks.nix/issues/452
- /*
cargo-check.enable = true;
clippy = {
enable = true;
packageOverrides.cargo = pkgs.cargo;
packageOverrides.clippy = pkgs.rustPackages.clippy;
};
- */
rustfmt = {
enable = true;
packageOverrides.rustfmt = pkgs.rustfmt;
@@ -40,7 +36,7 @@
packages = genPkgs (pkgs: {
my-package = pkgs.rustPlatform.buildRustPackage {
- pname = "kodotag";
+ pname = "my-package";
version = "0.1.0";
/*