misc cleanup

This commit is contained in:
Gerg-L 2023-03-28 22:01:50 -04:00
parent 7326e9213e
commit ef9f011e57
9 changed files with 62 additions and 60 deletions

View file

@ -6,7 +6,7 @@
stable.url = "github:NixOS/nixpkgs/nixos-22.11";
#nix 2.14
nix.url = "github:NixOS/nix/70d01bdec1f9e2d9deba8198e99f2ad0a663d08c";
#utilites --maybe flake-parts soon?
#utilites
flake-utils.url = "github:numtide/flake-utils";
nixos-generators = {
url = "github:nix-community/nixos-generators";
@ -25,7 +25,6 @@
url = "github:the-argus/spicetify-nix";
inputs.nixpkgs.follows = "unstable";
};
#my own packages
suckless = {
url = "github:Gerg-L/suckless";
@ -40,7 +39,7 @@
inputs.nixpkgs.follows = "unstable";
};
};
outputs = {
outputs = inputs @ {
self,
unstable,
flake-utils,
@ -48,7 +47,7 @@
nixos-generators,
disko,
...
} @ inputs:
}:
{
nixosConfigurations = {
gerg-desktop = unstable.lib.nixosSystem {
@ -59,7 +58,6 @@
username = "gerg";
};
};
modules = [
disko.nixosModules.disko
(import ./modules inputs)
@ -108,10 +106,13 @@
formatter = pkgs.alejandra;
devShells = rec {
nix = pkgs.mkShell {
packages = with pkgs; [sops nil alejandra deadnix statix];
};
rust = pkgs.mkShell {
packages = with pkgs; [rust-analyzer rustc cargo rustfmt clippy];
packages = [
pkgs.sops
pkgs.nil
pkgs.alejandra
pkgs.deadnix
pkgs.statix
];
};
default = nix;
};

View file

@ -16,7 +16,6 @@ in {
(with pkgs; [
gnome-photos
gnome-tour
gnome-console
gnome-text-editor
gnome-online-accounts
])
@ -48,6 +47,5 @@ in {
desktopManager.gnome.enable = true;
displayManager.defaultSession = "gnome";
};
environment.systemPackages = [pkgs.gnome.gnome-terminal];
};
}

View file

@ -1,33 +1,7 @@
inputs: {
lib,
self,
...
}: {
imports = [(import ./stage2patch.nix inputs)];
environment.etc = {
"issue" = {
text = "[?12l[?25h";
mode = "0444";
};
};
boot = {
blacklistedKernelModules = ["nouveau" "lbm-nouveau" "pcspkr"];
kernelParams = ["fbcon=nodefer" "bgrt_disable" "quiet" "systemd.show_status=false" "rd.udev.log_level=3" "vt.global_cursor_default=0"];
consoleLogLevel = 3;
initrd.verbose = false;
plymouth = {
enable = lib.mkDefault true;
theme = "breeze";
logo = "${self}/misc/nixos.png";
};
loader = {
systemd-boot = {
enable = lib.mkDefault true;
consoleMode = "max";
editor = false;
};
efi.canTouchEfiVariables = lib.mkDefault true;
timeout = 0;
};
};
imports = [
(import ./stage2patch.nix inputs)
(import ./silent.nix inputs)
(import ./misc.nix inputs)
];
}

22
modules/boot/misc.nix Normal file
View file

@ -0,0 +1,22 @@
_: {
self,
lib,
...
}: {
boot = {
plymouth = {
enable = lib.mkDefault true;
theme = "breeze";
logo = "${self}/misc/nixos.png";
};
loader = {
systemd-boot = {
enable = lib.mkDefault true;
consoleMode = "max";
editor = false;
};
efi.canTouchEfiVariables = lib.mkDefault true;
timeout = 0;
};
};
}

14
modules/boot/silent.nix Normal file
View file

@ -0,0 +1,14 @@
_: {
environment.etc = {
"issue" = {
text = "[?12l[?25h";
mode = "0444";
};
};
boot = {
blacklistedKernelModules = ["pcspkr"];
kernelParams = ["fbcon=nodefer" "bgrt_disable" "quiet" "systemd.show_status=false" "rd.udev.log_level=3" "vt.global_cursor_default=0"];
consoleLogLevel = 3;
initrd.verbose = false;
};
}

View file

@ -7,7 +7,6 @@ inputs: {
}: {
imports = [
(import ./prime.nix inputs)
(import ./gaming.nix inputs)
];
disko.devices = import ./disko.nix;
@ -28,9 +27,12 @@ inputs: {
"nvidia-persistenced"
"steam"
"steam-original"
"steam-run"
];
environment.systemPackages = [
pkgs.heroic
pkgs.legendary-gl
pkgs.prismlauncher
pkgs.lutris
pkgs.pcmanfm #file manager
pkgs.librewolf #best browser
pkgs.obs-studio

View file

@ -1,8 +0,0 @@
_: {pkgs, ...}: {
environment.systemPackages = with pkgs; [
heroic
legendary-gl
prismlauncher
lutris
];
}

View file

@ -1,8 +1,4 @@
_: {
config,
pkgs,
...
}: {
_: {config, ...}: {
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.latest;
prime = {
@ -10,7 +6,6 @@ _: {
enable = true;
enableOffloadCmd = true;
};
# sync.enable = true;
amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:0";
};
@ -23,7 +18,6 @@ _: {
modesetting.enable = true;
};
services.xserver = {
videoDrivers = ["nvidia"];
#disable DPMS
monitorSection = ''
Option "DPMS" "false"

View file

@ -40,7 +40,11 @@ inputs: {
videoDrivers = ["nvidia" "amdgpu"];
};
nixpkgs.config.allowUnfree = true;
nixpkgs.allowedUnfree = [
"nvidia-x11"
"steam"
"steam-original"
];
environment.systemPackages = [
pkgs.bitwarden #store stuff
@ -54,6 +58,7 @@ inputs: {
pkgs.ripgrep
pkgs.lutris
pkgs.prismlauncher
pkgs.xautoclick
# wrap webcord to remove state file https://github.com/SpacingBat3/WebCord/issues/360
(pkgs.symlinkJoin {
name = "webcord-wrapper";