Make device specific configs

This commit is contained in:
insert 2024-04-13 16:27:31 -04:00
parent bcc9cd7e42
commit a2d656577a
Signed by: insert
GPG key ID: A70775C389ACF105
5 changed files with 69 additions and 53 deletions

View file

@ -8,11 +8,7 @@
environment.etc.nixpkgs.source = inputs.nixpkgs; environment.etc.nixpkgs.source = inputs.nixpkgs;
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix /home/insert/Documents/nixos/hardware-configuration.nix
#<home-manager/nixos>
./sunshine.nix
#./home-files.nix
#./flatpak.nix
]; ];
hardware.opengl = { hardware.opengl = {
@ -30,7 +26,6 @@
boot.loader.systemd-boot.configurationLimit = 15; boot.loader.systemd-boot.configurationLimit = 15;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "insertpclinux"; # Define your hostname.
# Enable networking # Enable networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -55,7 +50,6 @@
# Enable the X11 windowing system. # Enable the X11 windowing system.
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.videoDrivers = ["nvidia"];
# Enable the KDE Plasma Desktop Environment. # Enable the KDE Plasma Desktop Environment.
services.xserver.displayManager.sddm.enable = false; services.xserver.displayManager.sddm.enable = false;
services.xserver.desktopManager.plasma5.enable = false; services.xserver.desktopManager.plasma5.enable = false;
@ -70,41 +64,7 @@
''; '';
}; };
#nixpkgs.overlays = [ (self: super: (let
# patched_pkgs = import inputs.nixpkgs_patched {
# inherit (self) system;
# config.allowUnfree = true;
# };
# in {
# linuxPackages = patched_pkgs.linuxPackages;
# })) ];
#boot.kernelPackages = pkgs.linuxPackages;
hardware.nvidia = {
# Modesetting is needed most of the time
modesetting.enable = true;
# Enable power management (do not disable this unless you have a reason to).
# Likely to cause problems on laptops and with screen tearing if disabled.
powerManagement.enable = true;
# Use the open source version of the kernel module ("nouveau")
# Note that this offers much lower performance and does not
# support all the latest Nvidia GPU features.
# You most likely don't want this.
# Only available on driver 515.43.04+
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.production;
};
# Configure keymap in X11 # Configure keymap in X11
services.xserver = { services.xserver = {
layout = "us"; layout = "us";
@ -144,18 +104,12 @@
options = "--delete-older-than 10d"; options = "--delete-older-than 10d";
}; };
#programs.zsh.enable = true; #programs.zsh.enable = true;
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
services.flatpak.enable = true; services.flatpak.enable = true;
users.users.insert = { users.users.insert = {
isNormalUser = true; isNormalUser = true;
description = "insert"; description = "insert";
extraGroups = [ "networkmanager" "wheel" "input" "docker" "libvirtd" ]; extraGroups = [ "networkmanager" "wheel" "input" "docker" "libvirtd" ];
#shell = pkgs.zsh; #shell = pkgs.zsh;
packages = with pkgs; [
firefox
kate
];
}; };
programs.waybar = { programs.waybar = {
@ -203,10 +157,6 @@
monocraft monocraft
]; ];
security.pki.certificateFiles = [
/home/insert/Documents/nextcloud/nextcloudinternal.pem
/home/insert/Documents/personal-vaultwarden/cert.pem
];
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget

View file

@ -16,6 +16,22 @@
outputs = { nixpkgs, flatpaks, agenix, home-manager, ... } @ inputs: { outputs = { nixpkgs, flatpaks, agenix, home-manager, ... } @ inputs: {
nixosConfigurations.insertpclinux = nixpkgs.lib.nixosSystem { nixosConfigurations.insertpclinux = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
flatpaks.nixosModules.default
./configuration.nix
./special/insertpclinux.nix
agenix.nixosModules.default
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.insert = import /home/insert/Documents/nixos/home.nix;
}
];
};
nixosConfigurations.insertlaptop = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
flatpaks.nixosModules.default flatpaks.nixosModules.default

View file

@ -9,6 +9,8 @@
pkgs.git pkgs.git
pkgs.fluffychat pkgs.fluffychat
pkgs.cinny-desktop pkgs.cinny-desktop
pkgs.firefox
pkgs.kate
pkgs.libsForQt5.lightly pkgs.libsForQt5.lightly
pkgs.pfetch pkgs.pfetch
pkgs.git-credential-oauth pkgs.git-credential-oauth

48
special/insertpclinux.nix Normal file
View file

@ -0,0 +1,48 @@
{ inputs, config, lib, pkgs, ... }:
{
environment.etc.nixpkgs.source = inputs.nixpkgs;
imports = [ ./sunshine.nix ];
networking.hostName = "insertpclinux";
services.xserver.videoDrivers = ["nvidia"];
#nixpkgs.overlays = [ (self: super: (let
# patched_pkgs = import inputs.nixpkgs_patched {
# inherit (self) system;
# config.allowUnfree = true;
# };
# in {
# linuxPackages = patched_pkgs.linuxPackages;
# })) ];
#boot.kernelPackages = pkgs.linuxPackages;
hardware.nvidia = {
# Modesetting is needed most of the time
modesetting.enable = true;
# Enable power management (do not disable this unless you have a reason to).
# Likely to cause problems on laptops and with screen tearing if disabled.
powerManagement.enable = true;
# Use the open source version of the kernel module ("nouveau")
# Note that this offers much lower performance and does not
# support all the latest Nvidia GPU features.
# You most likely don't want this.
# Only available on driver 515.43.04+
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.production;
};
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
security.pki.certificateFiles = [
/home/insert/Documents/nextcloud/nextcloudinternal.pem
/home/insert/Documents/personal-vaultwarden/cert.pem
];
}