even more changes

This commit is contained in:
Charlie Root 2024-08-16 22:46:01 +02:00
commit 1d2a73c25a
14 changed files with 120 additions and 108 deletions

View file

@ -4,8 +4,6 @@
config, config,
... ...
}: { }: {
# allow unfree packages
nixpkgs.config.allowUnfree = true;
# Time Zone # Time Zone
time.timeZone = "Europe/Zurich"; time.timeZone = "Europe/Zurich";
# Select internationalisation properties. # Select internationalisation properties.
@ -17,117 +15,109 @@
trusted-public-keys = [ trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
]; ];
trusted-users = ["root" "${config.modules.other.system.username}"];
# enable flakes # enable flakes
experimental-features = ["nix-command" "flakes"];
# reduce file size used & automatic garbage collector # reduce file size used & automatic garbage collector
auto-optimise-store = true;
max-jobs = 3;
cores = 4;
}; };
}; };
security.sudo.package = pkgs.sudo.override {withInsults = true;}; security.sudo.package = pkgs.sudo.override {withInsults = true;};
security.polkit.enable = true; security.polkit.enable = true;
programs.kdeconnect.enable = true; programs.kdeconnect.enable = true;
programs.dconf.enable = true; programs.dconf.enable = true;
services.thermald.enable = true; virtualisation.docker.enable = true;
services.auto-cpufreq = {
enable = true;
settings = {
battery = {
governor = "powersave";
turbo = "auto";
};
charger = {
governor = "performance";
turbo = "auto";
};
};
};
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
modules = { modules = {
system = {
hardware = {
nvidia.enable = true;
bluetooth = {
enable = true;
powerOnBoot = false;
};
};
programs = {
editors = {
emacs.enable = false;
neovim.enable = true;
helix.enable = false;
kakoune.enable = false;
};
discord.enable = true;
firefox.enable = true;
spotify.enable = true;
zellij.enable = true;
terminals = {
foot.enable = true;
kitty.enable = true;
};
};
sound.enable = true;
};
usrEnv = {
desktops.hyprland.enable = true;
programs = {
launchers = {
anyrun.enable = true;
rofi.enable = true;
};
media = {
beets.enable = true;
mpv.enable = true;
ncmpcpp.enable = true;
};
};
services = {
locate.enable = true;
media.mpd = {
enable = true;
musicDirectory = "/home/${config.modules.other.system.username}/Nextcloud/Media/Music";
};
};
style = {
gtk.enable = true;
stylix = {
enable = false;
scheme = "${pkgs.base16-schemes}/share/themes/bright.yaml";
cursor = {
size = 28;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
};
fontsizes = {
terminal = 18;
popups = 14;
applications = 14;
};
image = self + "assets/wallpapers/wholefoods.jpg";
};
};
};
other = { other = {
system = { system = {
hostname = "hermit"; hostname = "hermit";
username = "vali"; username = "vali";
gitPath = "/home/vali/repos/nichts"; gitPath = "/home/vali/projects/nichts";
}; };
home-manager = { home-manager = {
enable = true; enable = true;
enableDirenv = true; enableDirenv = true;
}; };
}; };
wms = {
wayland = {
enable = true;
hyprland.enable = true;
};
};
system = {
programs = {
discord.enable = true;
firefox.enable = true;
zathura.enable = true;
terminals = {
foot.enable = true;
kitty.enable = true;
};
};
};
usrEnv = {
programs = {
launchers = {
anyrun.enable = true;
};
};
services = {
mpd.enable = true;
};
};
programs = { programs = {
vesktop.enable = true;
ssh.enable = true; ssh.enable = true;
btop.enable = true; btop.enable = true;
mpv.enable = true;
newsboat.enable = true; newsboat.enable = true;
fish.enable = true; fish.enable = true;
ncmpcpp.enable = true;
nh.enable = true; nh.enable = true;
steam.enable = true;
waybar.enable = true; waybar.enable = true;
beets.enable = true;
};
editors = {
emacs.enable = false;
helix.enable = true;
kakoune.enable = false;
neovim.enable = false;
}; };
services = { services = {
pipewire.enable = true;
dunst.enable = true; dunst.enable = true;
mpd = {
enable = true;
musicDirectory = "/home/${config.modules.other.system.username}/Nextcloud/Media/Music";
};
}; };
theming = { theming = {
quickshell.enable = true; quickshell.enable = true;
stylix = {
# FIXME: Broken
enable = true;
# scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-pale.yaml";
scheme = "${pkgs.base16-schemes}/share/themes/tomorrow-night.yaml";
cursor = {size = 28;};
fontsizes = {
terminal = 18;
popups = 14;
applications = 14;
};
image = self + "assets/wallpapers/tiredgod.png";
};
gtk = {enable = false;};
qt = { qt = {
enable = true; enable = false;
package = pkgs.kde-gruvbox; package = pkgs.kde-gruvbox;
name = "Gruvbox-Dark"; name = "Gruvbox-Dark";
}; };

View file

@ -3,6 +3,5 @@ _: {
./configuration.nix ./configuration.nix
./programs.nix ./programs.nix
./hardware-configuration.nix ./hardware-configuration.nix
./profile.nix
]; ];
} }

View file

@ -1,9 +0,0 @@
_: {
imports = [
../../../options/boot/grub-boot.nix
../../../options/common/bluetooth.nix
../../../options/common/networking.nix
../../../options/common/gpu/nvidia.nix
../../../options/desktop/monitors.nix
];
}

12
modules/default.nix Normal file
View file

@ -0,0 +1,12 @@
_: {
imports = [
./programs
./other
./services
./wms
./runners
./style
./options
./system
];
}

View file

@ -0,0 +1,15 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib) mkOption mkEnableOption;
inherit (lib.types) str package int;
in {
options.modules.system.hardware = {
nvidia = {
enable = mkEnableOption "Nvidia Nvidia graphics drivers";
};
};
}

View file

@ -38,6 +38,8 @@ in {
# monitor configuration # monitor configuration
./monitors.nix ./monitors.nix
./hardware.nix
]; ];
config = { config = {
warnings = mkMerge [ warnings = mkMerge [
@ -92,12 +94,13 @@ in {
video = { video = {
enable = mkEnableOption "video drivers and programs that require a graphical user interface"; enable = mkEnableOption "video drivers and programs that require a graphical user interface";
nvidia = mkOption "Nvidia graphics drivers"; nvidia = mkEnableOption "Nvidia graphics drivers";
amd = mkOption "AMD graphics drivers"; amd = mkEnableOption "AMD graphics drivers";
}; };
bluetooth = { hardware.bluetooth = {
enable = mkEnableOption "bluetooth modules, drivers and configuration program(s)"; enable = mkEnableOption "bluetooth modules, drivers and configuration program(s)";
powerOnBoot = mkEnableOption "Enable bluetooth on boot";
}; };
# should the device enable printing module and try to load common printer modules # should the device enable printing module and try to load common printer modules

View file

@ -3,14 +3,6 @@ _: {
./cli ./cli
./gui ./gui
./tui ./tui
./other
./services
./editors ./editors
./wms
./runners
./style
./options
./system/nix/module.nix
./system
]; ];
} }

View file

@ -1,6 +1,5 @@
_: { _: {
imports = [ imports = [
./stylix.nix
./quickshell ./quickshell
./qt.nix ./qt.nix
./gtk.nix ./gtk.nix

View file

@ -6,6 +6,7 @@
}: let }: let
inherit (lib.types) optional; inherit (lib.types) optional;
inherit (config.modules.system.fonts) extraFonts; inherit (config.modules.system.fonts) extraFonts;
inherit (config.modules.other.system) username;
in { in {
# A (somewhat) sane list of default fonts to be installed. # A (somewhat) sane list of default fonts to be installed.
fonts.packages = with pkgs; fonts.packages = with pkgs;
@ -21,12 +22,14 @@ in {
] ]
++ optional (extraFonts != null) extraFonts; ++ optional (extraFonts != null) extraFonts;
# this fixes emoji stuff # this fixes emoji stuff
fontconfig = { home-manager.users.${username} = {
defaultFonts = { fontconfig = {
monospace = ["ComicShannsMono Nerd Font" "Noto Color Emoji"]; defaultFonts = {
sansSerif = ["ComicShannsMono Nerd Font" "Noto Color Emoji"]; monospace = ["ComicShannsMono Nerd Font" "Noto Color Emoji"];
serif = ["ComicShannsMono Nerd Font" "Noto Color Emoji"]; sansSerif = ["ComicShannsMono Nerd Font" "Noto Color Emoji"];
emoji = ["Noto Color Emoji"]; serif = ["ComicShannsMono Nerd Font" "Noto Color Emoji"];
emoji = ["Noto Color Emoji"];
};
}; };
}; };
} }

View file

@ -0,0 +1 @@
_: {imports = [./grub-boot.nix];}

View file

@ -1,5 +1,9 @@
_: { _: {
imports = [ imports = [
./keyboard.nix ./keyboard.nix
./boot
./hardware
./nix/module.nix
./os/networking/module.nix
]; ];
} }

View file

@ -2,12 +2,13 @@
config, config,
lib, lib,
pkgs, pkgs,
...
}: let }: let
cfg = config.modules.system.hardware.bluetooth; cfg = config.modules.system.hardware.bluetooth;
inherit (config.modules.other.system) username; inherit (config.modules.other.system) username;
inherit (lib) mkIf; inherit (lib) mkIf;
in { in {
confg = mkIf cfg.enable { config = mkIf cfg.enable {
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;
powerOnBoot = mkIf cfg.powerOnBoot true; powerOnBoot = mkIf cfg.powerOnBoot true;

View file

@ -0,0 +1 @@
_: {imports = [./bluetooth.nix ./graphics.nix];}

View file

@ -0,0 +1 @@
_: {imports = [./pipewire];}