Compare commits

...

4 Commits

17 changed files with 290 additions and 170 deletions

136
flake.lock generated
View File

@@ -6,7 +6,8 @@
"devenv"
],
"flake-compat": [
"devenv"
"devenv",
"flake-compat"
],
"git-hooks": [
"devenv",
@@ -18,11 +19,11 @@
]
},
"locked": {
"lastModified": 1752264895,
"narHash": "sha256-1zBPE/PNAkPNUsOWFET4J0cjlvziH8DOekesDmjND+w=",
"lastModified": 1760971495,
"narHash": "sha256-IwnNtbNVrlZIHh7h4Wz6VP0Furxg9Hh0ycighvL5cZc=",
"owner": "cachix",
"repo": "cachix",
"rev": "47053aef762f452e816e44eb9a23fbc3827b241a",
"rev": "c5bfd933d1033672f51a863c47303fc0e093c2d2",
"type": "github"
},
"original": {
@@ -32,6 +33,27 @@
"type": "github"
}
},
"claude-desktop": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1761825061,
"narHash": "sha256-AeRQZKr8+1XQer+WmbwtQaQBy05UDgeNNE7YZjNLuS0=",
"owner": "k3d3",
"repo": "claude-desktop-linux-flake",
"rev": "791cd93cfe216ad06ab740f0fdc142119b1d6ec2",
"type": "github"
},
"original": {
"owner": "k3d3",
"repo": "claude-desktop-linux-flake",
"type": "github"
}
},
"devenv": {
"inputs": {
"cachix": "cachix",
@@ -44,11 +66,11 @@
]
},
"locked": {
"lastModified": 1759437797,
"narHash": "sha256-+MwJvMExEcRpDIVKMwL1ZsSnC4AuhnooM7PNJh02S5I=",
"lastModified": 1761922975,
"narHash": "sha256-j4EB5ku/gDm7h7W7A+k70RYj5nUiW/l9wQtXMJUD2hg=",
"owner": "cachix",
"repo": "devenv",
"rev": "89ce1b7ac66ca381a335a60ad6acc723ef6f42f3",
"rev": "c9f0b47815a4895fadac87812de8a4de27e0ace1",
"type": "github"
},
"original": {
@@ -60,11 +82,11 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"lastModified": 1761588595,
"narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5",
"type": "github"
},
"original": {
@@ -81,11 +103,11 @@
]
},
"locked": {
"lastModified": 1756770412,
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"lastModified": 1760948891,
"narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "4524271976b625a4a605beefd893f270620fd751",
"rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04",
"type": "github"
},
"original": {
@@ -112,6 +134,24 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"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": [
@@ -125,11 +165,11 @@
]
},
"locked": {
"lastModified": 1758108966,
"narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=",
"lastModified": 1760663237,
"narHash": "sha256-BflA6U4AM1bzuRMR8QqzPXqh8sWVCNDzOdsxXEguJIc=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b",
"rev": "ca5b894d3e3e151ffc1db040b6ce4dcc75d31c37",
"type": "github"
},
"original": {
@@ -167,11 +207,11 @@
]
},
"locked": {
"lastModified": 1759337100,
"narHash": "sha256-CcT3QvZ74NGfM+lSOILcCEeU+SnqXRvl1XCRHenZ0Us=",
"lastModified": 1761878381,
"narHash": "sha256-lCRaipHgszaFZ1Cs8fdGJguVycCisBAf2HEFgip5+xU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "004753ae6b04c4b18aa07192c1106800aaacf6c3",
"rev": "4ac96eb21c101a3e5b77ba105febc5641a8959aa",
"type": "github"
},
"original": {
@@ -206,16 +246,16 @@
]
},
"locked": {
"lastModified": 1758763079,
"narHash": "sha256-Bx1A+lShhOWwMuy3uDzZQvYiBKBFcKwy6G6NEohhv6A=",
"lastModified": 1761648602,
"narHash": "sha256-H97KSB/luq/aGobKRuHahOvT1r7C03BgB6D5HBZsbN8=",
"owner": "cachix",
"repo": "nix",
"rev": "6f0140527c2b0346df4afad7497baa08decb929f",
"rev": "3e5644da6830ef65f0a2f7ec22830c46285bfff6",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "devenv-2.30.5",
"ref": "devenv-2.30.6",
"repo": "nix",
"type": "github"
}
@@ -227,11 +267,11 @@
]
},
"locked": {
"lastModified": 1759032422,
"narHash": "sha256-WZf+FhebP2/1pK2np5xj/NuDjD6fXK2BHnq/tPUN18o=",
"lastModified": 1761451000,
"narHash": "sha256-qBJL6xEIjqYq9zOcG2vf2nPTeVBppNJzvO0LuQWMwMo=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "ec7a78cb0e098832d8acac091a4df393259c4839",
"rev": "ed6b293161b378a7368cda38659eb8d3d9a0dac4",
"type": "github"
},
"original": {
@@ -242,11 +282,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1759381078,
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
"lastModified": 1761907660,
"narHash": "sha256-kJ8lIZsiPOmbkJypG+B5sReDXSD1KGu2VEPNqhRa/ew=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
"rev": "2fb006b87f04c4d3bdf08cfdbc7fab9c13d94a15",
"type": "github"
},
"original": {
@@ -258,7 +298,7 @@
},
"pumo-system-info": {
"inputs": {
"flake-utils": "flake-utils",
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
],
@@ -285,11 +325,11 @@
]
},
"locked": {
"lastModified": 1759303785,
"narHash": "sha256-EUXrK7pUIzOQWR1dquZh26A6W8lsY2oiHEEZzQnsarM=",
"lastModified": 1761897390,
"narHash": "sha256-er4gYrIoThYLjlsOMTysoRfn67d1Gci+ZpqDrtQxrA0=",
"ref": "refs/heads/master",
"rev": "9662234759eb57f2a1057f2a1c667da1bf128c1c",
"revCount": 686,
"rev": "fc704e6b5d445899a1565955268c91942a4f263f",
"revCount": 700,
"type": "git",
"url": "https://git.outfoxxed.me/quickshell/quickshell"
},
@@ -300,6 +340,7 @@
},
"root": {
"inputs": {
"claude-desktop": "claude-desktop",
"devenv": "devenv",
"home-manager": "home-manager",
"nix-index-database": "nix-index-database",
@@ -338,11 +379,11 @@
]
},
"locked": {
"lastModified": 1759188042,
"narHash": "sha256-f9QC2KKiNReZDG2yyKAtDZh0rSK2Xp1wkPzKbHeQVRU=",
"lastModified": 1760998189,
"narHash": "sha256-ee2e1/AeGL5X8oy/HXsZQvZnae6XfEVdstGopKucYLY=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "9fcfabe085281dd793589bdc770a2e577a3caa5d",
"rev": "5a7d18b5c55642df5c432aadb757140edfeb70b3",
"type": "github"
},
"original": {
@@ -366,6 +407,21 @@
"type": "github"
}
},
"systems_2": {
"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": [
@@ -373,11 +429,11 @@
]
},
"locked": {
"lastModified": 1759205174,
"narHash": "sha256-LMfGQsy3OibEqr3WtLCOqUVdOy5/6DJKWHV8h+1Vapk=",
"lastModified": 1761883599,
"narHash": "sha256-ntnfAAqSuXI/+uqXAWUjbY5arB7sRK9cpgFbHbCZgK8=",
"owner": "youwen5",
"repo": "zen-browser-flake",
"rev": "afd770119e0f9fbb085665738f3fa4c28ff42f78",
"rev": "5355c0dc6857a2aa34b126fb4a93a454ed702f52",
"type": "github"
},
"original": {

View File

@@ -34,6 +34,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
claude-desktop = {
url = "github:k3d3/claude-desktop-linux-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
zen-browser = {
url = "github:youwen5/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
@@ -83,7 +88,9 @@
];
};
homeConfigurations = {
homeConfigurations = let
extraSpecialArgs = {inherit inputs outputs system;};
in {
"phundrak@alys" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
@@ -96,9 +103,10 @@
};
"phundrak@marpa" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
# extraSpecialArgs = {
# inherit inputs outputs;
# };
inherit extraSpecialArgs;
modules = [
./users/phundrak/host/marpa.nix
inputs.sops-nix.homeManagerModules.sops
@@ -126,7 +134,9 @@
};
};
nixosConfigurations = {
nixosConfigurations = let
specialArgs = {inherit inputs outputs;};
in {
alys = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
@@ -142,7 +152,7 @@
];
};
marpa = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
inherit specialArgs;
modules = [
./hosts/marpa/configuration.nix
inputs.sops-nix.nixosModules.sops

View File

@@ -7,11 +7,25 @@
with lib; let
cfg = config.mySystem.dev.qemu;
in {
options.mySystem.dev.qemu.enable = mkEnableOption "Enable QEMU";
options.mySystem.dev.qemu = {
enable = mkEnableOption "Enable QEMU";
users = mkOption {
type = types.listOf types.str;
default = ["phundrak"];
example = ["user1" "user2"];
};
};
config = mkIf cfg.enable {
programs.virt-manager.enable = true;
users.groups.libvirtd.members = cfg.users;
virtualisation = {
libvirtd.enable = true;
spiceUSBRedirection.enable = true;
};
environment.systemPackages = with pkgs; [
qemu
virt-manager
quickemu
swtpm
];
systemd.tmpfiles.rules = ["L+ /var/lib/qemu/firmware - - - - ${pkgs.qemu}/share/qemu/firmware"];
boot.binfmt.emulatedSystems = ["aarch64-linux"];

View File

@@ -9,26 +9,26 @@ in {
options.mySystem.services.calibre = {
enable = mkEnableOption "Enable Calibre Web";
user = mkOption {
type = types.string;
type = types.str;
default = "phundrak";
};
group = mkOption {
type = types.string;
type = types.str;
default = "users";
};
dataDir = mkOption {
type = types.string;
type = types.str;
example = "/tank/calibre/conf";
default = "/tank/calibre/conf";
};
library = mkOption {
type = types.string;
type = types.str;
example = "/tank/calibre/library";
default = "/tank/calibre/library";
};
};
config.services.calibre-web = mkIf cfg.enable {
inherit (cfg) enable user group dataDir;
inherit (cfg) enable user dataDir group;
options = {
calibreLibrary = cfg.library;
enableBookConversion = true;

View File

@@ -9,16 +9,16 @@ in {
options.mySystem.services.jellyfin = {
enable = mkEnableOption "Enable Jellyfin";
dataDir = mkOption {
type = types.string;
type = types.str;
default = "/tank/jellyfin/data";
example = "/tank/jellyfin/data";
};
user = mkOption {
type = types.string;
type = types.str;
default = "phundrak";
};
group = mkOption {
type = types.string;
type = types.str;
default = "users";
};
};

View File

@@ -9,17 +9,17 @@ in {
options.mySystem.services.plex = {
enable = mkEnableOption "Enable Plex";
group = mkOption {
type = types.string;
type = types.str;
default = "users";
example = "users";
description = "Group under which Plex runs";
};
dataDir = mkOption {
type = types.string;
type = types.str;
example = "/tank/plex-config";
};
user = mkOption {
type = types.string;
type = types.str;
default = "phundrak";
};
};

View File

@@ -19,7 +19,6 @@ in {
extraPackages = mkIf cfg.extras (with pkgs.bat-extras; [
batman
batpipe
batgrep
]);
};
}

View File

@@ -0,0 +1,18 @@
{
config,
lib,
inputs,
system,
...
}:
with lib; let
cfg = config.home.dev.ai.claude;
in {
options.home.dev.ai.claude.enable = mkEnableOption "Enables Claude-related packages";
config = mkIf cfg.enable {
home.packages = [inputs.claude-desktop.packages.${system}.claude-desktop-with-fhs];
programs.claude-code = {
inherit (cfg) enable;
};
};
}

View File

@@ -0,0 +1,19 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.home.dev.ai;
in {
imports = [
./ollama.nix
./claude.nix
];
options.home.dev.ai.enable = mkEnableOption "Enables AI features";
config.home.dev.ai = mkIf cfg.enable {
ollama.enable = mkDefault cfg.enable;
claude.enable = mkDefault cfg.enable;
};
}

View File

@@ -4,20 +4,21 @@
...
}:
with lib; let
cfg = config.home.dev.ollama;
cfg = config.home.dev.ai.ollama;
in {
options.home.dev.ollama = {
options.home.dev.ai.ollama = {
enable = mkEnableOption "Enables Ollama";
gpu = mkOption {
type = types.nullOr types.enum ["none" "amd" "nvidia"];
example = "amd";
default = "none";
type = types.nullOr (types.enum [false "rocm" "cuda"]);
example = "rocm";
default = null;
description = "Which type of GPU should be used for hardware acceleration";
};
};
config.services.ollama = mkIf cfg.enable {
inherit (cfg) enable;
acceleration = cfg.gpu;
environmentVariables = {
OLLAMA_CONTEXT_LENGTH = "8192";
};

View File

@@ -7,8 +7,8 @@ with lib; let
cfg = config.home.dev;
in {
imports = [
./ai
./editors
./ollama.nix
./vcs
];

View File

@@ -5,7 +5,7 @@
...
}:
with lib; let
emacsDefaultPackage = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages (
emacsDefaultPackage = with pkgs; ((emacsPackagesFor emacs).emacsWithPackages (
epkgs: [
epkgs.mu4e
epkgs.pdf-tools

View File

@@ -90,9 +90,47 @@ in {
else cfg.sendmail.user;
in {
enable = true;
userEmail = cfg.email;
userName = cfg.name;
extraConfig = {
ignores = [
".env"
".direnv/"
"*~"
"\#*\#"
"*.elc"
"auto-save-list"
".\#*"
"*_flymake.*"
"/auto/"
".projectile"
".dir-locals.el"
"# Org mode files"
".org-id-locations"
"*_archive"
"*.out"
"*.o"
"*.so"
"# Archives"
"*.7zz"
"*.dmg"
"*.gz"
"*.iso"
"*.jar"
"*.rar"
"*.tar"
"*.zip"
"*.log"
"*.sqlite"
"dist/"
];
settings = {
user = {
inherit (cfg) name email;
};
color.ui = "auto";
column.ui = "auto";
tag.sort = "version:refname";
@@ -180,99 +218,62 @@ in {
insteadOf = "labs:";
};
};
};
ignores = [
".env"
".direnv/"
"*~"
"\#*\#"
"*.elc"
"auto-save-list"
".\#*"
"*_flymake.*"
"/auto/"
".projectile"
".dir-locals.el"
"# Org mode files"
".org-id-locations"
"*_archive"
"*.out"
"*.o"
"*.so"
"# Archives"
"*.7zz"
"*.dmg"
"*.gz"
"*.iso"
"*.jar"
"*.rar"
"*.tar"
"*.zip"
"*.log"
"*.sqlite"
"dist/"
];
aliases = {
a = "add --all";
aca = "!git add --all && git commit --amend";
acan = "!git add --all && git commit --amend --no-edit";
ap = "add --patch";
b = "branch";
bd = "branch -d";
bdd = "branch -D";
c = "commit -S";
ca = "commit -Sa";
can = "commit -Sa --no-edit";
cm = "commit -Sm";
cam = "commit -Sam";
co = "checkout";
cob = "checkout -b";
cod = "checkout develop";
cl = "clone";
cl1 = "clone --depth 1";
f = "fetch";
fp = "fetch --prune";
ps = "push";
psf = "push --force-with-lease";
pso = "push origin";
psfo = "push --force-with-lease origin";
pushall = "!git remote \vert{} xargs -L1 git push";
psl = "!git remote \vert{} xargs -L1 git push";
pullall = "!git remote \vert{} xargs -L1 git pull";
pll = "!git remote \vert{} xargs -L1 git pull";
pl = "pull";
pb = "pull --rebase";
r = "rebase";
ra = "rebase --abort";
rc = "rebase --continue";
rd = "rebase develop";
ri = "rebase -i";
rmf = "rm -f";
rmd = "rm -r";
rmdf = "rm -rf";
sm = "submodule";
sms = "submodule status";
sma = "submodule add";
smu = "submodule update";
smui = "submodule update --init";
smuir = "submodule update --init --recursive";
st = "stash";
stc = "stash clear";
stp = "stash pop";
stw = "stash show";
u = "reset --";
d = "diff -w";
l = "log --all --oneline --graph --decorate --pretty=format':%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'";
s = "status";
staged = "diff --cached";
upstream = "!git push -u origin HEAD";
unstage = "reset --";
alias = {
a = "add --all";
aca = "!git add --all && git commit --amend";
acan = "!git add --all && git commit --amend --no-edit";
ap = "add --patch";
b = "branch";
bd = "branch -d";
bdd = "branch -D";
c = "commit -S";
ca = "commit -Sa";
can = "commit -Sa --no-edit";
cm = "commit -Sm";
cam = "commit -Sam";
co = "checkout";
cob = "checkout -b";
cod = "checkout develop";
cl = "clone";
cl1 = "clone --depth 1";
f = "fetch";
fp = "fetch --prune";
ps = "push";
psf = "push --force-with-lease";
pso = "push origin";
psfo = "push --force-with-lease origin";
pushall = "!git remote \vert{} xargs -L1 git push";
psl = "!git remote \vert{} xargs -L1 git push";
pullall = "!git remote \vert{} xargs -L1 git pull";
pll = "!git remote \vert{} xargs -L1 git pull";
pl = "pull";
pb = "pull --rebase";
r = "rebase";
ra = "rebase --abort";
rc = "rebase --continue";
rd = "rebase develop";
ri = "rebase -i";
rmf = "rm -f";
rmd = "rm -r";
rmdf = "rm -rf";
sm = "submodule";
sms = "submodule status";
sma = "submodule add";
smu = "submodule update";
smui = "submodule update --init";
smuir = "submodule update --init --recursive";
st = "stash";
stc = "stash clear";
stp = "stash pop";
stw = "stash show";
u = "reset --";
d = "diff -w";
l = "log --all --oneline --graph --decorate --pretty=format':%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'";
s = "status";
staged = "diff --cached";
upstream = "!git push -u origin HEAD";
unstage = "reset --";
};
};
};
};

View File

@@ -17,6 +17,7 @@ in {
config = {
programs.ssh = mkIf cfg.enable {
enable = true;
enableDefaultConfig = false;
includes = lists.optional (cfg.hosts != null) cfg.hosts;
};
};

View File

@@ -11,7 +11,7 @@
];
config = let
emacsPkg = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages (
emacsPkg = with pkgs; ((emacsPackagesFor emacs).emacsWithPackages (
epkgs: [
epkgs.mu4e
epkgs.pdf-tools
@@ -37,10 +37,7 @@
};
desktop.waybar.style = ./config/waybar/style.css;
dev.ollama = {
enable = true;
gpu = "amd";
};
dev.ai.claude.enable = true;
fullDesktop = true;
shell.fish.enable = true;
};

View File

@@ -2,6 +2,10 @@
imports = [../home.nix];
home = {
cli.nh.flake = "${config.home.homeDirectory}/.dotfiles";
dev.ai.ollama = {
enable = true;
gpu = "rocm";
};
desktop.hyprland.host = "marpa";
phundrak.sshKey = {
content = builtins.readFile ../../../keys/id_marpa.pub;

View File

@@ -36,11 +36,11 @@ with lib; {
signal-desktop-bin
# Misc
bitwarden
bitwarden-desktop
gplates
libnotify
nextcloud-client
onlyoffice-bin
onlyoffice-desktopeditors
scrcpy
syncthing
watchmate