Compare commits

...

8 Commits

13 changed files with 153 additions and 30 deletions

View File

@ -71,4 +71,4 @@ This will set up an environment with:
## Contributing
Feel free to fork this repository and make your own changes. If you have any improvements or suggestions, please open an issue or submit a pull request.
Feel free to fork this repository and make your own changes. If you have any improvements or suggestions, please open an issue or submit a pull request.

69
flake.lock generated
View File

@ -88,6 +88,24 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": [
@ -290,17 +308,18 @@
},
"pumo-system-info": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1748127405,
"narHash": "sha256-5Xh7VXmjeK5m8Dxt2bti8A2HdkpmPftHc2+WXH3tQH8=",
"lastModified": 1748984111,
"narHash": "sha256-SP1/+cCHnPg0UqylHCzeKNx61wGapLrYRn5UKiiDicc=",
"ref": "refs/heads/develop",
"rev": "06fa652f9626590a9727f3ec8b48330ad3fcb78f",
"revCount": 6,
"rev": "f9fe233b6cb669a718a0ddb529793159d39ba32e",
"revCount": 9,
"type": "git",
"url": "https://labs.phundrak.com/phundrak/pumo-system-info"
},
@ -309,6 +328,26 @@
"url": "https://labs.phundrak.com/phundrak/pumo-system-info"
}
},
"quickshell": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1749772873,
"narHash": "sha256-ZsFQIs3ZpUud1QmR1TyhAW0LGbjHzCkA79YCLBbJ12A=",
"ref": "refs/heads/master",
"rev": "517143adf97fb0df7e9a7584061deecdffb19faf",
"revCount": 576,
"type": "git",
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
},
"original": {
"type": "git",
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
}
},
"root": {
"inputs": {
"devenv": "devenv",
@ -316,6 +355,7 @@
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs_4",
"pumo-system-info": "pumo-system-info",
"quickshell": "quickshell",
"sops-nix": "sops-nix",
"zen-browser": "zen-browser"
}
@ -328,11 +368,11 @@
]
},
"locked": {
"lastModified": 1748054080,
"narHash": "sha256-rwFiLLNCwkj9bqePtH1sMqzs1xmohE0Ojq249piMzF4=",
"lastModified": 1748918260,
"narHash": "sha256-KhXNXQ5IDLvwwYfJ0pXDjwIuisZ2qM6F7fcXjIGZy/4=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "2221d8d53c128beb69346fa3ab36da3f19bb1691",
"rev": "c9736155bc1eb7c7cf3a925920850e61c07ab22a",
"type": "github"
},
"original": {
@ -361,6 +401,21 @@
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"nixpkgs": [

View File

@ -20,6 +20,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
quickshell = {
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";

View File

@ -14,6 +14,7 @@
../../modules/ssh.nix
../../modules/endlessh.nix
../../programs/nano.nix
./services
];
system = {

View File

@ -0,0 +1,3 @@
{
imports = [./nextcloud-cron.nix];
}

View File

@ -0,0 +1,33 @@
{pkgs, ...}: {
systemd = {
timers."nextcloud-cron" = {
wantedBy = ["timers.target"];
timerConfig = {
OnBootSec = "20m";
OnUnitActiveSec = "20m";
Unit = "nextcloud-cron.service";
};
};
services."nextcloud-cron" = {
script = ''
CONTAINER_NAME="nextcloud-nextcloud-1"
is_container_running() {
${pkgs.docker}/bin/docker inspect -f '{{.State.Running}}' "$CONTAINER_NAME" 2>/dev/null | grep -q "true"
}
while ! is_container_running; do
echo "Waiting for $CONTAINER_NAME to start..."
sleep 10
done
echo "$CONTAINER_NAME is running. Executing CRON job..."
${pkgs.docker}/bin/docker exec -u www-data -it nextcloud-nextcloud-1 php /var/www/html/cron.php
'';
serviceConfig = {
Type = "oneshot";
User = "root";
};
};
};
}

View File

@ -50,7 +50,7 @@ in {
input = {
kb_layout = "fr";
kb_variant = "bepo_afnor";
kb_options = "caps:ctrl_modifier";
# kb_options = "caps:ctrl_modifier";
numlock_by_default = true;
follow_mouse = 1;
touchpad.natural_scroll = false;
@ -77,21 +77,11 @@ in {
new_status = "inherit";
};
workspace = [
"2, layoutopt:orientation:bottom"
"4, layoutopt:orientation:bottom"
"1, layoutopt:orientation:bottom"
];
decoration = {
rounding = 5;
# blur = {
# enable = true;
# size = 9;
# passes = 1;
# };
# shadow = {
# enable = true;
# color = "rgba(2e3440aa)";
# range = 4;
# render_power = 3;
# };
};
animations = {
enabled = true;

25
users/modules/ollama.nix Normal file
View File

@ -0,0 +1,25 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.modules.ollama;
in {
options.modules.ollama = {
enable = mkEnableOption "Enables Ollama";
gpu = mkOption {
type = types.nullOr types.enum ["none" "amd" "nvidia"];
example = "amd";
default = "none";
description = "Which type of GPU should be used for hardware acceleration";
};
};
config.services.ollama = mkIf cfg.enable {
inherit (cfg) enable;
environmentVariables = {
OLLAMA_CONTEXT_LENGTH = "8192";
};
};
}

View File

@ -12,6 +12,7 @@ in {
options.modules.vcs = {
git = {
enable = mkEnableOption "enables git";
cliff = mkEnableOption "enables git-cliff support";
sendmail = {
enable = mkOption {
type = types.bool;
@ -94,7 +95,7 @@ in {
'');
modules = {
git = mkIf cfg.git.enable {
inherit (cfg.git) enable sendmail browser completeConfig emacs mergeTool;
inherit (cfg.git) enable cliff sendmail browser completeConfig emacs mergeTool;
inherit (cfg) email name editor;
publicKeyFile = cfg.publicKey.file;
};

View File

@ -17,6 +17,7 @@ in {
type = types.str;
default = "Lucien Cartier-Tilet";
};
cliff = mkEnableOption "enables git-cliff support";
sendmail = {
enable = mkOption {
type = types.bool;
@ -77,6 +78,7 @@ in {
};
config = lib.mkIf cfg.enable {
programs.git-cliff.enable = cfg.cliff;
programs.git = let
smtpEmail =
if (cfg.sendmail.user == null)

View File

@ -83,7 +83,7 @@ in {
};
"group/audio" = {
modules = ["mpris" "pulseaudio" "pulseaudio/slider"];
modules = ["pulseaudio" "pulseaudio/slider" "mpris"];
orientation = "inherit";
drawer.transition-duration = 300;
};

View File

@ -9,16 +9,17 @@
./packages.nix
./email.nix
../modules/emacs.nix
../modules/emoji.nix
../modules/hyprland.nix
../modules/kdeconnect.nix
../modules/kitty.nix
../modules/hyprland.nix
../modules/mbsync.nix
../modules/mpd.nix
../modules/mpv.nix
../modules/ollama.nix
../modules/qt.nix
../modules/wofi.nix
../modules/yt-dlp.nix
../modules/emoji.nix
../modules/qt.nix
];
config = let
@ -55,6 +56,7 @@
bat.extras = true;
packages.emacsPackage = emacsPkg;
mopidy.enable = true;
ollama.enable = true;
emacs = {
enable = true;
@ -69,7 +71,7 @@
swaync = true;
waybar = {
enable = true;
battery = false;
battery = true;
style = ./config/waybar/style.css;
};
};
@ -87,6 +89,7 @@
integration = true;
pkg = emacsPkg;
};
cliff = true;
sendmail = {
enable = true;
passwordFile = config.sops.secrets.emailPassword.path;

View File

@ -21,8 +21,13 @@ in {
[
flatpak
# LSP server for Nix
nil
# LSP servers
bash-language-server
docker-language-server
kdePackages.qtdeclarative # For QML LSP
nil # Nix
python3 # for Emacs and LSP
yaml-language-server # Yaml (Docker, GitHub Actions, ...)
# Terminal stuff
duf
@ -63,6 +68,7 @@ in {
watchmate
inputs.zen-browser.packages.${system}.default
inputs.pumo-system-info.packages.${system}.default
inputs.quickshell.packages.${system}.default
# Games
atlauncher
@ -93,7 +99,6 @@ in {
grype # Vulnerability scanner for container images and filesystems
podman-desktop
podman-compose
python3 # for Emacs and LSP
tectonic # better LaTeX engine
virt-manager
zeal