Compare commits
No commits in common. "e3f3e7528571f29e221c5103c6891e95d6867e7c" and "acd7def6ed93fe5aceb84e1119a7d6ebc52cde85" have entirely different histories.
e3f3e75285
...
acd7def6ed
66 changed files with 1815 additions and 2250 deletions
|
|
@ -1,15 +1,12 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
|
||||||
flakes,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(inputs.self + /modules/machine-type.nix)
|
# ./cli-programs
|
||||||
(inputs.self + /modules/program.nix)
|
# inputs.home-manager.nixosModules.home-manager
|
||||||
(inputs.self + /programs)
|
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "26.05";
|
system.stateVersion = "26.05";
|
||||||
|
|
@ -132,13 +129,4 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
useUserPackages = true;
|
|
||||||
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit flakes;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,6 @@ _: {
|
||||||
./services
|
./services
|
||||||
];
|
];
|
||||||
|
|
||||||
custom.machine = {
|
|
||||||
type = "server";
|
|
||||||
capabilities = [
|
|
||||||
"cli"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.nameservers = [
|
networking.nameservers = [
|
||||||
"1.1.1.1"
|
"1.1.1.1"
|
||||||
"9.9.9.9"
|
"9.9.9.9"
|
||||||
|
|
@ -44,10 +37,10 @@ _: {
|
||||||
sops.defaultSopsFormat = "dotenv";
|
sops.defaultSopsFormat = "dotenv";
|
||||||
|
|
||||||
users.extraUsers.jana.extraGroups = [
|
users.extraUsers.jana.extraGroups = [
|
||||||
"storage"
|
"storage"
|
||||||
"syncthing"
|
"syncthing"
|
||||||
"jellyfin"
|
"jellyfin"
|
||||||
"media"
|
"media"
|
||||||
"nginx"
|
"nginx"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -54,10 +54,6 @@
|
||||||
name = "pocketid";
|
name = "pocketid";
|
||||||
ensureDBOwnership = true;
|
ensureDBOwnership = true;
|
||||||
}
|
}
|
||||||
{
|
|
||||||
name = "immich";
|
|
||||||
ensureDBOwnership = true;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
ensureDatabases = map (i: i.name) ensureUsers;
|
ensureDatabases = map (i: i.name) ensureUsers;
|
||||||
};
|
};
|
||||||
|
|
@ -6,9 +6,9 @@ _: {
|
||||||
./forgejo.nix
|
./forgejo.nix
|
||||||
./obsidian-sync.nix
|
./obsidian-sync.nix
|
||||||
./metrics.nix
|
./metrics.nix
|
||||||
./immich.nix
|
|
||||||
|
|
||||||
./factorio
|
./factorio.nix
|
||||||
|
|
||||||
./media
|
./media
|
||||||
./websites
|
./websites
|
||||||
./auth
|
./auth
|
||||||
|
|
@ -116,7 +116,7 @@ in
|
||||||
"pineapple"
|
"pineapple"
|
||||||
];
|
];
|
||||||
extraSettingsFile = config.sops.secrets.factorio.path;
|
extraSettingsFile = config.sops.secrets.factorio.path;
|
||||||
# mods = getMods .factorio-mods/tawney;
|
# mods = getMods ../../factorio-mods/tawney;
|
||||||
package = factorioVersion "2.0.69" "sha256-I1FHuz7WtfCmmTiTxskv3+U1upWrhmBG9R+GUoS1c0E=";
|
package = factorioVersion "2.0.69" "sha256-I1FHuz7WtfCmmTiTxskv3+U1upWrhmBG9R+GUoS1c0E=";
|
||||||
port = 20001;
|
port = 20001;
|
||||||
}
|
}
|
||||||
|
|
@ -129,7 +129,7 @@ in
|
||||||
"koragendum"
|
"koragendum"
|
||||||
];
|
];
|
||||||
extraSettingsFile = config.sops.secrets.factorio.path;
|
extraSettingsFile = config.sops.secrets.factorio.path;
|
||||||
mods = getMods ./factorio-mods/snek;
|
mods = getMods ../../factorio-mods/snek;
|
||||||
package = factorioVersion "2.0.69" "sha256-I1FHuz7WtfCmmTiTxskv3+U1upWrhmBG9R+GUoS1c0E=";
|
package = factorioVersion "2.0.69" "sha256-I1FHuz7WtfCmmTiTxskv3+U1upWrhmBG9R+GUoS1c0E=";
|
||||||
port = 20002;
|
port = 20002;
|
||||||
};
|
};
|
||||||
|
|
@ -94,9 +94,9 @@
|
||||||
SMTP_ADDR = "smtp.fastmail.com";
|
SMTP_ADDR = "smtp.fastmail.com";
|
||||||
FROM = "git@donsz.nl";
|
FROM = "git@donsz.nl";
|
||||||
USER = "git@donsz.nl";
|
USER = "git@donsz.nl";
|
||||||
PASSWD = config.sops.secrets.forgejo.path;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
mailerPasswordFile = config.sops.secrets.forgejo.path;
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets.forgejo-runner = {
|
sops.secrets.forgejo-runner = {
|
||||||
|
|
@ -39,7 +39,7 @@ let
|
||||||
restartIfChanged = true;
|
restartIfChanged = true;
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${flakes.mifg.packages.${pkgs.system}.backend}/bin/backend";
|
ExecStart = "${flakes.mifg.packages.${pkgs.system}.backend}/bin/mifg-backend";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
# EnvironmentFile = "/run/secrets/reviewqueue";
|
# EnvironmentFile = "/run/secrets/reviewqueue";
|
||||||
StateDirectory = "${service-name}";
|
StateDirectory = "${service-name}";
|
||||||
|
|
@ -49,12 +49,6 @@ let
|
||||||
MIFG_DATABASE_LOCATION = "/var/lib/${service-name}/db.sqlite";
|
MIFG_DATABASE_LOCATION = "/var/lib/${service-name}/db.sqlite";
|
||||||
MIFG_FRONTEND_ORIGIN = "https://${public-url}";
|
MIFG_FRONTEND_ORIGIN = "https://${public-url}";
|
||||||
MIFG_PORT = toString api-port;
|
MIFG_PORT = toString api-port;
|
||||||
LD_LIBRARY_PATH =
|
|
||||||
with pkgs;
|
|
||||||
lib.makeLibraryPath [
|
|
||||||
openssl
|
|
||||||
sqlite
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -39,12 +39,6 @@
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
DB_PATH = "/var/lib/reviewqueue/db.sqlite";
|
DB_PATH = "/var/lib/reviewqueue/db.sqlite";
|
||||||
LD_LIBRARY_PATH =
|
|
||||||
with pkgs;
|
|
||||||
lib.makeLibraryPath [
|
|
||||||
openssl
|
|
||||||
sqlite
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
34
flake.lock
generated
34
flake.lock
generated
|
|
@ -701,11 +701,11 @@
|
||||||
"nixpkgs": "nixpkgs_5"
|
"nixpkgs": "nixpkgs_5"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1769115257,
|
"lastModified": 1767948332,
|
||||||
"narHash": "sha256-Ju8QvCoBECGHoCfE9TQTUnMrK9E4BvBpyhCzh+VrerM=",
|
"narHash": "sha256-TfGH5+8H70FUNmEuyLW799G3EVmij0aJcjaL+hYhvk0=",
|
||||||
"owner": "jdonszelmann",
|
"owner": "jdonszelmann",
|
||||||
"repo": "homepage",
|
"repo": "homepage",
|
||||||
"rev": "53b9b3b1e3f13ea3e3f0b09856b5236c96e4cded",
|
"rev": "d236b50f86a638f15a58468b28a218797c1d4c4e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -817,11 +817,11 @@
|
||||||
"nixpkgs-mozilla": "nixpkgs-mozilla"
|
"nixpkgs-mozilla": "nixpkgs-mozilla"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1768926700,
|
"lastModified": 1768757523,
|
||||||
"narHash": "sha256-/bANzWLzVAzdRDXua/p9wIDS/RGIHSBHqyduXoCd+P8=",
|
"narHash": "sha256-S5hYmrxZUSgyZ8609tPK00dkmd9yjTHtIMz7GHllQ+U=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "7c883e02e2a77061bfa048d249df0d39b362a5cf",
|
"rev": "4df0eff3871a61df547bcb1fecd657dc77dc24c7",
|
||||||
"revCount": 72,
|
"revCount": 69,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://forgejo@git.donsz.nl/jana/money.is.fckn.gay.git"
|
"url": "ssh://forgejo@git.donsz.nl/jana/money.is.fckn.gay.git"
|
||||||
},
|
},
|
||||||
|
|
@ -1231,11 +1231,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_18": {
|
"nixpkgs_18": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1769248673,
|
"lastModified": 1768843991,
|
||||||
"narHash": "sha256-oyxrDiV2yFToXpzwiJUYkxCjFHvL21tMQ2BpQMyMDTw=",
|
"narHash": "sha256-PVeXWVDWOuBB7ZmcxZxaXztvqV33ChfojMR3sczLnFg=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c0301d62ba146fee37e79fbc4b6323af52a2834e",
|
"rev": "7f0857c5a1bffd38d5694d0979f708fec368577a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1644,11 +1644,11 @@
|
||||||
"nixpkgs-mozilla": "nixpkgs-mozilla_2"
|
"nixpkgs-mozilla": "nixpkgs-mozilla_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1768928997,
|
"lastModified": 1765466675,
|
||||||
"narHash": "sha256-YuG6heuos8YhDJYinNyllucglC33Rgi69FEGVl7pYI0=",
|
"narHash": "sha256-JXtN956VZHmRHQmwx4QxA1EWC3uTKjv/O5ttA6pSb7k=",
|
||||||
"owner": "jdonszelmann",
|
"owner": "jdonszelmann",
|
||||||
"repo": "review-queue",
|
"repo": "review-queue",
|
||||||
"rev": "5ab3617eab847a3007f7b70a11f912315afc3ec1",
|
"rev": "357bc3b37c99754b93cfc1950e69c209e374cb0c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1821,11 +1821,11 @@
|
||||||
"nixpkgs": "nixpkgs_18"
|
"nixpkgs": "nixpkgs_18"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1769256063,
|
"lastModified": 1767655057,
|
||||||
"narHash": "sha256-fVFJ10YXPF8RfUuyL3OHOP6v0pzU78mTeKvlOCRCuuA=",
|
"narHash": "sha256-gvDWxuDucrGsBxDF0iZeFcTqVbADMcWwK2nne6LKlLs=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "179e0bf0028c929978a3fbe7f77a27b2254eeb18",
|
"rev": "ea9c28258665f76042781a2b7b84ddf6d99a6e62",
|
||||||
"revCount": 7,
|
"revCount": 6,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://forgejo@git.donsz.nl/jana/server-secrets.git"
|
"url": "ssh://forgejo@git.donsz.nl/jana/server-secrets.git"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -142,9 +142,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
home-manager.nixosModules.home-manager
|
./fili/configuration.nix
|
||||||
./hosts/fili/configuration.nix
|
./users/users.nix
|
||||||
./users
|
|
||||||
./default-machine-config.nix
|
./default-machine-config.nix
|
||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
vpn-confinement.nixosModules.default
|
vpn-confinement.nixosModules.default
|
||||||
|
|
@ -162,8 +161,8 @@
|
||||||
};
|
};
|
||||||
imports = [
|
imports = [
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
./hosts/kili/configuration.nix
|
./kili/configuration.nix
|
||||||
./users
|
./users/users.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,96 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
secrets,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
|
|
||||||
users.groups.jellyfin = { };
|
|
||||||
users.users.immich = {
|
|
||||||
isSystemUser = true;
|
|
||||||
group = "immich";
|
|
||||||
|
|
||||||
extraGroups = [
|
|
||||||
"video"
|
|
||||||
"render"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
intel-ocl
|
|
||||||
intel-media-driver
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
sops.secrets.immich-session-secret = {
|
|
||||||
sopsFile = "${secrets}/immich.yaml";
|
|
||||||
key = "client_secret";
|
|
||||||
format = "yaml";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."photos.donsz.nl" = {
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://[::1]:${toString config.services.immich.port}";
|
|
||||||
proxyWebsockets = true;
|
|
||||||
recommendedProxySettings = true;
|
|
||||||
extraConfig = ''
|
|
||||||
client_max_body_size 50000M;
|
|
||||||
proxy_read_timeout 600s;
|
|
||||||
proxy_send_timeout 600s;
|
|
||||||
send_timeout 600s;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.immich = {
|
|
||||||
enable = true;
|
|
||||||
port = 2283;
|
|
||||||
|
|
||||||
database = {
|
|
||||||
name = "immich";
|
|
||||||
createDB = false;
|
|
||||||
user = "postgres";
|
|
||||||
host = "localhost";
|
|
||||||
port = 5432;
|
|
||||||
};
|
|
||||||
|
|
||||||
secretsFile = toString (
|
|
||||||
pkgs.writeText "db-password" ''
|
|
||||||
DB_PASSWORD=immich
|
|
||||||
''
|
|
||||||
);
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
server.externalDomain = "https://photos.donsz.nl";
|
|
||||||
logging.level = "verbose";
|
|
||||||
|
|
||||||
oauth = {
|
|
||||||
enabled = true;
|
|
||||||
|
|
||||||
clientSecret._secret = config.sops.secrets.immich-session-secret.path;
|
|
||||||
autoLaunch = true;
|
|
||||||
autoRegister = true;
|
|
||||||
buttonText = "Log in";
|
|
||||||
clientId = "8fd9c066-2298-4991-ba24-7c41bd73192b";
|
|
||||||
issuerUrl = "https://auth.donsz.nl";
|
|
||||||
roleClaim = "immich_role";
|
|
||||||
scope = "openid email profile groups";
|
|
||||||
tokenEndpointAuthMethod = "client_secret_post";
|
|
||||||
# storageLabelClaim: "",
|
|
||||||
# "mobileOverrideEnabled": false,
|
|
||||||
# "mobileRedirectUri": "",
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
mediaLocation = "/storage/storage/media-server/photos";
|
|
||||||
accelerationDevices = [
|
|
||||||
"/dev/dri/renderD128"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +1,16 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
|
flakes,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../default-machine-config.nix
|
../default-machine-config.nix
|
||||||
|
../programs/kanata/system.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
custom.machine = {
|
|
||||||
type = "pc";
|
|
||||||
capabilities = [
|
|
||||||
"cli"
|
|
||||||
"graphical"
|
|
||||||
"work"
|
|
||||||
"fun"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
|
@ -49,6 +41,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.jana = {
|
users.users.jana = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "jana";
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"wheel"
|
"wheel"
|
||||||
|
|
@ -160,4 +154,14 @@
|
||||||
"root"
|
"root"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
users.jana = ./home.nix;
|
||||||
|
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit flakes;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
58
kili/home.nix
Normal file
58
kili/home.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
flakes,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
flakes.nixvim.homeModules.nixvim
|
||||||
|
flakes.niri.homeModules.niri
|
||||||
|
flakes.matugen.nixosModules.default
|
||||||
|
flakes.noctalia.homeModules.default
|
||||||
|
|
||||||
|
# ../programs/nvim
|
||||||
|
../programs/fish
|
||||||
|
../programs/kanata
|
||||||
|
../programs/kitty
|
||||||
|
../programs/tmux
|
||||||
|
../programs/git
|
||||||
|
../programs/jj
|
||||||
|
../programs/niri
|
||||||
|
../programs/zed
|
||||||
|
../programs/firefox
|
||||||
|
];
|
||||||
|
|
||||||
|
home = {
|
||||||
|
stateVersion = "26.05";
|
||||||
|
username = "jana";
|
||||||
|
homeDirectory = "/home/jana";
|
||||||
|
|
||||||
|
packages = with pkgs; [
|
||||||
|
p1n3appl3.tab
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file = {
|
||||||
|
"dl".source = config.lib.file.mkOutOfStoreSymlink "${config.xdg.userDirs.download}";
|
||||||
|
"doc".source = config.lib.file.mkOutOfStoreSymlink "${config.xdg.userDirs.documents}";
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
configHome = "${config.home.homeDirectory}/.config";
|
||||||
|
userDirs = {
|
||||||
|
enable = true;
|
||||||
|
documents = "${config.home.homeDirectory}/Documents";
|
||||||
|
desktop = "${config.home.homeDirectory}/Documents";
|
||||||
|
download = "${config.home.homeDirectory}/Downloads";
|
||||||
|
music = "${config.home.homeDirectory}/Documents/personal/music";
|
||||||
|
pictures = "${config.home.homeDirectory}/Documents/personal/pictures";
|
||||||
|
};
|
||||||
|
|
||||||
|
mime.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
[
|
|
||||||
# needs configs for cli access
|
|
||||||
"cli"
|
|
||||||
# needs configs for ui like a desktop manager and login manager
|
|
||||||
"graphical"
|
|
||||||
# needs configs for work computers like libreoffice etc
|
|
||||||
"work"
|
|
||||||
# needs configs for fun use, like steam
|
|
||||||
"fun"
|
|
||||||
]
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib;
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
custom.home-info = mkOption {
|
|
||||||
type = types.submodule {
|
|
||||||
options = {
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib;
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
custom.machine = mkOption {
|
|
||||||
type = types.submodule {
|
|
||||||
options = {
|
|
||||||
type = mkOption {
|
|
||||||
type = types.enum [
|
|
||||||
"server"
|
|
||||||
"pc"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
capabilities = mkOption {
|
|
||||||
type = types.listOf (types.enum (import ./capabilities.nix));
|
|
||||||
default = [ "cli" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
options,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib;
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
custom.program = mkOption {
|
|
||||||
type = types.attrsOf (
|
|
||||||
types.submodule (
|
|
||||||
{ config, ... }:
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
name = mkOption {
|
|
||||||
type = types.string;
|
|
||||||
};
|
|
||||||
requirements = mkOption {
|
|
||||||
type = types.listOf (types.enum (import ./capabilities.nix));
|
|
||||||
default = [ "cli" ];
|
|
||||||
};
|
|
||||||
home-config = mkOption {
|
|
||||||
type = types.deferredModule;
|
|
||||||
};
|
|
||||||
system-config = mkOption {
|
|
||||||
# type = types.attrs;
|
|
||||||
type = types.deferredModule;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,109 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.custom.users;
|
|
||||||
machine = config.custom.machine;
|
|
||||||
valid-on-machine =
|
|
||||||
on:
|
|
||||||
# TODO: iterate over possibilities
|
|
||||||
if machine.type == "server" then
|
|
||||||
on.server
|
|
||||||
else if machine.type == "pc" then
|
|
||||||
on.pc
|
|
||||||
else
|
|
||||||
false;
|
|
||||||
matches-capabilities =
|
|
||||||
# all requirements are contained in the machine capabilities
|
|
||||||
requirements: lib.all (req: builtins.elem req machine.capabilities) requirements;
|
|
||||||
users = lib.filterAttrs (_: value: valid-on-machine value.on) cfg;
|
|
||||||
home-users = lib.filterAttrs (_: value: value.apply-home-configs) users;
|
|
||||||
stateVersion = config.system.stateVersion;
|
|
||||||
programs = lib.attrsets.attrValues config.custom.program;
|
|
||||||
valid-programs = builtins.filter (program: matches-capabilities program.requirements) programs;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options =
|
|
||||||
let
|
|
||||||
userType = types.submodule {
|
|
||||||
options = {
|
|
||||||
name = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = [ ];
|
|
||||||
};
|
|
||||||
groups = mkOption {
|
|
||||||
type = types.listOf types.str;
|
|
||||||
default = [ ];
|
|
||||||
};
|
|
||||||
keys = mkOption {
|
|
||||||
type = types.listOf types.str;
|
|
||||||
default = [ ];
|
|
||||||
};
|
|
||||||
shell = mkOption {
|
|
||||||
type = types.package;
|
|
||||||
default = pkgs.fish;
|
|
||||||
};
|
|
||||||
on = mkOption {
|
|
||||||
type = types.submodule {
|
|
||||||
options = {
|
|
||||||
server = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
pc = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
apply-home-configs = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
custom.users = mkOption {
|
|
||||||
type = types.attrsOf userType;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkMerge ([
|
|
||||||
{
|
|
||||||
users.extraUsers = lib.mapAttrs (name: value: {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = value.groups;
|
|
||||||
openssh.authorizedKeys.keys = value.keys;
|
|
||||||
shell = value.shell;
|
|
||||||
description = name;
|
|
||||||
}) users;
|
|
||||||
home-manager.users = lib.mapAttrs (
|
|
||||||
name: value:
|
|
||||||
(
|
|
||||||
{ pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
imports = (
|
|
||||||
[
|
|
||||||
./home-info.nix
|
|
||||||
]
|
|
||||||
++ (map (program: program.home-config) valid-programs)
|
|
||||||
);
|
|
||||||
|
|
||||||
home = {
|
|
||||||
inherit stateVersion;
|
|
||||||
username = name;
|
|
||||||
homeDirectory = "/home/${name}";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
) home-users;
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,79 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./nvim
|
|
||||||
./fish
|
|
||||||
./kanata
|
|
||||||
./kitty
|
|
||||||
./tmux
|
|
||||||
./git
|
|
||||||
./jj
|
|
||||||
./niri
|
|
||||||
./zed
|
|
||||||
./firefox
|
|
||||||
];
|
|
||||||
|
|
||||||
custom.program.graphcial-packages = {
|
|
||||||
requirements = [ "graphical" ];
|
|
||||||
home-config = _: {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
spotify
|
|
||||||
obsidian
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
custom.program.fun-packages = {
|
|
||||||
requirements = [ "fun" ];
|
|
||||||
home-config = _: {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
p1n3appl3.tab
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
custom.program.cli-packages = {
|
|
||||||
requirements = [ "cli" ];
|
|
||||||
home-config = _: {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
sops
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
custom.program.homedirs = {
|
|
||||||
home-config =
|
|
||||||
{ config, ... }:
|
|
||||||
{
|
|
||||||
home.file = {
|
|
||||||
"dl".source = config.lib.file.mkOutOfStoreSymlink "${config.xdg.userDirs.download}";
|
|
||||||
"doc".source = config.lib.file.mkOutOfStoreSymlink "${config.xdg.userDirs.documents}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
custom.program.xdg = {
|
|
||||||
home-config =
|
|
||||||
{ config, ... }:
|
|
||||||
{
|
|
||||||
xdg = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
configHome = "${config.home.homeDirectory}/.config";
|
|
||||||
userDirs = {
|
|
||||||
enable = true;
|
|
||||||
documents = "${config.home.homeDirectory}/Documents";
|
|
||||||
desktop = "${config.home.homeDirectory}/Documents";
|
|
||||||
download = "${config.home.homeDirectory}/Downloads";
|
|
||||||
music = "${config.home.homeDirectory}/Documents/personal/music";
|
|
||||||
pictures = "${config.home.homeDirectory}/Documents/personal/pictures";
|
|
||||||
};
|
|
||||||
|
|
||||||
mime.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,165 +1,153 @@
|
||||||
_: {
|
{
|
||||||
custom.program.firefox.requirements = [ "graphical" ];
|
config,
|
||||||
custom.program.firefox.home-config =
|
flakes,
|
||||||
{
|
pkgs,
|
||||||
config,
|
...
|
||||||
flakes,
|
}:
|
||||||
pkgs,
|
let
|
||||||
...
|
ff-pkgs = flakes.firefox-addons.packages.${pkgs.system};
|
||||||
}:
|
lock-false = {
|
||||||
let
|
Value = false;
|
||||||
ff-pkgs = flakes.firefox-addons.packages.${pkgs.system};
|
Status = "locked";
|
||||||
lock-false = {
|
};
|
||||||
Value = false;
|
# lock-true = {
|
||||||
Status = "locked";
|
# Value = true;
|
||||||
};
|
# Status = "locked";
|
||||||
# lock-true = {
|
# };
|
||||||
# Value = true;
|
in
|
||||||
# Status = "locked";
|
{
|
||||||
# };
|
|
||||||
in
|
|
||||||
{
|
|
||||||
programs.firefox = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
|
||||||
extraPolicies = {
|
|
||||||
DisableFormHistory = true;
|
|
||||||
OfferToSaveLogins = false;
|
|
||||||
PasswordManagerEnabled = false;
|
|
||||||
AppAutoUpdate = false;
|
|
||||||
DisableFirefoxStudies = true;
|
|
||||||
DisablePocket = true;
|
|
||||||
DisableTelemetry = true;
|
|
||||||
UserMessaging = {
|
|
||||||
WhatsNew = true;
|
|
||||||
ExtensionRecommendations = false;
|
|
||||||
FeatureRecommendations = false;
|
|
||||||
UrlbarInterventions = false;
|
|
||||||
SkipOnboarding = true;
|
|
||||||
MoreFromMozilla = false;
|
|
||||||
Locked = true;
|
|
||||||
};
|
|
||||||
FirefoxHome = {
|
|
||||||
Search = true;
|
|
||||||
TopSites = false;
|
|
||||||
SponsoredTopSites = false;
|
|
||||||
Highlights = false;
|
|
||||||
Pocket = false;
|
|
||||||
SponsoredPocket = false;
|
|
||||||
Snippets = false;
|
|
||||||
Locked = false;
|
|
||||||
};
|
|
||||||
FirefoxSuggest = {
|
|
||||||
WebSuggestions = false;
|
|
||||||
SponsoredSuggestions = false;
|
|
||||||
ImproveSuggest = false;
|
|
||||||
Locked = true;
|
|
||||||
};
|
|
||||||
# TODO: https://github.com/TheRealGramdalf/nixos/blob/83f4339b121175f47940314bf5811080ac42c316/users/games/firefox/privacy.nix
|
|
||||||
};
|
|
||||||
|
|
||||||
|
home.file."${config.programs.firefox.profilesPath}/main/chrome".source =
|
||||||
|
"${flakes.firefox-sidebar-css}";
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||||
|
extraPolicies = {
|
||||||
|
DisableFormHistory = true;
|
||||||
|
OfferToSaveLogins = false;
|
||||||
|
PasswordManagerEnabled = false;
|
||||||
|
AppAutoUpdate = false;
|
||||||
|
DisableFirefoxStudies = true;
|
||||||
|
DisablePocket = true;
|
||||||
|
DisableTelemetry = true;
|
||||||
|
UserMessaging = {
|
||||||
|
WhatsNew = true;
|
||||||
|
ExtensionRecommendations = false;
|
||||||
|
FeatureRecommendations = false;
|
||||||
|
UrlbarInterventions = false;
|
||||||
|
SkipOnboarding = true;
|
||||||
|
MoreFromMozilla = false;
|
||||||
|
Locked = true;
|
||||||
};
|
};
|
||||||
|
FirefoxHome = {
|
||||||
profiles.default = {
|
Search = true;
|
||||||
id = 0;
|
TopSites = false;
|
||||||
name = "profile_0";
|
SponsoredTopSites = false;
|
||||||
isDefault = true;
|
Highlights = false;
|
||||||
settings = {
|
Pocket = false;
|
||||||
# specify profile-specific preferences here; check about:config for options
|
SponsoredPocket = false;
|
||||||
"browser.newtabpage.activity-stream.feeds.section.highlights" = false;
|
Snippets = false;
|
||||||
"browser.startup.page" = 3; # Restore previous tabs
|
Locked = false;
|
||||||
"extensions.autoDisableScopes" = 0;
|
|
||||||
"extensions.pocket.enabled" = lock-false;
|
|
||||||
"browser.tabs.closeWindowWithLastTab" = lock-false;
|
|
||||||
"sidebar.position_start" = false; # sidebar on the right
|
|
||||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
|
||||||
"browser.toolbars.bookmarks.visibility" = "always";
|
|
||||||
};
|
|
||||||
|
|
||||||
userChrome = builtins.readFile ./userChrome.css;
|
|
||||||
userContent = builtins.readFile ./userChrome.css;
|
|
||||||
|
|
||||||
extensions.packages = with ff-pkgs; [
|
|
||||||
bitwarden
|
|
||||||
ublock-origin
|
|
||||||
sidebery
|
|
||||||
sponsorblock
|
|
||||||
# vimium
|
|
||||||
];
|
|
||||||
|
|
||||||
bookmarks = {
|
|
||||||
force = true;
|
|
||||||
settings = [
|
|
||||||
{
|
|
||||||
keyword = "!w";
|
|
||||||
url = "https://www.wikipedia.org/w/index.php?title=Special:Search&search=%s";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
keyword = "!m";
|
|
||||||
url = "https://www.google.com/maps?q=%s";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
keyword = "!git";
|
|
||||||
url = "https://github.com/search?q=%s&type=code";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
keyword = "!std";
|
|
||||||
url = "https://std.rs%s";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
keyword = "!rust";
|
|
||||||
url = "https://docs.rs/releases/search?query=%s";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
keyword = "!np";
|
|
||||||
url = "https://search.nixos.org/packages?query=%s";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
keyword = "!nho";
|
|
||||||
url = "https://home-manager-options.extranix.com/?query=%s";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
keyword = "!no";
|
|
||||||
url = "https://search.nixos.org/options?query=%s";
|
|
||||||
}
|
|
||||||
|
|
||||||
# {
|
|
||||||
# name = "bank";
|
|
||||||
# toolbar = true;
|
|
||||||
# url = "https://web.bunq.com/user";
|
|
||||||
# }
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# extensions.settings = {
|
|
||||||
# "${ff-pkgs.sidebery.addonId}".settings = {
|
|
||||||
# sidebar = {
|
|
||||||
# # panels = with builtins; with lib; listToAttrs (map ffContainerToSideberryPanel (attrsToList containers));
|
|
||||||
# # nav = [ "Personal" "Programming"];
|
|
||||||
# };
|
|
||||||
# # https://github.com/Dash-L/nixconfig/blob/c30f6d1486a3fe2b3793ab0cb13a88edefe83b7a/home/firefox.nix#L82
|
|
||||||
# settings = {
|
|
||||||
# pinnedTabsPosition = "top";
|
|
||||||
# hideEmptyPanels = false;
|
|
||||||
# activateAfterClosing = "prev";
|
|
||||||
# activateAfterClosingStayInPanel = true;
|
|
||||||
# newTabCtxReopen = true;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
|
FirefoxSuggest = {
|
||||||
|
WebSuggestions = false;
|
||||||
|
SponsoredSuggestions = false;
|
||||||
|
ImproveSuggest = false;
|
||||||
|
Locked = true;
|
||||||
|
};
|
||||||
|
# TODO: https://github.com/TheRealGramdalf/nixos/blob/83f4339b121175f47940314bf5811080ac42c316/users/games/firefox/privacy.nix
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.mimeApps = {
|
|
||||||
defaultApplications."x-scheme-handler/http" = [
|
|
||||||
"firefox.desktop"
|
|
||||||
];
|
|
||||||
defaultApplications."x-scheme-handler/https" = [
|
|
||||||
"firefox.desktop"
|
|
||||||
];
|
|
||||||
defaultApplications."text/html" = [ "firefox.desktop" ];
|
|
||||||
defaultApplications."x-scheme-handler/about" = [ "firefox.desktop" ];
|
|
||||||
defaultApplications."x-scheme-handler/unknown" = [ "firefox.desktop" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
profiles.default = {
|
||||||
|
id = 0;
|
||||||
|
name = "profile_0";
|
||||||
|
isDefault = true;
|
||||||
|
settings = {
|
||||||
|
# specify profile-specific preferences here; check about:config for options
|
||||||
|
"browser.newtabpage.activity-stream.feeds.section.highlights" = false;
|
||||||
|
"browser.startup.page" = 3; # Restore previous tabs
|
||||||
|
"extensions.autoDisableScopes" = 0;
|
||||||
|
"extensions.pocket.enabled" = lock-false;
|
||||||
|
"browser.tabs.closeWindowWithLastTab" = lock-false;
|
||||||
|
"sidebar.position_start" = false; # sidebar on the right
|
||||||
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
userChrome = builtins.readFile ./userChrome.css;
|
||||||
|
userContent = builtins.readFile ./userChrome.css;
|
||||||
|
|
||||||
|
extensions.packages = with ff-pkgs; [
|
||||||
|
bitwarden
|
||||||
|
ublock-origin
|
||||||
|
sidebery
|
||||||
|
sponsorblock
|
||||||
|
# vimium
|
||||||
|
];
|
||||||
|
|
||||||
|
bookmarks = {
|
||||||
|
force = true;
|
||||||
|
settings = [
|
||||||
|
{
|
||||||
|
keyword = "!w";
|
||||||
|
url = "https://www.wikipedia.org/w/index.php?title=Special:Search&search=%s";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
keyword = "!m";
|
||||||
|
url = "https://www.google.com/maps?q=%s";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
keyword = "!git";
|
||||||
|
url = "https://github.com/search?q=%s&type=code";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
keyword = "!std";
|
||||||
|
url = "https://std.rs%s";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
keyword = "!rust";
|
||||||
|
url = "https://docs.rs/releases/search?query=%s";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
keyword = "!np";
|
||||||
|
url = "https://search.nixos.org/packages?query=%s";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
keyword = "!nf";
|
||||||
|
url = "https://search.nixos.org/flakes?query=%s";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# extensions.settings = {
|
||||||
|
# "${ff-pkgs.sidebery.addonId}".settings = {
|
||||||
|
# sidebar = {
|
||||||
|
# # panels = with builtins; with lib; listToAttrs (map ffContainerToSideberryPanel (attrsToList containers));
|
||||||
|
# # nav = [ "Personal" "Programming"];
|
||||||
|
# };
|
||||||
|
# # https://github.com/Dash-L/nixconfig/blob/c30f6d1486a3fe2b3793ab0cb13a88edefe83b7a/home/firefox.nix#L82
|
||||||
|
# settings = {
|
||||||
|
# pinnedTabsPosition = "top";
|
||||||
|
# hideEmptyPanels = false;
|
||||||
|
# activateAfterClosing = "prev";
|
||||||
|
# activateAfterClosingStayInPanel = true;
|
||||||
|
# newTabCtxReopen = true;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.mimeApps = {
|
||||||
|
defaultApplications."x-scheme-handler/http" = [
|
||||||
|
"firefox.desktop"
|
||||||
|
];
|
||||||
|
defaultApplications."x-scheme-handler/https" = [
|
||||||
|
"firefox.desktop"
|
||||||
|
];
|
||||||
|
defaultApplications."text/html" = [ "firefox.desktop" ];
|
||||||
|
defaultApplications."x-scheme-handler/about" = [ "firefox.desktop" ];
|
||||||
|
defaultApplications."x-scheme-handler/unknown" = [ "firefox.desktop" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,241 +1,236 @@
|
||||||
_: {
|
{ config
|
||||||
custom.program.fish.requirements = [ "cli" ];
|
, pkgs
|
||||||
custom.program.fish.home-config =
|
, lib
|
||||||
{
|
, ...
|
||||||
config,
|
}:
|
||||||
pkgs,
|
with builtins;
|
||||||
lib,
|
with lib.attrsets;
|
||||||
...
|
let
|
||||||
}:
|
scripts = (import ./scripts.nix) pkgs;
|
||||||
with builtins;
|
aliases = with scripts; {
|
||||||
with lib.attrsets;
|
"cp-mov" = cp-media "mov" "movies";
|
||||||
let
|
"cp-ser" = cp-media "ser" "shows";
|
||||||
scripts = (import ./scripts.nix) pkgs;
|
"cp-ani" = cp-media "ani" "anime";
|
||||||
aliases = with scripts; {
|
"dumpasm" = "${pkgs.custom.dumpasm}/bin/dumpasm";
|
||||||
"cp-mov" = cp-media "mov" "movies";
|
"p" = builtins.trace calc calc;
|
||||||
"cp-ser" = cp-media "ser" "shows";
|
"s" = "systemctl";
|
||||||
"cp-ani" = cp-media "ani" "anime";
|
"j" = "journalctl";
|
||||||
"dumpasm" = "${pkgs.custom.dumpasm}/bin/dumpasm";
|
"ju" = "journalctl -u";
|
||||||
"p" = builtins.trace calc calc;
|
"jfu" = "journalctl -fu";
|
||||||
"s" = "systemctl";
|
"ls" = "${pkgs.eza}/bin/eza --git";
|
||||||
"j" = "journalctl";
|
"ll" = "${pkgs.eza}/bin/eza --git";
|
||||||
"ju" = "journalctl -u";
|
"lt" = "${pkgs.eza}/bin/eza --long --tree -L 3";
|
||||||
"jfu" = "journalctl -fu";
|
"open" = "${pkgs.xdg-utils}/bin/xdg-open";
|
||||||
"ls" = "${pkgs.eza}/bin/eza --git";
|
"cb" = "${pkgs.wl-clipboard-rs}/bin/wl-copy";
|
||||||
"ll" = "${pkgs.eza}/bin/eza --git";
|
"cat" = "${pkgs.bat}/bin/bat";
|
||||||
"lt" = "${pkgs.eza}/bin/eza --long --tree -L 3";
|
|
||||||
"open" = "${pkgs.xdg-utils}/bin/xdg-open";
|
|
||||||
"cb" = "${pkgs.wl-clipboard-rs}/bin/wl-copy";
|
|
||||||
"cat" = "${pkgs.bat}/bin/bat";
|
|
||||||
|
|
||||||
# "pull" = "${pkgs.git}/bin/git pull";
|
# "pull" = "${pkgs.git}/bin/git pull";
|
||||||
# "push" = "${pkgs.git}/bin/git push";
|
# "push" = "${pkgs.git}/bin/git push";
|
||||||
# "commit" = "${pkgs.git}/bin/git commit";
|
# "commit" = "${pkgs.git}/bin/git commit";
|
||||||
# "add" = "${pkgs.git}/bin/git add";
|
# "add" = "${pkgs.git}/bin/git add";
|
||||||
# "patch" = "${pkgs.git}/bin/git add -p";
|
# "patch" = "${pkgs.git}/bin/git add -p";
|
||||||
# "amend" = "${pkgs.git}/bin/git commit --amend";
|
# "amend" = "${pkgs.git}/bin/git commit --amend";
|
||||||
# "log" = "${pkgs.git}/bin/git log --all --graph --decorate";
|
# "log" = "${pkgs.git}/bin/git log --all --graph --decorate";
|
||||||
# "st" = "${pkgs.git}/bin/git status";
|
# "st" = "${pkgs.git}/bin/git status";
|
||||||
# "checkout" = "${pkgs.git}/bin/git checkout";
|
# "checkout" = "${pkgs.git}/bin/git checkout";
|
||||||
# "rebase" = "${pkgs.git}/bin/git rebase";
|
# "rebase" = "${pkgs.git}/bin/git rebase";
|
||||||
# "stash" = "${pkgs.git}/bin/git stash";
|
# "stash" = "${pkgs.git}/bin/git stash";
|
||||||
|
|
||||||
"edit" = "jj edit";
|
"edit" = "jj edit";
|
||||||
"old" = "jj edit @-";
|
"old" = "jj edit @-";
|
||||||
"new" = "jj edit @+";
|
"new" = "jj edit @+";
|
||||||
"rebase" = "jj rebase";
|
"rebase" = "jj rebase";
|
||||||
"pull" = "jj git fetch; jj catchup";
|
"pull" = "jj git fetch; jj catchup";
|
||||||
"msg" = "jj describe -m";
|
"msg" = "jj describe -m";
|
||||||
"branch" = "jj bookmark set";
|
"branch" = "jj bookmark set";
|
||||||
"stat" = "jj status";
|
"stat" = "jj status";
|
||||||
"push" = "jj git push";
|
"push" = "jj git push";
|
||||||
|
|
||||||
"tidy" = "x test tidy --bless";
|
"tidy" = "x test tidy --bless";
|
||||||
"ui" = "x test tests/ui/";
|
"ui" = "x test tests/ui/";
|
||||||
|
|
||||||
"f" = "nautilus --no-desktop . &";
|
"f" = "nautilus --no-desktop . &";
|
||||||
|
};
|
||||||
|
# extracting any compressed format
|
||||||
|
extract = ''
|
||||||
|
function extract -a file -d "decompress a file"
|
||||||
|
if not test -f $file
|
||||||
|
echo "'$file' is not a valid file"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
switch $file
|
||||||
|
# tar can automatically figure out how to decompress
|
||||||
|
case '*.{tar,tar.{bz2,zst,gz,xz},tbz2,tgz'; ${pkgs.gnutar}/bin/tar xf $file; end
|
||||||
|
case '*.bz2'; bunzip2 $file; end
|
||||||
|
case '*.rar'; unrar e $file; end
|
||||||
|
case '*.gz'; gunzip $file; end
|
||||||
|
case '*.zip'; ${pkgs.unzip}/bin/unzip $file; end
|
||||||
|
case '*.Z'; uncompress $file; end
|
||||||
|
case '*.7z'; 7z x $file; end
|
||||||
|
case '*';
|
||||||
|
echo "'$file' cannot be extracted"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
atuin = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
filter_mode_shell_up_key_binding = "directory";
|
||||||
|
exit_mode = "return-original";
|
||||||
|
|
||||||
|
workspaces = true;
|
||||||
};
|
};
|
||||||
# extracting any compressed format
|
};
|
||||||
extract = ''
|
|
||||||
function extract -a file -d "decompress a file"
|
zoxide = {
|
||||||
if not test -f $file
|
enable = true;
|
||||||
echo "'$file' is not a valid file"
|
enableFishIntegration = true;
|
||||||
return 1
|
};
|
||||||
end
|
|
||||||
switch $file
|
direnv = {
|
||||||
# tar can automatically figure out how to decompress
|
enable = true;
|
||||||
case '*.{tar,tar.{bz2,zst,gz,xz},tbz2,tgz'; ${pkgs.gnutar}/bin/tar xf $file; end
|
# enableFishIntegration = lib.mkDefault true;
|
||||||
case '*.bz2'; bunzip2 $file; end
|
};
|
||||||
case '*.rar'; unrar e $file; end
|
|
||||||
case '*.gz'; gunzip $file; end
|
fzf = {
|
||||||
case '*.zip'; ${pkgs.unzip}/bin/unzip $file; end
|
enable = true;
|
||||||
case '*.Z'; uncompress $file; end
|
enableFishIntegration = true;
|
||||||
case '*.7z'; 7z x $file; end
|
};
|
||||||
case '*';
|
|
||||||
echo "'$file' cannot be extracted"
|
fish = {
|
||||||
|
enable = true;
|
||||||
|
shellAliases = aliases;
|
||||||
|
plugins = with pkgs.fishPlugins; [
|
||||||
|
{
|
||||||
|
name = "bang-bang";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "oh-my-fish";
|
||||||
|
repo = "plugin-bang-bang";
|
||||||
|
rev = "ec991b80ba7d4dda7a962167b036efc5c2d79419";
|
||||||
|
hash = "sha256-oPPCtFN2DPuM//c48SXb4TrFRjJtccg0YPXcAo0Lxq0=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "tide";
|
||||||
|
inherit (tide) src;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "sponge";
|
||||||
|
inherit (sponge) src;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "autopair";
|
||||||
|
inherit (autopair) src;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
functions = {
|
||||||
|
fish_jj_prompt = {
|
||||||
|
body = ''
|
||||||
|
if not ${config.programs.jujutsu.package}/bin/jj root --quiet &>/dev/null
|
||||||
return 1
|
return 1
|
||||||
end
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
programs = {
|
|
||||||
atuin = {
|
|
||||||
enable = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
filter_mode_shell_up_key_binding = "directory";
|
|
||||||
exit_mode = "return-original";
|
|
||||||
|
|
||||||
workspaces = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
zoxide = {
|
|
||||||
enable = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
direnv = {
|
|
||||||
enable = true;
|
|
||||||
# enableFishIntegration = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
|
|
||||||
fzf = {
|
|
||||||
enable = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
fish = {
|
|
||||||
enable = true;
|
|
||||||
shellAliases = aliases;
|
|
||||||
plugins = with pkgs.fishPlugins; [
|
|
||||||
{
|
|
||||||
name = "bang-bang";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "oh-my-fish";
|
|
||||||
repo = "plugin-bang-bang";
|
|
||||||
rev = "ec991b80ba7d4dda7a962167b036efc5c2d79419";
|
|
||||||
hash = "sha256-oPPCtFN2DPuM//c48SXb4TrFRjJtccg0YPXcAo0Lxq0=";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "tide";
|
|
||||||
inherit (tide) src;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "sponge";
|
|
||||||
inherit (sponge) src;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "autopair";
|
|
||||||
inherit (autopair) src;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
functions = {
|
|
||||||
fish_jj_prompt = {
|
|
||||||
body = ''
|
|
||||||
if not ${config.programs.jujutsu.package}/bin/jj root --quiet &>/dev/null
|
|
||||||
return 1
|
|
||||||
end
|
|
||||||
|
|
||||||
${config.programs.jujutsu.package}/bin/jj log --ignore-working-copy --no-graph --color always -r @ -T '
|
|
||||||
separate(
|
|
||||||
" ",
|
|
||||||
bookmarks.join(", "),
|
|
||||||
change_id.shortest(),
|
|
||||||
commit_id.shortest(),
|
|
||||||
if(conflict, "conflict"),
|
|
||||||
if(empty, "empty"),
|
|
||||||
if(divergent, "divergent"),
|
|
||||||
if(hidden, "hidden"),
|
|
||||||
)
|
|
||||||
'
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
_tide_item_jj = {
|
|
||||||
body = ''
|
|
||||||
set -l _tide_item_jj_color $_tide_location_color
|
|
||||||
echo -ns $_tide_item_jj_color" ("(fish_jj_prompt)$_tide_item_jj_color")"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
_tide_item_git = {
|
|
||||||
body = ''
|
|
||||||
if not test -d .jj
|
|
||||||
fish_git_prompt '%s'
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
interactiveShellInit = ''
|
|
||||||
fish_vi_key_bindings
|
|
||||||
|
|
||||||
set -g sponge_successful_exit_codes 0
|
|
||||||
set -g sponge_allow_previously_successful false
|
|
||||||
set -g sponge_delay 10
|
|
||||||
|
|
||||||
${config.programs.jujutsu.package}/bin/jj util completion fish | source
|
|
||||||
|
|
||||||
# if set -q tide_left_prompt_items; and not contains "jj" $tide_left_prompt_items
|
|
||||||
# set -l tide_item_jj_idx (contains -i "pwd" $tide_left_prompt_items)
|
|
||||||
# if test $tide_item_jj_idx
|
|
||||||
# set tide_left_prompt_items \
|
|
||||||
# $tide_left_prompt_items[1..$tide_item_jj_idx] \
|
|
||||||
# jj \
|
|
||||||
# $tide_left_prompt_items[(math $tide_item_jj_idx + 1)..-1]
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
|
|
||||||
function t
|
|
||||||
cd "$(${pkgs.custom.t}/bin/t-rs $argv | tail -n 1)"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function temp
|
${config.programs.jujutsu.package}/bin/jj log --ignore-working-copy --no-graph --color always -r @ -T '
|
||||||
t $argv
|
separate(
|
||||||
end
|
" ",
|
||||||
|
bookmarks.join(", "),
|
||||||
|
change_id.shortest(),
|
||||||
|
commit_id.shortest(),
|
||||||
|
if(conflict, "conflict"),
|
||||||
|
if(empty, "empty"),
|
||||||
|
if(divergent, "divergent"),
|
||||||
|
if(hidden, "hidden"),
|
||||||
|
)
|
||||||
|
'
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
function rs
|
_tide_item_jj = {
|
||||||
cd "$(${pkgs.custom.t}/bin/t-rs $argv | tail -n 1)"
|
body = ''
|
||||||
cargo init . --bin --name $(basename "$PWD")
|
set -l _tide_item_jj_color $_tide_location_color
|
||||||
vim src/main.rs
|
echo -ns $_tide_item_jj_color" ("(fish_jj_prompt)$_tide_item_jj_color")"
|
||||||
end
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
fish_add_path "$HOME/.cargo/bin"
|
_tide_item_git = {
|
||||||
fish_add_path "$HOME/.local/bin"
|
body = ''
|
||||||
fish_add_path "$HOME/Documents/scripts"
|
if not test -d .jj
|
||||||
fish_add_path "$HOME/.nix-profile/bin"
|
fish_git_prompt '%s'
|
||||||
|
|
||||||
function fish_greeting
|
|
||||||
${pkgs.blahaj}/bin/blahaj -s
|
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.activation = {
|
interactiveShellInit = ''
|
||||||
setupTide = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
fish_vi_key_bindings
|
||||||
setupTide() {
|
|
||||||
${pkgs.fish}/bin/fish -c ${lib.escapeShellArg "tide configure ${
|
set -g sponge_successful_exit_codes 0
|
||||||
lib.cli.toGNUCommandLineShell { } {
|
set -g sponge_allow_previously_successful false
|
||||||
auto = true;
|
set -g sponge_delay 10
|
||||||
style = "Lean";
|
|
||||||
prompt_colors = "True color";
|
${config.programs.jujutsu.package}/bin/jj util completion fish | source
|
||||||
show_time = "No";
|
|
||||||
lean_prompt_height = "Two lines";
|
# if set -q tide_left_prompt_items; and not contains "jj" $tide_left_prompt_items
|
||||||
prompt_connection = "Disconnected";
|
# set -l tide_item_jj_idx (contains -i "pwd" $tide_left_prompt_items)
|
||||||
prompt_spacing = "Compact";
|
# if test $tide_item_jj_idx
|
||||||
icons = "Few icons";
|
# set tide_left_prompt_items \
|
||||||
transient = "Yes";
|
# $tide_left_prompt_items[1..$tide_item_jj_idx] \
|
||||||
}
|
# jj \
|
||||||
}"} >/dev/null 2>&1
|
# $tide_left_prompt_items[(math $tide_item_jj_idx + 1)..-1]
|
||||||
}
|
# end
|
||||||
setupTide
|
# end
|
||||||
'';
|
|
||||||
};
|
function t
|
||||||
|
cd "$(${pkgs.custom.t}/bin/t-rs $argv | tail -n 1)"
|
||||||
|
end
|
||||||
|
|
||||||
|
function temp
|
||||||
|
t $argv
|
||||||
|
end
|
||||||
|
|
||||||
|
function rs
|
||||||
|
cd "$(${pkgs.custom.t}/bin/t-rs $argv | tail -n 1)"
|
||||||
|
cargo init . --bin --name $(basename "$PWD")
|
||||||
|
vim src/main.rs
|
||||||
|
end
|
||||||
|
|
||||||
|
fish_add_path "$HOME/.cargo/bin"
|
||||||
|
fish_add_path "$HOME/.local/bin"
|
||||||
|
fish_add_path "$HOME/Documents/scripts"
|
||||||
|
fish_add_path "$HOME/.nix-profile/bin"
|
||||||
|
|
||||||
|
function fish_greeting
|
||||||
|
${pkgs.blahaj}/bin/blahaj -s
|
||||||
|
end
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.activation = {
|
||||||
|
setupTide = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
setupTide() {
|
||||||
|
${pkgs.fish}/bin/fish -c ${lib.escapeShellArg "tide configure ${
|
||||||
|
lib.cli.toGNUCommandLineShell { } {
|
||||||
|
auto = true;
|
||||||
|
style = "Lean";
|
||||||
|
prompt_colors = "True color";
|
||||||
|
show_time = "No";
|
||||||
|
lean_prompt_height = "Two lines";
|
||||||
|
prompt_connection = "Disconnected";
|
||||||
|
prompt_spacing = "Compact";
|
||||||
|
icons = "Few icons";
|
||||||
|
transient = "Yes";
|
||||||
|
}
|
||||||
|
}"} >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
setupTide
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,39 +1,36 @@
|
||||||
_: {
|
_: {
|
||||||
custom.program.git.requirements = [ "cli" ];
|
programs.git = {
|
||||||
custom.program.git.home-config = _: {
|
enable = true;
|
||||||
programs.git = {
|
signing.key = "/home/jana/.ssh/id_ed25519.pub";
|
||||||
enable = true;
|
signing.signByDefault = true;
|
||||||
signing.key = "/home/jana/.ssh/id_ed25519.pub";
|
|
||||||
signing.signByDefault = true;
|
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
user.email = "jana@donsz.nl";
|
user.email = "jana@donsz.nl";
|
||||||
user.name = "Jana Dönszelmann";
|
user.name = "Jana Dönszelmann";
|
||||||
|
|
||||||
push.autoSetupRemote = true;
|
push.autoSetupRemote = true;
|
||||||
pull.rebase = true;
|
pull.rebase = true;
|
||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
gpg.format = "ssh";
|
gpg.format = "ssh";
|
||||||
diff.colorMoved = "default";
|
diff.colorMoved = "default";
|
||||||
rerere.enabled = true;
|
rerere.enabled = true;
|
||||||
|
|
||||||
alias.conflicts = "diff --check";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
alias.conflicts = "diff --check";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.delta = {
|
};
|
||||||
enable = true;
|
|
||||||
options = {
|
programs.delta = {
|
||||||
navigate = true;
|
enable = true;
|
||||||
light = false;
|
options = {
|
||||||
side-by-side = true;
|
navigate = true;
|
||||||
features = "decorations interactive";
|
light = false;
|
||||||
interactive = {
|
side-by-side = true;
|
||||||
keep-plus-minus-markers = false;
|
features = "decorations interactive";
|
||||||
};
|
interactive = {
|
||||||
|
keep-plus-minus-markers = false;
|
||||||
};
|
};
|
||||||
enableGitIntegration = true;
|
|
||||||
};
|
};
|
||||||
|
enableGitIntegration = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,184 +1,180 @@
|
||||||
_: {
|
{ config, pkgs, ... }:
|
||||||
custom.program.jujutsu.requirements = [ "cli" ];
|
{
|
||||||
custom.program.jujutsu.home-config =
|
programs.jujutsu = {
|
||||||
{ config, pkgs, ... }:
|
enable = true;
|
||||||
{
|
# package = pkgs.custom.jujutsu;
|
||||||
programs.jujutsu = {
|
|
||||||
enable = true;
|
|
||||||
# package = pkgs.custom.jujutsu;
|
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
user = {
|
user = {
|
||||||
email = config.programs.git.settings.user.email;
|
email = config.programs.git.settings.user.email;
|
||||||
name = config.programs.git.settings.user.name;
|
name = config.programs.git.settings.user.name;
|
||||||
};
|
};
|
||||||
|
|
||||||
ui = {
|
ui = {
|
||||||
paginate = "never";
|
paginate = "never";
|
||||||
# pager = "${pkgs.delta}/bin/delta";
|
# pager = "${pkgs.delta}/bin/delta";
|
||||||
# for delta
|
# for delta
|
||||||
# diff-formatter = ":git";
|
# diff-formatter = ":git";
|
||||||
diff-formatter = [
|
diff-formatter = [
|
||||||
"${pkgs.difftastic}/bin/difft"
|
"${pkgs.difftastic}/bin/difft"
|
||||||
"--color=always"
|
"--color=always"
|
||||||
"$left"
|
"$left"
|
||||||
"$right"
|
"$right"
|
||||||
];
|
];
|
||||||
|
|
||||||
default-command = [
|
default-command = [
|
||||||
"log"
|
"log"
|
||||||
"--reversed"
|
"--reversed"
|
||||||
"--no-pager"
|
"--no-pager"
|
||||||
];
|
];
|
||||||
merge-editor = [
|
merge-editor = [
|
||||||
"${pkgs.meld}/bin/meld"
|
"${pkgs.meld}/bin/meld"
|
||||||
"$left"
|
"$left"
|
||||||
"$base"
|
"$base"
|
||||||
"$right"
|
"$right"
|
||||||
"-o"
|
"-o"
|
||||||
"$output"
|
"$output"
|
||||||
"--auto-merge"
|
"--auto-merge"
|
||||||
];
|
];
|
||||||
# diff-editor = "${pkgs.meld}/bin/meld";
|
# diff-editor = "${pkgs.meld}/bin/meld";
|
||||||
};
|
};
|
||||||
|
|
||||||
fsmonitor.backend = "watchman";
|
fsmonitor.backend = "watchman";
|
||||||
fsmonitor.watchman.register-snapshot-trigger = true;
|
fsmonitor.watchman.register-snapshot-trigger = true;
|
||||||
|
|
||||||
# revsets.log = "@ | ancestors(trunk()..(visible_heads() & mine()), 2) | trunk()";
|
# revsets.log = "@ | ancestors(trunk()..(visible_heads() & mine()), 2) | trunk()";
|
||||||
# revsets.log = "trunk()..@ | @..trunk() | trunk() | @:: | fork_point(trunk() | @)";
|
# revsets.log = "trunk()..@ | @..trunk() | trunk() | @:: | fork_point(trunk() | @)";
|
||||||
revsets.log = "trunk() | ancestors(trunk()..heads(((trunk()..visible_heads()) & my() | @)::), 2)";
|
revsets.log = "trunk() | ancestors(trunk()..heads(((trunk()..visible_heads()) & my() | @)::), 2)";
|
||||||
|
|
||||||
revset-aliases = {
|
revset-aliases = {
|
||||||
"my()" = "user(\"${config.programs.jujutsu.settings.user.email}\")";
|
"my()" = "user(\"${config.programs.jujutsu.settings.user.email}\")";
|
||||||
"user(x)" = "author(x) | committer(x)";
|
"user(x)" = "author(x) | committer(x)";
|
||||||
current = "bookmarks() & my() & ~immutable()";
|
current = "bookmarks() & my() & ~immutable()";
|
||||||
"closest_bookmark(to)" = "heads(::to & bookmarks())";
|
"closest_bookmark(to)" = "heads(::to & bookmarks())";
|
||||||
};
|
};
|
||||||
|
|
||||||
template-aliases = {
|
template-aliases = {
|
||||||
"format_timestamp(timestamp)" = "timestamp.ago()";
|
"format_timestamp(timestamp)" = "timestamp.ago()";
|
||||||
log_oneline = ''
|
log_oneline = ''
|
||||||
if(root,
|
if(root,
|
||||||
format_root_commit(self),
|
format_root_commit(self),
|
||||||
label(if(current_working_copy, "working_copy"),
|
label(if(current_working_copy, "working_copy"),
|
||||||
concat(
|
concat(
|
||||||
separate(" ",
|
separate(" ",
|
||||||
format_short_change_id_with_change_offset(self),
|
format_short_change_id_with_change_offset(self),
|
||||||
if(empty, label("empty", "(empty)")),
|
if(empty, label("empty", "(empty)")),
|
||||||
if(description,
|
if(description,
|
||||||
description.first_line(),
|
description.first_line(),
|
||||||
label(if(empty, "empty"), description_placeholder),
|
label(if(empty, "empty"), description_placeholder),
|
||||||
),
|
|
||||||
bookmarks,
|
|
||||||
tags,
|
|
||||||
working_copies,
|
|
||||||
if(conflict, label("conflict", "conflict")),
|
|
||||||
if(config("ui.show-cryptographic-signatures").as_boolean(),
|
|
||||||
format_short_cryptographic_signature(signature)),
|
|
||||||
) ++ "\n",
|
|
||||||
),
|
),
|
||||||
)
|
bookmarks,
|
||||||
)
|
tags,
|
||||||
'';
|
working_copies,
|
||||||
# if(.contained_in('first_parent(@)'), label("git_head", "HEAD")),
|
if(conflict, label("conflict", "conflict")),
|
||||||
status_summary = "'\n' ++ self.diff().summary() ++ '\n'";
|
if(config("ui.show-cryptographic-signatures").as_boolean(),
|
||||||
log_oneline_with_status_summary = "log_oneline ++ if(self.current_working_copy() && self.diff().files().len() > 0, status_summary)";
|
format_short_cryptographic_signature(signature)),
|
||||||
};
|
) ++ "\n",
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
# if(.contained_in('first_parent(@)'), label("git_head", "HEAD")),
|
||||||
|
status_summary = "'\n' ++ self.diff().summary() ++ '\n'";
|
||||||
|
log_oneline_with_status_summary = "log_oneline ++ if(self.current_working_copy() && self.diff().files().len() > 0, status_summary)";
|
||||||
|
};
|
||||||
|
|
||||||
aliases =
|
aliases =
|
||||||
let
|
let
|
||||||
util = script: [
|
util = script: [
|
||||||
"util"
|
"util"
|
||||||
"exec"
|
"exec"
|
||||||
"--"
|
"--"
|
||||||
"bash"
|
"bash"
|
||||||
"-c"
|
"-c"
|
||||||
script
|
script
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
tug = [
|
tug = [
|
||||||
"bookmark"
|
"bookmark"
|
||||||
"move"
|
"move"
|
||||||
"--from"
|
"--from"
|
||||||
"heads(::@- & bookmarks())"
|
"heads(::@- & bookmarks())"
|
||||||
"--to"
|
"--to"
|
||||||
"coalesce(@ & ~empty(), @-)"
|
"coalesce(@ & ~empty(), @-)"
|
||||||
];
|
];
|
||||||
catchup = [
|
catchup = [
|
||||||
"rebase"
|
"rebase"
|
||||||
"-b"
|
"-b"
|
||||||
"bookmarks() & mine() & ~immutable()"
|
"bookmarks() & mine() & ~immutable()"
|
||||||
"-d"
|
"-d"
|
||||||
"trunk()"
|
"trunk()"
|
||||||
"--skip-emptied"
|
"--skip-emptied"
|
||||||
];
|
];
|
||||||
pull = util ''
|
pull = util ''
|
||||||
jj git fetch
|
jj git fetch
|
||||||
jj catchup
|
jj catchup
|
||||||
'';
|
'';
|
||||||
ch = [
|
ch = [
|
||||||
"show"
|
"show"
|
||||||
"--stat"
|
"--stat"
|
||||||
];
|
];
|
||||||
move = [
|
move = [
|
||||||
"rebase"
|
"rebase"
|
||||||
"-r"
|
"-r"
|
||||||
];
|
];
|
||||||
push = [
|
push = [
|
||||||
"git"
|
"git"
|
||||||
"push"
|
"push"
|
||||||
];
|
];
|
||||||
ll = [
|
ll = [
|
||||||
"log"
|
"log"
|
||||||
"-T"
|
"-T"
|
||||||
"builtin_log_compact"
|
"builtin_log_compact"
|
||||||
];
|
];
|
||||||
mdiff = [
|
mdiff = [
|
||||||
"diff"
|
"diff"
|
||||||
"--from"
|
"--from"
|
||||||
"trunk()"
|
"trunk()"
|
||||||
];
|
];
|
||||||
};
|
|
||||||
|
|
||||||
templates = {
|
|
||||||
log_node = ''
|
|
||||||
label("node",
|
|
||||||
coalesce(
|
|
||||||
if(!self, label("elided", "~")),
|
|
||||||
if(current_working_copy, label("working_copy", "@")),
|
|
||||||
if(conflict, label("conflict", "×")),
|
|
||||||
if(immutable, label("immutable", "*")),
|
|
||||||
label("normal", "·")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
log = "log_oneline_with_status_summary";
|
|
||||||
git_push_bookmark = ''"jdonszelmann/" ++ change_id.short()'';
|
|
||||||
};
|
|
||||||
|
|
||||||
signing = {
|
|
||||||
# sign-all = true;
|
|
||||||
behavior = "own";
|
|
||||||
backend = "ssh";
|
|
||||||
key = "~/.ssh/id_ed25519.pub";
|
|
||||||
};
|
|
||||||
|
|
||||||
# remotes.origin.auto-track-bookmarks = true;
|
|
||||||
# remotes.upstream.auto-track-bookmarks = true;
|
|
||||||
|
|
||||||
git = {
|
|
||||||
private-commits = "description(glob:'wip:*') | description(glob:'trial:*')";
|
|
||||||
write-change-id-header = true;
|
|
||||||
|
|
||||||
fetch = [
|
|
||||||
"upstream"
|
|
||||||
"origin"
|
|
||||||
];
|
|
||||||
push = "origin";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
templates = {
|
||||||
|
log_node = ''
|
||||||
|
label("node",
|
||||||
|
coalesce(
|
||||||
|
if(!self, label("elided", "~")),
|
||||||
|
if(current_working_copy, label("working_copy", "@")),
|
||||||
|
if(conflict, label("conflict", "×")),
|
||||||
|
if(immutable, label("immutable", "*")),
|
||||||
|
label("normal", "·")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
log = "log_oneline_with_status_summary";
|
||||||
|
git_push_bookmark = ''"jdonszelmann/" ++ change_id.short()'';
|
||||||
|
};
|
||||||
|
|
||||||
|
signing = {
|
||||||
|
# sign-all = true;
|
||||||
|
behavior = "own";
|
||||||
|
backend = "ssh";
|
||||||
|
key = "~/.ssh/id_ed25519.pub";
|
||||||
|
};
|
||||||
|
|
||||||
|
# remotes.origin.auto-track-bookmarks = true;
|
||||||
|
# remotes.upstream.auto-track-bookmarks = true;
|
||||||
|
|
||||||
|
git = {
|
||||||
|
private-commits = "description(glob:'wip:*') | description(glob:'trial:*')";
|
||||||
|
write-change-id-header = true;
|
||||||
|
|
||||||
|
fetch = [
|
||||||
|
"upstream"
|
||||||
|
"origin"
|
||||||
|
];
|
||||||
|
push = "origin";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
0
programs/kanata/cfg.kbd
Normal file
0
programs/kanata/cfg.kbd
Normal file
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, config, ... }:
|
||||||
let
|
let
|
||||||
kanata-config = ''
|
kanata-config = ''
|
||||||
(defcfg
|
(defcfg
|
||||||
|
|
@ -74,52 +74,31 @@ let
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
custom.program.kanata.requirements = [ "graphical" ];
|
|
||||||
custom.program.kanata.home-config =
|
|
||||||
{ pkgs, config, ... }:
|
|
||||||
{
|
|
||||||
systemd.user.services.kanata = {
|
|
||||||
Unit = {
|
|
||||||
Description = "kanata";
|
|
||||||
};
|
|
||||||
|
|
||||||
Service = {
|
|
||||||
Restart = "always";
|
|
||||||
RestartSec = "3";
|
|
||||||
ExecStart = "${pkgs.kanata-with-cmd}/bin/kanata --cfg ${pkgs.writeText "kanata.kbd" kanata-config}";
|
|
||||||
Nice = "-20";
|
|
||||||
};
|
|
||||||
|
|
||||||
Install = {
|
|
||||||
WantedBy = [ "default.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home.file.kanata = {
|
|
||||||
target = ".config/kanata/kanata.kbd";
|
|
||||||
text = kanata-config;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# custom.program.kanata.system-config =
|
|
||||||
# { pkgs, ... }:
|
|
||||||
# {
|
|
||||||
# sudo groupadd uinput
|
# sudo groupadd uinput
|
||||||
# sudo usermod -aG input $USER
|
# sudo usermod -aG input $USER
|
||||||
# sudo usermod -aG uinput $USER
|
# sudo usermod -aG uinput $USER
|
||||||
# echo "KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"" >> /etc/udev/rules.d/99-input.rules
|
# echo "KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"" >> /etc/udev/rules.d/99-input.rules
|
||||||
# reboot or sudo udevadm control --reload-rules && sudo udevadm trigger
|
# reboot or sudo udevadm control --reload-rules && sudo udevadm trigger
|
||||||
# sudo modprobe uinput
|
# sudo modprobe uinput
|
||||||
|
systemd.user.services.kanata = {
|
||||||
|
Unit = {
|
||||||
|
Description = "kanata";
|
||||||
|
};
|
||||||
|
|
||||||
users.groups.uinput = { };
|
Service = {
|
||||||
users.extraUsers.jana.extraGroups = [
|
Restart = "always";
|
||||||
"uinput"
|
RestartSec = "3";
|
||||||
"input"
|
ExecStart = "${pkgs.kanata-with-cmd}/bin/kanata --cfg ${pkgs.writeText "kanata.kbd" kanata-config}";
|
||||||
];
|
Nice = "-20";
|
||||||
environment.systemPackages = [ pkgs.kanata-with-cmd ];
|
};
|
||||||
services.udev.extraRules = ''
|
|
||||||
KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"
|
|
||||||
'';
|
|
||||||
# };
|
|
||||||
|
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.kanata = {
|
||||||
|
target = ".config/kanata/kanata.kbd";
|
||||||
|
text = builtins.readFile ./cfg.kbd;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
19
programs/kanata/system.nix
Normal file
19
programs/kanata/system.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
# sudo groupadd uinput
|
||||||
|
# sudo usermod -aG input $USER
|
||||||
|
# sudo usermod -aG uinput $USER
|
||||||
|
# echo "KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"" >> /etc/udev/rules.d/99-input.rules
|
||||||
|
# reboot or sudo udevadm control --reload-rules && sudo udevadm trigger
|
||||||
|
# sudo modprobe uinput
|
||||||
|
|
||||||
|
users.groups.uinput = { };
|
||||||
|
users.extraUsers.jana.extraGroups = [
|
||||||
|
"uinput"
|
||||||
|
"input"
|
||||||
|
];
|
||||||
|
environment.systemPackages = [ pkgs.kanata-with-cmd ];
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
@ -1,57 +1,53 @@
|
||||||
_: {
|
{ pkgs, flakes, ... }:
|
||||||
custom.program.kitty.requirements = [ "graphical" ];
|
{
|
||||||
custom.program.kitty.home-config =
|
programs.kitty = {
|
||||||
{ pkgs, flakes, ... }:
|
enable = true;
|
||||||
{
|
font = {
|
||||||
programs.kitty = {
|
name = "Jetbrains Mono";
|
||||||
enable = true;
|
size = 13.0;
|
||||||
font = {
|
package = pkgs.jetbrains-mono;
|
||||||
name = "Jetbrains Mono";
|
|
||||||
size = 13.0;
|
|
||||||
package = pkgs.jetbrains-mono;
|
|
||||||
};
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
scrollback_lines = 20000;
|
|
||||||
allow_hyperlinks = true;
|
|
||||||
|
|
||||||
repaint_delay = 10;
|
|
||||||
input_delay = 3;
|
|
||||||
|
|
||||||
enable_audio_bell = false;
|
|
||||||
update_check_interval = 0;
|
|
||||||
|
|
||||||
initial_window_width = "95c";
|
|
||||||
initial_window_height = "30c";
|
|
||||||
remember_window_size = "no";
|
|
||||||
|
|
||||||
draw_minimal_borders = false;
|
|
||||||
hide_window_decorations = true;
|
|
||||||
|
|
||||||
shell = "${pkgs.tmux}/bin/tmux";
|
|
||||||
clipboard_control = "write-clipboard write-primary read-clipboard read-primary";
|
|
||||||
|
|
||||||
foreground = "#fcfcfc";
|
|
||||||
background = "#232627";
|
|
||||||
linux_display_server = "auto";
|
|
||||||
};
|
|
||||||
|
|
||||||
keybindings = {
|
|
||||||
"ctrl+f" =
|
|
||||||
"launch --location=hsplit --allow-remote-control kitty +kitten ${flakes.kitty-search}/search.py @active-kitty-window-id";
|
|
||||||
"ctrl+alt+r" = "load_config_file";
|
|
||||||
"ctrl+shift+r" = "no_op";
|
|
||||||
"super+`" = "no_op";
|
|
||||||
"ctrl+EQUAL" = "change_font_size all +2.0";
|
|
||||||
"ctrl+minus" = "change_font_size all -2.0";
|
|
||||||
"ctrl+0" = "change_font_size all 0";
|
|
||||||
# "ctrl+/" = "send_text all ";
|
|
||||||
"super+~" = "no_op";
|
|
||||||
};
|
|
||||||
|
|
||||||
extraConfig = ''
|
|
||||||
mouse_map left click ungrabbed no-op
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
scrollback_lines = 20000;
|
||||||
|
allow_hyperlinks = true;
|
||||||
|
|
||||||
|
repaint_delay = 10;
|
||||||
|
input_delay = 3;
|
||||||
|
|
||||||
|
enable_audio_bell = false;
|
||||||
|
update_check_interval = 0;
|
||||||
|
|
||||||
|
initial_window_width = "95c";
|
||||||
|
initial_window_height = "30c";
|
||||||
|
remember_window_size = "no";
|
||||||
|
|
||||||
|
draw_minimal_borders = false;
|
||||||
|
hide_window_decorations = true;
|
||||||
|
|
||||||
|
shell = "${pkgs.tmux}/bin/tmux";
|
||||||
|
clipboard_control = "write-clipboard write-primary read-clipboard read-primary";
|
||||||
|
|
||||||
|
foreground = "#fcfcfc";
|
||||||
|
background = "#232627";
|
||||||
|
linux_display_server = "auto";
|
||||||
|
};
|
||||||
|
|
||||||
|
keybindings = {
|
||||||
|
"ctrl+f" =
|
||||||
|
"launch --location=hsplit --allow-remote-control kitty +kitten ${flakes.kitty-search}/search.py @active-kitty-window-id";
|
||||||
|
"ctrl+alt+r" = "load_config_file";
|
||||||
|
"ctrl+shift+r" = "no_op";
|
||||||
|
"super+`" = "no_op";
|
||||||
|
"ctrl+EQUAL" = "change_font_size all +2.0";
|
||||||
|
"ctrl+minus" = "change_font_size all -2.0";
|
||||||
|
"ctrl+0" = "change_font_size all 0";
|
||||||
|
# "ctrl+/" = "send_text all ";
|
||||||
|
"super+~" = "no_op";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
mouse_map left click ungrabbed no-op
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,104 +1,99 @@
|
||||||
_: {
|
{ pkgs, inputs, ... }:
|
||||||
custom.program.nvim.requirements = [ "cli" ];
|
{
|
||||||
custom.program.nvim.home-config =
|
home = {
|
||||||
{ pkgs, flakes, ... }:
|
sessionVariables = {
|
||||||
{
|
EDITOR = "nvim";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
home = {
|
imports = [
|
||||||
sessionVariables = {
|
./options.nix
|
||||||
EDITOR = "nvim";
|
./plugins.nix
|
||||||
};
|
./keys.nix
|
||||||
};
|
];
|
||||||
|
|
||||||
imports = [
|
programs.nixvim = {
|
||||||
flakes.nixvim.homeModules.nixvim
|
enable = true;
|
||||||
./options.nix
|
globals.mapleader = " ";
|
||||||
./plugins.nix
|
globals.maplocalleader = " ";
|
||||||
./keys.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.nixvim = {
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
|
||||||
|
# Highlight and remove extra white spaces
|
||||||
|
# same color as cursorline as per
|
||||||
|
# https://github.com/joshdick/onedark.vim/blob/390b893d361c356ac1b00778d849815f2aa44ae4/autoload/onedark.vim
|
||||||
|
highlight.ExtraWhitespace.bg = "#2C323C";
|
||||||
|
match.ExtraWhitespace = "\\s\\+$";
|
||||||
|
|
||||||
|
clipboard.providers.wl-copy.enable = true;
|
||||||
|
|
||||||
|
performance = {
|
||||||
|
byteCompileLua.enable = true;
|
||||||
|
combinePlugins = {
|
||||||
enable = true;
|
enable = true;
|
||||||
globals.mapleader = " ";
|
|
||||||
globals.maplocalleader = " ";
|
|
||||||
|
|
||||||
viAlias = true;
|
standalonePlugins = [
|
||||||
vimAlias = true;
|
# clashes with lualine
|
||||||
|
"onedark.nvim"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Highlight and remove extra white spaces
|
extraLuaPackages = ps: [ ps.magick ];
|
||||||
# same color as cursorline as per
|
extraPackages = [ pkgs.imagemagick ];
|
||||||
# https://github.com/joshdick/onedark.vim/blob/390b893d361c356ac1b00778d849815f2aa44ae4/autoload/onedark.vim
|
|
||||||
highlight.ExtraWhitespace.bg = "#2C323C";
|
|
||||||
match.ExtraWhitespace = "\\s\\+$";
|
|
||||||
|
|
||||||
clipboard.providers.wl-copy.enable = true;
|
# package = (import inputs.unstable { inherit (pkgs) system; }).neovim-unwrapped;
|
||||||
|
package = pkgs.neovim-unwrapped;
|
||||||
|
|
||||||
performance = {
|
colorschemes.onedark = {
|
||||||
byteCompileLua.enable = true;
|
enable = true;
|
||||||
combinePlugins = {
|
settings = {
|
||||||
enable = true;
|
style = "deep";
|
||||||
|
|
||||||
standalonePlugins = [
|
highlights = {
|
||||||
# clashes with lualine
|
# bright green doccomments
|
||||||
"onedark.nvim"
|
"@lsp.type.comment".fg = "#77B767";
|
||||||
];
|
"@comment.documentation.rust".fg = "#77B767";
|
||||||
};
|
"@comment.documentation".fg = "#77B767";
|
||||||
|
"@comment".fg = "#426639";
|
||||||
|
# "Visual".bg = "#2a2e36";
|
||||||
|
# "Cursorline".bg = "#2a2e36";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraLuaPackages = ps: [ ps.magick ];
|
|
||||||
extraPackages = [ pkgs.imagemagick ];
|
|
||||||
|
|
||||||
# package = (import inputs.unstable { inherit (pkgs) system; }).neovim-unwrapped;
|
|
||||||
package = pkgs.neovim-unwrapped;
|
|
||||||
|
|
||||||
colorschemes.onedark = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
style = "deep";
|
|
||||||
|
|
||||||
highlights = {
|
|
||||||
# bright green doccomments
|
|
||||||
"@lsp.type.comment".fg = "#77B767";
|
|
||||||
"@comment.documentation.rust".fg = "#77B767";
|
|
||||||
"@comment.documentation".fg = "#77B767";
|
|
||||||
"@comment".fg = "#426639";
|
|
||||||
# "Visual".bg = "#2a2e36";
|
|
||||||
# "Cursorline".bg = "#2a2e36";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
extraConfigLuaPre = ''
|
|
||||||
require("neoconf").setup({})
|
|
||||||
'';
|
|
||||||
extraConfigLua = ''
|
|
||||||
require("render-markdown").setup {
|
|
||||||
latex_converter = '${pkgs.python312Packages.pylatexenc}/bin/latex2text',
|
|
||||||
}
|
|
||||||
''
|
|
||||||
|
|
||||||
# local lspconfig = require 'lspconfig'
|
|
||||||
# local configs = require 'lspconfig.configs'
|
|
||||||
# if not configs.foo_lsp then
|
|
||||||
# configs.noteslsp = {
|
|
||||||
# default_config = {
|
|
||||||
# -- cmd = {'${pkgs.custom.noteslsp}/bin/noteslsp'},
|
|
||||||
# cmd = {'./noteslsp/target/debug/noteslsp'},
|
|
||||||
# filetypes = {'markdown'},
|
|
||||||
# root_dir = function(fname)
|
|
||||||
# return lspconfig.util.find_git_ancestor(fname)
|
|
||||||
# end,
|
|
||||||
# settings = {}
|
|
||||||
# ,
|
|
||||||
# },
|
|
||||||
# }
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# lspconfig.noteslsp.setup{}
|
|
||||||
# ''
|
|
||||||
+ (builtins.readFile ./config.lua);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraConfigLuaPre = ''
|
||||||
|
require("neoconf").setup({})
|
||||||
|
'';
|
||||||
|
extraConfigLua =
|
||||||
|
''
|
||||||
|
require("render-markdown").setup {
|
||||||
|
latex_converter = '${pkgs.python312Packages.pylatexenc}/bin/latex2text',
|
||||||
|
}
|
||||||
|
''
|
||||||
|
|
||||||
|
# local lspconfig = require 'lspconfig'
|
||||||
|
# local configs = require 'lspconfig.configs'
|
||||||
|
# if not configs.foo_lsp then
|
||||||
|
# configs.noteslsp = {
|
||||||
|
# default_config = {
|
||||||
|
# -- cmd = {'${pkgs.custom.noteslsp}/bin/noteslsp'},
|
||||||
|
# cmd = {'./noteslsp/target/debug/noteslsp'},
|
||||||
|
# filetypes = {'markdown'},
|
||||||
|
# root_dir = function(fname)
|
||||||
|
# return lspconfig.util.find_git_ancestor(fname)
|
||||||
|
# end,
|
||||||
|
# settings = {}
|
||||||
|
# ,
|
||||||
|
# },
|
||||||
|
# }
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# lspconfig.noteslsp.setup{}
|
||||||
|
# ''
|
||||||
|
+ (builtins.readFile ./config.lua);
|
||||||
|
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,14 +11,14 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
# fzy-lua-native = pkgs.vimUtils.buildVimPlugin {
|
# fzy-lua-native = pkgs.vimUtils.buildVimPlugin {
|
||||||
# name = "fzy-lua-native";
|
# name = "fzy-lua-native";
|
||||||
# src = pkgs.fetchFromGitHub {
|
# src = pkgs.fetchFromGitHub {
|
||||||
# owner = "romgrk";
|
# owner = "romgrk";
|
||||||
# repo = "fzy-lua-native";
|
# repo = "fzy-lua-native";
|
||||||
# rev = "9d720745d5c2fb563c0d86c17d77612a3519c506";
|
# rev = "9d720745d5c2fb563c0d86c17d77612a3519c506";
|
||||||
# hash = "sha256-pBV5iGa1+5gtM9BcDk8I5SKoQ9sydOJHsmyoBcxAct0=";
|
# hash = "sha256-pBV5iGa1+5gtM9BcDk8I5SKoQ9sydOJHsmyoBcxAct0=";
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
{
|
{
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
plugins = {
|
plugins = {
|
||||||
|
|
@ -286,33 +286,29 @@ in
|
||||||
|
|
||||||
neo-tree = {
|
neo-tree = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
closeIfLastWindow = true;
|
||||||
close_if_last_window = true;
|
enableGitStatus = false;
|
||||||
enable_git_status = false;
|
|
||||||
|
|
||||||
window = {
|
|
||||||
position = "right";
|
|
||||||
width = 30;
|
|
||||||
# mappings = {
|
|
||||||
# "<bs>" = "navigate_up";
|
|
||||||
# "." = "set_root";
|
|
||||||
# "/" = "fuzzy_finder";
|
|
||||||
# "f" = "filter_on_submit";
|
|
||||||
# "h" = "show_help";
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
filesystem = {
|
|
||||||
follow_current_file.enabled = true;
|
|
||||||
filteredItems = {
|
|
||||||
hide_hidden = false;
|
|
||||||
hide_dotfiles = false;
|
|
||||||
force_visible_in_empty_folder = true;
|
|
||||||
hide_gitignored = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
window = {
|
||||||
|
position = "right";
|
||||||
|
width = 30;
|
||||||
|
# mappings = {
|
||||||
|
# "<bs>" = "navigate_up";
|
||||||
|
# "." = "set_root";
|
||||||
|
# "/" = "fuzzy_finder";
|
||||||
|
# "f" = "filter_on_submit";
|
||||||
|
# "h" = "show_help";
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
filesystem = {
|
||||||
|
followCurrentFile.enabled = true;
|
||||||
|
filteredItems = {
|
||||||
|
hideHidden = false;
|
||||||
|
hideDotfiles = false;
|
||||||
|
forceVisibleInEmptyFolder = true;
|
||||||
|
hideGitignored = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nvim-lightbulb = {
|
nvim-lightbulb = {
|
||||||
|
|
|
||||||
|
|
@ -1,170 +1,166 @@
|
||||||
_: {
|
{ pkgs, ... }:
|
||||||
custom.program.tmux.requirements = [ "cli" ];
|
{
|
||||||
custom.program.tmux.home-config =
|
programs.tmux = {
|
||||||
{ pkgs, ... }:
|
enable = true;
|
||||||
{
|
mouse = true;
|
||||||
programs.tmux = {
|
clock24 = true;
|
||||||
enable = true;
|
|
||||||
mouse = true;
|
|
||||||
clock24 = true;
|
|
||||||
|
|
||||||
shortcut = "k";
|
shortcut = "k";
|
||||||
|
|
||||||
plugins = with pkgs; [
|
|
||||||
{
|
|
||||||
plugin = tmuxPlugins.mkTmuxPlugin {
|
|
||||||
pluginName = "suspend";
|
|
||||||
version = "1a2f806";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "MunifTanjim";
|
|
||||||
repo = "tmux-suspend";
|
|
||||||
rev = "1a2f806666e0bfed37535372279fa00d27d50d14";
|
|
||||||
sha256 = "0j7vjrwc7gniwkv1076q3wc8ccwj42zph5wdmsm9ibz6029wlmzv";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
extraConfig = ''
|
|
||||||
set -g @suspend_key 'F11'
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
{
|
|
||||||
plugin = tmuxPlugins.mode-indicator;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
|
plugins = with pkgs; [
|
||||||
|
{
|
||||||
|
plugin = tmuxPlugins.mkTmuxPlugin {
|
||||||
|
pluginName = "suspend";
|
||||||
|
version = "1a2f806";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "MunifTanjim";
|
||||||
|
repo = "tmux-suspend";
|
||||||
|
rev = "1a2f806666e0bfed37535372279fa00d27d50d14";
|
||||||
|
sha256 = "0j7vjrwc7gniwkv1076q3wc8ccwj42zph5wdmsm9ibz6029wlmzv";
|
||||||
|
};
|
||||||
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
# unbind every single normal keybinding
|
set -g @suspend_key 'F11'
|
||||||
unbind-key -a
|
|
||||||
|
|
||||||
# for special characters to work right
|
|
||||||
# like <C-_>
|
|
||||||
# set-window-option -g xterm-keys on
|
|
||||||
set -g default-terminal "screen-256color"
|
|
||||||
|
|
||||||
set -g set-titles on
|
|
||||||
set -g allow-passthrough on
|
|
||||||
set -s escape-time 0
|
|
||||||
|
|
||||||
set-option -g default-shell ${pkgs.fish}/bin/fish
|
|
||||||
set -ga terminal-features "\*:hyperlinks"
|
|
||||||
|
|
||||||
set-window-option -g mode-keys vi
|
|
||||||
|
|
||||||
# clipboard stuff
|
|
||||||
bind -T copy-mode-vi v send-keys -X begin-selection
|
|
||||||
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
|
|
||||||
bind v copy-mode
|
|
||||||
bind p paste-buffer -p
|
|
||||||
set -s set-clipboard on
|
|
||||||
|
|
||||||
# get back normal terminal emulator bindings
|
|
||||||
bind-key -n S-PPage copy-mode -u
|
|
||||||
bind-key -T copy-mode -n S-NPage send-keys -X page-down
|
|
||||||
|
|
||||||
# don't scroll to end when copying with mouse
|
|
||||||
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe
|
|
||||||
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe
|
|
||||||
bind-key -T copy-mode DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe
|
|
||||||
bind-key -T copy-mode TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe
|
|
||||||
bind-key -T copy-mode-vi DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe
|
|
||||||
bind-key -T copy-mode-vi TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe
|
|
||||||
|
|
||||||
# window control
|
|
||||||
bind t new-window -c "#{pane_current_path}"
|
|
||||||
bind-key Tab next-window
|
|
||||||
bind-key BTab previous-window
|
|
||||||
set -g automatic-rename-format "#{?#{==:#{pane_current_path},$HOME},~,#{b:pane_current_path}} (#{pane_current_command})"
|
|
||||||
set -g renumber-windows on
|
|
||||||
bind-key Q confirm-before -p "kill-window #W? (y/n)" kill-window
|
|
||||||
bind A last-window
|
|
||||||
|
|
||||||
bind-key 1 select-window -t :0
|
|
||||||
bind-key 2 select-window -t :1
|
|
||||||
bind-key 3 select-window -t :2
|
|
||||||
bind-key 4 select-window -t :3
|
|
||||||
bind-key 5 select-window -t :4
|
|
||||||
bind-key 6 select-window -t :5
|
|
||||||
bind-key 7 select-window -t :6
|
|
||||||
bind-key 8 select-window -t :7
|
|
||||||
bind-key 9 select-window -t :8
|
|
||||||
bind-key 0 select-window -t :9
|
|
||||||
|
|
||||||
# pane control
|
|
||||||
bind h select-pane -L
|
|
||||||
bind j select-pane -D
|
|
||||||
bind k select-pane -U
|
|
||||||
bind l select-pane -R
|
|
||||||
bind L split-window -h -c "#{pane_current_path}"
|
|
||||||
bind J split-window -v -c "#{pane_current_path}"
|
|
||||||
bind H split-window -h -b -c "#{pane_current_path}"
|
|
||||||
bind K split-window -v -b -c "#{pane_current_path}"
|
|
||||||
bind x swap-pane -D
|
|
||||||
|
|
||||||
# double-click ^k (or lshift with kanata) for previous pane like ^w in vim
|
|
||||||
bind -r ^k select-pane -l
|
|
||||||
bind-key q confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
|
||||||
|
|
||||||
bind-key o choose-tree -wZ
|
|
||||||
bind-key O choose-tree -sZ
|
|
||||||
|
|
||||||
# get back command mode and some other basics...
|
|
||||||
bind : command-prompt
|
|
||||||
bind r source-file ~/.config/tmux/tmux.conf \; display "config reloaded"
|
|
||||||
bind-key ? list-keys
|
|
||||||
|
|
||||||
# Scroll oin man etc
|
|
||||||
tmux_commands_with_legacy_scroll="nano less more man git"
|
|
||||||
|
|
||||||
bind-key -T root WheelUpPane \
|
|
||||||
if-shell -Ft= '#{?mouse_any_flag,1,#{pane_in_mode}}' \
|
|
||||||
'send -Mt=' \
|
|
||||||
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
|
|
||||||
"send -t= Up" "copy-mode -et="'
|
|
||||||
|
|
||||||
bind-key -T root WheelDownPane \
|
|
||||||
if-shell -Ft = '#{?pane_in_mode,1,#{mouse_any_flag}}' \
|
|
||||||
'send -Mt=' \
|
|
||||||
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
|
|
||||||
"send -t= Down" "send -Mt="'
|
|
||||||
|
|
||||||
bind-key -T copy-mode-vi ] \
|
|
||||||
send-keys -X clear-selection \; \
|
|
||||||
send-keys -X search-forward "--> " \; \
|
|
||||||
send-keys -X next-word \; \
|
|
||||||
send-keys -X begin-selection \; \
|
|
||||||
send-keys -X jump-forward ":" \; \
|
|
||||||
send-keys -X jump-to-forward ":" \;
|
|
||||||
|
|
||||||
bind-key -T copy-mode-vi [ \
|
|
||||||
send-keys -X clear-selection \; \
|
|
||||||
send-keys -X start-of-line \; \
|
|
||||||
send-keys -X search-backward "--> " \; \
|
|
||||||
send-keys -X next-word \; \
|
|
||||||
send-keys -X begin-selection \; \
|
|
||||||
send-keys -X jump-forward ":" \; \
|
|
||||||
send-keys -X jump-to-forward ":" \;
|
|
||||||
|
|
||||||
bind-key [ copy-mode \; send-keys [
|
|
||||||
bind-key ] copy-mode \; send-keys ]
|
|
||||||
|
|
||||||
bind d select-pane -l \; send-keys [
|
|
||||||
|
|
||||||
'';
|
'';
|
||||||
};
|
}
|
||||||
# bind-key -T root DoubleClick1Pane run-shell "cd '#{pane_current_path}'; echo '#{mouse_line}' | ${pkgs.writeScriptBin "open-file" ''
|
{
|
||||||
# open_file () {
|
plugin = tmuxPlugins.mode-indicator;
|
||||||
# input=`cat`
|
}
|
||||||
# link=$(echo "$input" | grep -Po '[^ \\]*/[^ \\]*\.[^ \\]*\:[0-9]+' | sed 's/\:/|/g')
|
];
|
||||||
#
|
|
||||||
# if [ ! -z "$link" ]; then
|
extraConfig = ''
|
||||||
# echo "LINK = $link"
|
# unbind every single normal keybinding
|
||||||
# vim_proc=$(pgrep vim | xargs pwdx | grep $(pwd -P) | awk '{print $1}' | sed 's/\:*$//g' | xargs -I{} find /run/user/1000 -depth -maxdepth 1 -name "nvim.{}.0")
|
unbind-key -a
|
||||||
#
|
|
||||||
# nvim --server "$vim_proc" --remote-send "<C-\><C-N>:e $link<cr>"
|
# for special characters to work right
|
||||||
# fi
|
# like <C-_>
|
||||||
# }
|
# set-window-option -g xterm-keys on
|
||||||
#
|
set -g default-terminal "screen-256color"
|
||||||
# open_file 2>&1 >> ~/open-file.log
|
|
||||||
#
|
set -g set-titles on
|
||||||
# ''}/bin/open-file"
|
set -g allow-passthrough on
|
||||||
};
|
set -s escape-time 0
|
||||||
|
|
||||||
|
set-option -g default-shell ${pkgs.fish}/bin/fish
|
||||||
|
set -ga terminal-features "\*:hyperlinks"
|
||||||
|
|
||||||
|
set-window-option -g mode-keys vi
|
||||||
|
|
||||||
|
# clipboard stuff
|
||||||
|
bind -T copy-mode-vi v send-keys -X begin-selection
|
||||||
|
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
|
||||||
|
bind v copy-mode
|
||||||
|
bind p paste-buffer -p
|
||||||
|
set -s set-clipboard on
|
||||||
|
|
||||||
|
# get back normal terminal emulator bindings
|
||||||
|
bind-key -n S-PPage copy-mode -u
|
||||||
|
bind-key -T copy-mode -n S-NPage send-keys -X page-down
|
||||||
|
|
||||||
|
# don't scroll to end when copying with mouse
|
||||||
|
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe
|
||||||
|
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe
|
||||||
|
bind-key -T copy-mode DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe
|
||||||
|
bind-key -T copy-mode TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe
|
||||||
|
bind-key -T copy-mode-vi DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe
|
||||||
|
bind-key -T copy-mode-vi TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe
|
||||||
|
|
||||||
|
# window control
|
||||||
|
bind t new-window -c "#{pane_current_path}"
|
||||||
|
bind-key Tab next-window
|
||||||
|
bind-key BTab previous-window
|
||||||
|
set -g automatic-rename-format "#{?#{==:#{pane_current_path},$HOME},~,#{b:pane_current_path}} (#{pane_current_command})"
|
||||||
|
set -g renumber-windows on
|
||||||
|
bind-key Q confirm-before -p "kill-window #W? (y/n)" kill-window
|
||||||
|
bind A last-window
|
||||||
|
|
||||||
|
bind-key 1 select-window -t :0
|
||||||
|
bind-key 2 select-window -t :1
|
||||||
|
bind-key 3 select-window -t :2
|
||||||
|
bind-key 4 select-window -t :3
|
||||||
|
bind-key 5 select-window -t :4
|
||||||
|
bind-key 6 select-window -t :5
|
||||||
|
bind-key 7 select-window -t :6
|
||||||
|
bind-key 8 select-window -t :7
|
||||||
|
bind-key 9 select-window -t :8
|
||||||
|
bind-key 0 select-window -t :9
|
||||||
|
|
||||||
|
# pane control
|
||||||
|
bind h select-pane -L
|
||||||
|
bind j select-pane -D
|
||||||
|
bind k select-pane -U
|
||||||
|
bind l select-pane -R
|
||||||
|
bind L split-window -h -c "#{pane_current_path}"
|
||||||
|
bind J split-window -v -c "#{pane_current_path}"
|
||||||
|
bind H split-window -h -b -c "#{pane_current_path}"
|
||||||
|
bind K split-window -v -b -c "#{pane_current_path}"
|
||||||
|
bind x swap-pane -D
|
||||||
|
|
||||||
|
# double-click ^k (or lshift with kanata) for previous pane like ^w in vim
|
||||||
|
bind -r ^k select-pane -l
|
||||||
|
bind-key q confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
||||||
|
|
||||||
|
bind-key o choose-tree -wZ
|
||||||
|
bind-key O choose-tree -sZ
|
||||||
|
|
||||||
|
# get back command mode and some other basics...
|
||||||
|
bind : command-prompt
|
||||||
|
bind r source-file ~/.config/tmux/tmux.conf \; display "config reloaded"
|
||||||
|
bind-key ? list-keys
|
||||||
|
|
||||||
|
# Scroll oin man etc
|
||||||
|
tmux_commands_with_legacy_scroll="nano less more man git"
|
||||||
|
|
||||||
|
bind-key -T root WheelUpPane \
|
||||||
|
if-shell -Ft= '#{?mouse_any_flag,1,#{pane_in_mode}}' \
|
||||||
|
'send -Mt=' \
|
||||||
|
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
|
||||||
|
"send -t= Up" "copy-mode -et="'
|
||||||
|
|
||||||
|
bind-key -T root WheelDownPane \
|
||||||
|
if-shell -Ft = '#{?pane_in_mode,1,#{mouse_any_flag}}' \
|
||||||
|
'send -Mt=' \
|
||||||
|
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
|
||||||
|
"send -t= Down" "send -Mt="'
|
||||||
|
|
||||||
|
bind-key -T copy-mode-vi ] \
|
||||||
|
send-keys -X clear-selection \; \
|
||||||
|
send-keys -X search-forward "--> " \; \
|
||||||
|
send-keys -X next-word \; \
|
||||||
|
send-keys -X begin-selection \; \
|
||||||
|
send-keys -X jump-forward ":" \; \
|
||||||
|
send-keys -X jump-to-forward ":" \;
|
||||||
|
|
||||||
|
bind-key -T copy-mode-vi [ \
|
||||||
|
send-keys -X clear-selection \; \
|
||||||
|
send-keys -X start-of-line \; \
|
||||||
|
send-keys -X search-backward "--> " \; \
|
||||||
|
send-keys -X next-word \; \
|
||||||
|
send-keys -X begin-selection \; \
|
||||||
|
send-keys -X jump-forward ":" \; \
|
||||||
|
send-keys -X jump-to-forward ":" \;
|
||||||
|
|
||||||
|
bind-key [ copy-mode \; send-keys [
|
||||||
|
bind-key ] copy-mode \; send-keys ]
|
||||||
|
|
||||||
|
bind d select-pane -l \; send-keys [
|
||||||
|
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
# bind-key -T root DoubleClick1Pane run-shell "cd '#{pane_current_path}'; echo '#{mouse_line}' | ${pkgs.writeScriptBin "open-file" ''
|
||||||
|
# open_file () {
|
||||||
|
# input=`cat`
|
||||||
|
# link=$(echo "$input" | grep -Po '[^ \\]*/[^ \\]*\.[^ \\]*\:[0-9]+' | sed 's/\:/|/g')
|
||||||
|
#
|
||||||
|
# if [ ! -z "$link" ]; then
|
||||||
|
# echo "LINK = $link"
|
||||||
|
# vim_proc=$(pgrep vim | xargs pwdx | grep $(pwd -P) | awk '{print $1}' | sed 's/\:*$//g' | xargs -I{} find /run/user/1000 -depth -maxdepth 1 -name "nvim.{}.0")
|
||||||
|
#
|
||||||
|
# nvim --server "$vim_proc" --remote-send "<C-\><C-N>:e $link<cr>"
|
||||||
|
# fi
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# open_file 2>&1 >> ~/open-file.log
|
||||||
|
#
|
||||||
|
# ''}/bin/open-file"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,171 +1,166 @@
|
||||||
_: {
|
{ pkgs, ... }:
|
||||||
custom.program.zed.requirements = [ "work" ];
|
{
|
||||||
custom.program.zed.home-config =
|
programs.zed-editor = {
|
||||||
{ pkgs, ... }:
|
enable = true;
|
||||||
{
|
extensions = [
|
||||||
programs.zed-editor = {
|
"nix"
|
||||||
enable = true;
|
"intellij-newui-theme"
|
||||||
extensions = [
|
"charmed-icons"
|
||||||
"nix"
|
];
|
||||||
"intellij-newui-theme"
|
userSettings = {
|
||||||
"charmed-icons"
|
|
||||||
"astro"
|
|
||||||
];
|
|
||||||
userSettings = {
|
|
||||||
|
|
||||||
ssh_connections = [
|
ssh_connections = [
|
||||||
|
{
|
||||||
|
host = "icecube";
|
||||||
|
args = [ ];
|
||||||
|
projects = [
|
||||||
{
|
{
|
||||||
host = "icecube";
|
paths = [
|
||||||
args = [ ];
|
"/home/jana/src/eii-test"
|
||||||
projects = [
|
];
|
||||||
{
|
}
|
||||||
paths = [
|
{
|
||||||
"/home/jana/src/eii-test"
|
paths = [
|
||||||
];
|
"/home/jana/src/example"
|
||||||
}
|
];
|
||||||
{
|
}
|
||||||
paths = [
|
{
|
||||||
"/home/jana/src/example"
|
paths = [
|
||||||
];
|
"/home/jana/src/fitgirl-ddl"
|
||||||
}
|
];
|
||||||
{
|
}
|
||||||
paths = [
|
{
|
||||||
"/home/jana/src/fitgirl-ddl"
|
paths = [
|
||||||
];
|
"/home/jana/src/libs-team/tools/unstable-api"
|
||||||
}
|
];
|
||||||
{
|
}
|
||||||
paths = [
|
{
|
||||||
"/home/jana/src/libs-team/tools/unstable-api"
|
paths = [
|
||||||
];
|
"/home/jana/src/ml-kem-hang"
|
||||||
}
|
];
|
||||||
{
|
}
|
||||||
paths = [
|
{
|
||||||
"/home/jana/src/ml-kem-hang"
|
paths = [
|
||||||
];
|
"/home/jana/src/opendal/core"
|
||||||
}
|
];
|
||||||
{
|
}
|
||||||
paths = [
|
{
|
||||||
"/home/jana/src/opendal/core"
|
paths = [
|
||||||
];
|
"/home/jana/src/rust"
|
||||||
}
|
];
|
||||||
{
|
}
|
||||||
paths = [
|
{
|
||||||
"/home/jana/src/rust"
|
paths = [
|
||||||
];
|
"/home/jana/src/span-lowering-tests"
|
||||||
}
|
|
||||||
{
|
|
||||||
paths = [
|
|
||||||
"/home/jana/src/span-lowering-tests"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
icon_theme = "Warm Charmed Icons";
|
}
|
||||||
ui_font_size = 16;
|
];
|
||||||
buffer_font_size = 16;
|
icon_theme = "Warm Charmed Icons";
|
||||||
theme = {
|
ui_font_size = 16;
|
||||||
mode = "system";
|
buffer_font_size = 16;
|
||||||
light = "One Light";
|
theme = {
|
||||||
dark = "JetBrains New Dark";
|
mode = "system";
|
||||||
};
|
light = "One Light";
|
||||||
disable_ai = true;
|
dark = "JetBrains New Dark";
|
||||||
|
};
|
||||||
|
disable_ai = true;
|
||||||
|
|
||||||
preview_tabs = {
|
preview_tabs = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
enable_preview_from_file_finder = true;
|
enable_preview_from_file_finder = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
close_on_file_delete = true;
|
close_on_file_delete = true;
|
||||||
confirm_quit = true;
|
confirm_quit = true;
|
||||||
|
|
||||||
edit_predictions_disabled_in = [
|
edit_predictions_disabled_in = [
|
||||||
"comment"
|
"comment"
|
||||||
"string"
|
"string"
|
||||||
];
|
];
|
||||||
|
|
||||||
vim_mode = true;
|
vim_mode = true;
|
||||||
cursor_blink = false;
|
cursor_blink = false;
|
||||||
vertical_scroll_margin = 0;
|
vertical_scroll_margin = 0;
|
||||||
|
|
||||||
inlay_hints = {
|
inlay_hints = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
project_panel = {
|
project_panel = {
|
||||||
dock = "right";
|
dock = "right";
|
||||||
git_status = false;
|
git_status = false;
|
||||||
};
|
};
|
||||||
minimap = {
|
minimap = {
|
||||||
show = "auto";
|
show = "auto";
|
||||||
thumb = "always";
|
thumb = "always";
|
||||||
thumb_border = "left_open";
|
thumb_border = "left_open";
|
||||||
};
|
};
|
||||||
tab_bar = {
|
tab_bar = {
|
||||||
show = true;
|
show = true;
|
||||||
show_nav_history_buttons = false;
|
show_nav_history_buttons = false;
|
||||||
show_tab_bar_buttons = false;
|
show_tab_bar_buttons = false;
|
||||||
};
|
};
|
||||||
tabs = {
|
tabs = {
|
||||||
file_icons = true;
|
file_icons = true;
|
||||||
git_status = false;
|
git_status = false;
|
||||||
activate_on_close = "history";
|
activate_on_close = "history";
|
||||||
show_close_button = "hover";
|
show_close_button = "hover";
|
||||||
};
|
};
|
||||||
lsp = {
|
lsp = {
|
||||||
rust-analyzer = {
|
rust-analyzer = {
|
||||||
initialization_options = {
|
initialization_options = {
|
||||||
inlayHints = {
|
inlayHints = {
|
||||||
lifetimeElisionHints = "always";
|
lifetimeElisionHints = "always";
|
||||||
discriminantHints = "always";
|
discriminantHints = "always";
|
||||||
};
|
|
||||||
diagnostic = {
|
|
||||||
refreshSupport = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
nil = {
|
diagnostic = {
|
||||||
binary = {
|
refreshSupport = true;
|
||||||
ignore_system_version = false;
|
|
||||||
path = "${pkgs.lib.getExe' pkgs.nil "nil"}";
|
|
||||||
};
|
|
||||||
|
|
||||||
initialization_options = {
|
|
||||||
formatting = {
|
|
||||||
command = [ "${pkgs.lib.getExe' pkgs.nixfmt "nixfmt"}" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
diagnostics = {
|
};
|
||||||
button = false;
|
nil = {
|
||||||
include_warnings = true;
|
binary = {
|
||||||
inline = {
|
ignore_system_version = false;
|
||||||
enabled = true;
|
path = "${pkgs.lib.getExe' pkgs.nil "nil"}";
|
||||||
};
|
|
||||||
};
|
};
|
||||||
terminal = {
|
|
||||||
"dock" = "left";
|
|
||||||
"env" = {
|
|
||||||
# "EDITOR": "zeditor --wait"
|
|
||||||
"EDITOR" = "vim";
|
|
||||||
};
|
|
||||||
"font_size" = 12;
|
|
||||||
"font_family" = "Noto Sans Mono";
|
|
||||||
"line_height" = "standard";
|
|
||||||
};
|
|
||||||
buffer_font_family = "JetBrains Mono";
|
|
||||||
|
|
||||||
# "diagnostics_max_severity": "off",
|
initialization_options = {
|
||||||
|
formatting = {
|
||||||
"experimental.theme_overrides" = {
|
command = [ "${pkgs.lib.getExe' pkgs.nixfmt "nixfmt"}" ];
|
||||||
"syntax" = {
|
|
||||||
"comment.doc" = {
|
|
||||||
"color" = "#77B767";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
diagnostics = {
|
||||||
|
button = false;
|
||||||
|
include_warnings = true;
|
||||||
|
inline = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
terminal = {
|
||||||
|
"dock" = "left";
|
||||||
|
"env" = {
|
||||||
|
# "EDITOR": "zeditor --wait"
|
||||||
|
"EDITOR" = "vim";
|
||||||
|
};
|
||||||
|
"font_size" = 12;
|
||||||
|
"font_family" = "Noto Sans Mono";
|
||||||
|
"line_height" = "standard";
|
||||||
|
};
|
||||||
|
buffer_font_family = "JetBrains Mono";
|
||||||
|
|
||||||
|
# "diagnostics_max_severity": "off",
|
||||||
|
|
||||||
|
"experimental.theme_overrides" = {
|
||||||
|
"syntax" = {
|
||||||
|
"comment.doc" = {
|
||||||
|
"color" = "#77B767";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,94 +0,0 @@
|
||||||
{ pkgs, inputs, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
(inputs.self + /modules/users.nix)
|
|
||||||
];
|
|
||||||
users.groups.media = { };
|
|
||||||
|
|
||||||
custom.users = {
|
|
||||||
vivian = {
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKME+A5zu36tMIsY+PBoboizgAzt6xReUNrKRBkxvl3i vivian@null"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC8llUcEBHsLqotFZc++LNP2fjItuuzeUsu5ObXecYNj vivian@eevee"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICBhJAp7NWlHgwDYd2z6VNROy5RkeZHRINFLsFvwT4b3 vivian@bastion"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMMbdjysLnmwJD5Fs/SjBPstdIQNUxy8zFHP0GlhHMJB vivian@bastion"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIfooZjMWXvXZu1ReOEACDZ0TMb2WJRBSOLlWE8y6fUh vivian@aoife"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBMTCUjDbDjAiEKbKmLPavuYM0wJIBdjgytLsg1uWuGc vivian@nord"
|
|
||||||
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIM3TqXaApX2JZsgfZd7PKVFMecDgqTHKibpSzgdXNpYAAAAABHNzaDo= solov2-le"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
jana = {
|
|
||||||
shell = pkgs.fish;
|
|
||||||
keys = [
|
|
||||||
# ori (lenovo laptop/desktop)
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIET69oniNUA2nJV5+GxQ6XuK+vQbO8Uhtgrp1TrmiXVi jana@ori"
|
|
||||||
|
|
||||||
# bastion (arch server)
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHJT6QJcxhUKjvHBv3Bd1rugyfAFUpxIe9cu1Frw3ylL jana@bastion"
|
|
||||||
|
|
||||||
# fili (server)
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC0pmCsQeMMJ0r3o/XN7Zw8YFa9OEqrL3ikoGTK0OUY6 jana@fili"
|
|
||||||
|
|
||||||
# kili (tudelft laptop)
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOAXOTU6E06zjK/zkzlSPhTG35PoNRYgTCStEPUYyjeE jana@kili"
|
|
||||||
|
|
||||||
# nori hp tudelft laptop
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOSCuEu1kFg8mAgpOuYZ/IH2Ur7LQP7sQrDjcPmerkSx jana@nori"
|
|
||||||
|
|
||||||
# oneplus 5 phone
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBTqoHEVYxD+mwmZhPj+1+i1P0XmgTxXgSnPdPwFT1vr u0_a484@localhost"
|
|
||||||
|
|
||||||
# git deploy key
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICgadaDrViJp0Z6fbLBAo9grkmCeNQliIPXe12l3X3i/ jana@deploy"
|
|
||||||
];
|
|
||||||
# Make me admin
|
|
||||||
groups = [
|
|
||||||
"systemd-journal"
|
|
||||||
"wheel"
|
|
||||||
"networkmanager"
|
|
||||||
"libvirtd"
|
|
||||||
"dialout"
|
|
||||||
];
|
|
||||||
|
|
||||||
on = {
|
|
||||||
pc = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
apply-home-configs = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
laura = {
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
|
|
||||||
keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBIlFUUXbwOkhNUjoA6zueTdRuaylgpgFqSe/xWGK9zb laura@zmeura"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBVkk9/80askWhInQk03JMntF6SThAYkFZNm+lIGt4E7 laura@mura"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
wffl = {
|
|
||||||
keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbYifrfevSlcZvKSCpJShXGX89dlLdD0wEl5L3CvX6e"
|
|
||||||
];
|
|
||||||
groups = [ "media" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
julia = {
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
keys = [
|
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfVoCjrBTOH746bJCKQwRgWzjFskNeLQKz73qmd4P3tmiJIFMAim7MiCwtQbxvIUOTZHbG7vRHZ5SwSH/d/wqmESmY1meRH/43uP4YlRRwUFkUHcwEJsVP9dDza0jYuBXVo04B/fuP93W2+aeBPKiSuWrnQ9s2LwRJ/0aqani8xpVn87EXp90aXjdF4iqu7tL4Nn1zUULYOdULrry0j6moUumUhmtkWb0PrTcxZr7BoDz8UH7Fu9G0uK8Xr5dAxs7RgTyFpUWg6h+AKQczMHLluwuRr2m12gWXKZIVO+Sw1PYYuU58Y7+E00KEM1Xy9SnuOW5ZgnxWBqydD+Gc2q67"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPCatP3klEjfQPSiJNUc3FRDdz927BG1IzektpouzOZR"
|
|
||||||
];
|
|
||||||
groups = [ "media" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
jonathan-brouwer = {
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFP6UDiX8vb4rHV+8Zwaozh8dnCAsPM+fe/4BEfC/xyV jonathantbrouwer@gmail.com"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
95
users/users.nix
Normal file
95
users/users.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
users.groups.media = { };
|
||||||
|
|
||||||
|
users.extraUsers.vivian = {
|
||||||
|
isNormalUser = true;
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKME+A5zu36tMIsY+PBoboizgAzt6xReUNrKRBkxvl3i vivian@null"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC8llUcEBHsLqotFZc++LNP2fjItuuzeUsu5ObXecYNj vivian@eevee"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICBhJAp7NWlHgwDYd2z6VNROy5RkeZHRINFLsFvwT4b3 vivian@bastion"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMMbdjysLnmwJD5Fs/SjBPstdIQNUxy8zFHP0GlhHMJB vivian@bastion"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIfooZjMWXvXZu1ReOEACDZ0TMb2WJRBSOLlWE8y6fUh vivian@aoife"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBMTCUjDbDjAiEKbKmLPavuYM0wJIBdjgytLsg1uWuGc vivian@nord"
|
||||||
|
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIM3TqXaApX2JZsgfZd7PKVFMecDgqTHKibpSzgdXNpYAAAAABHNzaDo= solov2-le"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
users.extraUsers.jana = {
|
||||||
|
isNormalUser = true;
|
||||||
|
shell = pkgs.fish;
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
# ori (lenovo laptop/desktop)
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIET69oniNUA2nJV5+GxQ6XuK+vQbO8Uhtgrp1TrmiXVi jana@ori"
|
||||||
|
|
||||||
|
# bastion (arch server)
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHJT6QJcxhUKjvHBv3Bd1rugyfAFUpxIe9cu1Frw3ylL jana@bastion"
|
||||||
|
|
||||||
|
# fili (server)
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC0pmCsQeMMJ0r3o/XN7Zw8YFa9OEqrL3ikoGTK0OUY6 jana@fili"
|
||||||
|
|
||||||
|
# kili (tudelft laptop)
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOAXOTU6E06zjK/zkzlSPhTG35PoNRYgTCStEPUYyjeE jana@kili"
|
||||||
|
|
||||||
|
# nori hp tudelft laptop
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOSCuEu1kFg8mAgpOuYZ/IH2Ur7LQP7sQrDjcPmerkSx jana@nori"
|
||||||
|
|
||||||
|
# oneplus 5 phone
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBTqoHEVYxD+mwmZhPj+1+i1P0XmgTxXgSnPdPwFT1vr u0_a484@localhost"
|
||||||
|
|
||||||
|
# git deploy key
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICgadaDrViJp0Z6fbLBAo9grkmCeNQliIPXe12l3X3i/ jana@deploy"
|
||||||
|
];
|
||||||
|
# Make me admin
|
||||||
|
extraGroups = [
|
||||||
|
"systemd-journal"
|
||||||
|
"wheel"
|
||||||
|
"networkmanager"
|
||||||
|
"libvirtd"
|
||||||
|
"dialout"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
users.extraUsers.laura = {
|
||||||
|
isNormalUser = true;
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBIlFUUXbwOkhNUjoA6zueTdRuaylgpgFqSe/xWGK9zb laura@zmeura"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBVkk9/80askWhInQk03JMntF6SThAYkFZNm+lIGt4E7 laura@mura"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
users.extraUsers.wffl = {
|
||||||
|
isNormalUser = true;
|
||||||
|
shell = pkgs.fish;
|
||||||
|
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbYifrfevSlcZvKSCpJShXGX89dlLdD0wEl5L3CvX6e"
|
||||||
|
];
|
||||||
|
|
||||||
|
extraGroups = [ "media" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
users.extraUsers.julia = {
|
||||||
|
isNormalUser = true;
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfVoCjrBTOH746bJCKQwRgWzjFskNeLQKz73qmd4P3tmiJIFMAim7MiCwtQbxvIUOTZHbG7vRHZ5SwSH/d/wqmESmY1meRH/43uP4YlRRwUFkUHcwEJsVP9dDza0jYuBXVo04B/fuP93W2+aeBPKiSuWrnQ9s2LwRJ/0aqani8xpVn87EXp90aXjdF4iqu7tL4Nn1zUULYOdULrry0j6moUumUhmtkWb0PrTcxZr7BoDz8UH7Fu9G0uK8Xr5dAxs7RgTyFpUWg6h+AKQczMHLluwuRr2m12gWXKZIVO+Sw1PYYuU58Y7+E00KEM1Xy9SnuOW5ZgnxWBqydD+Gc2q67"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPCatP3klEjfQPSiJNUc3FRDdz927BG1IzektpouzOZR"
|
||||||
|
];
|
||||||
|
|
||||||
|
extraGroups = [ "media" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
users.extraUsers.jonathan-brouwer = {
|
||||||
|
isNormalUser = true;
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFP6UDiX8vb4rHV+8Zwaozh8dnCAsPM+fe/4BEfC/xyV jonathantbrouwer@gmail.com"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue