Files
dotfiles/flake.nix
2024-04-05 14:48:12 +02:00

96 lines
2.4 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";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }:
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 = {
transparency = "0.9";
colors = rec {
main-fg = "#ffffff";
main-bg = "#000000";
bubble-fg = main-fg;
bubble-bg = "#222222";
bubble-border = "#bbbbbb";
secondary-fg = main-fg;
secondary-bg = "#222255";
lines = "#bbbbbb";
accent = "#ff00ff";
};
font = {
code = {
name = "CascadiaCove-NF";
package = (pkgs.nerdfonts.override { fonts = [ "CascadiaCode" ]; });
};
base = {
name = "Atkinson Hyperlegible";
package = pkgs.atkinson-hyperlegible;
};
};
};
in
{
nixosConfigurations = {
NxXPS = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./configuration.nix
];
specialArgs = { inherit user pkgs-unstable allowed secrets rice nvidia; };
};
};
homeConfigurations = {
nx2 = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = { inherit system user allowed secrets pkgs-unstable rice nvidia; };
};
};
};
}