Compare commits

..

6 Commits

Author SHA1 Message Date
Lennart J. Kurzweg (Nx2)
4b42af4523 merge north master 2024-07-23 17:45:11 +02:00
Lennart J. Kurzweg (Nx2)
1e0af7a61b flake restructure 2024-07-23 17:35:57 +02:00
Lennart J. Kurzweg (Nx2)
ad784f41f9 new ollama 2024-07-23 14:08:49 +02:00
Lennart J. Kurzweg (Nx2)
ad885f7675 nvidia 555 2024-07-23 14:08:38 +02:00
Lennart J. Kurzweg (Nx2)
97ef1500ab switch to zen for north 2024-07-23 14:08:25 +02:00
Lennart J. Kurzweg (Nx2)
d29a12094a chtterino new token 2024-07-23 14:08:05 +02:00
18 changed files with 808 additions and 942 deletions

View File

@@ -12,7 +12,7 @@
./system-modules/gc.nix
./system-modules/dm.nix
./system-modules/networking.nix
# ./system-modules/virtualisation.nix
./system-modules/virtualisation.nix
./system-modules/sshd.nix
./system-modules/gpg.nix
./system-modules/sops.nix
@@ -60,17 +60,6 @@
hardware.bluetooth.powerOnBoot = true; #
services.blueman.enable = true;
# nixpkgs.config.allowUnfree = true;
nixpkgs.config = {
# allowUnfree = true;
# allowUnfreePredicate = (pkg: true);
allowUnfreePredicate = let
string-list = allowed.unfree-packages ++ (if nvidia.enable == true then nvidia.unfree else []);
in pkg: builtins.elem (lib.getName pkg) string-list;
cudaSupport = nvidia.enable;
enableParallelBuildingByDefault = true;
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; ([

43
flake-modules/allowed.nix Normal file
View File

@@ -0,0 +1,43 @@
{
unfree = [
"discord"
"spotify"
"obsidian"
"zoom-us"
"zoom"
# since the predicate ist to be set in the flake and not in a module
# it is impossible to make the list dynamic and respect nvidia.enable
"nvidia-x11"
"nvidia-settings"
"nvidia-persistenced"
"cudatoolkit"
"cuda-merged"
"cuda_cuobjdump"
"cuda_gdb"
"cuda_nvcc"
"cuda_nvdisasm"
"cuda_nvprune"
"cuda_cccl"
"cuda_cudart"
"cuda_cupti"
"cuda_cuxxfilt"
"cuda_nvml_dev"
"cuda_nvrtc"
"cuda_nvtx"
"cuda_profiler_api"
"cuda_sanitizer_api"
"libcublas"
"libcufft"
"libcurand"
"libcusolver"
"libnvjitlink"
"libcusparse"
"libnpp"
];
inecure = [
# "electron-25.9.0"
];
}

4
flake-modules/nvidia.nix Normal file
View File

@@ -0,0 +1,4 @@
{
enable = false;
prime = false;
}

59
flake-modules/rice.nix Normal file
View File

@@ -0,0 +1,59 @@
pkgs: rec {
lib = import ../nxlib/ricelib.nix pkgs.lib;
transparency = 0.8;
rounding = 10;
gap-size = 10;
border-width = 3;
color =
let
dark = (-0.5);
bright = (0.5);
alter-set = let f = lib.alter-luminace-hex; in color-name: color-value: { base = color-value; dark = f color-value dark; bright = f color-value bright; };
alter = let f = lib.alter-luminace-hex; in color-value: { base = color-value; dark = f color-value dark; bright = f color-value bright; };
ccolor = builtins.mapAttrs alter-set {
black = "#000022"; # "#111111" "#001100";
white = "#ddddff"; # "#dddddd" "#66dd66";
blue = "#4422ff"; # "#3333dd" "#003300";
cyan = "#11dddd"; # "#11dddd" "#00dd55";
green = "#11dd44"; # "#11dd11" "#11dd11";
magenta = "#6622dd"; # "#dd11dd" "#005500";
red = "#dd1166"; # "#dd1111" "#00aa00";
yellow = "#dd6611"; # "#dddd11" "#ffff00";
};
xcolor = with ccolor; rec {
background = black.dark;
foreground = white.base;
border = cyan.base;
border2 = blue.base;
accent = blue;
secondary = cyan;
tertiary = magenta;
special = yellow;
weird = green;
positive = alter "#00dd00";
negative = alter "#dd0000";
};
in ccolor // xcolor;
font = {
code = {
name = "JetBrainsMono-NF";
name2 = "JetBrainsMono Nerd Font";
package = (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; });
# name = "CascadiaCove-NF";
# package = (pkgs.nerdfonts.override { fonts = [ "CascadiaCode" ]; });
};
base = {
# name = "NewComputerModern08";
# package = pkgs.newcomputermodern;
name = "Atkinson Hyperlegible";
package = pkgs.atkinson-hyperlegible;
};
};
cursor = {
name = "Bibata-Original-Classic";
package = pkgs.bibata-cursors;
size = 24;
};
}

175
flake.lock generated
View File

@@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1718642173,
"narHash": "sha256-iyj4D6c77uROAH9QdZjPd9SKnS/DuACMESqaEKnBgI8=",
"lastModified": 1720553729,
"narHash": "sha256-9aM4MCBJn4UstcsSdukOFTxg79keUMTw9Kmqr7Wsfmw=",
"owner": "KZDKM",
"repo": "Hyprspace",
"rev": "2f3edb68f47a8f5d99d10b322e9a85a285f53cc7",
"rev": "e8662093ae5b6e13a3cf1145d21d4804a3e84aeb",
"type": "github"
},
"original": {
@@ -20,6 +20,39 @@
"type": "github"
}
},
"aquamarine": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1721571743,
"narHash": "sha256-hat7wggtDISBJD8kTo5MTrT+IsY/Ha2MwgjmqqijoCA=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "601f6cf95cbe4fef02dc7faf34bba58566c914e9",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "aquamarine",
"type": "github"
}
},
"crane": {
"inputs": {
"flake-compat": [
@@ -53,29 +86,6 @@
"type": "github"
}
},
"firefox-addons": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1719875691,
"narHash": "sha256-DtfpH7yivPHcfXV0EL70NwCKlg6nVTZGNngWkPshQjM=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "f2c6c0e41d6c2c82524b9d104bcfd1750a426d1b",
"type": "gitlab"
},
"original": {
"dir": "pkgs/firefox-addons",
"owner": "rycee",
"repo": "nur-expressions",
"type": "gitlab"
}
},
"flake-compat": {
"flake": false,
"locked": {
@@ -97,11 +107,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1719877454,
"narHash": "sha256-g5N1yyOSsPNiOlFfkuI/wcUjmtah+nxdImJqrSATjOU=",
"lastModified": 1719994518,
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "4e3583423212f9303aa1a6337f8dffb415920e4f",
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
"type": "github"
},
"original": {
@@ -132,21 +142,6 @@
}
},
"flake-utils": {
"locked": {
"lastModified": 1629284811,
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c5d161cc0af116a2e17f54316f0bf43f0819785c",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
@@ -193,11 +188,11 @@
]
},
"locked": {
"lastModified": 1719827385,
"narHash": "sha256-qs+nU20Sm8czHg3bhGCqiH+8e13BJyRrKONW34g3i50=",
"lastModified": 1720042825,
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "391ca6e950c2525b4f853cbe29922452c14eda82",
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
"type": "github"
},
"original": {
@@ -223,11 +218,11 @@
]
},
"locked": {
"lastModified": 1718450675,
"narHash": "sha256-jpsns6buS4bK+1sF8sL8AaixAiCRjA+nldTKvcwmvUs=",
"lastModified": 1721330371,
"narHash": "sha256-aYlHTWylczLt6ERJyg6E66Y/XSCbVL7leVcRuJmVbpI=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "66d5b46ff94efbfa6fa3d1d1b66735f1779c34a6",
"rev": "4493a972b48f9c3014befbbf381ed5fff91a65dc",
"type": "github"
},
"original": {
@@ -238,6 +233,7 @@
},
"hyprland": {
"inputs": {
"aquamarine": "aquamarine",
"hyprcursor": "hyprcursor",
"hyprlang": "hyprlang",
"hyprutils": "hyprutils",
@@ -247,11 +243,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1719938427,
"narHash": "sha256-b0QtvQtFAtuOVBNPEUYf4V2VNGChTukkrLH/JlCQds8=",
"lastModified": 1721684218,
"narHash": "sha256-FbFz+F5LJs92s6/DEkhh2h+k8NRqqrs8MGF+GRZWZGo=",
"ref": "refs/heads/main",
"rev": "6247a6b537fd1c05ecf35420529fab1adf83143e",
"revCount": 4903,
"rev": "3c758db95c129ed6ca7ce0c1b5b82ad6e189488d",
"revCount": 4963,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
@@ -279,11 +275,11 @@
]
},
"locked": {
"lastModified": 1719784423,
"narHash": "sha256-D7O5+nh2Wn9tQPJArWHrDSZeEfBCtj5zTGd86701LPE=",
"lastModified": 1721668405,
"narHash": "sha256-ZnIXa+jeMXoerhRz/ZJwVoYHaROjcLyQsr1b6JZ2AjQ=",
"owner": "hyprwm",
"repo": "hyprland-plugins",
"rev": "98cb18c6fcfe8196ef4150d09fbae305b7bb2954",
"rev": "4c2cef8326711fbd91b7a313f095545eb50d2a57",
"type": "github"
},
"original": {
@@ -306,11 +302,11 @@
]
},
"locked": {
"lastModified": 1714869498,
"narHash": "sha256-vbLVOWvQqo4n1yvkg/Q70VTlPbMmTiCQfNTgcWDCfJM=",
"lastModified": 1718746314,
"narHash": "sha256-HUklK5u86w2Yh9dOkk4FdsL8eehcOZ95jPhLixGDRQY=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "e06482e0e611130cd1929f75e8c1cf679e57d161",
"rev": "1b61f0093afff20ab44d88ad707aed8bf2215290",
"type": "github"
},
"original": {
@@ -335,11 +331,11 @@
]
},
"locked": {
"lastModified": 1717881852,
"narHash": "sha256-XeeVoKHQgfKuXoP6q90sUqKyl7EYy3ol2dVZGM+Jj94=",
"lastModified": 1721324361,
"narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "ec6938c66253429192274d612912649a0cfe4d28",
"rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086",
"type": "github"
},
"original": {
@@ -380,11 +376,11 @@
]
},
"locked": {
"lastModified": 1719316102,
"narHash": "sha256-dmRz128j/lJmMuTYeCYPfSBRHHQO3VeH4PbmoyAhHzw=",
"lastModified": 1721324102,
"narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "1f6bbec5954f623ff8d68e567bddcce97cd2f085",
"rev": "962582a090bc233c4de9d9897f46794280288989",
"type": "github"
},
"original": {
@@ -405,11 +401,11 @@
]
},
"locked": {
"lastModified": 1719067853,
"narHash": "sha256-mAnZG/eQy72Fp1ImGtqCgUrDumnR1rMZv2E/zgP4U74=",
"lastModified": 1721324119,
"narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "914f083741e694092ee60a39d31f693d0a6dc734",
"rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30",
"type": "github"
},
"original": {
@@ -423,7 +419,7 @@
"crane": "crane",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts_2",
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_3",
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
"rust-overlay": "rust-overlay"
@@ -445,11 +441,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1719075281,
"narHash": "sha256-CyyxvOwFf12I91PBWz43iGT1kjsf5oi6ax7CrvaMyAo=",
"lastModified": 1721379653,
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a71e967ef3694799d0c418c98332f7ff4cc5f6af",
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374",
"type": "github"
},
"original": {
@@ -489,27 +485,27 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1719663039,
"narHash": "sha256-tXlrgAQygNIy49LDVFuPXlWD2zTQV9/F8pfoqwwPJyo=",
"lastModified": 1721524707,
"narHash": "sha256-5NctRsoE54N86nWd0psae70YSLfrOek3Kv1e8KoXe/0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4a1e673523344f6ccc84b37f4413ad74ea19a119",
"rev": "556533a23879fc7e5f98dd2e0b31a6911a213171",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.11",
"ref": "release-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1719848872,
"narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=",
"lastModified": 1721562059,
"narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8",
"rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe",
"type": "github"
},
"original": {
@@ -551,11 +547,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1719838683,
"narHash": "sha256-Zw9rQjHz1ilNIimEXFeVa1ERNRBF8DoXDhLAZq5B4pE=",
"lastModified": 1721548954,
"narHash": "sha256-7cCC8+Tdq1+3OPyc3+gVo9dzUNkNIQfwSDJ2HSi2u3o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d032c1a6dfad4eedec7e35e91986becc699d7d69",
"rev": "63d37ccd2d178d54e7fb691d7ec76000740ea24a",
"type": "github"
},
"original": {
@@ -598,7 +594,6 @@
"root": {
"inputs": {
"Hyprspace": "Hyprspace",
"firefox-addons": "firefox-addons",
"home-manager": "home-manager",
"hyprland": "hyprland",
"hyprland-plugins": "hyprland-plugins",
@@ -642,11 +637,11 @@
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1719873517,
"narHash": "sha256-D1dxZmXf6M2h5lNE1m6orojuUawVPjogbGRsqSBX+1g=",
"lastModified": 1721688883,
"narHash": "sha256-9jsjsRKtJRqNSTXKj9zuDFRf2PGix30nMx9VKyPgD2U=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "a11224af8d824935f363928074b4717ca2e280db",
"rev": "aff2f88277dabe695de4773682842c34a0b7fd54",
"type": "github"
},
"original": {
@@ -702,11 +697,11 @@
]
},
"locked": {
"lastModified": 1718619174,
"narHash": "sha256-FWW68AVYmB91ZDQnhLMBNCUUTCjb1ZpO2k2KIytHtkA=",
"lastModified": 1721648131,
"narHash": "sha256-cyyxu/oj4QEFp3CVx2WeXa9T4OAUyynuBJHGkBZSxJI=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "c7894aa54f9a7dbd16df5cd24d420c8af22d5623",
"rev": "663be9cad424b170b28b9fa8a61042d721007f3b",
"type": "github"
},
"original": {

262
flake.nix
View File

@@ -2,244 +2,66 @@
description = "Multisystem NixOS Flake of Lennart J. Kurzweg";
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
nixpkgs = { url = "nixpkgs/nixos-24.05"; };
nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; };
home-manager = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; };
sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
lanzaboote = { url = "github:nix-community/lanzaboote/v0.3.0"; };
hyprland = { url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; };
hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; };
Hyprspace = { url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; };
hyprswitch = { url = "github:h3rmt/hyprswitch/release"; };
# firefox-addons = { url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; inputs.nixpkgs.follows = "nixpkgs"; };
};
hyprland = {
url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
# url = "github:hyprwm/Hyprland";
# inputs.nixpkgs.follows = "nixpkgs";
};
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
Hyprspace = {
url = "github:KZDKM/Hyprspace";
inputs.hyprland.follows = "hyprland";
};
hyprswitch.url = "github:h3rmt/hyprswitch/release";
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.3.0";
# inputs.nixpkgs.follows = "nixpkgs-unstable";
};
#arion = {
# url = "github:hercules-ci/arion";
# inputs.nixpkgs.follows = "nixpkgs";
#};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
# yazi.url = "github:sxyazi/yazi";
};
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs:
let
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs: let
system = "x86_64-linux";
pkgs-config = {
allowUnfree = true;
# cudaSupport = nvidia.enable;
# enableParallelBuildingByDefault = true;
};
pkgs = import nixpkgs {
system = system;
config = pkgs-config;
};
pkgs-unstable = import nixpkgs-unstable {
system = system;
config = pkgs-config;
};
user = "nx2";
nvidia = {
enable = true;
prime = true;
# unfree = if enable then [
unfree = [
"cuda_cccl"
"cuda_cudart"
"cuda_cuobjdump"
"cuda_cupti"
"cuda_cuxxfilt"
"cuda_gdb"
"cuda-merged"
"cuda_nvcc"
"cuda_nvdisasm"
"cuda_nvml_dev"
"cuda_nvprune"
"cuda_nvrtc"
"cuda_nvtx"
"cuda_profiler_api"
"cuda_sanitizer_api"
"cudatoolkit"
"libcublas"
"libcufft"
"libcurand"
"libcusolver"
"libcusparse"
"libnpp"
"libnvjitlink"
"nviaia-x11"
"nvidia-persistenced"
"nvidia-settings"
"nvidia-x11"
];
# ] else [];
};
allowed = {
unfree-packages = [
"discord"
"obsidian"
"spotify"
"zoom"
"zoom-us"
] ++ nvidia.unfree;
config = { allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; };
inecure-packages = [
"electron-25.9.0"
];
};
pkgs = import nixpkgs { inherit system config; };
pkgs-unstable = import nixpkgs-unstable { inherit system config; };
nvidia-set = import ./flake-modules/nvidia.nix;
secrets = import ./git-crypt/secrets.nix;
rice = rec {
lib = import ./nxlib/ricelib.nix { lib = nixpkgs.lib; };
transparency = 0.8;
rounding = 10;
gap-size = 10;
border-width = 3;
color =
let
dark = (-0.5);
bright = (0.5);
alter-set = let f = rice.lib.alter-luminace-hex; in color-name: color-value: { base = color-value; dark = f color-value dark; bright = f color-value bright; };
alter = let f = rice.lib.alter-luminace-hex; in color-value: { base = color-value; dark = f color-value dark; bright = f color-value bright; };
ccolor = builtins.mapAttrs alter-set {
black = "#000022"; # "#111111" "#001100";
white = "#ddddff"; # "#dddddd" "#66dd66";
blue = "#4422ff"; # "#3333dd" "#003300";
cyan = "#11dddd"; # "#11dddd" "#00dd55";
green = "#11dd44"; # "#11dd11" "#11dd11";
magenta = "#6622dd"; # "#dd11dd" "#005500";
red = "#dd1166"; # "#dd1111" "#00aa00";
yellow = "#dd6611"; # "#dddd11" "#ffff00";
};
xcolor = with ccolor; rec {
background = black.dark;
foreground = white.base;
border = cyan.base;
border2 = blue.base;
accent = blue;
secondary = cyan;
tertiary = magenta;
special = yellow;
weird = green;
positive = alter "#00dd00";
negative = alter "#dd0000";
};
# ccolor = builtins.mapAttrs alter-set {
# black = "#112200";
# white = "#ddffdd";
# blue = "#779944";
# cyan = "#11ffcc";
# green = "#00ff00";
# magenta = "#449999";
# red = "#dd2200";
# yellow = "#ffff11";
# };
# xcolor = with ccolor; rec {
# background = black.dark; # black.dark;
# foreground = white.base; # white.base;
# border = accent.base; # cyan.base;
# border2 = yellow.base; # blue.base;
# accent = green; # blue;
# secondary = red; # cyan;
# tertiary = yellow; # magenta;
# special = blue; # yellow;
# weird = magenta; # green;
# positive = alter "#00dd00"; # alter "#00dd00";
# negative = alter "#dd0000"; # alter "#dd0000";
# };
in ccolor // xcolor;
font = {
code = {
name = "JetBrainsMono-NF";
name2 = "JetBrainsMono Nerd Font";
package = (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; });
# name = "CascadiaCove-NF";
# package = (pkgs.nerdfonts.override { fonts = [ "CascadiaCode" ]; });
};
base = {
# name = "NewComputerModern08";
# package = pkgs.newcomputermodern;
name = "Atkinson Hyperlegible";
package = pkgs.atkinson-hyperlegible;
};
};
cursor = {
name = "Bibata-Original-Classic";
package = pkgs.bibata-cursors;
size = 24;
};
};
in
{
nixosConfigurations = {
NxXPS = let host = "NxXPS"; in nixpkgs.lib.nixosSystem {
rice = import ./flake-modules/rice.nix pkgs;
in {
nixosConfigurations = let
make-nixos-system = host: nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./configuration.nix ];
specialArgs = { inherit inputs user host pkgs-unstable allowed secrets rice nvidia; };
specialArgs = let
nvidia = nvidia-set // {
enable = if (host == "NxXPS" || host == "NxNORTH") then true else false;
prime = if (host == "NxXPS") then true else false;
};
NxNORTH = let host = "NxNORTH"; in nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./configuration.nix ];
specialArgs = { inherit inputs user host pkgs-unstable allowed secrets rice nvidia; };
};
NxACE = let host = "NxACE"; nvidia.enable = false; in nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./configuration.nix ];
specialArgs = { inherit inputs user host pkgs-unstable allowed secrets rice nvidia; };
in { inherit inputs user host pkgs-unstable secrets rice nvidia; };
};
in {
NxXPS = make-nixos-system "NxXPS";
NxNORTH = make-nixos-system "NxNORTH";
NxACE = make-nixos-system "NxACE";
};
homeConfigurations = {
"${user}@NxXPS" = let host = "NxXPS"; in home-manager.lib.homeManagerConfiguration {
homeConfigurations = let
make-home-configuration = host: user: home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = { inherit inputs system user host allowed secrets pkgs-unstable rice nvidia; };
extraSpecialArgs = let
nvidia = nvidia-set // {
enable = if (host == "NxXPS" || host == "NxNORTH") then true else false;
prime = if (host == "NxXPS") then true else false;
};
"${user}@NxNORTH" = let host = "NxNORTH"; in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = { inherit inputs system user host allowed secrets pkgs-unstable rice nvidia; };
};
"${user}@NxACE" = let host = "NxACE"; nvidia.enable = false; in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = { inherit inputs system user host allowed secrets pkgs-unstable rice nvidia; };
};
"tv@NxACE" =
let
host = "NxACE";
user = "tv";
nvidia.enable = pkgs.kib.mkForce false;
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = { inherit inputs system user host allowed secrets pkgs-unstable rice nvidia; };
in { inherit inputs system user host pkgs-unstable rice secrets nvidia; };
};
in {
"${user}@NxXPS" = make-home-configuration "NxXPS" user;
"${user}@NxNORTH" = make-home-configuration "NxNORTH" user;
"${user}@NxACE" = make-home-configuration "NxACE" user;
"tv@NxACE" = make-home-configuration "NxACE" "tv";
};
};
}

Binary file not shown.

View File

@@ -1,11 +1,12 @@
{ config, pkgs, pkgs-unstable, lib, host, user, allowed, ... }:
{ pkgs, lib, host, ... }:
lib.mkIf (host != "NxACE")
{
home.packages = [
pkgs-unstable.vesktop
home = {
packages = with pkgs; [
vesktop
];
home.file.".config/vesktop/settings/settings.json".text = ''
file.".config/vesktop/settings/settings.json".text = ''
{
"notifyAboutUpdates": true,
"autoUpdate": false,
@@ -487,6 +488,7 @@ lib.mkIf (host != "NxACE")
}
}
'';
};
}

View File

@@ -2,7 +2,7 @@
{
home = {
packages = with pkgs; [
nixfmt # nix formater
nixfmt-classic # nix formater
nil # nix language server
python311Packages.python-lsp-server
lldb # debugger for llvm stuff

View File

@@ -1,4 +1,4 @@
{ config, pkgs, lib, system, user, host, allowed, secrets, ... }:
{ pkgs, lib, host, secrets, ... }:
lib.mkIf (host != "NxACE")
{
home.packages = [

View File

@@ -1,4 +1,4 @@
{ config, pkgs, pkgs-unstable, lib, system, nvidia, host, user, rice, allowed, secrets, ... }:
{ pkgs, pkgs-unstable, lib, host, user, ... }:
{
imports = [
@@ -32,7 +32,6 @@
./home-modules/fish.nix
./home-modules/bash.nix
./home-modules/starship.nix
# ./home-modules/nvim.nix
./home-modules/helix.nix
./home-modules/vale.nix
@@ -62,15 +61,6 @@
home.username = user;
home.homeDirectory = "/home/${user}";
home.stateVersion = "24.05";
nixpkgs.config = {
allowUnfree = true;
# allowUnfreePredicate = (pkg: true);
# allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) allowed.unfree-packages;
permittedInsecurePackages = allowed.inecure-packages;
# cudaSupport = nvidia.enable;
# enableParallelBuildingByDefault = true;
};
home.packages = with pkgs; [
chromium

View File

@@ -1,4 +1,4 @@
{ lib, ... }:
lib:
let
# takes in "ff0044" (no hash!) and returns { r = "ff", g = "00", b = "44" }
slice-hex = hex: with builtins; { r = substring 0 2 hex; g = substring 2 2 hex; b = substring 4 2 hex; };

View File

@@ -1,4 +1,4 @@
{ config, pkgs, lib, host, inputs, ... }:
{ config, pkgs, pkgs-unstable, lib, host, inputs, ... }:
let
grub-theme-ascii-diana = (pkgs.fetchFromGitea {
domain = "git.nx2.site";
@@ -76,7 +76,7 @@ in
# '';
# };
};
# kernelPackages = pkgs.linuxPackages_latest;
kernelPackages = pkgs-unstable.linuxPackages_zen;
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
kernelModules = [ "v4l2loopback" ];
extraModprobeConfig = ''options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1'';

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, user, allowed, secrets, ... }:
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [

View File

@@ -1,6 +1,6 @@
{ config, pkgs, pkgs-unstable, lib, nvidia, ... }:
{ config, pkgs, lib, nvidia, ... }:
lib.mkIf nvidia.enable
{
config = lib.mkIf nvidia.enable {
environment.systemPackages = with pkgs; [
lshw
glxinfo
@@ -11,7 +11,7 @@
export __VK_LAYER_NV_optimus=NVIDIA_only
exec "$@"
'')
] ++ [
# ] ++ [
# pkgs-unstable.nvtopPackages.intel
# pkgs-unstable.nvtopPackages.nvidia
];
@@ -41,7 +41,7 @@
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = true;
powerManagement.finegrained = nvidia.prime;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
@@ -57,7 +57,7 @@
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
package = config.boot.kernelPackages.nvidiaPackages.beta;
};
opengl = {
enable = true;
@@ -65,5 +65,4 @@
driSupport32Bit = true;
};
};
};
}

View File

@@ -1,47 +1,12 @@
{ pkgs, pkgs-unstable, lib, host, nvidia, ... }:
let p = pkgs-unstable; in
{
environment.systemPackages = with pkgs-unstable; [
environment.systemPackages = with p; [
ollama
];
# services.ollama.environmentVariables = {
# OLLAMA_ORIGINS = "*";
# };
# systemd.services.ollama = {
# environment.OLLAMA_ORIGINS = "*";
# description = "Ollama Service";
# after = [ "network-online.target" "ollama-doesnt-respect-xdg-data-home.service" ];
# serviceConfig = {
# Type = "simple";
# # Environment = "\"XDG_DATA_HOME=/run/current-system/sw/share\"";
# ExecStart = "${pkgs.ollama}/bin/ollama serve";
# User = "ollama";
# Group = "ollama";
# Restart = "always";
# RestartSec = "3";
# };
# wantedBy = [ "default.target" ];
# };
# users.users.ollama = {
# isSystemUser = true;
# home = "/usr/share/ollama";
# shell = "/bin/false";
# group = "ollama";
# };
# users.groups.ollama = {};
# systemd.services.ollama-doesnt-respect-xdg-data-home = {
# wantedBy = ["multi-user.target"];
# script = ''
# mkdir -p /usr/share/ollama/.ollama
# chown ollama:ollama -R /usr/share/ollama
# '';
# };
services.ollama = {
# package = pkgs-unstable.ollama;
package = p.ollama;
enable = true;
acceleration = lib.mkIf nvidia.enable "cuda";
listenAddress = if host == "NxACE" then "0.0.0.0:11434" else "127.0.0.1:11434";

View File

@@ -1,4 +1,4 @@
{ config, pkgs, lib, system, user, allowed, secrets, ... }:
{ config, pkgs, lib, ... }:
{
services.pipewire = {

View File

@@ -1,4 +1,4 @@
{ config, pkgs, lib, system, host, user, allowed, secrets, ... }:
{ pkgs, lib, host, user, ... }:
{
users.defaultUserShell = pkgs.bash; # if interactive, itll switch to fish
@@ -10,13 +10,11 @@
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID1RPCcS8DtIf75a2FEW4d8X6WTVeLlmretoLqppvZlJ" # From [A] GPG Sub Key
];
packages = with pkgs; []; # all in home.nix
};
users.users.tv = lib.mkIf (host == "NxACE") {
isNormalUser = true;
extraGroups = [ "networkmanager" "audio" "video" "uinput" ];
useDefaultShell = true;
packages = with pkgs; []; # all in home.nix
};