initial commit
This commit is contained in:
parent
93df78333e
commit
5634b9aecf
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
hardware-configuration.nix
|
||||
flake.lock
|
||||
result/
|
34
application-configuration.nix
Normal file
34
application-configuration.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
nixpkgs.config.allowBroken = true;
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
"obsidian"
|
||||
|
||||
"minecraft-launcher"
|
||||
|
||||
"steam-run"
|
||||
"steam-original"
|
||||
"steam"
|
||||
|
||||
"nvidia-x11"
|
||||
"nvidia-settings"
|
||||
];
|
||||
|
||||
users.users.caleb.packages = with pkgs; [
|
||||
minecraft
|
||||
firefox
|
||||
keepassxc
|
||||
obsidian
|
||||
qalculate-qt
|
||||
isoimagewriter
|
||||
libreoffice-qt
|
||||
polymc
|
||||
signal-desktop
|
||||
tor-browser-bundle-bin
|
||||
yubikey-manager-qt
|
||||
];
|
||||
|
||||
services.pcscd.enable = true;
|
||||
|
||||
programs.steam.enable = true;
|
||||
}
|
10
bootloader-configuration.nix
Normal file
10
bootloader-configuration.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
{
|
||||
boot = {
|
||||
kernelParams = [ "quiet" ];
|
||||
loader = {
|
||||
timeout = 0;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
}
|
92
configuration.nix
Normal file
92
configuration.nix
Normal file
|
@ -0,0 +1,92 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./application-configuration.nix
|
||||
./bootloader-configuration.nix
|
||||
./hardware-configuration.nix
|
||||
./networking-configuration.nix
|
||||
./power-configuration.nix
|
||||
./zephyrus-configuration.nix
|
||||
];
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
};
|
||||
|
||||
# Enable the kde plasma
|
||||
services = {
|
||||
xserver.enable = true;
|
||||
desktopManager.plasma6.enable = true;
|
||||
displayManager.sddm = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Enable sound
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Define a user account.
|
||||
users.users.caleb = {
|
||||
isNormalUser = true;
|
||||
description = "caleb";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
hashedPassword = "$y$j9T$v6EDyPW8C/K.Th4xg8MHL/$tA67k6U0kLtafTNNW2DM7j.xObjPSaZFQ4e/beBX7g2";
|
||||
};
|
||||
|
||||
# disable sudo password for wheel
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
appimage-run
|
||||
git
|
||||
protontricks
|
||||
steam-run
|
||||
winetricks
|
||||
wineWowPackages.stable
|
||||
vim
|
||||
wget
|
||||
];
|
||||
|
||||
# Enable CUPS printing
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.brlaser ];
|
||||
};
|
||||
|
||||
# enable flakes
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
52
flake.nix
Normal file
52
flake.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
# secure boot
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v0.4.1";
|
||||
|
||||
# Optional but recommended to limit the size of your system closure.
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# polymc
|
||||
polymc.url = "github:PolyMC/PolyMC";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, lanzaboote, polymc, ... }: {
|
||||
nixosConfigurations = {
|
||||
laptop = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
|
||||
modules = [
|
||||
./configuration.nix
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
|
||||
({ pkgs, lib, ... }: {
|
||||
environment.systemPackages = [
|
||||
# For debugging and troubleshooting Secure Boot.
|
||||
pkgs.sbctl
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [ polymc.overlay ];
|
||||
|
||||
# Lanzaboote currently replaces the systemd-boot module.
|
||||
# This setting is usually set to true in configuration.nix
|
||||
# generated at installation time. So we force it to false
|
||||
# for now.
|
||||
boot = {
|
||||
initrd.systemd.enable = true;
|
||||
loader.systemd-boot.enable = lib.mkForce false;
|
||||
|
||||
lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
15
networking-configuration.nix
Normal file
15
networking-configuration.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# Enable networking and bluetooth
|
||||
networking = {
|
||||
hostName = "laptop";
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
wifi.macAddress = "random";
|
||||
};
|
||||
};
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
# Enable tailscale
|
||||
services.tailscale.enable = true;
|
||||
}
|
6
power-configuration.nix
Normal file
6
power-configuration.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
#powerManagement.powertop.enable = true;
|
||||
|
||||
boot.kernelParams = [ "vm.dirty_writeback_centisecs=1500" ];
|
||||
}
|
47
zephyrus-configuration.nix
Normal file
47
zephyrus-configuration.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
# Configure basic system settings:
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelParams = [
|
||||
"mem_sleep_default=deep"
|
||||
"pcie_aspm.policy=powersupersave"
|
||||
];
|
||||
};
|
||||
|
||||
# Enable asus tools
|
||||
services = {
|
||||
supergfxd.enable = true;
|
||||
asusd = {
|
||||
enable = true;
|
||||
enableUserService = true;
|
||||
};
|
||||
fwupd.enable = true;
|
||||
};
|
||||
|
||||
# Enable Open GL and Nvidia
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
finegrained = true;
|
||||
};
|
||||
nvidiaSettings = true;
|
||||
prime = {
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
amdgpuBusId = "PCI:101:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user