oh my god

This commit is contained in:
Sakooooo 2023-07-07 23:08:26 +03:00
parent 89cb7bc5d1
commit 717a65f00c
Signed by: sako
GPG key ID: 3FD715D87D7725E0
10 changed files with 41 additions and 160 deletions

View file

@ -8,7 +8,6 @@
./hardware-configuration.nix ./hardware-configuration.nix
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
# TODO(sako):: make this better # TODO(sako):: make this better
../../modules
]; ];
# grub (mount efi partition to /boot/efi) # grub (mount efi partition to /boot/efi)
@ -74,6 +73,32 @@
driSupport32Bit = true; driSupport32Bit = true;
}; };
# tell xserver i want this driver
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# wayland support cause why not
modesetting.enable = true;
# TODO(sako):: add this as a cfg option for hosts
open = false;
# settings
nvidiaSettings = true;
# Package
package = config.boot.kernelPackages.nvidiaPackages.stable;
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
# packages that are unfree because they want to or need to # packages that are unfree because they want to or need to
#nixpkgs.config.allowUnfreePredicate = pkg: #nixpkgs.config.allowUnfreePredicate = pkg:
# builtins.elem (lib.getName pkg) [ # builtins.elem (lib.getName pkg) [
@ -157,6 +182,21 @@
]; ];
}; };
# mpd
services.mpd = {
enable = true;
# pipewire fix
user = "sako";
musicDirectory = "/home/sako/music";
extraConfig = builtins.readFile ../../config/mpd/mpd.conf;
startWhenNeeded = true;
};
# systemd fix pipewire
systemd.services.mpd.environment = {
XDG_RUNTIME_DIR = "/run/user/1000";
};
# TODO(sako):: make overlays in different folder # TODO(sako):: make overlays in different folder
nixpkgs.overlays = [ nixpkgs.overlays = [
(final: prev: { qutebrowser = prev.qutebrowser.override { enableWideVine = true; }; }) (final: prev: { qutebrowser = prev.qutebrowser.override { enableWideVine = true; }; })

View file

@ -1,7 +0,0 @@
{ config, pkgs, lib, ...}:
{
imports = [
./media/mpd
./hardware
];
}

View file

@ -1,30 +0,0 @@
{ options, config, lib, pkgs, ...}:
with lib;
let cfg = config.modules.desktop.bspwm;
in {
options.modules.desktop.bspwm = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
services.xserver = {
enable = true;
windowManager.bspwm.enable = true;
layout = "us";
};
xdg.configFile = {
bspwm = {
source = ../../../config/bspwm;
};
sxhkd = {
source = ../../../config/sxhkd;
};
};
users.users.sako.packages = with pkgs; [
rofi
(polybar.override {
pulseSupport = true;
})
];
};
}

View file

@ -1,20 +0,0 @@
{ options, config, lib, pkgs, ...}:
with lib;
let cfg = config.modules.desktop.kitty;
in {
options.modules.desktop.kitty = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
kitty
];
fonts.fonts = with pkgs; [
jetbrains-mono
(nerdfonts.override { fonts = [
"JetBrainsMono"
];})
];
};
}

View file

@ -1,31 +0,0 @@
{ options, config, lib, pkgs, ...}:
with lib;
let cfg = config.modules.web.qutebrowser;
in {
options.modules.web.qutebrowser = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
users.users.sako = {
packages = with pkgs; [
qutebrowser-qt6
python310Packages.pynacl
python310Packages.adblock
];
};
nixpkgs.overlays = [
(final: prev: { qutebrowser = prev.qutebrowser.override { enableWideVine = true; }; })
];
xdg.configFile = {
"qutebrowser/config.py" = {
source = ../../../config/qutebrowser/config.py;
};
"qutebrowser/greasemonkey" = {
source = ../../../config/qutebrowser/greasemonkey;
recursive = true;
};
};
};
}

View file

@ -1,14 +0,0 @@
# What is this for?
Because bloatware sucks and nix sometimes leaves alot of garbage, I decided to make each project a
seperate nix file.
# How do I use this?
- copy project-template.nix
- add package dependencies to it
- when you dont maintain that project anymore you can delete the file and rebuild
# Add language?
- just make a nix file and add that yeah

View file

@ -1,15 +0,0 @@
{ config, lib, pkgs, ...}:
with lib;
let cfg = config.modules.dev.cpp;
in {
options.modules.dev.cpp = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
cmake
gcc
];
};
}

View file

@ -1,6 +0,0 @@
{ config, pkgs, lib, ...}:
{
imports = [
./cpp.nix
];
}

View file

@ -1,6 +0,0 @@
{ config, pkgs, lib, ...}:
{
imports = [
./nvidia
];
}

View file

@ -1,30 +0,0 @@
{ config, pkgs, lib, ...}:
{
# tell xserver i want this driver
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# wayland support cause why not
modesetting.enable = true;
# TODO(sako):: add this as a cfg option for hosts
open = false;
# settings
nvidiaSettings = true;
# Package
package = config.boot.kernelPackages.nvidiaPackages.stable;
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
}