Skip to content
Merged
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
7 changes: 0 additions & 7 deletions bacon.toml

This file was deleted.

139 changes: 126 additions & 13 deletions flake.lock

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

5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
}
);
inputs = {
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
Expand All @@ -34,6 +38,7 @@
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.url = "github:Mic92/sops-nix";
yazi.url = "github:sxyazi/yazi";
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
Expand Down
16 changes: 14 additions & 2 deletions ops/nix/hosts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ in
};
modules.nixos.leaf = {
networking.hostName = "pi";
nix.settings.experimental-features = "nix-command flakes";
nix.settings = {
experimental-features = "nix-command flakes";
extra-substituters = [ "https://nix-community.cachix.org" ];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
nixpkgs.hostPlatform = "aarch64-linux";
system.stateVersion = "25.11";
services.openssh.enable = true;
Expand All @@ -46,7 +52,13 @@ in
in
{
networking.hostName = "alpha";
nix.settings.experimental-features = "nix-command flakes";
nix.settings = {
experimental-features = "nix-command flakes";
extra-substituters = [ "https://nix-community.cachix.org" ];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
nixpkgs.hostPlatform = "aarch64-darwin";
system = {
configurationRevision = inputs.self.rev or inputs.self.dirtyRev or null;
Expand Down
2 changes: 1 addition & 1 deletion ops/nix/manifest.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILdsZyY3gu8IGB8MzMnLdh+ClDxQQ2RYG9rkeetIKq8n";
defaultBranchName = "prime";
apps = {
editor = "nvf";
editor = "neovim";
shell = "fish";
browser = "firefox";
terminal = "ghostty";
Expand Down
54 changes: 39 additions & 15 deletions ops/nix/modules/flake-parts/dendri/users/apps/editor.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,49 @@ let
cfg = config.flake;
inherit (cfg.paths) src;
inherit (builtins) mapAttrs;
inherit (lib.modules) mkIf;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.options) mkOption;
inherit (lib.types) enum;
in
{
config.flake = {
users.userOptions.apps.editor = mkOption { type = enum [ "nvf" ]; };
modules.homeManager = mapAttrs (username: userConfig: {
imports = [ inputs.nvf.homeManagerModules.default ];
config = mkIf (userConfig.apps.editor == "nvf") {
programs.nvf = {
enable = true;
defaultEditor = true;
settings.vim = {
additionalRuntimePaths = [ src ];
luaConfigRC.${username} = "require(\"${username}\")";
};
};
};
}) cfg.users.users;
users.userOptions.apps.editor = mkOption {
type = enum [
"nvf"
"neovim"
];
};
modules.homeManager = mapAttrs (
username: userConfig:
(
{ pkgs, ... }:
{
imports = [ inputs.nvf.homeManagerModules.default ];
config = mkMerge [
(mkIf (userConfig.apps.editor == "nvf") {
programs.nvf = {
enable = true;
defaultEditor = true;
settings.vim = {
additionalRuntimePaths = [ src ];
luaConfigRC.${username} = "require(\"${username}\")";
};
};
})
(mkIf (userConfig.apps.editor == "neovim") {
programs.neovim = {
enable = true;
package = inputs.neovim-nightly-overlay.packages.${pkgs.stdenv.hostPlatform.system}.default;
defaultEditor = true;
viAlias = true;
vimAlias = true;
extraLuaConfig = "require(\"${username}\")";
};
xdg.configFile."nvim/lua".source = src + /lua;
})
];
}
)
) cfg.users.users;
};
}
Loading
Loading