add portable ssd, fix laptop eval

This commit is contained in:
Kopatz
2024-12-09 14:01:24 +01:00
parent c04be0ef1e
commit deda06423e
12 changed files with 115 additions and 33 deletions

View File

@@ -222,6 +222,12 @@
disko.nixosModules.disko
];
};
"portable-ssd" = mkHost {
modules = [
./users/kopatz
./systems/portable-ssd/configuration.nix
];
};
};
packages = customPackages.packages;

View File

@@ -33,7 +33,6 @@
#android.enable = true;
};
#emulators.enable = true;
gamemode.enable = true;
gnome.enable = true;
hyprland.enable = true;
#games.enable = true;

View File

@@ -10,7 +10,6 @@
./awesome.nix
./emulators.nix
./i3.nix
./gamemode.nix
./games.nix
./gnome.nix
./gnome-settings.nix

View File

@@ -1,20 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.custom.graphical.gamemode;
in
{
options.custom.graphical.gamemode = {
enable = mkEnableOption "Enables gamemode";
};
config = mkIf cfg.enable {
programs.gamemode = {
enable = true;
settings.custom = {
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
};
};
};
}

View File

@@ -17,6 +17,13 @@ in {
gamescopeSession.enable = true;
extraCompatPackages = with pkgs; [ proton-ge-bin ];
};
programs.gamemode = {
enable = true;
settings.custom = {
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
};
};
environment.systemPackages = [ pkgs.mangohud ]
++ optionals cfg.enablePreinstalled (with pkgs; [
#taisei

View File

@@ -24,9 +24,8 @@ in {
environment.gnome.excludePackages = (with pkgs; [
gnome-photos
gnome-tour
cheese
gedit # text editor
]) ++ (with pkgs.gnome; [
cheese # webcam tool
gnome-music
gnome-terminal
epiphany # web browser
@@ -43,11 +42,11 @@ in {
environment.systemPackages = with pkgs; [
wmctrl
rofi-wayland
gnome.mutter
mutter
adwaita-icon-theme
gnome.gnome-settings-daemon
gnome.gnome-tweaks
gnome.dconf-editor
gnome-settings-daemon
gnome-tweaks
dconf-editor
#gruvbox-gtk-theme
colloid-icon-theme
gnomeExtensions.appindicator

View File

@@ -0,0 +1,12 @@
{ lib, config, pkgs, inputs, pkgsVersion, ... }:
let cfg = config.custom.hardware.amd-gpu;
in {
options.custom.hardware.amd-gpu = {
enable = lib.mkEnableOption "Enables amd gpus";
};
config = lib.mkIf cfg.enable {
boot.initrd.kernelModules = [ "amdgpu" ];
services.xserver.videoDrivers = [ "amdgpu" ];
};
}

View File

@@ -1,5 +1,6 @@
{ pkgs, config, ... }: {
imports = [
./amd-gpu.nix
./android.nix
./firmware.nix
./nvidia.nix

View File

@@ -23,6 +23,7 @@
};
services = { syncthing = { enable = true; }; };
hardware = {
amd-gpu.enable = true;
firmware.enable = true;
ssd.enable = true;
wooting.enable = true;
@@ -62,9 +63,6 @@
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.kernelModules = [ "amdgpu" ];
services.xserver.enable = true;
services.xserver.videoDrivers = [ "amdgpu" ];
#zenpower for ryzen
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];

View File

@@ -6,7 +6,7 @@
services.system76-scheduler.settings.cfsProfiles.enable = true;
services.upower.enable = true;
environment.systemPackages = with pkgs; [ gnome.gnome-power-manager ];
environment.systemPackages = with pkgs; [ gnome-power-manager ];
# Enable TLP (better than gnomes internal power manager)
services.tlp = {

View File

@@ -57,7 +57,6 @@
android.enable = true;
};
#emulators.enable = true;
gamemode.enable = true;
games = {
enable = true;
enablePreinstalled = true;

View File

@@ -0,0 +1,82 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
{
imports = [ ../../modules/kernel.nix ];
specialisation = {
nvidia = {
inheritParentConfig = true;
configuration = { custom = { hardware = { nvidia.enable = true; }; }; };
};
amd-gpu = {
inheritParentConfig = true;
configuration = { custom = { hardware = { amd-gpu.enable = true; }; }; };
};
};
custom = {
nftables.enable = true;
cli-tools.enable = true;
nix = {
index.enable = true;
ld.enable = true;
settings.enable = true;
};
hardware = {
firmware.enable = true;
ssd.enable = true;
wooting.enable = true;
};
graphical = {
audio.enable = true;
sddm.enable = true;
nightlight.enable = true;
i3.enable = true;
xfce.enable = true;
shared.enable = true;
games.enable = true;
};
};
mainUser.layout = "de";
mainUser.variant = "";
networking.useDHCP = lib.mkDefault true;
networking.networkmanager.enable = true;
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ehci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos-ssd";
fsType = "ext4";
options = [ "defaults" "noatime" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/7395-0541";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "portable-ssd"; # Define your hostname.
nixpkgs.config.permittedInsecurePackages =
[ "electron-28.3.3" "electron-27.3.11" ];
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
git
];
system.stateVersion = "24.11"; # Did you read the comment?
}