Retrying
This commit is contained in:
+310
-322
File diff suppressed because it is too large
Load Diff
+1
-13
@@ -896,31 +896,25 @@ This section describes a way of installing packages, either through nixpkgs orr
|
|||||||
** install_packages.nix
|
** install_packages.nix
|
||||||
#+begin_src nix :tangle configuration/apps/install_packages.nix :noweb tangle :mkdirp yes
|
#+begin_src nix :tangle configuration/apps/install_packages.nix :noweb tangle :mkdirp yes
|
||||||
{ config, lib, pkgs, flakeRoot, inputs, ... }:
|
{ config, lib, pkgs, flakeRoot, inputs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
packagesConfPath = flakeRoot + "/assets/conf/apps/packages.conf";
|
packagesConfPath = flakeRoot + "/assets/conf/apps/packages.conf";
|
||||||
raw = builtins.readFile packagesConfPath;
|
raw = builtins.readFile packagesConfPath;
|
||||||
|
|
||||||
# IMPORTANT: explicit "\n" so we never accidentally split into characters
|
# IMPORTANT: explicit "\n" so we never accidentally split into characters
|
||||||
rawLines = lib.splitString "\n" raw;
|
rawLines = lib.splitString "\n" raw;
|
||||||
|
|
||||||
# Guard: if we accidentally split into characters, rawLines length ~= stringLength raw
|
# Guard: if we accidentally split into characters, rawLines length ~= stringLength raw
|
||||||
_guard = assert !(
|
_guard = assert !(
|
||||||
builtins.stringLength raw > 1 &&
|
builtins.stringLength raw > 1 &&
|
||||||
builtins.length rawLines == builtins.stringLength raw
|
builtins.length rawLines == builtins.stringLength raw
|
||||||
); true;
|
); true;
|
||||||
|
|
||||||
cleanLine = l:
|
cleanLine = l:
|
||||||
let
|
let
|
||||||
noCR = lib.replaceStrings [ "\r" ] [ "" ] l;
|
noCR = lib.replaceStrings [ "\r" ] [ "" ] l;
|
||||||
noInlineComment = lib.head (lib.splitString "#" noCR);
|
noInlineComment = lib.head (lib.splitString "#" noCR);
|
||||||
in
|
in
|
||||||
lib.strings.trim noInlineComment;
|
lib.strings.trim noInlineComment;
|
||||||
|
|
||||||
entries =
|
entries =
|
||||||
builtins.filter (l: l != "")
|
builtins.filter (l: l != "")
|
||||||
(map cleanLine rawLines);
|
(map cleanLine rawLines);
|
||||||
|
|
||||||
resolvePkg = name:
|
resolvePkg = name:
|
||||||
let
|
let
|
||||||
parts = lib.splitString "." name;
|
parts = lib.splitString "." name;
|
||||||
@@ -929,19 +923,15 @@ let
|
|||||||
if found == null then
|
if found == null then
|
||||||
throw ''
|
throw ''
|
||||||
install_packages.nix: package not found in pkgs
|
install_packages.nix: package not found in pkgs
|
||||||
|
|
||||||
Token : ${builtins.toJSON name}
|
Token : ${builtins.toJSON name}
|
||||||
packages.conf : ${toString packagesConfPath}
|
packages.conf : ${toString packagesConfPath}
|
||||||
Hint : check the attribute name on search.nixos.org/packages
|
Hint : check the attribute name on search.nixos.org/packages
|
||||||
''
|
''
|
||||||
else
|
else
|
||||||
found;
|
found;
|
||||||
|
|
||||||
packages = builtins.seq _guard (map resolvePkg entries);
|
packages = builtins.seq _guard (map resolvePkg entries);
|
||||||
|
|
||||||
zenBrowser =
|
zenBrowser =
|
||||||
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
@@ -953,12 +943,10 @@ in
|
|||||||
** install_flatpaks.nix
|
** install_flatpaks.nix
|
||||||
#+begin_src nix :tangle configuration/apps/install_flatpaks.nix :noweb tangle :mkdirp yes
|
#+begin_src nix :tangle configuration/apps/install_flatpaks.nix :noweb tangle :mkdirp yes
|
||||||
{ config, pkgs, lib, flakeRoot, ... }:
|
{ config, pkgs, lib, flakeRoot, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
moduleName = "install-flatpaks";
|
moduleName = "install-flatpaks";
|
||||||
flatpakConfPath = flakeRoot + "/assets/conf/apps/flatpaks.conf";
|
flatpakConfPath = flakeRoot + "/assets/conf/apps/flatpaks.conf";
|
||||||
raw = builtins.readFile flatpakConfPath;
|
raw = builtins.readFile flatpakConfPath;
|
||||||
|
|
||||||
# Explicit "\n" so we never accidentally split into characters
|
# Explicit "\n" so we never accidentally split into characters
|
||||||
rawLines = lib.splitString "\n" raw;
|
rawLines = lib.splitString "\n" raw;
|
||||||
|
|
||||||
@@ -1655,7 +1643,7 @@ It ensures the Ollama CLI is available system-wide for interacting with local mo
|
|||||||
It automatically pulls and prepares selected coding models (e.g., Qwen2.5-Coder and StarCoder2) at system activation.
|
It automatically pulls and prepares selected coding models (e.g., Qwen2.5-Coder and StarCoder2) at system activation.
|
||||||
|
|
||||||
#+begin_src nix :tangle home/apps/ai.nix :noweb tangle :mkdirp yes
|
#+begin_src nix :tangle home/apps/ai.nix :noweb tangle :mkdirp yes
|
||||||
{ config, hello, pkgs, lib, flakeRoot, ... }:
|
{ config, pkgs, lib, flakeRoot, ... }:
|
||||||
let
|
let
|
||||||
# Read environment variables from file
|
# Read environment variables from file
|
||||||
envVars = lib.genAttrs (builtins.splitStrings "\n" (builtins.readFile (toString ./assets/conf/apps/ai.env)))
|
envVars = lib.genAttrs (builtins.splitStrings "\n" (builtins.readFile (toString ./assets/conf/apps/ai.env)))
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.ollama = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.ollama-vulkan;
|
|
||||||
loadModels = [
|
|
||||||
"qwen2.5-coder:7b"
|
|
||||||
"qwen2.5-coder:32b"
|
|
||||||
"starcoder2:15b"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.ollama-vulkan
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
{ config, pkgs, lib, flakeRoot, ... }:
|
{ config, pkgs, lib, flakeRoot, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
moduleName = "install-flatpaks";
|
moduleName = "install-flatpaks";
|
||||||
flatpakConfPath = flakeRoot + "/assets/conf/apps/flatpaks.conf";
|
flatpakConfPath = flakeRoot + "/assets/conf/apps/flatpaks.conf";
|
||||||
raw = builtins.readFile flatpakConfPath;
|
raw = builtins.readFile flatpakConfPath;
|
||||||
|
|
||||||
# Explicit "\n" so we never accidentally split into characters
|
# Explicit "\n" so we never accidentally split into characters
|
||||||
rawLines = lib.splitString "\n" raw;
|
rawLines = lib.splitString "\n" raw;
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +1,23 @@
|
|||||||
{ config, lib, pkgs, flakeRoot, inputs, ... }:
|
{ config, lib, pkgs, flakeRoot, inputs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
packagesConfPath = flakeRoot + "/assets/conf/apps/packages.conf";
|
packagesConfPath = flakeRoot + "/assets/conf/apps/packages.conf";
|
||||||
raw = builtins.readFile packagesConfPath;
|
raw = builtins.readFile packagesConfPath;
|
||||||
|
|
||||||
# IMPORTANT: explicit "\n" so we never accidentally split into characters
|
# IMPORTANT: explicit "\n" so we never accidentally split into characters
|
||||||
rawLines = lib.splitString "\n" raw;
|
rawLines = lib.splitString "\n" raw;
|
||||||
|
|
||||||
# Guard: if we accidentally split into characters, rawLines length ~= stringLength raw
|
# Guard: if we accidentally split into characters, rawLines length ~= stringLength raw
|
||||||
_guard = assert !(
|
_guard = assert !(
|
||||||
builtins.stringLength raw > 1 &&
|
builtins.stringLength raw > 1 &&
|
||||||
builtins.length rawLines == builtins.stringLength raw
|
builtins.length rawLines == builtins.stringLength raw
|
||||||
); true;
|
); true;
|
||||||
|
|
||||||
cleanLine = l:
|
cleanLine = l:
|
||||||
let
|
let
|
||||||
noCR = lib.replaceStrings [ "\r" ] [ "" ] l;
|
noCR = lib.replaceStrings [ "\r" ] [ "" ] l;
|
||||||
noInlineComment = lib.head (lib.splitString "#" noCR);
|
noInlineComment = lib.head (lib.splitString "#" noCR);
|
||||||
in
|
in
|
||||||
lib.strings.trim noInlineComment;
|
lib.strings.trim noInlineComment;
|
||||||
|
|
||||||
entries =
|
entries =
|
||||||
builtins.filter (l: l != "")
|
builtins.filter (l: l != "")
|
||||||
(map cleanLine rawLines);
|
(map cleanLine rawLines);
|
||||||
|
|
||||||
resolvePkg = name:
|
resolvePkg = name:
|
||||||
let
|
let
|
||||||
parts = lib.splitString "." name;
|
parts = lib.splitString "." name;
|
||||||
@@ -32,19 +26,15 @@ let
|
|||||||
if found == null then
|
if found == null then
|
||||||
throw ''
|
throw ''
|
||||||
install_packages.nix: package not found in pkgs
|
install_packages.nix: package not found in pkgs
|
||||||
|
|
||||||
Token : ${builtins.toJSON name}
|
Token : ${builtins.toJSON name}
|
||||||
packages.conf : ${toString packagesConfPath}
|
packages.conf : ${toString packagesConfPath}
|
||||||
Hint : check the attribute name on search.nixos.org/packages
|
Hint : check the attribute name on search.nixos.org/packages
|
||||||
''
|
''
|
||||||
else
|
else
|
||||||
found;
|
found;
|
||||||
|
|
||||||
packages = builtins.seq _guard (map resolvePkg entries);
|
packages = builtins.seq _guard (map resolvePkg entries);
|
||||||
|
|
||||||
zenBrowser =
|
zenBrowser =
|
||||||
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, hello, pkgs, lib, flakeRoot, ... }:
|
{ config, pkgs, lib, flakeRoot, ... }:
|
||||||
let
|
let
|
||||||
# Read environment variables from file
|
# Read environment variables from file
|
||||||
envVars = lib.genAttrs (builtins.splitStrings "\n" (builtins.readFile (toString ./assets/conf/apps/ai.env)))
|
envVars = lib.genAttrs (builtins.splitStrings "\n" (builtins.readFile (toString ./assets/conf/apps/ai.env)))
|
||||||
|
|||||||
Reference in New Issue
Block a user