Merge branch 'master' of git.bitlab21.com:sam/nixos

This commit is contained in:
Sam 2025-01-17 20:04:28 +00:00
commit efd30e3968
7 changed files with 51 additions and 16 deletions

View File

@ -632,11 +632,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1737077867, "lastModified": 1737097711,
"narHash": "sha256-+VpCgelbCgJvxos+4sAVaKfwYRKrkflsWcYVOhG0mXg=", "narHash": "sha256-Zql7TDxEMAOASLSu0wBlfM5SIY+4Pz2R/k17O/asCYc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "0ab8bdef1a34b67d2ecc8f86763cbb3cb5297699", "rev": "3cbc78cfa611511c04f47c4932509f9dbdf4381a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -698,11 +698,11 @@
"treefmt-nix": "treefmt-nix_3" "treefmt-nix": "treefmt-nix_3"
}, },
"locked": { "locked": {
"lastModified": 1737094363, "lastModified": 1737107600,
"narHash": "sha256-RQvEM5nMQ7UUuatWk9ytnYv5DyKZhocfdGzHYuDk3B8=", "narHash": "sha256-pBF7pAmSRlmmObXbS71v0YM5sEC4/4HvesFV3oz2xQU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "af9410660d59f7ef2d1c5d375e62ecfd739ae737", "rev": "b65350213a768bdf4d2da001537a6635edcd562a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -783,11 +783,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1736808430, "lastModified": 1737107480,
"narHash": "sha256-wlgdf/n7bJMLBheqt1jmPoxJFrUP6FByKQFXuM9YvIk=", "narHash": "sha256-GXUE9+FgxoZU8v0p6ilBJ8NH7k8nKmZjp/7dmMrCv3o=",
"owner": "mic92", "owner": "mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "553c7cb22fed19fd60eb310423fdc93045c51ba8", "rev": "4c4fb93f18b9072c6fa1986221f9a3d7bf1fe4b6",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -1,5 +1,5 @@
{ {
description = "Nix Config"; description = "Nixos Config";
inputs = { inputs = {
# Nixpkgs # Nixpkgs

View File

@ -23,6 +23,7 @@ in {
./todo-comments.nix ./todo-comments.nix
./oil.nix ./oil.nix
./comment.nix ./comment.nix
./git-workree.nix
]; ];
programs.nixvim.plugins.web-devicons.enable = true; programs.nixvim.plugins.web-devicons.enable = true;

View File

@ -0,0 +1,26 @@
{
programs.nixvim.keymaps = [
# Switching worktrees
{
mode = ["n"];
key = "<leader>fws";
action = "<cmd>lua require('telescope').extensions.git_worktree.git_worktrees()<CR>";
options = {noremap = true;};
}
{
mode = ["n"];
key = "<leader>fwc";
action = "<cmd>lua require('telescope').extensions.git_worktree.create_git_worktree()<CR>";
options = {noremap = true;};
}
];
programs.nixvim.plugins.git-worktree = {
enable = true;
enableTelescope = true;
autopush = true;
changeDirectoryCommand = "cd";
clearJumpsOnChange = true;
updateOnChange = true;
updateOnChangeCommand = "e .";
};
}

View File

@ -46,5 +46,12 @@
action = "<cmd>Telescope oldfiles<CR>"; action = "<cmd>Telescope oldfiles<CR>";
options = {noremap = true;}; options = {noremap = true;};
} }
{
# show recently opened files
mode = ["n"];
key = "<Leader>fk";
action = "<cmd>Telescope keymaps<CR>";
options = {noremap = true;};
}
]; ];
} }

View File

@ -1,8 +1,7 @@
{ {config, ...}: {
sops.secrets = { sops.secrets = {
"software/photoprism" = { "software/photoprism" = {
path = "/run/secrets/photoprism/config.yaml"; path = "/etc/photoprism/options.yml";
mode = "0600";
}; };
}; };
virtualisation.arion = { virtualisation.arion = {
@ -11,7 +10,7 @@
settings = { settings = {
services.photoprism.service = { services.photoprism.service = {
ports = [ ports = [
"8096:8096" "2342:2342"
]; ];
container_name = "photoprism"; container_name = "photoprism";
image = "photoprism/photoprism:latest"; image = "photoprism/photoprism:latest";
@ -21,10 +20,10 @@
"/media/photos/sam/originals:/photoprism/originals" "/media/photos/sam/originals:/photoprism/originals"
"/media/photos/sam/imports:/photoprism/import" "/media/photos/sam/imports:/photoprism/import"
"/srv/docker/photoprism/storage:/photoprism/storage" "/srv/docker/photoprism/storage:/photoprism/storage"
"/run/secrets/photoprism/config.yaml:/etc/photoprism/config.yaml" "${config.sops.secrets."software/photoprism".path}:/etc/photoprism/options.yml"
]; ];
environment = { environment = {
PHOTOPRISM_CONFIG_PATH = "/etc/photoprism/config.yaml"; PHOTOPRISM_CONFIG_PATH = "/etc/photoprism";
PHOTOPRISM_INIT = "intel"; PHOTOPRISM_INIT = "intel";
PHOTOPRISM_ORIGINALS_LIMIT = 5000; PHOTOPRISM_ORIGINALS_LIMIT = 5000;
PHOTOPRISM_HTTP_COMPRESSION = "gzip"; PHOTOPRISM_HTTP_COMPRESSION = "gzip";

View File

@ -3,6 +3,7 @@
config, config,
lib, lib,
configVars, configVars,
outputs,
... ...
}: let }: let
# Disko setup # Disko setup
@ -46,6 +47,7 @@ in {
../common/optional/nfs-mounts/media.nix ../common/optional/nfs-mounts/media.nix
../common/optional/gaming.nix ../common/optional/gaming.nix
../common/optional/printing.nix ../common/optional/printing.nix
outputs.nixosModules.nixosAutoUpgrade
]; ];
boot = { boot = {