feat: build a much more minimal config for installing

This commit is contained in:
oddlama 2023-09-26 21:43:23 +02:00
parent 73897f648d
commit 73d7a42879
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
11 changed files with 136 additions and 113 deletions

View file

@ -44,18 +44,12 @@
options = "--delete-older-than 90d";
};
# Define global flakes for this system
registry = {
registry = rec {
nixpkgs.flake = inputs.nixpkgs;
p.flake = inputs.nixpkgs;
pkgs.flake = inputs.nixpkgs;
p = nixpkgs;
templates.flake = inputs.templates;
};
};
system = {
extraSystemBuilderCmds = ''
ln -sv ${pkgs.path} $out/nixpkgs
'';
stateVersion = "23.11";
};
system.stateVersion = "23.11";
}

View file

@ -1,8 +1,11 @@
{
inputs,
pkgs,
lib,
minimal,
...
}: {
}:
lib.optionalAttrs (!minimal) {
imports = [
inputs.nixseparatedebuginfod.nixosModules.default
./documentation.nix

View file

@ -2,55 +2,59 @@
config,
inputs,
lib,
minimal,
...
}: let
inherit
(lib)
mkOption
types
optionalAttrs
;
in {
imports = [
inputs.stylix.nixosModules.stylix
in
{
options.graphical.gaming.enable = mkOption {
description = "Enables gaming on this machine and will add a lot of gaming related packages and configuration.";
default = false;
type = types.bool;
};
}
// optionalAttrs (!minimal) {
imports = [
inputs.stylix.nixosModules.stylix
./fonts.nix
./steam.nix
./wayland.nix
./xserver.nix
];
./fonts.nix
./steam.nix
./wayland.nix
./xserver.nix
];
options.graphical.gaming.enable = mkOption {
description = "Enables gaming on this machine and will add a lot of gaming related packages and configuration.";
default = false;
type = types.bool;
};
config = {
# Needed for gtk
programs.dconf.enable = true;
stylix = {
# I want to choose what to style myself.
autoEnable = false;
polarity = "dark";
image = config.lib.stylix.pixel "base00";
base16Scheme = {
base00 = "282c34";
base01 = "353b45";
base02 = "3e4451";
base03 = "545862";
base04 = "565c64";
base05 = "abb2bf";
base06 = "b6bdca";
base07 = "c8ccd4";
base08 = "e06c75";
base09 = "d19a66";
base0A = "e5c07b";
base0B = "98c379";
base0C = "56b6c2";
base0D = "61afef";
base0E = "c678dd";
base0F = "be5046";
config = {
# Needed for gtk
programs.dconf.enable = true;
stylix = {
# I want to choose what to style myself.
autoEnable = false;
polarity = "dark";
image = config.lib.stylix.pixel "base00";
base16Scheme = {
base00 = "282c34";
base01 = "353b45";
base02 = "3e4451";
base03 = "545862";
base04 = "565c64";
base05 = "abb2bf";
base06 = "b6bdca";
base07 = "c8ccd4";
base08 = "e06c75";
base09 = "d19a66";
base0A = "e5c07b";
base0B = "98c379";
base0C = "56b6c2";
base0D = "61afef";
base0E = "c678dd";
base0F = "be5046";
};
};
};
};
}
}

View file

@ -1,8 +1,10 @@
{
lib,
minimal,
pkgs,
...
}: {
}:
lib.optionalAttrs (!minimal) {
boot.blacklistedKernelModules = ["nouveau"];
services.xserver.videoDrivers = lib.mkForce ["nvidia"];

View file

@ -1,8 +1,10 @@
{
lib,
minimal,
pkgs,
...
}: {
}:
lib.optionalAttrs (!minimal) {
# Helpful utilities:
# Show pipewire devices and application overview or specifics
# > wpctl status; wpctl inspect <id>

View file

@ -5,19 +5,18 @@
}: let
inherit
(lib)
mdDoc
mkOption
types
;
in {
options.node = {
name = mkOption {
description = mdDoc "A unique name for this node (host) in the repository. Defines the default hostname, but this can be overwritten.";
description = "A unique name for this node (host) in the repository. Defines the default hostname, but this can be overwritten.";
type = types.str;
};
secretsDir = mkOption {
description = mdDoc "Path to the secrets directory for this node.";
description = "Path to the secrets directory for this node.";
type = types.path;
};
};