Compare commits

..

1 Commits

Author SHA1 Message Date
Lennart J. Kurzweg (Nx2)
dffd47fa94 changes saved (doesnt built) 2024-07-20 21:23:47 +02:00
23 changed files with 958 additions and 841 deletions

View File

@@ -1,4 +1,4 @@
{ pkgs, pkgs-unstable, inputs, ... }:
{ pkgs, pkgs-unstable, lib, inputs, allowed, nvidia, ... }:
{
imports = [
inputs.sops-nix.nixosModules.sops
@@ -12,12 +12,12 @@
./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
./system-modules/syncthing.nix
# ./system-modules/hsmw.nix # old
./system-modules/hsmw.nix # old
./system-modules/docker.nix
./system-modules/health_reminder.nix
./system-modules/ydotool.nix
@@ -60,9 +60,20 @@
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; [
environment.systemPackages = with pkgs; ([
git
lazygit # home-manager module is bugged
git-crypt
@@ -80,8 +91,8 @@
blueman
dmidecode
file
] ++ (with pkgs-unstable; [
sendme
# ]) ++ (with pkgs-unstable; [
# # sendme
]);
environment.variables = {
@@ -100,7 +111,6 @@
nix.settings.experimental-features = [ "nix-command" "flakes" ];
programs.bash.shellInit = ''
source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
'';

View File

@@ -1,43 +0,0 @@
{
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"
];
}

View File

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

View File

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

262
flake.nix
View File

@@ -2,66 +2,244 @@
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"; };
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"; };
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";
};
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs: let
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
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";
config = { allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; };
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;
pkgs = import nixpkgs { inherit system config; };
pkgs-unstable = import nixpkgs-unstable { inherit system config; };
inecure-packages = [
"electron-25.9.0"
];
};
nvidia-set = import ./flake-modules/nvidia.nix;
secrets = import ./git-crypt/secrets.nix;
rice = import ./flake-modules/rice.nix pkgs;
in {
nixosConfigurations = let
make-nixos-system = host: nixpkgs.lib.nixosSystem {
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 {
inherit system;
modules = [ ./configuration.nix ];
specialArgs = let
nvidia = nvidia-set // {
enable = if (host == "NxXPS" || host == "NxNORTH") then true else false;
prime = if (host == "NxXPS") then true else false;
specialArgs = { inherit inputs user host pkgs-unstable allowed secrets rice nvidia; };
};
in { inherit inputs user host pkgs-unstable secrets rice nvidia; };
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 {
NxXPS = make-nixos-system "NxXPS";
NxNORTH = make-nixos-system "NxNORTH";
NxACE = make-nixos-system "NxACE";
};
homeConfigurations = let
make-home-configuration = host: user: home-manager.lib.homeManagerConfiguration {
homeConfigurations = {
"${user}@NxXPS" = let host = "NxXPS"; in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = let
nvidia = nvidia-set // {
enable = if (host == "NxXPS" || host == "NxNORTH") then true else false;
prime = if (host == "NxXPS") then true else false;
extraSpecialArgs = { inherit inputs system user host allowed secrets pkgs-unstable rice nvidia; };
};
in { inherit inputs system user host pkgs-unstable rice secrets nvidia; };
"${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 {
"${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,12 +1,11 @@
{ pkgs, lib, host, ... }:
{ config, pkgs, pkgs-unstable, lib, host, user, allowed, ... }:
lib.mkIf (host != "NxACE")
{
home = {
packages = with pkgs; [
vesktop
home.packages = [
pkgs-unstable.vesktop
];
file.".config/vesktop/settings/settings.json".text = ''
home.file.".config/vesktop/settings/settings.json".text = ''
{
"notifyAboutUpdates": true,
"autoUpdate": false,
@@ -488,7 +487,6 @@ lib.mkIf (host != "NxACE")
}
}
'';
};
}

View File

@@ -102,9 +102,9 @@ lib.mkIf (host != "NxACE")
};
};
hsmw = {
address = secrets.email.hsmw.mail;
userName = secrets.email.hsmw.mail;
hsmw = with secrets.email.hsmw; {
address = "${un}@hs-mittweida.de";
userName = "${un}@hs-mittweida.de";
realName = "Lennart J. Kurzweg";
imap = {
port = 993;
@@ -117,8 +117,8 @@ lib.mkIf (host != "NxACE")
};
signature = {
text = ''
MatNr: ${secrets.email.hsmw.mnr}
SemGr: ${secrets.email.hsmw.semgr}
MatNr: ${mnr}
SemGr: ${semgr}
About Me: https://nx2.site/about-me
Contact: https://nx2.site/contact
GPG: https://nx2.site/gpg
@@ -128,6 +128,9 @@ lib.mkIf (host != "NxACE")
thunderbird = {
enable = true;
profiles = [ "default" ];
settings = id: {
"mail.server.server_${id}.fcc_folder" = "imap://${un}%40hs-mittweida.de@xc.hs-mittweida.de/Sent";
};
};
};
};

View File

@@ -2,7 +2,7 @@
{
home = {
packages = with pkgs; [
nixfmt-classic # nix formater
nixfmt # nix formater
nil # nix language server
python311Packages.python-lsp-server
lldb # debugger for llvm stuff
@@ -99,7 +99,7 @@
"constant" = accent.bright;
"constant.character.escape" = special.bright;
"constant.numeric" = foreground;
"constructor" = blue.dark;
"constructor" = weird.base;
"debug" = yellow.base;
"diagnostic.modifiers" = [ "underlined" ];
"diff.delta" = blue.bright;

View File

@@ -49,6 +49,7 @@ lib.mkIf (user != "tv")
"leagueclientux.exe" = "󰰌"
zathura = "󰈦"
code-oss = "󰨞"
codium-url-handler = "󰨞"
discord = "󰙯"
vesktop = "󰙯"
blueman-manager = "󰂯"

View File

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

View File

@@ -1,4 +1,4 @@
{ pkgs, pkgs-unstable, lib, host, user, ... }:
{ config, pkgs, pkgs-unstable, lib, system, nvidia, host, user, rice, allowed, secrets, ... }:
{
imports = [
@@ -62,6 +62,15 @@
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
@@ -74,7 +83,8 @@
swww playerctl
imv mpv mediainfo exiftool ffmpeg
pavucontrol fontpreview gtk2fontsel
pavucontrol
fontpreview gtk2fontsel
lynx w3m browsh
bat du-dust eza neofetch tldr fzf figlet ripgrep lolcat jq glow
brightnessctl wev

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; };

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
{ config, pkgs, pkgs-unstable, lib, host, inputs, ... }:
{ config, pkgs, lib, host, inputs, ... }:
let
grub-theme-ascii-diana = (pkgs.fetchFromGitea {
domain = "git.nx2.site";
@@ -76,7 +76,7 @@ in
# '';
# };
};
kernelPackages = pkgs-unstable.linuxPackages_zen;
# kernelPackages = pkgs.linuxPackages_latest;
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 @@
{ pkgs, ... }:
{ config, lib, pkgs, user, allowed, secrets, ... }:
{
environment.systemPackages = with pkgs; [

View File

@@ -1,24 +1,31 @@
{ pkgs, lib, host, secrets, ... }:
lib.mkIf (host != "NxACE")
{
environment.systemPackages = [
pkgs.strongswanNM
environment.systemPackages = with pkgs; [
strongswanNM
];
environment.etc = {
# Easyroam
"ssl/certs/easyroam_client_cert.pem".source = ../secrets/easyroam-hsmw/easyroam_client_cert.pem;
"ssl/certs/easyroam_root_ca.pem".source = ../secrets/easyroam-hsmw/easyroam_root_ca.pem;
"ssl/certs/easyroam_client_key.pem".source = ../secrets/easyroam-hsmw/easyroam_client_key.pem;
"NetworkManager/system-connections/eduroam.nmconnection" = {
text = secrets.easyroamHSMW.nmconfig;
mode = "0600";
# # Easyroam
# "ssl/certs/easyroam_client_cert.pem".source = ../secrets/easyroam-hsmw/easyroam_client_cert.pem;
# "ssl/certs/easyroam_root_ca.pem".source = ../secrets/easyroam-hsmw/easyroam_root_ca.pem;
# "ssl/certs/easyroam_client_key.pem".source = ../secrets/easyroam-hsmw/easyroam_client_key.pem;
# "NetworkManager/system-connections/eduroam.nmconnection" = {
# text = secrets.easyroamHSMW.nmconfig;
# mode = "0600";
# };
# "ipsec.d/hsmw.secrets".text = ''${secrets.email.hsmw.un}@hs-mittweida.de : EAP "megasecret"'';
# "ipsec.d/USERTrust-ECC.pem".source = ../secrets/vpn-hsmw/USERTrust-ECC-Certification-Authority.pem;
# "ipsec.d/USERTrust-RSA.pem".source = ../secrets/vpn-hsmw/USERTrust-RSA-Certification-Authority.pem;
};
"ipsec.d/hsmw.secrets".text = ''${secrets.email.hsmw.mail} : EAP "${secrets.email.hsmw.password}"'';
"ipsec.d/USERTrust-ECC.pem".source = ../secrets/vpn-hsmw/USERTrust-ECC-Certification-Authority.pem;
"ipsec.d/USERTrust-RSA.pem".source = ../secrets/vpn-hsmw/USERTrust-RSA-Certification-Authority.pem;
sops.secrets = {
"USERTrust/ECC" = { path = "/etc/ipsec.d/USERTrust-ECC.pem"; };
"USERTrust/RSA" = { path = "/etc/ipsec.d/USERTrust-RSA.pem"; };
"hsmw-vpn-secret" = { path = "/etc/ipsec.d/hsmw.secret"; mode = "600"; };
};
networking.networkmanager.enableStrongSwan = true;
@@ -35,7 +42,7 @@ lib.mkIf (host != "NxACE")
left = "%defaultroute";
leftid = "%any";
leftauth = "eap";
eap_identity = secrets.email.hsmw.mail;
eap_identity = "${secrets.email.hsmw.un}@hs-mittweida.de";
leftsourceip = "%config";
leftdns = "%config4";
leftfirewall = "no";
@@ -73,7 +80,7 @@ lib.mkIf (host != "NxACE")
"openssl"
"resolve"
];
secrets = [ "/etc/ipsec.d/hsmw.secrets" ];
secrets = [ "/etc/ipsec.d/hsmw.secret" ];
ca = {
hsmw = {
auto = "add";

View File

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

View File

@@ -1,7 +1,7 @@
{ pkgs, pkgs-unstable, lib, host, nvidia, ... }:
let p = pkgs-unstable; in
{
environment.systemPackages = with p; [
environment.systemPackages = with pkgs-unstable; [
ollama
];
@@ -41,7 +41,7 @@ let p = pkgs-unstable; in
# '';
# };
services.ollama = {
package = p.ollama;
# package = pkgs-unstable.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, ... }:
{ config, pkgs, lib, system, user, allowed, secrets, ... }:
{
services.pipewire = {

View File

@@ -1,4 +1,4 @@
{ pkgs, lib, host, user, ... }:
{ config, pkgs, lib, system, host, user, allowed, secrets, ... }:
{
users.defaultUserShell = pkgs.bash; # if interactive, itll switch to fish
@@ -10,11 +10,13 @@
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
};