overlays refactor

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2025-06-17 19:48:31 +02:00
parent fbd045d53e
commit d2d1ce7830
103 changed files with 156 additions and 323 deletions

View File

@@ -1,8 +1,7 @@
{ pkgs, hyper, inputs, ... }:
{ pkgs, ... }@all: with all;
{
imports = [
inputs.sops-nix.nixosModules.sops
inputs.nixpkgs.nixosModules.readOnlyPkgs
./system-modules/adb.nix
./system-modules/auto-mount.nix
@@ -119,8 +118,6 @@
dmidecode
file
parallel
# ]) ++ (with pkgs-unstable; [
# # sendme
]);
environment.variables = {
@@ -140,7 +137,7 @@
system.stateVersion = pkgs.version;
nixpkgs.pkgs = pkgs;
# nixpkgs.pkgs = pkgs;
nix = {
settings = {

173
flake.lock generated
View File

@@ -200,27 +200,6 @@
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709445365,
"narHash": "sha256-DVv6nd9FQBbMWbOmhq0KVqmlc3y3FMSYl49UXmMcO+0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "4de84265d7ec7634a69ba75028696d74de9a44a7",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"hyprcursor": {
"inputs": {
"hyprlang": [
@@ -557,55 +536,6 @@
"type": "github"
}
},
"nix-formatter-pack": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs"
],
"nmd": "nmd",
"nmt": "nmt"
},
"locked": {
"lastModified": 1705252799,
"narHash": "sha256-HgSTREh7VoXjGgNDwKQUYcYo13rPkltW7IitHrTPA5c=",
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"rev": "2de39dedd79aab14c01b9e2934842051a160ffa5",
"type": "github"
},
"original": {
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"type": "github"
}
},
"nix-on-droid": {
"inputs": {
"home-manager": "home-manager_2",
"nix-formatter-pack": "nix-formatter-pack",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-docs": "nixpkgs-docs",
"nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap",
"nmd": "nmd_2"
},
"locked": {
"lastModified": 1720396533,
"narHash": "sha256-UFzk/hZWO1VkciIO5UPaSpJN8s765wsngUSvtJM6d5Q=",
"owner": "nix-community",
"repo": "nix-on-droid",
"rev": "f3d3b8294039f2f9a8fb7ea82c320f29c6b0fe25",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.05",
"repo": "nix-on-droid",
"type": "github"
}
},
"nixos-wsl": {
"inputs": {
"flake-compat": "flake-compat_3",
@@ -642,38 +572,6 @@
"type": "github"
}
},
"nixpkgs-docs": {
"locked": {
"lastModified": 1705957679,
"narHash": "sha256-Q8LJaVZGJ9wo33wBafvZSzapYsjOaNjP/pOnSiKVGHY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9a333eaa80901efe01df07eade2c16d183761fa3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-for-bootstrap": {
"locked": {
"lastModified": 1720244366,
"narHash": "sha256-WrDV0FPMVd2Sq9hkR5LNHudS3OSMmUrs90JUTN+MXpA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40",
"type": "github"
}
},
"nixpkgs-latest": {
"locked": {
"lastModified": 1750014763,
@@ -784,60 +682,6 @@
"type": "github"
}
},
"nmd": {
"flake": false,
"locked": {
"lastModified": 1666190571,
"narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=",
"owner": "rycee",
"repo": "nmd",
"rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmd",
"type": "gitlab"
}
},
"nmd_2": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs-docs"
],
"scss-reset": "scss-reset"
},
"locked": {
"lastModified": 1705050560,
"narHash": "sha256-x3zzcdvhJpodsmdjqB4t5mkVW22V3wqHLOun0KRBzUI=",
"owner": "~rycee",
"repo": "nmd",
"rev": "66d9334933119c36f91a78d565c152a4fdc8d3d3",
"type": "sourcehut"
},
"original": {
"owner": "~rycee",
"repo": "nmd",
"type": "sourcehut"
}
},
"nmt": {
"flake": false,
"locked": {
"lastModified": 1648075362,
"narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=",
"owner": "rycee",
"repo": "nmt",
"rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmt",
"type": "gitlab"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
@@ -895,7 +739,6 @@
"hyprland-plugins": "hyprland-plugins",
"hyprspace": "hyprspace",
"lanzaboote": "lanzaboote",
"nix-on-droid": "nix-on-droid",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_4",
"nixpkgs-latest": "nixpkgs-latest",
@@ -946,22 +789,6 @@
"type": "github"
}
},
"scss-reset": {
"flake": false,
"locked": {
"lastModified": 1631450058,
"narHash": "sha256-muDlZJPtXDIGevSEWkicPP0HQ6VtucbkMNygpGlBEUM=",
"owner": "andreymatin",
"repo": "scss-reset",
"rev": "0cf50e27a4e95e9bb5b1715eedf9c54dee1a5a91",
"type": "github"
},
"original": {
"owner": "andreymatin",
"repo": "scss-reset",
"type": "github"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [

View File

@@ -31,13 +31,19 @@
domain = "nx2.site";
home = "/home/${user}/";
webroot = "/var/lib/hugo/nx2site/public";
pkgs-version = "25.05";
};
pkgs = (import nixpkgs { inherit system config; }) // {
unstable = import nixpkgs-unstable { inherit system config; };
latest = import nixpkgs-latest { inherit system config; };
version = "25.05";
};
pkgs = builtins.removeAttrs (import nixpkgs {
inherit system config;
overlays = [
(final: prev: {
unstable = import nixpkgs-unstable { inherit system config; };
latest = import nixpkgs-latest { inherit system config; };
version = "25.05";
})
];
}) [ "hyper" "host" ]; # this removes the programs from pkgs so I can use the variable name
nvidia-base = import ./flake-modules/nvidia.nix;
secrets = import ./git-crypt/secrets.nix;
@@ -45,16 +51,18 @@
in {
nixosConfigurations = let
make-nixos-system = host: nvidia-settings: nixpkgs.lib.nixosSystem {
inherit pkgs;
modules = [ ./configuration.nix ];
specialArgs = let
hyper = hyper-base // { inherit host; nvidia = (nvidia-base // nvidia-settings); };
in { inherit pkgs inputs hyper rice secrets; };
in { inherit inputs hyper rice secrets; };
};
make-nixos-wsl-system = host: nixpkgs.lib.nixosSystem {
inherit pkgs;
modules = [ ./nixos-wsl.nix ];
specialArgs = let
hyper = hyper-base // { inherit host; };
in { inherit pkgs inputs hyper rice; };
in { inherit inputs hyper rice; };
};
in {
NxXPS = make-nixos-system "NxXPS" { enable = true; prime = true; };

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
bitwarden

View File

@@ -1,4 +1,4 @@
{ pkgs, user, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = let
u = pkgs.writers.writePython3Bin "nx_fix_campuszeit_python" {

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, secrets, ... }: let
{ pkgs, ... }@all: with all; let
calendars = with hyper; [
{
name = "Preservation";
@@ -85,7 +85,7 @@ in {
userName = hyper.user; # my globally set username
};
};
in pkgs.lib.attrsets.mergeAttrsList (
in lib.attrsets.mergeAttrsList (
map (calendar: {
"${calendar.name}" = transform_caledar_set ( default_set // calendar );
}) calendars
@@ -93,7 +93,7 @@ in {
programs.thunderbird.settings = let
to_safe_name = name: (builtins.replaceStrings ["."] ["-"]) name;
in (pkgs.lib.attrsets.mergeAttrsList (
in (lib.attrsets.mergeAttrsList (
map (calendar: with ( default_set // calendar ); {
"calendar.registry.${to_safe_name calendar.name}.cache.enabled" = true;
"calendar.registry.${to_safe_name calendar.name}.calendar-main-default" = primary;
@@ -106,7 +106,7 @@ in {
"calendar.registry.${to_safe_name calendar.name}.readOnly" = read-only;
}) calendars
) // {
"calendar.list.sortOrder" = pkgs.lib.fold (calendar: acc: calendar.name + " " + acc) "" calendars;
"calendar.list.sortOrder" = lib.fold (calendar: acc: calendar.name + " " + acc) "" calendars;
"calendar.week.start" = 1;
});
}

View File

@@ -1,4 +1,4 @@
{ config, pkgs, hyper, rice, secrets, ... }:
{ pkgs, ... }@all: with all;
let
channels = [
"Caedrel"

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
services.clipman = {
package = pkgs.clipman;

View File

@@ -1,5 +1,5 @@
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host != "NxACE")
{ pkgs, ... }@all: with all;
lib.mkIf (hyper.host != "NxACE")
{
home = {
packages = with pkgs; [

View File

@@ -1,12 +1,12 @@
{ pkgs, hyper, rice, secrets, ... }:
pkgs.lib.mkIf (hyper.host != "NxACE")
{ pkgs, ... }@all: with all;
lib.mkIf (hyper.host != "NxACE")
{
home.packages = with pkgs; [
thunderbird
];
programs.thunderbird = let
inherit (pkgs.lib.generators) toJSON;
inherit (lib.generators) toJSON;
extensions = toJSON {} {
"addon@darkreader.org" = "71d6c69d-55f9-4c56-888c-abdcf6efd73d";
};

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, rice, ... }:
{ pkgs, ... }@all: with all;
# browser.tabs.allow_transparent_browser
# https://www.reddit.com/r/FirefoxCSS/comments/1dqws4b/firefox_128_will_allow_the_main_browser_content/
{

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
fish

View File

@@ -1,5 +1,5 @@
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host == "NxNORTH")
{ pkgs, ... }@all: with all;
lib.mkIf (hyper.host == "NxNORTH")
{
home = {
packages = (with pkgs.unstable; [

View File

@@ -1,5 +1,5 @@
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host == "NxXPS")
{ pkgs, ... }@all: with all;
lib.mkIf (hyper.host == "NxXPS")
{
home.packages = with pkgs; [
libinput-gestures

View File

@@ -1,4 +1,4 @@
{ pkgs, rice, ... }:
{ pkgs, ... }@all: with all;
{
programs.ghostty = {
enable = true;

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
# (gimp-with-plugins.override {

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, rice, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
delta
@@ -21,10 +21,10 @@
};
extraConfig = {
credential = {
"https://git.da.dicos.de".username = pkgs.lib.mkIf (hyper.host =="NxWSL") "lkurzweg";
"https://git.da.dicos.de".password = pkgs.lib.mkIf (hyper.host =="NxWSL") "Test";
"https://git.da.dicos.de".username = lib.mkIf (hyper.host =="NxWSL") "lkurzweg";
"https://git.da.dicos.de".password = lib.mkIf (hyper.host =="NxWSL") "Test";
};
url."ssh://git@git.da.dicos.de/".insteadOf = pkgs.lib.mkIf (hyper.host =="NxWSL") "https://git.da.dicos.de/";
url."ssh://git@git.da.dicos.de/".insteadOf = lib.mkIf (hyper.host =="NxWSL") "https://git.da.dicos.de/";
pull.rebase = false; # true
};
};

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
# there also is a system module
home.packages = with pkgs; [

View File

@@ -1,4 +1,4 @@
{ config, pkgs, rice, ... }:
{ pkgs, ... }@all: with all;
let
# theme-name = "Colloid-Pink-Dark-Compact";
# theme-package = pkgs.colloid-gtk-theme.override {

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, rice, ... }:
{ pkgs, ... }@all: with all;
{
home = {
packages = with pkgs; [
@@ -271,7 +271,7 @@
command = "nixd";
};
"style-check" = {
command = pkgs.lib.getExe pkgs.vale-ls;
command = lib.getExe pkgs.vale-ls;
};
"language-tool" = {
command = "${pkgs.ltex-ls}/bin/ltex-ls";
@@ -287,7 +287,7 @@
];
};
"llm" = {
command = pkgs.lib.getExe pkgs.helix-gpt;
command = lib.getExe pkgs.helix-gpt;
args = [
"--handler"
"ollama"

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home = {
packages = with pkgs; [ hyprland-autoname-workspaces ];

View File

@@ -1,4 +1,4 @@
{ config, pkgs, hyper, inputs, rice, ... }:
{ pkgs, ... }@all: with all;
let
animation-speed = "5";
transparency = builtins.toString rice.transparency;

View File

@@ -1,5 +1,5 @@
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host != "NxACE")
{ pkgs, ... }@all: with all;
lib.mkIf (hyper.host != "NxACE")
{
home.packages = with pkgs; [
texlab # LSP

View File

@@ -1,4 +1,4 @@
{ pkgs, rice, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [ libnotify ];
services.mako = with rice; {

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
# cinny-desktop

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, ... }:
{ pkgs, ... }@all: with all;
{
home = {
packages = with pkgs; [

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
nixd

View File

@@ -1,5 +1,5 @@
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.nvidia.enable == true)
{ pkgs, ... }@all: with all;
lib.mkIf (hyper.nvidia.enable == true)
{
home = {
packages = with pkgs; [

View File

@@ -1,4 +1,4 @@
{ config, pkgs, secrets, ... }: let
{ pkgs, ... }@all: with all;
sep = " ";
in {
home = {

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = [
(pkgs.writeShellApplication {

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
(writeShellApplication {

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
ghostscript

View File

@@ -1,5 +1,5 @@
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host != "NxACE")
{ pkgs, ... }@all: with all;
lib.mkIf (hyper.host != "NxACE")
{
# home.packages = with pkgs; [
# obs-studio

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
libreoffice

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
ollama

View File

@@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
pandoc

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
bat

View File

@@ -1,5 +1,5 @@
{ pkgs, hyper, secrets, ... }:
pkgs.lib.mkIf (hyper.host != "NxACE")
{ pkgs, ... }@all: with all;
lib.mkIf (hyper.host != "NxACE")
{
home.packages = [
pkgs.remmina

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home = {
packages = with pkgs; [

View File

@@ -1,5 +1,5 @@
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host != "NxACE")
{ pkgs, ... }@all: with all;
lib.mkIf (hyper.host != "NxACE")
{
home.packages = with pkgs; [
erlang

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home = {
packages = with pkgs; [

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home = {
packages = with pkgs; [

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
nodejs

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home = let
python-with-packages = pkgs.python3.withPackages (pp: with pp; [

View File

@@ -1,4 +1,5 @@
{ pkgs, rice, ... }: {
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
rofi-wayland
];

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
xsane

View File

@@ -1,4 +1,4 @@
{ pkgs, rice, ... }:
{ pkgs, ... }@all: with all;
let
my-sent = pkgs.sent.override {
patches = [

View File

@@ -1,12 +1,12 @@
{ pkgs, hyper, inputs, ... }:
{ pkgs, ... }@all: with all;
{
imports = [
inputs.sops-nix.homeManagerModules.sops
];
sops = {
age.keyFile = pkgs.lib.mkIf (hyper.host == "NxACE") "${hyper.home}.age_nx2_key_13.txt";
gnupg.home = pkgs.lib.mkIf (hyper.host != "NxACE") "${hyper.home}.gnupg";
age.keyFile = lib.mkIf (hyper.host == "NxACE") "${hyper.home}.age_nx2_key_13.txt";
gnupg.home = lib.mkIf (hyper.host != "NxACE") "${hyper.home}.gnupg";
defaultSopsFile = ../sops-secrets.yaml;
# %r is $XDG_RUNTIME_DIR

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, ... }:
{ pkgs, ... }@all: with all;
{
home = {
packages = with pkgs; [ sshfs ];

View File

@@ -1,4 +1,4 @@
{ pkgs, rice, ... }:
{ pkgs, ... }@all: with all;
{
programs.starship = {
enable = true;
@@ -7,7 +7,7 @@
enableFishIntegration = true;
settings = with rice.color; {
add_newline = false;
format = pkgs.lib.strings.concatMapStrings (x: "$" + x) [
format = lib.strings.concatMapStrings (x: "$" + x) [
"jobs"
"battery"
"username"

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
(writeShellApplication {

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }: let
{ pkgs, ... }@all: with all; let
vws = pkgs.vale.withStyles (s: [ s.alex s.google ]);
in {
home = {

View File

@@ -1,5 +1,5 @@
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host == "NxNORTH")
{ pkgs, ... }@all: with all;
lib.mkIf (hyper.host == "NxNORTH")
{
home.packages = with pkgs; [
virt-manager

View File

@@ -1,6 +1,6 @@
{ config, pkgs, hyper, rice, ... }:
{ pkgs, ... }@all: with all;
{
config = pkgs.lib.mkIf (hyper.host != "NxACE") {
config = lib.mkIf (hyper.host != "NxACE") {
home.packages = [
pkgs.vscodium
pkgs.nixpkgs-fmt
@@ -92,13 +92,13 @@
# url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/mutability.nix";
# sha256 = "4b5ca670c1ac865927e98ac5bf5c131eca46cc20abf0bd0612db955bfc979de8";
# })
# { inherit config pkgs; lib = pkgs.lib; })
# { inherit config pkgs; lib = lib; })
# (import
# (builtins.fetchurl {
# url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/vscode.nix";
# sha256 = "fed877fa1eefd94bc4806641cea87138df78a47af89c7818ac5e76ebacbd025f";
# })
# { inherit config pkgs; lib = pkgs.lib; })
# { inherit config pkgs; lib = lib; })
# ] else [];
}

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
(writers.writePython3Bin "change_colors_json" {

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, rice, ... }:
{ pkgs, ... }@all: with all;
let
sep = " ";
in {

View File

@@ -1,4 +1,4 @@
{ pkgs, rice,... }:
{ pkgs, ... }@all: with all;
{
home = {
packages = with pkgs; [ wlogout ];

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, rice, inputs, ... }:
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
unar

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, ... }:
{ pkgs, ... }@all: with all;
{
imports = [
./home-modules/auto-mount.nix
@@ -67,7 +67,7 @@
home.username = hyper.user;
# home.homeDirectory = hyper.home; # for some reason you cant use hyper.home here
home.homeDirectory = "/home/${hyper.user}";
home.stateVersion = pkgs.version;
home.stateVersion = hyper.pkgs-version;
home.packages = with pkgs; [
bat
brightnessctl

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
# Simply install just the packages
environment.packages = with pkgs; [

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, inputs, ... }:
{ pkgs, ... }@all: with all;
{
imports = [
inputs.nixos-wsl.nixosModules.default

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, ... }:
{ pkgs, ... }@all: with all;
{
imports = [
./home-modules/bash.nix

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, lib, ... }:
{ pkgs, ... }@all: with all;
lib.mkIf (hyper.host != "NxACE")
{
environment.systemPackages = with pkgs; [

View File

@@ -1,4 +1,4 @@
{ config, pkgs, hyper, inputs, ... }:
{ pkgs, ... }@all: with all;
let
grub-theme-ascii-diana = (pkgs.fetchFromGitea {
domain = "git.${hyper.domain}";

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
systemd.timers."nx_cal_dicos" = {
enable = true;

View File

@@ -1,4 +1,4 @@
{ config, pkgs, hyper, ... }:
{ pkgs, ... }@all: with all;
{
systemd.timers."nx_cal_lec" = {
enable = true;

View File

@@ -1,4 +1,4 @@
{ config, pkgs, hyper, ... }:
{ pkgs, ... }@all: with all;
{
systemd.timers."nx_cal_lr" = {
enable = true;

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, ... }:
{ pkgs, ... }@all: with all;
let
radicale-root = "/var/lib/radicale";
web-root = "/var/nginx/webroot";

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
environment.systemPackages = with pkgs; [

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, ... }:
{ pkgs, ... }@all: with all;
{
services.greetd = {
enable = true;

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, ... }:
{ pkgs, ... }@all: with all;
{
environment.systemPackages = with pkgs; [

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
# i18n.inputMethod = {
# type = "fcitx5";

View File

@@ -1,4 +1,4 @@
{ pkgs, rice, ... }:
{ pkgs, ... }@all: with all;
{
fonts.packages = with pkgs; [
noto-fonts

View File

@@ -1,4 +1,4 @@
{ config, pkgs, ...}:
{ pkgs, ... }@all: with all;
{
environment = {

View File

@@ -1,5 +1,5 @@
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host == "NxNORTH" || hyper.host == "NxACE")
{ pkgs, ... }@all: with all;
lib.mkIf (hyper.host == "NxNORTH" || hyper.host == "NxACE")
{
programs = {
steam = {

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
environment.systemPackages = with pkgs; [
gnupg

View File

@@ -1,4 +1,4 @@
{ config, pkgs, hyper, modulesPath, ... }:
{ pkgs, ... }@all: with all;
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
@@ -29,19 +29,19 @@
{ device = "/dev/disk/by-label/swap"; }
];
networking.useDHCP = pkgs.lib.mkDefault true;
networking.useDHCP = lib.mkDefault true;
hardware.cpu.intel.updateMicrocode = pkgs.lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# from nixos-hardware
services.thermald.enable = pkgs.lib.mkDefault true;
services.thermald.enable = lib.mkDefault true;
boot.extraModprobeConfig = if hyper.host == "NxXPS" then ''
options iwlwifi 11n_disable=8
'' else "";
boot.initrd.kernelModules = if hyper.host == "NxXPS" then [ "i915" ] else [];
environment.variables = if hyper.host == "NxXPS" then {
VDPAU_DRIVER = pkgs.lib.mkIf config.hardware.graphics.enable (pkgs.lib.mkDefault "va_gl");
VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl");
} else {};
hardware.graphics.extraPackages = if hyper.host == "NxXPS" then with pkgs; [

View File

@@ -1,5 +1,5 @@
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host != "NxACE")
{ pkgs, ... }@all: with all;
lib.mkIf (hyper.host != "NxACE")
{
systemd.timers."health_reminder" = {
enable = true;

View File

@@ -1,4 +1,4 @@
{ pkgs, lib, host, secrets, ... }:
{ pkgs, ... }@all: with all;
{
environment.systemPackages = with pkgs; [
strongswanNM

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, ... }:
{ pkgs, ... }@all: with all;
let p = pkgs; in
{
environment.systemPackages = with p; [

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
services.kanata = {
enable = true;

View File

@@ -1,4 +1,4 @@
{ pkgs, lib, host, ... }:
{ pkgs, ... }@all: with all;
lib.mkIf (host == "NxACE")
{}
# {

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, secrets, ... }:
{ pkgs, ... }@all: with all;
{
# sops.secrets = {
# "wireless-networking.env" = {};

View File

@@ -1,5 +1,5 @@
{ config, pkgs, hyper, ... }:
pkgs.lib.mkIf hyper.nvidia.enable
{ pkgs, ... }@all: with all;
lib.mkIf hyper.nvidia.enable
{
environment.systemPackages = with pkgs; [
lshw
@@ -21,7 +21,7 @@ pkgs.lib.mkIf hyper.nvidia.enable
hardware = {
nvidia = {
prime = pkgs.lib.mkIf hyper.nvidia.prime {
prime = lib.mkIf hyper.nvidia.prime {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
offload = {

View File

@@ -1,4 +1,4 @@
{ config, pkgs, hyper, secrets, ... }:
{ pkgs, ... }@all: with all;
let dns-user = "cloudflare"; in
{
sops.secrets = {

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
services = {
audiobookshelf = {

View File

@@ -1,4 +1,4 @@
{ config, pkgs, hyper, ... }:
{ pkgs, ... }@all: with all;
{
sops.secrets = {
# "nx2site/namecheap.pw" = { };

View File

@@ -1,4 +1,4 @@
{ config, pkgs, hyper, secrets, ... }:
{ pkgs, ... }@all: with all;
let git-user = "git"; in
{
sops.secrets = {

View File

@@ -1,4 +1,4 @@
{ pkgs, hyper, ... }:
{ pkgs, ... }@all: with all;
{
services = {
open-web-calendar = {

View File

@@ -1,4 +1,4 @@
{ config, pkgs, hyper, secrets, ... }:
{ pkgs, ... }@all: with all;
let paperless-user = "paperless"; in
{
sops.secrets = {

View File

@@ -44,7 +44,7 @@
# appendConfig = '''';
clientMaxBodySize = "20m";
defaultHTTPListenPort = 80;
defaultListenAddresses = [ "0.0.0.0" ] ++ pkgs.lib.optional config.networking.enableIPv6 "[::0]";
defaultListenAddresses = [ "0.0.0.0" ] ++ lib.optional config.networking.enableIPv6 "[::0]";
defaultListen = dl;
defaultMimeTypes = "${pkgs.mailcap}/etc/nginx/mime.types";
defaultSSLListenPort = 443;
@@ -138,7 +138,7 @@
listen = dl;
locations = { "/" = { proxyPass = "http://127.0.0.1:8441"; }; };
};
"dav.${hyper.domain}" = pkgs.lib.mkIf config.services.radicale.enable (vh // {
"dav.${hyper.domain}" = lib.mkIf config.services.radicale.enable (vh // {
listen = dl;
locations = { "/" = { proxyPass = "http://127.0.0.1:5232"; }; };
});

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
environment.systemPackages = [
(pkgs.mkYarnPackage {

View File

@@ -1,4 +1,4 @@
{ config, pkgs, hyper, secrets, ... }:
{ pkgs, ... }@all: with all;
{
sops.secrets = {
"nx2site/vaultwarden.env" = {

View File

@@ -1,9 +1,9 @@
{ pkgs, hyper, ... }:
{ pkgs, ... }@all: with all;
{
services.ollama = {
package = if hyper.nvidia.enable then pkgs.ollama-cuda else pkgs.ollama;
enable = true;
acceleration = pkgs.lib.mkIf hyper.nvidia.enable "cuda";
acceleration = lib.mkIf hyper.nvidia.enable "cuda";
host = if hyper.host == "NxACE" then "0.0.0.0" else "127.0.0.1";
port = 11434;
environmentVariables = {

View File

@@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ pkgs, ... }@all: with all;
{
services = {
postgresql = {

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
hardware.keyboard.qmk.enable = true;

View File

@@ -3,7 +3,7 @@
hardware.sane = {
enable = true;
};
services.avahi = {
services.avahi.nssmdns4 = {
enable = true;
nssmdns = true;
};

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
environment.systemPackages = with pkgs; [
age

View File

@@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ pkgs, ... }@all: with all;
{
services.pipewire = {

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }@all: with all;
{
environment.etc = {
"ssl/certs/tuda-eduroam-root.crt".source = "${pkgs.cacert.unbundled}/etc/ssl/certs/T-TeleSec_GlobalRoot_Class_2:1.crt";

Some files were not shown because too many files have changed in this diff Show More