Use the repo as flake for private dots

This commit is contained in:
js0ny 2025-11-24 09:57:10 +00:00
parent b76d8a0337
commit 410c5ea38f
14 changed files with 110 additions and 11 deletions

View file

@ -34,6 +34,9 @@ return {
{ {
"NeogitOrg/neogit", "NeogitOrg/neogit",
config = true, config = true,
dependencies = {
"sindrets/diffview.nvim",
},
cmd = { cmd = {
"Neogit", "Neogit",
}, },

21
nixcfgs/flake.lock generated
View file

@ -750,6 +750,26 @@
"type": "github" "type": "github"
} }
}, },
"nix-index-database": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1763870992,
"narHash": "sha256-NPyc76Wxmv/vAsXJ8F+/8fXECHYcv2YGSqdiSHp/F/A=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "d7423982c7a26586aa237d130b14c8b302c7a367",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-index-database",
"type": "github"
}
},
"nixcord": { "nixcord": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@ -1105,6 +1125,7 @@
"niri-flake": "niri-flake", "niri-flake": "niri-flake",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nix-flatpak": "nix-flatpak", "nix-flatpak": "nix-flatpak",
"nix-index-database": "nix-index-database",
"nixcord": "nixcord", "nixcord": "nixcord",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nixpkgs-stable": "nixpkgs-stable_2", "nixpkgs-stable": "nixpkgs-stable_2",

View file

@ -47,6 +47,10 @@
}; };
nixcord.url = "github:kaylorben/nixcord"; nixcord.url = "github:kaylorben/nixcord";
catppuccin.url = "github:catppuccin/nix"; catppuccin.url = "github:catppuccin/nix";
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { outputs = {
@ -67,6 +71,7 @@
zen-browser, zen-browser,
nixcord, nixcord,
catppuccin, catppuccin,
nix-index-database,
... ...
} @ inputs: let } @ inputs: let
overlays = [ overlays = [
@ -137,6 +142,7 @@
betterfox-nix.modules.homeManager.betterfox betterfox-nix.modules.homeManager.betterfox
nixcord.homeModules.nixcord nixcord.homeModules.nixcord
catppuccin.homeModules.catppuccin catppuccin.homeModules.catppuccin
nix-index-database.homeModules.nix-index
]; ];
}; };
"js0ny@nixvirt" = home-manager.lib.homeManagerConfiguration { "js0ny@nixvirt" = home-manager.lib.homeManagerConfiguration {
@ -164,5 +170,16 @@
]; ];
}; };
}; };
# Export nixos modules for private use
nixosModules = {
server = {...}: {
imports = [
./modules/nixos
./modules/nixos/server.nix
./modules/nixos/core/sshd.nix
./modules/nixos/programs/zsh.nix
];
};
};
}; };
} }

View file

@ -20,14 +20,12 @@
../../modules/nixos/hardware/udev/basys3.nix ../../modules/nixos/hardware/udev/basys3.nix
# Services # Services
../../modules/nixos/desktop/wayvnc.nix
../../modules/nixos/core/sshd.nix ../../modules/nixos/core/sshd.nix
../../modules/nixos/desktop/xremap.nix ../../modules/nixos/desktop/xremap.nix
# desktop environment and display manager # desktop environment and display manager
../../modules/nixos/desktop/dm/ly.nix ../../modules/nixos/desktop/dm/ly.nix
../../modules/nixos/desktop/de/niri.nix ../../modules/nixos/desktop/de/niri.nix
../../modules/nixos/desktop/de/hyprland.nix
# desktop programs # desktop programs
../../modules/nixos/programs/zsh.nix ../../modules/nixos/programs/zsh.nix

View file

@ -6,10 +6,8 @@
curl curl
git git
tmux tmux
nix-index
file file
unzip unzip
zip zip
pkg-config
]; ];
} }

View file

@ -2,7 +2,7 @@
hardware.nvidia = { hardware.nvidia = {
modesetting.enable = true; modesetting.enable = true;
powerManagement.enable = true; powerManagement.enable = true;
open = false; open = true;
nvidiaSettings = true; nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable; package = config.boot.kernelPackages.nvidiaPackages.stable;
# powerManagement.finegrained = true; # powerManagement.finegrained = true;

View file

@ -0,0 +1,58 @@
{
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.my.host;
in {
options.my.host = {
role = mkOption {
type = types.enum ["server" "desktop" "laptop"];
default = "server";
description = "The role of this machine, affects default packages and services.";
};
tailscale = {
# Syntax sugar: mkOption type=bool
enable = mkEnableOption "Tailscale VPN service";
ip = mkOption {
type = types.nullOr types.str;
default = null;
description = "Tailscale VPN IP address.";
};
};
public = {
ipv4 = mkOption {
type = types.nullOr types.str;
default = null;
description = "Public IPv4 address.";
};
};
sshKey = mkOption {
type = types.nullOr types.str;
default = null;
description = "Host ED25519 public key.";
};
};
config = mkMerge [
{
time.timeZone = "Etc/UTC";
services.qemuGuest.enable = true;
nix.settings.trusted-users = ["root" "@wheel"];
}
(mkIf cfg.tailscale.enable {
services.tailscale.enable = true;
networking.firewall.allowedUDPPorts = [config.services.tailscale.port];
})
];
}

View file

@ -19,5 +19,8 @@ in {
enable = true; enable = true;
flavor = "mocha"; flavor = "mocha";
accent = "pink"; accent = "pink";
zed.enable = false;
zsh-syntax-highlighting.enable = false;
nvim.enable = false; # Defined in lua config
}; };
} }

View file

@ -18,7 +18,6 @@
beancount beancount
gnumake gnumake
chezmoi chezmoi
cmake
curlie curlie
duf duf
dust dust
@ -73,4 +72,8 @@
then with pkgs; [duti] then with pkgs; [duti]
else with pkgs; [bluetui] else with pkgs; [bluetui]
); );
programs.nix-index.enable = true;
programs.nix-index.symlinkToCacheHome = true;
programs.nix-index-database.comma.enable = true;
} }

View file

@ -280,5 +280,5 @@
}; };
}; };
}; };
catppuccin.fcitx5.enable = false; catppuccin.fcitx5.enable = true;
} }

View file

@ -91,6 +91,7 @@ in {
''; '';
}; };
programs.firefox = { programs.firefox = {
policies = { policies = {
ExtensionSettings = [ ExtensionSettings = [

View file

@ -16,6 +16,7 @@ in {
stylua stylua
nodejs-slim_24 # for copilot-lua nodejs-slim_24 # for copilot-lua
lua-language-server lua-language-server
vimPlugins.nvim-treesitter-parsers.diff
]; ];
}; };
# home.packages = with pkgs; [lua-language-server]; # home.packages = with pkgs; [lua-language-server];
@ -23,6 +24,4 @@ in {
programs.bash.shellAliases = nvimAlias; programs.bash.shellAliases = nvimAlias;
programs.zsh.shellAliases = nvimAlias; programs.zsh.shellAliases = nvimAlias;
programs.nushell.shellAliases = nvimAlias; programs.nushell.shellAliases = nvimAlias;
catppuccin.nvim.enable = false; # Defined in lua config
} }

View file

@ -9,7 +9,6 @@ in {
zsh-fzf-tab zsh-fzf-tab
zsh-nix-shell zsh-nix-shell
]; ];
catppuccin.zsh-syntax-highlighting.enable = false;
programs.zsh = { programs.zsh = {
enable = true; enable = true;
autocd = true; autocd = true;

View file

@ -1,5 +1,4 @@
{pkgs, ...}: { {pkgs, ...}: {
catppuccin.zed.enable = false;
programs.zed-editor = { programs.zed-editor = {
enable = true; enable = true;
package = package =