Compare commits

...

27 commits

Author SHA1 Message Date
b478f7b1ae home: jujutsu: explicitly create 'conf.d'
All checks were successful
ci/woodpecker/push/check Pipeline was successful
This is to serve as a reminder of _how_ to add a local configuration
file.
2025-06-06 11:32:55 +00:00
f65bdf0013 WIP: ADD NOTE FOR FUTURE SELF 2025-06-06 11:32:54 +00:00
b7f933e0e5 home: jj: use verbose draft commit messages 2025-06-06 11:32:54 +00:00
57e63e4b6d WIP: add jujutsu (w/ Delta) 2025-06-06 11:32:52 +00:00
a67a54bda2 nixos: services: paperless: use structured setting
All checks were successful
ci/woodpecker/push/check Pipeline was successful
The module should stringify it to JSON automatically, so might as well
use the more readable option.
2025-05-31 22:56:30 +02:00
9751fdb888 hosts: homes: bazin: disable 'atuin' package
All checks were successful
ci/woodpecker/push/check Pipeline was successful
Same as on `mousqueton`.
2025-05-27 11:39:15 +00:00
24407448d4 hosts: homes: mousqueton: disable 'atuin' package
The system-provided package is built without its sync functionality.

To ensure the module works as written, I can't use `pkgs.emptyDirectory`
for this unfortunately...
2025-05-27 11:38:09 +00:00
c1e2114c57 flake: bump inputs
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2025-05-23 22:57:41 +01:00
97bcc5f34e hosts: nixos: porthos: secrets: update cross-seed
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2025-05-22 16:13:55 +02:00
f14f5c7f8a flake: bump inputs
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2025-05-14 18:51:12 +00:00
5b545a28f1 nixos: services: mealie: use automatic DB setup
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2025-05-09 00:02:07 +02:00
1dc65a37e7 nixos: services: paperless: set proxy settings
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2025-05-08 23:29:30 +02:00
a997d36964 nixos: services: paperless: fix formatting 2025-05-08 23:22:35 +02:00
0c5836bc56 nixos: services: paperless: use 'PAPERLESS_URL' 2025-05-08 23:22:11 +02:00
77839ab2ef flake: bump inputs
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2025-05-08 13:29:35 +00:00
8a8e4f93a5 flake: home-manager: remove obsolete comment
Some checks failed
ci/woodpecker/push/check Pipeline failed
2025-05-07 17:16:44 +00:00
07d8f5a03f flake: nixos: use 'nixpkgs.hostPlatform'
Some checks failed
ci/woodpecker/push/check Pipeline failed
This is the proper way to set `system` nowadays.
2025-05-07 17:46:01 +02:00
a9ba93f834 home: delta: assert git is enabled
Some checks failed
ci/woodpecker/push/check Pipeline failed
2025-05-07 11:27:12 +00:00
d2a8894eb2 home: wm: i3: make 'firefox' history float
Some checks failed
ci/woodpecker/manual/check Pipeline failed
2025-05-05 18:06:46 +01:00
22f97b4ac7 home: vim: lua: lsp: configure inlay hints 2025-05-03 13:56:12 +01:00
921d604ebe hosts: nixos: porthos: secrets: update cross-seed
Some checks failed
ci/woodpecker/push/check Pipeline failed
2025-05-02 22:35:33 +01:00
e3243ebe80 nixos: services: nextcloud: simplify DB handling
Some checks failed
ci/woodpecker/push/check Pipeline failed
I *think* the option didn't exist when I originally used this module.
2025-05-02 17:59:06 +01:00
4b6f62b25a home: gpg: fix deprecated config
Some checks failed
ci/woodpecker/push/check Pipeline failed
2025-04-30 21:39:39 +01:00
c5be292dfc nixos: profiles: wm: fix i3lock PAM service
This was announced as a breaking change, and would lock me out if not
set.

I wish the transition went a bit slower, by first introducing the
option for each PAM service, and *then* toggling it. Oh well.
2025-04-30 21:38:29 +01:00
bfda64288e nix: bump inputs 2025-04-30 21:05:22 +01:00
89bc60609f home: firefox: tridactyl: use 'replaceVars'
Some checks failed
ci/woodpecker/push/check Pipeline failed
2025-04-24 12:46:24 +02:00
2eb2a83dca flake: bump inputs
Some checks failed
ci/woodpecker/push/check Pipeline failed
2025-04-24 09:33:30 +00:00
17 changed files with 249 additions and 78 deletions

30
flake.lock generated
View file

@ -14,11 +14,11 @@
]
},
"locked": {
"lastModified": 1736955230,
"narHash": "sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA=",
"lastModified": 1747575206,
"narHash": "sha256-NwmAFuDUO/PFcgaGGr4j3ozG9Pe5hZ/ogitWhY+D81k=",
"owner": "ryantm",
"repo": "agenix",
"rev": "e600439ec4c273cf11e06fe4d9d906fb98fa097c",
"rev": "4835b1dc898959d8547a871ef484930675cb47f1",
"type": "github"
},
"original": {
@ -36,11 +36,11 @@
]
},
"locked": {
"lastModified": 1700795494,
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
"lastModified": 1744478979,
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
"type": "github"
},
"original": {
@ -117,11 +117,11 @@
]
},
"locked": {
"lastModified": 1742649964,
"narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=",
"lastModified": 1747372754,
"narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
"rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46",
"type": "github"
},
"original": {
@ -159,11 +159,11 @@
]
},
"locked": {
"lastModified": 1743869639,
"narHash": "sha256-Xhe3whfRW/Ay05z9m1EZ1/AkbV1yo0tm1CbgjtCi4rQ=",
"lastModified": 1747978958,
"narHash": "sha256-pQQnbxWpY3IiZqgelXHIe/OAE/Yv4NSQq7fch7M6nXQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d094c6763c6ddb860580e7d3b4201f8f496a6836",
"rev": "7419250703fd5eb50e99bdfb07a86671939103ea",
"type": "github"
},
"original": {
@ -175,11 +175,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1744777043,
"narHash": "sha256-O6jgTxz9BKUiaJl03JsVHvSjtCOC8gHfDvC2UCfcLMc=",
"lastModified": 1747744144,
"narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7a6f7f4c1c69eee05641beaa40e7f85da8e69fb0",
"rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f",
"type": "github"
},
"original": {

View file

@ -22,10 +22,6 @@ let
];
mkHome = name: system: inputs.home-manager.lib.homeManagerConfiguration {
# Work-around for home-manager
# * not letting me set `lib` as an extraSpecialArgs
# * not respecting `nixpkgs.overlays` [1]
# [1]: https://github.com/nix-community/home-manager/issues/2954
pkgs = inputs.nixpkgs.legacyPackages.${system};
modules = defaultModules ++ [

View file

@ -15,8 +15,10 @@ let
];
buildHost = name: system: lib.nixosSystem {
inherit system;
modules = defaultModules ++ [
{
nixpkgs.hostPlatform = system;
}
"${self}/hosts/nixos/${name}"
];
specialArgs = {

View file

@ -4,6 +4,20 @@
services.gpg-agent.enable = lib.mkForce false;
my.home = {
atuin = {
package = pkgs.stdenv.mkDerivation {
pname = "atuin";
version = "18.4.0";
buildCommand = ''
mkdir -p $out/bin
ln -s /usr/bin/atuin $out/bin/atuin
'';
meta.mainProgram = "atuin";
};
};
git = {
package = pkgs.emptyDirectory;
};

View file

@ -7,6 +7,20 @@
services.gpg-agent.enable = lib.mkForce false;
my.home = {
atuin = {
package = pkgs.stdenv.mkDerivation {
pname = "atuin";
version = "18.4.0";
buildCommand = ''
mkdir -p $out/bin
ln -s /usr/bin/atuin $out/bin/atuin
'';
meta.mainProgram = "atuin";
};
};
git = {
package = pkgs.emptyDirectory;
};

View file

@ -24,6 +24,7 @@
./gtk
./htop
./jq
./jujutsu
./keyboard
./mail
./mpv

View file

@ -11,6 +11,10 @@ in
git = {
enable = my.mkDisableOption "git integration";
};
jujutsu = {
enable = my.mkDisableOption "jujutsu integration";
};
};
config = lib.mkIf cfg.enable {
@ -23,6 +27,20 @@ in
properly configured.
'';
}
{
assertion = cfg.enable -> config.programs.git.enable;
message = ''
`config.my.home.delta` relies on `config.programs.git` to be
enabled.
'';
}
{
assertion = cfg.jujutsu.enable -> cfg.git.enable;
message = ''
`config.my.home.delta.jujutsu` relies on `config.my.home.delta.git`
being enabled.
'';
}
];
home.packages = [ cfg.package ];
@ -57,5 +75,25 @@ in
};
};
};
programs.jujutsu = lib.mkIf cfg.jujutsu.enable {
settings = {
merge-tools = {
delta = {
# Errors are signaled with exit codes greater or equal to 2
diff-expected-exit-codes = [ 0 1 ];
};
};
ui = {
diff = {
# Delta expects a `git diff` input
format = "git";
};
pager = "${lib.getExe cfg.package}";
};
};
};
};
}

View file

@ -12,9 +12,7 @@ let
in
{
config = lib.mkIf cfg.enable {
xdg.configFile."tridactyl/tridactylrc".source = pkgs.substituteAll {
src = ./tridactylrc;
xdg.configFile."tridactyl/tridactylrc".source = pkgs.replaceVars ./tridactylrc {
editorcmd = lib.concatStringsSep " " [
# Use my configured terminal
term

View file

@ -17,7 +17,7 @@ in
services.gpg-agent = {
enable = true;
enableSshSupport = true; # One agent to rule them all
pinentryPackage = cfg.pinentry;
pinentry.package = cfg.pinentry;
extraConfig = ''
allow-loopback-pinentry
'';

View file

@ -0,0 +1,128 @@
{ config, pkgs, lib, ... }:
let
cfg = config.my.home.jujutsu;
inherit (lib.my) mkMailAddress;
in
{
options.my.home.jujutsu = with lib; {
enable = my.mkDisableOption "jujutsu configuration";
package = mkPackageOption pkgs "jujutsu" { };
};
config = lib.mkIf cfg.enable {
assertions = [
{
# For `jj git` commands
assertion = cfg.enable -> config.my.home.git.enable;
message = ''
`config.my.home.jujutsu` relies on `config.my.home.git` being enabled.
'';
}
];
programs.jujutsu = {
enable = true;
inherit (cfg) package;
settings = {
# Who am I?
user = {
name = "Bruno BELANYI";
email = mkMailAddress "bruno" "belanyi.fr";
};
aliases = {
jj = [ "util" "exec" "--" "jj" ];
# FIXME:
# * topo sort by default (I think? test it)
# * still not a big fan of the template
lol = [ "log" "-r" "..@" "-T" "builtin_log_oneline" ];
lola = [ "lol" "-r" "all()" ];
# TODO:
# * `pick` (https://github.com/jj-vcs/jj/issues/5446): [ "util" "exec" "--" "bash" "-c" "jj log -p -r \"diff_contains($1)\"" ]
# * `root`: `jj workspace root` (barely necessary then)
};
# FIXME: git equivalents
# blame = {
# coloring = "repeatedLines";
# markIgnoredLines = true;
# markUnblamables = true;
# };
# FIXME: log colors should probably match git
# FIXME: patience diff?
# FIXME: fetch prune/pruneTags?
# FIXME: pull.rebase=true? Probably true TBH
# FIXME: push.default=simple? Probably true TBH
# FIXME: conflict style? ui.conflict-marker-style=git is diff3/zdiff3
# FIXME: from ma_9's config, plus my own stuff
# snapshot = {
# auto-track = "none()";
# };
#
# ui = {
# diff-editor = ":builtin"; # To silence hints
# movement = {
# edit = false;
# };
# };
templates = {
# Equivalent to `commit.verbose = true` in Git
draft_commit_description = "commit_description_verbose(self)";
};
template-aliases = {
"commit_description_verbose(commit)" = ''
concat(
commit_description(commit),
"JJ: ignore-rest\n",
diff.git(),
)
'';
# FIXME: use `diff.summary()` instead? Supported by syntax highlighting
# See https://github.com/jj-vcs/jj/issues/1946#issuecomment-2572986485
# FIXME: tree-sitter grammar isn't in `nvim-treesitter` (https://github.com/kareigu/tree-sitter-jjdescription)
"commit_description(commit)" = ''
concat(
commit.description(), "\n",
"JJ: This commit contains the following changes:\n",
indent("JJ: ", diff.stat(72)),
)
'';
};
"--scope" = [
# Multiple identities
{
"--when" = {
repositories = [ "~/git/EPITA/" ];
};
user = {
name = "Bruno BELANYI";
email = mkMailAddress "bruno.belanyi" "epita.fr";
};
}
{
"--when" = {
repositories = [ "~/git/work/" ];
};
user = {
name = "Bruno BELANYI";
email = mkMailAddress "ambroisie" "google.com";
};
}
];
};
};
# To drop in a `local.toml` configuration, not-versioned
xdg.configFile = {
"jj/conf.d/.keep".text = "";
};
};
}

View file

@ -53,6 +53,10 @@ M.on_attach = function(client, bufnr)
vim.diagnostic.open_float(nil, { scope = "buffer" })
end
local function toggle_inlay_hints()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
end
local keys = {
buffer = bufnr,
-- LSP navigation
@ -67,6 +71,7 @@ M.on_attach = function(client, bufnr)
{ "<leader>ca", vim.lsp.buf.code_action, desc = "Code actions" },
{ "<leader>cd", cycle_diagnostics_display, desc = "Cycle diagnostics display" },
{ "<leader>cD", show_buffer_diagnostics, desc = "Show buffer diagnostics" },
{ "<leader>ch", toggle_inlay_hints, desc = "Toggle inlay hints" },
{ "<leader>cr", vim.lsp.buf.rename, desc = "Rename symbol" },
{ "<leader>cs", vim.lsp.buf.signature_help, desc = "Show signature" },
{ "<leader>ct", vim.lsp.buf.type_definition, desc = "Go to type definition" },

View file

@ -127,6 +127,7 @@ in
{ class = "^Blueman-.*$"; }
{ title = "^htop$"; }
{ class = "^Thunderbird$"; instance = "Mailnews"; window_role = "filterlist"; }
{ class = "^firefox$"; instance = "Places"; window_role = "Organizer"; }
{ class = "^pavucontrol.*$"; }
{ class = "^Arandr$"; }
{ class = "^\\.blueman-manager-wrapped$"; }

View file

@ -24,6 +24,8 @@ in
my.home.udiskie.enable = true;
# udiskie fails if it can't find this dbus service
services.udisks2.enable = true;
# Ensure i3lock can actually unlock the session
security.pam.services.i3lock.enable = true;
})
];
}

View file

@ -38,27 +38,13 @@ in
# Make it work with socket auth
POSTGRES_URL_OVERRIDE = "postgresql://mealie:@/mealie?host=/run/postgresql";
};
};
systemd.services = {
mealie = {
after = [ "postgresql.service" ];
requires = [ "postgresql.service" ];
# Automatic PostgreSQL provisioning
database = {
createLocally = true;
};
};
# Set-up database
services.postgresql = {
enable = true;
ensureDatabases = [ "mealie" ];
ensureUsers = [
{
name = "mealie";
ensureDBOwnership = true;
}
];
};
my.services.nginx.virtualHosts = {
mealie = {
inherit (cfg) port;

View file

@ -44,11 +44,15 @@ in
adminuser = cfg.admin;
adminpassFile = cfg.passwordFile;
dbtype = "pgsql";
dbhost = "/run/postgresql";
};
https = true;
# Automatic PostgreSQL provisioning
database = {
createLocally = true;
};
settings = {
overwriteprotocol = "https"; # Nginx only allows SSL
};
@ -60,22 +64,6 @@ in
};
};
services.postgresql = {
enable = true;
ensureDatabases = [ "nextcloud" ];
ensureUsers = [
{
name = "nextcloud";
ensureDBOwnership = true;
}
];
};
systemd.services."nextcloud-setup" = {
requires = [ "postgresql.service" ];
after = [ "postgresql.service" ];
};
# The service above configures the domain, no need for my wrapper
services.nginx.virtualHosts."nextcloud.${config.networking.domain}" = {
forceSSL = true;

View file

@ -52,30 +52,28 @@ in
mediaDir = lib.mkIf (cfg.documentPath != null) cfg.documentPath;
settings =
let
paperlessDomain = "paperless.${config.networking.domain}";
in
{
# Use SSO
PAPERLESS_ENABLE_HTTP_REMOTE_USER = true;
PAPERLESS_HTTP_REMOTE_USER_HEADER_NAME = "HTTP_X_USER";
settings = {
# Use SSO
PAPERLESS_ENABLE_HTTP_REMOTE_USER = true;
PAPERLESS_ENABLE_HTTP_REMOTE_USER_API = true;
PAPERLESS_HTTP_REMOTE_USER_HEADER_NAME = "HTTP_X_USER";
# Security settings
PAPERLESS_ALLOWED_HOSTS = paperlessDomain;
PAPERLESS_CORS_ALLOWED_HOSTS = "https://${paperlessDomain}";
# Security settings
PAPERLESS_URL = "https://paperless.${config.networking.domain}";
PAPERLESS_USE_X_FORWARD_HOST = true;
PAPERLESS_PROXY_SSL_HEADER = [ "HTTP_X_FORWARDED_PROTO" "https" ];
# OCR settings
PAPERLESS_OCR_LANGUAGE = "fra+eng";
# OCR settings
PAPERLESS_OCR_LANGUAGE = "fra+eng";
# Workers
PAPERLESS_TASK_WORKERS = 3;
PAPERLESS_THREADS_PER_WORKER = 4;
# Workers
PAPERLESS_TASK_WORKERS = 3;
PAPERLESS_THREADS_PER_WORKER = 4;
# Misc
PAPERLESS_TIME_ZONE = config.time.timeZone;
PAPERLESS_ADMIN_USER = cfg.username;
};
# Misc
PAPERLESS_TIME_ZONE = config.time.timeZone;
PAPERLESS_ADMIN_USER = cfg.username;
};
# Admin password
passwordFile = cfg.passwordFile;