Files
dotfiles/flake.nix
Lennart J. Kurzweg (Nx2) 66ef004344 added NxACE (untested)
2024-05-04 12:10:42 +02:00

189 lines
5.9 KiB
Nix

{
description = "A Flake lol";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland ={
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";
# };
# nixvim = {
# url = "github:nix-community/nixvim/nixos-23.11";
# inputs.nixpkgs.follows = "nixpkgs";
# };
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.3.0";
# inputs.nixpkgs.follows = "nixpkgs-unstable";
};
};
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
user = "nx2";
nvidia = rec {
enable = true;
prime = true;
# unfree = if enable then [
unfree = [
"nvidia-x11"
"nvidia-settings"
"nvidia-persistenced"
"cudatoolkit"
"cudatoolkit-11.8.0"
"cudatoolkit-12.2.2"
];
# ] else [];
};
allowed = {
unfree-packages = [
"spotify"
"cudatoolkit-12.2.2"
"discord"
"obsidian"
"zoom-us"
"zoom"
"vscode-extension-MS-python-vscode-pylance"
] ++ nvidia.unfree;
inecure-packages = [
"electron-25.9.0"
];
};
secrets = import ./secrets/passwords-and-certificates.nix;
rice = rec {
lib = import ./nxlib/ricelib.nix { lib = nixpkgs.lib; };
transparency = 0.9;
rounding = 0;
gap-size = 0;
border-width = 2;
color = rec {
background = "#000000";
foreground = white;
border = red;
accent = magenta;
black = "#111111"; # "#000000" "#000000"
bright-black = "#444444"; # "#231a40" "#231a40"
blue = "#4411ff"; # "#9d00ff" "#432d59"
bright-blue = "#9977ff"; # "#c76eff" "#593380"
cyan = "#00ffff"; # "#00ddff" "#00ff00"
bright-cyan = "#88ffff"; # "#33f9ff" "#b08ae6"
green = "#00ff00"; # "#0048ff" "#9045e6"
bright-green = "#88ff88"; # "#1166ff" "#a366ff"
magenta = "#ff00ff"; # "#B21889" "#a82ee6"
bright-magenta = "#ff88ff"; # "#ff75f6" "#bb66cc"
red = "#ff0044"; # "#ff0044" "#f29df2"
bright-red = "#ff4499"; # "#ff4576" "#4595e6"
white = "#dddddd"; # "#939599" "#40dfff"
bright-white = "#ffffff"; # "#ffffff" "#4136d9"
yellow = "#ff4400"; # "#ff4000" "#7e5ce6"
bright-yellow = "#ff8844"; # "#ff8454" "#a886bf"
};
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 = "Atkinson Hyperlegible";
package = pkgs.atkinson-hyperlegible;
};
};
};
in
{
nixosConfigurations = {
NxXPS = let
host = "NxXPS";
in
nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./configuration.nix ];
specialArgs = { inherit inputs user host pkgs-unstable allowed 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; };
};
};
homeConfigurations = {
"${user}@NxXPS" = let host = "NxXPS"; in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home.nix
];
extraSpecialArgs = { inherit inputs system user host allowed secrets pkgs-unstable rice 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; };
};
};
};
}