mirror of
https://github.com/callumio/nixfiles.git
synced 2025-12-19 20:39:20 +00:00
Compare commits
22 commits
d86345eecc
...
1863297ef5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1863297ef5 | ||
| 1ed9ee409b | |||
| cb51c7e09b | |||
| 188d9cb439 | |||
| 967f911b5a | |||
| 3c5f85bbb1 | |||
| b86629718d | |||
| 3bb23ce5d5 | |||
| 1d10befe61 | |||
| cd0e067dad | |||
| 7dd119992f | |||
| 497876d1c9 | |||
| fe661455fe | |||
| 351ad8d494 | |||
| b121ac562f | |||
| bf7d690ff5 | |||
| 06c972ef26 | |||
| a4591797a6 | |||
| 897e30d1df | |||
| b2bcef1cde | |||
| c8bc7c67bb | |||
| 49da33a9d3 |
35 changed files with 944 additions and 483 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
|
@ -1,4 +1,5 @@
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
|
@ -22,4 +23,4 @@ jobs:
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
pushFilter: '(nerdfonts)'
|
pushFilter: '(nerdfonts)'
|
||||||
extraPullNames: nix-community, om
|
extraPullNames: nix-community, om
|
||||||
- run: nix run github:juspay/omnix -- ci run "."
|
- run: nix run github:juspay/omnix --accept-flake-config -- ci run "."
|
||||||
|
|
|
||||||
30
.github/workflows/clear-cache.yml
vendored
Normal file
30
.github/workflows/clear-cache.yml
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
name: Clear cache
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
clear-cache:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Clear cache
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
console.log("About to clear")
|
||||||
|
const caches = await github.rest.actions.getActionsCacheList({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
})
|
||||||
|
for (const cache of caches.data.actions_caches) {
|
||||||
|
console.log(cache)
|
||||||
|
github.rest.actions.deleteActionsCacheById({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
cache_id: cache.id,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log("Clear completed")
|
||||||
2
.github/workflows/update-flake.yml
vendored
2
.github/workflows/update-flake.yml
vendored
|
|
@ -2,7 +2,7 @@ name: Update flake inputs
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
# Every day, 5am
|
# Every day, 5am
|
||||||
- cron: "0 5 * * *"
|
- cron: "0 5 * * 6"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
|
||||||
689
flake.lock
generated
689
flake.lock
generated
File diff suppressed because it is too large
Load diff
36
flake.nix
36
flake.nix
|
|
@ -8,9 +8,10 @@
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
mods = import ./modules;
|
mods = import ./modules;
|
||||||
|
cLib = import ./lib {inherit (nixpkgs) lib;};
|
||||||
mkLinuxSystem = mod:
|
mkLinuxSystem = mod:
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = {inherit inputs cLib;};
|
||||||
modules =
|
modules =
|
||||||
[
|
[
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
|
@ -20,8 +21,8 @@
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nixpkgs.overlays = [self.overlays.default];
|
nixpkgs.overlays = [self.overlays.default];
|
||||||
}
|
}
|
||||||
mod
|
|
||||||
]
|
]
|
||||||
|
++ mod
|
||||||
++ mods.sharedModules;
|
++ mods.sharedModules;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
@ -38,8 +39,8 @@
|
||||||
inherit (mods) homeManagerModules nixosModules;
|
inherit (mods) homeManagerModules nixosModules;
|
||||||
# TODO: use ./hosts/
|
# TODO: use ./hosts/
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
artemis = mkLinuxSystem ./hosts/artemis;
|
artemis = mkLinuxSystem [./hosts/artemis inputs.lanzaboote.nixosModules.lanzaboote];
|
||||||
hermes = mkLinuxSystem ./hosts/hermes;
|
hermes = mkLinuxSystem [./hosts/hermes];
|
||||||
};
|
};
|
||||||
diskoConfigurations = {}; # maybe?
|
diskoConfigurations = {}; # maybe?
|
||||||
om.health.default = {nix-version.min-required = "2.18.5";};
|
om.health.default = {nix-version.min-required = "2.18.5";};
|
||||||
|
|
@ -159,5 +160,32 @@
|
||||||
|
|
||||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||||
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
|
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
lanzaboote = {
|
||||||
|
url = "github:nix-community/lanzaboote/v0.4.1";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
# my custom programs
|
||||||
|
nish = {
|
||||||
|
url = "github:callumio/nish";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.follows = "unstable";
|
||||||
|
flake-parts.follows = "flake-parts";
|
||||||
|
systems.follows = "systems";
|
||||||
|
treefmt-nix.follows = "treefmt-nix";
|
||||||
|
pre-commit-hooks.follows = "pre-commit-hooks";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nsbm = {
|
||||||
|
url = "github:callumio/nsbm";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.follows = "unstable";
|
||||||
|
treefmt-nix.follows = "treefmt-nix";
|
||||||
|
flake-parts.follows = "flake-parts";
|
||||||
|
systems.follows = "systems";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
# TODO: sort this out
|
||||||
gnome.adwaita-icon-theme
|
gnome.adwaita-icon-theme
|
||||||
networkmanagerapplet
|
networkmanagerapplet
|
||||||
libsecret
|
libsecret
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,14 @@
|
||||||
{pkgs, ...}: {
|
{
|
||||||
|
pkgs,
|
||||||
|
cLib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
mkFishPlug = pkg: {
|
||||||
|
name = pkg.pname;
|
||||||
|
inherit (pkg) src;
|
||||||
|
};
|
||||||
|
tmux = cLib.getProgFor pkgs "tmux";
|
||||||
|
in {
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
@ -7,47 +17,27 @@
|
||||||
trap __trap_exit_tmux EXIT
|
trap __trap_exit_tmux EXIT
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# TODO: dont use this directly
|
||||||
shellAliases = {v = "nvim";};
|
shellAliases = {v = "nvim";};
|
||||||
|
|
||||||
functions = {
|
functions = {
|
||||||
__trap_exit_tmux = {
|
__trap_exit_tmux = {
|
||||||
body = ''
|
body = ''
|
||||||
test (tmux list-windows | wc -l) = 1 || exit
|
test (${tmux} list-windows | wc -l) = 1 || exit
|
||||||
test (tmux list-panes | wc -l) = 1 || exit
|
test (${tmux} list-panes | wc -l) = 1 || exit
|
||||||
tmux switch-client -t main
|
${tmux} switch-client -t main
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
plugins = with pkgs.fishPlugins; [
|
plugins = with pkgs.fishPlugins; [
|
||||||
{
|
(mkFishPlug z)
|
||||||
name = "z";
|
(mkFishPlug hydro)
|
||||||
inherit (z) src;
|
(mkFishPlug sponge)
|
||||||
}
|
(mkFishPlug grc)
|
||||||
{
|
(mkFishPlug done)
|
||||||
name = "hydro";
|
(mkFishPlug fzf-fish)
|
||||||
inherit (hydro) src;
|
(mkFishPlug git-abbr)
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "sponge";
|
|
||||||
inherit (sponge) src;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "grc";
|
|
||||||
inherit (grc) src;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "done";
|
|
||||||
inherit (done) src;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "fzf-fish";
|
|
||||||
inherit (fzf-fish) src;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "forgit";
|
|
||||||
inherit (forgit) src;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
userName = "Callum Leslie";
|
userName = "Callum Leslie";
|
||||||
userEmail = "git@cleslie.uk";
|
userEmail = "git@cleslie.uk";
|
||||||
signing.key = "D382C4AFEECEAA90";
|
signing.key = "03B01F427831BCFD!";
|
||||||
signing.signByDefault = true;
|
signing.signByDefault = true;
|
||||||
|
|
||||||
ignores = [".direnv/"];
|
ignores = [".direnv/"];
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
contents = {
|
contents = {
|
||||||
user = {
|
user = {
|
||||||
email = "psycl6@nottingham.ac.uk";
|
email = "psycl6@nottingham.ac.uk";
|
||||||
signingKey = "5A944DF89B6F65AC";
|
signingKey = "14861F1282EFB5C8!";
|
||||||
};
|
};
|
||||||
credential = {helper = "store";};
|
credential = {helper = "store";};
|
||||||
};
|
};
|
||||||
|
|
@ -34,6 +34,6 @@
|
||||||
ghq = {root = "~/repos";};
|
ghq = {root = "~/repos";};
|
||||||
};
|
};
|
||||||
|
|
||||||
diff-so-fancy.enable = true;
|
delta.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,32 @@
|
||||||
{...}: {
|
{
|
||||||
|
pkgs,
|
||||||
|
cLib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
getProgFor' = cLib.getProgFor' pkgs;
|
||||||
|
getProgFor = cLib.getProgFor pkgs;
|
||||||
|
web = getProgFor "firefox";
|
||||||
|
mail = getProgFor "betterbird";
|
||||||
|
chat = getProgFor "discord";
|
||||||
|
media = getProgFor "spotify";
|
||||||
|
terminal = getProgFor "alacritty";
|
||||||
|
runner = getProgFor' "rofi-wayland" "rofi";
|
||||||
|
rofi-rbw = getProgFor' "rofi-rbw-wayland" "rofi-rbw";
|
||||||
|
tmux = getProgFor "tmux";
|
||||||
|
slurp = getProgFor "slurp";
|
||||||
|
grim = getProgFor "grim";
|
||||||
|
wl-copy = getProgFor' "wl-clipboard" "wl-copy";
|
||||||
|
mullvad = getProgFor' "mullvad-vpn" "mullvad-gui";
|
||||||
|
playerctl = getProgFor "playerctl";
|
||||||
|
brightnessctl = getProgFor "brightnessctl";
|
||||||
|
wpctl = getProgFor' "wireplumber" "wpctl";
|
||||||
|
hyprlock = getProgFor "hyprlock";
|
||||||
|
hyprctl = getProgFor' "hyprland" "hyprctl";
|
||||||
|
in {
|
||||||
services = {
|
services = {
|
||||||
blueman-applet.enable = true;
|
blueman-applet.enable = true;
|
||||||
network-manager-applet.enable = true;
|
network-manager-applet.enable = true;
|
||||||
kanshi.systemdTarget = "hyprland-session.target";
|
kanshi.systemdTarget = "graphical-session.target";
|
||||||
udiskie = {
|
udiskie = {
|
||||||
enable = true;
|
enable = true;
|
||||||
tray = "auto";
|
tray = "auto";
|
||||||
|
|
@ -65,7 +89,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
# TODO: move to nix config over text
|
|
||||||
settings = {
|
settings = {
|
||||||
"monitor" = ",prefered,auto,1";
|
"monitor" = ",prefered,auto,1";
|
||||||
|
|
||||||
|
|
@ -137,13 +161,13 @@
|
||||||
"$mainMod SHIFT, q, exit"
|
"$mainMod SHIFT, q, exit"
|
||||||
"$mainMod, F, fullscreen"
|
"$mainMod, F, fullscreen"
|
||||||
"$mainMod SHIFT, f, togglefloating"
|
"$mainMod SHIFT, f, togglefloating"
|
||||||
"$mainMod, d, exec, rofi -show drun"
|
"$mainMod, d, exec, ${runner} -show drun"
|
||||||
"$mainMod, w, exec, rofi -show window"
|
"$mainMod, w, exec, ${runner} -show window"
|
||||||
"$mainMod, p, exec, rofi-rbw --no-folder"
|
"$mainMod, p, exec, ${rofi-rbw} --no-folder"
|
||||||
"$mainMod, s, togglesplit"
|
"$mainMod, s, togglesplit"
|
||||||
"$mainMod SHIFT, r, exec, hyprctl reload"
|
"$mainMod SHIFT, r, exec, ${hyprctl} reload"
|
||||||
"$mainMod, return, exec, alacritty -e tmux new -A -s main"
|
"$mainMod, return, exec, ${terminal} -e ${tmux} new -A -s main"
|
||||||
"$mainMod SHIFT, return, exec, [float; pin] alacritty -e tmux new -A -s main"
|
"$mainMod SHIFT, return, exec, [float; pin] ${terminal} -e ${tmux} new -A -s main"
|
||||||
|
|
||||||
"$mainMod, b, workspace, name:web"
|
"$mainMod, b, workspace, name:web"
|
||||||
"$mainMod, n, workspace, name:chat"
|
"$mainMod, n, workspace, name:chat"
|
||||||
|
|
@ -172,9 +196,9 @@
|
||||||
"$mainMod SHIFT, l, movewindow, r"
|
"$mainMod SHIFT, l, movewindow, r"
|
||||||
"$mainMod SHIFT, k, movewindow, u"
|
"$mainMod SHIFT, k, movewindow, u"
|
||||||
"$mainMod SHIFT, j, movewindow, d"
|
"$mainMod SHIFT, j, movewindow, d"
|
||||||
''SHIFT, Print, exec, grim -g "$(slurp)" - | wl-copy''
|
''SHIFT, Print, exec, ${grim} -g "$(${slurp})" - | ${wl-copy}''
|
||||||
", Print, exec, grim - | wl-copy"
|
", Print, exec, ${grim} - | ${wl-copy}"
|
||||||
"$mainMod, 0, exec, hyprlock"
|
"$mainMod, 0, exec, ${hyprlock}"
|
||||||
]
|
]
|
||||||
++ (builtins.concatLists (builtins.genList (x: let
|
++ (builtins.concatLists (builtins.genList (x: let
|
||||||
ws = x + 1;
|
ws = x + 1;
|
||||||
|
|
@ -187,10 +211,10 @@
|
||||||
9));
|
9));
|
||||||
|
|
||||||
workspace = [
|
workspace = [
|
||||||
"name:web, on-created-empty: firefox"
|
"name:web, on-created-empty: ${web}"
|
||||||
"name:chat, on-created-empty: discord"
|
"name:chat, on-created-empty: ${chat}"
|
||||||
"name:media, on-created-empty: spotify"
|
"name:media, on-created-empty: ${media}"
|
||||||
"name:mail, on-created-empty: betterbird"
|
"name:mail, on-created-empty: ${mail}"
|
||||||
];
|
];
|
||||||
|
|
||||||
bindm = [
|
bindm = [
|
||||||
|
|
@ -199,25 +223,19 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
bindle = [
|
bindle = [
|
||||||
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
", XF86AudioRaiseVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
||||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
", XF86AudioLowerVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||||
", XF86AudioMute , exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
", XF86AudioMute , exec, ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||||
", XF86AudioMicMute , exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
", XF86AudioMicMute , exec, ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||||
", XF86AudioPlay , exec, playerctl play-pause"
|
", XF86AudioPlay , exec, ${playerctl} play-pause"
|
||||||
", XF86AudioPause , exec, playerctl play-pause"
|
", XF86AudioPause , exec, ${playerctl} play-pause"
|
||||||
", XF86AudioNext , exec, playerctl next"
|
", XF86AudioNext , exec, ${playerctl} next"
|
||||||
", XF86AudioPrev , exec, playerctl previous"
|
", XF86AudioPrev , exec, ${playerctl} previous"
|
||||||
", XF86MonBrightnessUp, exec, brightnessctl -c backlight set +5%"
|
", XF86MonBrightnessUp, exec, ${brightnessctl} -c backlight set +5%"
|
||||||
", XF86MonBrightnessDown, exec, brightnessctl -c backlight set 5%-"
|
", XF86MonBrightnessDown, exec, ${brightnessctl} -c backlight set 5%-"
|
||||||
];
|
];
|
||||||
|
|
||||||
exec = [
|
exec-once = [(toString mullvad)];
|
||||||
#"pkill wpaperd & sleep 0.5 && wpaperd"
|
|
||||||
#"pkill waybar & sleep 0.5 && waybar"
|
|
||||||
#"pkill mako & sleep 0.5 && mako"
|
|
||||||
];
|
|
||||||
|
|
||||||
exec-once = ["mullvad-gui"];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"diagnostics.globals": [
|
|
||||||
"vim",
|
|
||||||
"lsp_on_attach"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,313 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
programs.neovim = let
|
|
||||||
leaders = ''
|
|
||||||
vim.g.mapleader = ' '
|
|
||||||
vim.g.maplocalleader = ' '
|
|
||||||
'';
|
|
||||||
toLua = str: ''
|
|
||||||
lua << EOF
|
|
||||||
${leaders}
|
|
||||||
${str}
|
|
||||||
EOF
|
|
||||||
'';
|
|
||||||
toLuaFile = file: ''
|
|
||||||
lua << EOF
|
|
||||||
${leaders}
|
|
||||||
${builtins.readFile file}
|
|
||||||
EOF
|
|
||||||
'';
|
|
||||||
toLuaFileLSP = file: ''
|
|
||||||
lua << EOF
|
|
||||||
${leaders}
|
|
||||||
${builtins.readFile ./plugin/lsp/lsp-keys.lua}
|
|
||||||
${builtins.readFile file}
|
|
||||||
EOF
|
|
||||||
'';
|
|
||||||
|
|
||||||
fromGit = ref: rev: repo:
|
|
||||||
pkgs.vimUtils.buildVimPlugin {
|
|
||||||
pname = "${lib.strings.sanitizeDerivationName repo}";
|
|
||||||
version = ref;
|
|
||||||
src = builtins.fetchGit {
|
|
||||||
url = "https://github.com/${repo}.git";
|
|
||||||
inherit ref;
|
|
||||||
inherit rev;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# always installs latest version
|
|
||||||
pluginGit = fromGit "HEAD";
|
|
||||||
in {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
# package = pkgs.neovim-nightly;
|
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
# Rust
|
|
||||||
rust-analyzer
|
|
||||||
cargo
|
|
||||||
rustc
|
|
||||||
rustfmt
|
|
||||||
|
|
||||||
# YAML
|
|
||||||
yaml-language-server
|
|
||||||
|
|
||||||
# JSON
|
|
||||||
nodePackages.vscode-json-languageserver
|
|
||||||
|
|
||||||
# Go
|
|
||||||
gopls
|
|
||||||
|
|
||||||
# Typescript
|
|
||||||
nodePackages.typescript
|
|
||||||
nodePackages.typescript-language-server
|
|
||||||
|
|
||||||
# Javascript
|
|
||||||
eslint_d
|
|
||||||
|
|
||||||
# Python
|
|
||||||
nodePackages.pyright
|
|
||||||
black
|
|
||||||
|
|
||||||
# Util
|
|
||||||
ripgrep
|
|
||||||
fzf
|
|
||||||
|
|
||||||
# C-Family
|
|
||||||
clang-tools
|
|
||||||
|
|
||||||
# Shell
|
|
||||||
shellcheck
|
|
||||||
shfmt
|
|
||||||
|
|
||||||
# Lua
|
|
||||||
lua-language-server
|
|
||||||
selene
|
|
||||||
stylua
|
|
||||||
|
|
||||||
# Nix
|
|
||||||
rnix-lsp
|
|
||||||
nixfmt
|
|
||||||
statix
|
|
||||||
|
|
||||||
# LLM
|
|
||||||
ollama
|
|
||||||
|
|
||||||
# Haskell
|
|
||||||
haskellPackages.haskell-debug-adapter
|
|
||||||
haskellPackages.haskell-language-server
|
|
||||||
haskellPackages.fourmolu
|
|
||||||
ghc
|
|
||||||
|
|
||||||
# Docker
|
|
||||||
dockerfile-language-server-nodejs
|
|
||||||
docker-compose-language-service
|
|
||||||
];
|
|
||||||
|
|
||||||
defaultEditor = true;
|
|
||||||
|
|
||||||
viAlias = true;
|
|
||||||
vimAlias = true;
|
|
||||||
vimdiffAlias = true;
|
|
||||||
|
|
||||||
extraLuaConfig = ''
|
|
||||||
${builtins.readFile ./options.lua}
|
|
||||||
'';
|
|
||||||
|
|
||||||
plugins = with pkgs.vimPlugins; [
|
|
||||||
{
|
|
||||||
plugin = nvim-lspconfig;
|
|
||||||
config = toLuaFileLSP ./plugin/lsp/lsp.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = crates-nvim;
|
|
||||||
config = toLua "require('crates').setup()";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = rustaceanvim;
|
|
||||||
config = toLuaFileLSP ./plugin/lsp/rust.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = haskell-tools-nvim;
|
|
||||||
config = toLuaFileLSP ./plugin/lsp/haskell.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = SchemaStore-nvim;
|
|
||||||
config = toLuaFileLSP ./plugin/lsp/schemastore.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = todo-comments-nvim;
|
|
||||||
config =
|
|
||||||
toLua
|
|
||||||
"require('todo-comments').setup(); vim.api.nvim_set_keymap('n', '<leader>vtd', ':TodoTelescope<CR>', { noremap = true });";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = comment-nvim;
|
|
||||||
config = toLua "require('Comment').setup()";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = onedark-nvim;
|
|
||||||
config = "colorscheme onedark";
|
|
||||||
}
|
|
||||||
|
|
||||||
neodev-nvim
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = nvim-cmp;
|
|
||||||
config = toLuaFile ./plugin/cmp.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = telescope-nvim;
|
|
||||||
config = toLuaFile ./plugin/telescope.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin =
|
|
||||||
pluginGit "951b163e55ce7639eb320c450bde9283c4fe968b"
|
|
||||||
"laytan/cloak.nvim";
|
|
||||||
config = toLuaFile ./plugin/cloak.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin =
|
|
||||||
pluginGit "41ad952c8269fa7aa3a4b8a5abb44541cb628313"
|
|
||||||
"David-Kunz/gen.nvim";
|
|
||||||
config = toLuaFile ./plugin/gen.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = nvim-dap;
|
|
||||||
config = toLuaFile ./plugin/debugger.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin =
|
|
||||||
pluginGit "fd35a46f4b7c1b244249266bdcb2da3814f01724"
|
|
||||||
"xiyaowong/transparent.nvim";
|
|
||||||
config = toLua "require('transparent').setup{}";
|
|
||||||
}
|
|
||||||
|
|
||||||
nvim-dap-ui
|
|
||||||
telescope-dap-nvim
|
|
||||||
nvim-dap-virtual-text
|
|
||||||
|
|
||||||
telescope-fzf-native-nvim
|
|
||||||
|
|
||||||
cmp_luasnip
|
|
||||||
cmp-nvim-lsp
|
|
||||||
|
|
||||||
luasnip
|
|
||||||
friendly-snippets
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = hardtime-nvim;
|
|
||||||
config = toLua "require('hardtime').setup()";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = nvim-surround;
|
|
||||||
config = toLua "require('nvim-surround').setup{}";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = harpoon;
|
|
||||||
config = toLuaFile ./plugin/harpoon.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = lualine-nvim;
|
|
||||||
config =
|
|
||||||
toLua
|
|
||||||
"require('lualine').setup{options = {icons_enabled = true, theme = 'onedark', component_separators = '|', section_separators = ''}, sections = { lualine_a = { { 'buffers', } } }}";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = nvim-autopairs;
|
|
||||||
config = toLua "require('nvim-autopairs').setup {}";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = leap-nvim;
|
|
||||||
config = toLua "require('leap.user').add_default_mappings()";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = none-ls-nvim;
|
|
||||||
config = toLuaFile ./plugin/lsp/none-ls.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = oil-nvim;
|
|
||||||
config = toLuaFile ./plugin/oil.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = zen-mode-nvim;
|
|
||||||
config = toLuaFile ./plugin/zen.lua;
|
|
||||||
}
|
|
||||||
twilight-nvim
|
|
||||||
|
|
||||||
nvim-web-devicons
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = undotree;
|
|
||||||
config =
|
|
||||||
toLua "vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle)";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = gitsigns-nvim;
|
|
||||||
config = toLuaFile ./plugin/gitsigns.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = nvim-treesitter.withPlugins (p: [
|
|
||||||
p.tree-sitter-nix
|
|
||||||
p.tree-sitter-vim
|
|
||||||
p.tree-sitter-bash
|
|
||||||
p.tree-sitter-lua
|
|
||||||
p.tree-sitter-python
|
|
||||||
p.tree-sitter-rust
|
|
||||||
p.tree-sitter-json
|
|
||||||
p.tree-sitter-c
|
|
||||||
p.tree-sitter-comment
|
|
||||||
p.tree-sitter-javascript
|
|
||||||
p.tree-sitter-fish
|
|
||||||
p.tree-sitter-dockerfile
|
|
||||||
p.tree-sitter-cpp
|
|
||||||
p.tree-sitter-git_config
|
|
||||||
p.tree-sitter-git_rebase
|
|
||||||
p.tree-sitter-gitattributes
|
|
||||||
p.tree-sitter-gitcommit
|
|
||||||
p.tree-sitter-gitignore
|
|
||||||
p.tree-sitter-markdown
|
|
||||||
p.tree-sitter-markdown_inline
|
|
||||||
p.tree-sitter-make
|
|
||||||
p.tree-sitter-norg
|
|
||||||
p.tree-sitter-ssh_config
|
|
||||||
p.tree-sitter-typescript
|
|
||||||
p.tree-sitter-tsx
|
|
||||||
p.tree-sitter-haskell
|
|
||||||
p.tree-sitter-yaml
|
|
||||||
p.tree-sitter-zig
|
|
||||||
]);
|
|
||||||
config = toLuaFile ./plugin/treesitter.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
vim-nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
24
home/c/programs/tmux/bar.patch
Normal file
24
home/c/programs/tmux/bar.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
diff --git a/tmux-onedark-theme.tmux b/tmux-onedark-theme.tmux
|
||||||
|
index e440cc7..33ba373 100755
|
||||||
|
--- a/tmux-onedark-theme.tmux
|
||||||
|
+++ b/tmux-onedark-theme.tmux
|
||||||
|
@@ -75,14 +75,14 @@ set "status-fg" "$onedark_white"
|
||||||
|
set "@prefix_highlight_fg" "$onedark_black"
|
||||||
|
set "@prefix_highlight_bg" "$onedark_green"
|
||||||
|
set "@prefix_highlight_copy_mode_attr" "fg=$onedark_black,bg=$onedark_green"
|
||||||
|
-set "@prefix_highlight_output_prefix" " "
|
||||||
|
+set "@prefix_highlight_output_prefix" " "
|
||||||
|
|
||||||
|
status_widgets=$(get "@onedark_widgets")
|
||||||
|
time_format=$(get "@onedark_time_format" "%R")
|
||||||
|
date_format=$(get "@onedark_date_format" "%d/%m/%Y")
|
||||||
|
|
||||||
|
-set "status-right" "#[fg=$onedark_white,bg=$onedark_black,nounderscore,noitalics]${time_format} ${date_format} #[fg=$onedark_visual_grey,bg=$onedark_black]#[fg=$onedark_visual_grey,bg=$onedark_visual_grey]#[fg=$onedark_white, bg=$onedark_visual_grey]${status_widgets} #[fg=$onedark_green,bg=$onedark_visual_grey,nobold,nounderscore,noitalics]#[fg=$onedark_black,bg=$onedark_green,bold] #h #[fg=$onedark_yellow, bg=$onedark_green]#[fg=$onedark_red,bg=$onedark_yellow]"
|
||||||
|
-set "status-left" "#[fg=$onedark_black,bg=$onedark_green,bold] #S #{prefix_highlight}#[fg=$onedark_green,bg=$onedark_black,nobold,nounderscore,noitalics]"
|
||||||
|
+set "status-right" "#[fg=$onedark_white,bg=$onedark_black,nounderscore,noitalics]${time_format} ${date_format} #[fg=$onedark_visual_grey,bg=$onedark_black]#[fg=$onedark_visual_grey,bg=$onedark_visual_grey]#[fg=$onedark_white, bg=$onedark_visual_grey]${status_widgets} #[fg=$onedark_green,bg=$onedark_visual_grey,nobold,nounderscore,noitalics]#[fg=$onedark_black,bg=$onedark_green,bold] #h #[fg=$onedark_yellow, bg=$onedark_green]#[fg=$onedark_red,bg=$onedark_yellow]"
|
||||||
|
+set "status-left" "#[fg=$onedark_black,bg=$onedark_green,bold] #S #{prefix_highlight}#[fg=$onedark_green,bg=$onedark_black,nobold,nounderscore,noitalics]"
|
||||||
|
|
||||||
|
-set "window-status-format" "#[fg=$onedark_black,bg=$onedark_black,nobold,nounderscore,noitalics]#[fg=$onedark_white,bg=$onedark_black] #I #W #[fg=$onedark_black,bg=$onedark_black,nobold,nounderscore,noitalics]"
|
||||||
|
-set "window-status-current-format" "#[fg=$onedark_black,bg=$onedark_visual_grey,nobold,nounderscore,noitalics]#[fg=$onedark_white,bg=$onedark_visual_grey,nobold] #I #W #[fg=$onedark_visual_grey,bg=$onedark_black,nobold,nounderscore,noitalics]"
|
||||||
|
+set "window-status-format" "#[fg=$onedark_black,bg=$onedark_black,nobold,nounderscore,noitalics]#[fg=$onedark_white,bg=$onedark_black] #I #W #[fg=$onedark_black,bg=$onedark_black,nobold,nounderscore,noitalics]"
|
||||||
|
+set "window-status-current-format" "#[fg=$onedark_black,bg=$onedark_visual_grey,nobold,nounderscore,noitalics]#[fg=$onedark_white,bg=$onedark_visual_grey,nobold] #I #W #[fg=$onedark_visual_grey,bg=$onedark_black,nobold,nounderscore,noitalics]"
|
||||||
|
|
@ -1,4 +1,13 @@
|
||||||
{pkgs, ...}: {
|
{
|
||||||
|
pkgs,
|
||||||
|
cLib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
getProgFor = cLib.getProgFor pkgs;
|
||||||
|
getProgFor' = cLib.getProgFor' pkgs;
|
||||||
|
tmux = getProgFor "tmux";
|
||||||
|
tmux-sessionizer = getProgFor' "tmux-sessionizer-cl" "tmux-sessionizer";
|
||||||
|
in {
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shortcut = "x";
|
shortcut = "x";
|
||||||
|
|
@ -11,15 +20,15 @@
|
||||||
sensible
|
sensible
|
||||||
yank
|
yank
|
||||||
{
|
{
|
||||||
plugin = onedark-theme;
|
plugin = onedark-theme.overrideAttrs (_: {
|
||||||
|
patches = [./bar.patch];
|
||||||
|
});
|
||||||
extraConfig = "\n";
|
extraConfig = "\n";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = resurrect;
|
plugin = resurrect;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set -g @resurrect-strategy-vim 'session'
|
set -g @resurrect-capture-pane-contents 'off'
|
||||||
set -g @resurrect-strategy-nvim 'session'
|
|
||||||
set -g @resurrect-capture-pane-contents 'on'
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -42,9 +51,9 @@
|
||||||
bind \\ split-window -v -c "#{pane_current_path}"
|
bind \\ split-window -v -c "#{pane_current_path}"
|
||||||
bind c new-window -c "#{pane_current_path}"
|
bind c new-window -c "#{pane_current_path}"
|
||||||
|
|
||||||
bind-key -r s run-shell "tmux display-popup -E 'tmux-sessionizer -s'"
|
bind-key -r s run-shell "${tmux} display-popup -E '${tmux-sessionizer} -s'"
|
||||||
bind-key -r f run-shell "tmux display-popup -E 'tmux-sessionizer -p'"
|
bind-key -r f run-shell "${tmux} display-popup -E '${tmux-sessionizer} -p'"
|
||||||
bind-key -r m run-shell "tmux switch-client -t main"
|
bind-key -r m run-shell "${tmux} switch-client -t main"
|
||||||
bind S choose-tree
|
bind S choose-tree
|
||||||
|
|
||||||
bind -r k select-pane -U
|
bind -r k select-pane -U
|
||||||
|
|
@ -53,8 +62,4 @@
|
||||||
bind -r l select-pane -R
|
bind -r l select-pane -R
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = [
|
|
||||||
pkgs.tmux-sessionizer-cl
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
{pkgs, ...}: {
|
{
|
||||||
|
pkgs,
|
||||||
|
cLib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
soundControl = cLib.getProgFor pkgs "pwvucontrol";
|
||||||
|
in {
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.waybar.override {
|
package = pkgs.waybar.override {
|
||||||
|
|
@ -35,7 +41,7 @@
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
};
|
};
|
||||||
wireplumber = {
|
wireplumber = {
|
||||||
on-click = "${pkgs.pwvucontrol}/bin/pwvucontrol";
|
on-click = toString soundControl;
|
||||||
format = "{icon} {volume}%";
|
format = "{icon} {volume}%";
|
||||||
format-muted = "";
|
format-muted = "";
|
||||||
format-icons = ["" "" ""];
|
format-icons = ["" "" ""];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{...}: {
|
{pkgs, ...}: {
|
||||||
imports = [./mako ./kanshi];
|
imports = [./mako ./kanshi];
|
||||||
services = {
|
services = {
|
||||||
network-manager-applet.enable = true;
|
network-manager-applet.enable = true;
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
gpg-agent = {
|
gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableSshSupport = true;
|
enableSshSupport = true;
|
||||||
|
pinentryPackage = pkgs.pinentry-gnome3;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,15 @@
|
||||||
vim
|
vim
|
||||||
gnome.adwaita-icon-theme
|
gnome.adwaita-icon-theme
|
||||||
wget
|
wget
|
||||||
|
pinentry
|
||||||
fzf
|
fzf
|
||||||
nil
|
nil
|
||||||
killall
|
killall
|
||||||
gcc
|
gcc
|
||||||
pkg-config
|
pkg-config
|
||||||
|
sbctl
|
||||||
|
nish
|
||||||
|
nsbm
|
||||||
];
|
];
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
|
|
@ -43,10 +47,7 @@
|
||||||
sessionVariables = {NIXOS_OZONE_WL = "1";};
|
sessionVariables = {NIXOS_OZONE_WL = "1";};
|
||||||
|
|
||||||
shells = with pkgs; [fish];
|
shells = with pkgs; [fish];
|
||||||
|
|
||||||
# etc."greetd/environments".text = ''
|
|
||||||
# hyprland
|
|
||||||
# '';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts.packages = with pkgs; [nerdfonts meslo-lgs-nf];
|
fonts.packages = with pkgs; [nerdfonts meslo-lgs-nf];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,12 @@
|
||||||
kernelModules = ["kvm-intel"];
|
kernelModules = ["kvm-intel"];
|
||||||
extraModulePackages = [];
|
extraModulePackages = [];
|
||||||
#kernelPackages = pkgs.linuxPackages_latest;
|
#kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
loader.systemd-boot.enable = lib.mkForce false;
|
||||||
|
lanzaboote = {
|
||||||
|
enable = true;
|
||||||
|
pkiBundle = "/etc/secureboot";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
hardware = {
|
hardware = {
|
||||||
bluetooth = {
|
bluetooth = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
{inputs, ...}: {
|
{
|
||||||
|
inputs,
|
||||||
|
cLib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
programs.hyprlock.enable = true;
|
programs.hyprlock.enable = true;
|
||||||
security.pam.services.hyprlock = {};
|
security.pam.services.hyprlock = {};
|
||||||
home-manager = {
|
home-manager = {
|
||||||
|
|
@ -11,6 +15,6 @@
|
||||||
inputs.self.homeManagerModules.trayscale
|
inputs.self.homeManagerModules.trayscale
|
||||||
];
|
];
|
||||||
users.c = import ../../home/c;
|
users.c = import ../../home/c;
|
||||||
extraSpecialArgs = {inherit inputs;};
|
extraSpecialArgs = {inherit inputs cLib;};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
flaresolverr = {
|
flaresolverr = {
|
||||||
#image = "ghcr.io/flaresolverr/flaresolverr:latest";
|
#image = "ghcr.io/flaresolverr/flaresolverr:latest";
|
||||||
#image = "ghcr.io/flaresolverr/flaresolverr:pr-1282";
|
#image = "ghcr.io/flaresolverr/flaresolverr:pr-1282";
|
||||||
image = "docker.io/alexfozor/flaresolverr:pr-1300";
|
image = "docker.io/alexfozor/flaresolverr:pr-1300-experimental";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
ports = ["127.0.0.1:8191:8191"];
|
ports = ["127.0.0.1:8191:8191"];
|
||||||
environment = {
|
environment = {
|
||||||
|
|
|
||||||
13
hosts/hermes/ddns.nix
Normal file
13
hosts/hermes/ddns.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{config, ...}: {
|
||||||
|
services.cloudflare-dyndns = {
|
||||||
|
enable = true;
|
||||||
|
ipv4 = true;
|
||||||
|
ipv6 = false;
|
||||||
|
proxied = false;
|
||||||
|
deleteMissing = false;
|
||||||
|
domains = [];
|
||||||
|
apiTokenFile = config.age.secrets.cloudflare-api.path;
|
||||||
|
};
|
||||||
|
# services.cloudflare-dyndns.domains = [];
|
||||||
|
age.secrets."cloudflare-api".file = ../../secrets/cloudflare-api.age;
|
||||||
|
}
|
||||||
|
|
@ -2,11 +2,14 @@
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
|
./ddns.nix
|
||||||
|
./quassel.nix
|
||||||
./fail2ban.nix
|
./fail2ban.nix
|
||||||
./containers.nix
|
./containers.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
./media.nix
|
./media.nix
|
||||||
./headscale.nix
|
./headscale.nix
|
||||||
|
./forgejo.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
40
hosts/hermes/forgejo.nix
Normal file
40
hosts/hermes/forgejo.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
domain = "git.cleslie.uk";
|
||||||
|
in {
|
||||||
|
services = {
|
||||||
|
cloudflare-dyndns.domains = [domain];
|
||||||
|
forgejo = {
|
||||||
|
enable = true;
|
||||||
|
database.type = "postgres";
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
#DOMAIN = domain;
|
||||||
|
ROOT_URL = "https://${domain}";
|
||||||
|
HTTP_PORT = 3000;
|
||||||
|
SSH_PORT = builtins.head config.services.openssh.ports;
|
||||||
|
};
|
||||||
|
service.DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
caddy.virtualHosts.${domain}.extraConfig = ''
|
||||||
|
reverse_proxy localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.forgejo.preStart = ''
|
||||||
|
admin="${lib.getExe config.services.forgejo.package} admin user"
|
||||||
|
$admin create --admin --email "git@cleslie.uk" --username cleslie --password "$(tr -d '\n' < ${config.age.secrets.forgejo-password.path})" || true
|
||||||
|
# $admin change-password --username cleslie --password "$(tr -d '\n' < ${config.age.secrets.forgejo-password.path})" || true
|
||||||
|
'';
|
||||||
|
|
||||||
|
age.secrets."forgejo-password" = {
|
||||||
|
file = ../../secrets/forgejo-password.age;
|
||||||
|
mode = "400";
|
||||||
|
owner = "forgejo";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -13,6 +13,7 @@ in {
|
||||||
ip_prefixes = "100.64.0.0/10";
|
ip_prefixes = "100.64.0.0/10";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
cloudflare-dyndns.domains = [domain];
|
||||||
caddy.virtualHosts.${domain}.extraConfig = ''
|
caddy.virtualHosts.${domain}.extraConfig = ''
|
||||||
reverse_proxy localhost:${toString config.services.headscale.port}
|
reverse_proxy localhost:${toString config.services.headscale.port}
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,8 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cloudflare-dyndns.domains = ["media.cleslie.uk" "watch.cleslie.uk" "request.cleslie.uk"];
|
||||||
|
|
||||||
jellyfin = {
|
jellyfin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.jellyfin;
|
package = pkgs.jellyfin;
|
||||||
|
|
|
||||||
6
hosts/hermes/quassel.nix
Normal file
6
hosts/hermes/quassel.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{...}: {
|
||||||
|
services.quassel = {
|
||||||
|
enable = true;
|
||||||
|
interfaces = ["0.0.0.0"];
|
||||||
|
};
|
||||||
|
}
|
||||||
4
justfile
4
justfile
|
|
@ -5,10 +5,14 @@ alias r := rebuild
|
||||||
alias v := vim
|
alias v := vim
|
||||||
alias u := update
|
alias u := update
|
||||||
alias c := cache
|
alias c := cache
|
||||||
|
alias d := deploy
|
||||||
|
|
||||||
rebuild:
|
rebuild:
|
||||||
sudo nixos-rebuild switch --flake .#
|
sudo nixos-rebuild switch --flake .#
|
||||||
|
|
||||||
|
deploy MACHINE:
|
||||||
|
nix run .#deploy-{{MACHINE}}
|
||||||
|
|
||||||
vim:
|
vim:
|
||||||
nix flake lock --update-input nixvim
|
nix flake lock --update-input nixvim
|
||||||
|
|
||||||
|
|
|
||||||
6
lib/default.nix
Normal file
6
lib/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
getProgFor' = pkgs: prog: progn: lib.getExe' pkgs.${prog} progn;
|
||||||
|
getProgFor = pkgs: prog: getProgFor' pkgs prog prog;
|
||||||
|
in {
|
||||||
|
inherit getProgFor getProgFor';
|
||||||
|
}
|
||||||
|
|
@ -28,7 +28,7 @@ in {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "An unofficial GUI wrapper around the Tailscale CLI client";
|
Description = "An unofficial GUI wrapper around the Tailscale CLI client";
|
||||||
Requires = ["tray.target"];
|
Requires = ["tray.target"];
|
||||||
After = ["graphical-session-pre.target" "tray.target"];
|
After = ["graphical-session-pre.target" "tray.target" "tailscaled.service"];
|
||||||
PartOf = ["graphical-session.target"];
|
PartOf = ["graphical-session.target"];
|
||||||
};
|
};
|
||||||
Install = {WantedBy = ["graphical-session.target"];};
|
Install = {WantedBy = ["graphical-session.target"];};
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@
|
||||||
agenix = inputs'.agenix.packages.default;
|
agenix = inputs'.agenix.packages.default;
|
||||||
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
|
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
|
||||||
devour-flake = pkgs.callPackage inputs.devour-flake {};
|
devour-flake = pkgs.callPackage inputs.devour-flake {};
|
||||||
|
nish = inputs'.nish.packages.default;
|
||||||
|
nsbm = inputs'.nsbm.packages.default;
|
||||||
jellyfin-ffmpeg = pkgs.jellyfin-ffmpeg.override {
|
jellyfin-ffmpeg = pkgs.jellyfin-ffmpeg.override {
|
||||||
ffmpeg_6-full = pkgs.ffmpeg_6-full.override {
|
ffmpeg_6-full = pkgs.ffmpeg_6-full.override {
|
||||||
withMfx = false;
|
withMfx = false;
|
||||||
|
|
|
||||||
8
secrets/cloudflare-api.age
Normal file
8
secrets/cloudflare-api.age
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 /RyXeg p2ROUhWiDQDOjALQnhhf566js8ivYTsgwNfCaaoe6yQ
|
||||||
|
UnCc2/4lb+PxnrKdAPVqwAyXavFGr8M3NV3+fSSdAU0
|
||||||
|
-> ssh-ed25519 aSaoJQ hHqpvUCaH5RLAQwTdH1llfF/0aTraXtl25qFDaFhUwk
|
||||||
|
+4VMHc3PGR9HBlVTw4anbYORQPgFl24WGF5pwmt7w20
|
||||||
|
--- qa7ctM764SNg3u/ITk+6DRXbLqF1Lom1xgKysY9DrkE
|
||||||
|
ô›Zš¾;Qš
|
||||||
|
7î‡kÔ4%ú½#<08>ŸÞåpqÃÅâvìyú]
ièeǺð]É©i¾Ó!4Ø=ÇsŒä‰<C3A4>JfÉpúH«sæò29½¥œs¯åF}µ‘˪—#ói8ù
|
||||||
7
secrets/forgejo-password.age
Normal file
7
secrets/forgejo-password.age
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 /RyXeg IjBz5+4Rk9Rg+jBgKWo/B5IoZmq/wTCWcqZRB/5lhAU
|
||||||
|
E2bov9sYropmovrjqTItnLLzgEECt6+9iD2zjHLvXbU
|
||||||
|
-> ssh-ed25519 aSaoJQ Rjq+7b3BFCrUFuVQhvrpxm8i4D7jpkkLleu36r4cinM
|
||||||
|
HpdvPeOUqUOxdcsnBd5QWiU00Di7xcKHLstI8Z9p6EM
|
||||||
|
--- 3Ku+G1FBZdVdS31q7fKd68Ai+FkD1rJg0eSKpYLd+2c
|
||||||
|
_ÎPEÚ ú#]¬È¼<17>ìlX‚“"ý¬ba·4¢Õ–•AƒlG8Œsot ~ióþé#/ib¡Î1eôµ7Þ›³ÿù
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
age-encryption.org/v1
|
age-encryption.org/v1
|
||||||
-> ssh-ed25519 /RyXeg RCXNBh7g6+X5buZJdDCd52elfUAnzgOUfINsdGCAcUg
|
-> ssh-ed25519 /RyXeg 9XOLVh3LUWmQD98tT0JVXV87VObvZLYdEpFZfbdF0xg
|
||||||
0MOZk6dC51NyFWBu/4+6XY9bMgQ9JoCv6ekH9eaghI0
|
ekxCG1bf0dBtxYn4MRNj5BrwfOEJQpH7NOLRGFTFfuo
|
||||||
-> ssh-ed25519 ejjLpg ILRsr6hHJZrX4ssD1hj8FEH8VhqIouHpdLX0phc8qiM
|
-> ssh-ed25519 ejjLpg GmmHEVNJCsf4ABHzKSSkHmjqg4hblBvB/ob/223u1yY
|
||||||
0G6VMYbLtq+HcYurP8AIT5qCrLbQJQEpyyqNmRrjJ7I
|
Dh+VB4Z4eYyZBq7+ygyFCh9UuUrczcgAfGs4ZwG87bo
|
||||||
-> ssh-ed25519 aSaoJQ OVpC763FiqHOaD+uThjZcXgi215AE07aXitPi6Ar3wE
|
-> ssh-ed25519 aSaoJQ OIxgxGcuSoXb7S6Ae8+zf3DIKQzsGq0/W7i9I9MRfy4
|
||||||
UGQ4Nnnxi2Z57XPJ+9DCUV+/U7aC+Wuprv4JcEHkFqE
|
jhujSlaLTbtlUwIMeT8sVXPlh6gizyQ7GvI7Smk51mA
|
||||||
--- ulRUBJuSDAodVNUVviwGJAYe7l/FOzVNNiQaVzGUWnI
|
--- GRaOmf1hUdTF6KiamM+U9yW/QerPtQSmLEnPVdlk5Zw
|
||||||
òÊÈë&‡¬(fsR…v•Kp¬**/-~jž&I-Ô³²/ÄpdEÑÂ$u*öànëÓPnïëïA0Ž–_ìE–ëû‰ÒÏôÿ6·´
|
ÄsOà…-r*S0'ïÄ™s*¢öq`x¢O¸p8¾_ÏÑ—6"¡l7Çø^î‹Ø«ð@"êuî^øïjÜ9„´d÷½ÑËŠ2Óïè²€/ª»
|
||||||
Binary file not shown.
|
|
@ -9,4 +9,6 @@ in {
|
||||||
"wg-conf.age".publicKeys = keys.c ++ allSystems;
|
"wg-conf.age".publicKeys = keys.c ++ allSystems;
|
||||||
"mesh-conf-infra.age".publicKeys = keys.c ++ allSystems;
|
"mesh-conf-infra.age".publicKeys = keys.c ++ allSystems;
|
||||||
"mesh-conf-cleslie.age".publicKeys = keys.c ++ allSystems;
|
"mesh-conf-cleslie.age".publicKeys = keys.c ++ allSystems;
|
||||||
|
"forgejo-password.age".publicKeys = keys.c ++ [systems.hermes];
|
||||||
|
"cloudflare-api.age".publicKeys = keys.c ++ [systems.hermes];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue