Initial Commit
This commit is contained in:
297
system/configuration/configuration.nix
Normal file
297
system/configuration/configuration.nix
Normal file
@@ -0,0 +1,297 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
|
||||
|
||||
hardware = {
|
||||
#graphics.enable = true;
|
||||
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
};
|
||||
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
open = true;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
|
||||
prime = {
|
||||
# Make sure to use the correct Bus ID values for your system!
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
# WARNING: sync and offload are mutually exclusive.
|
||||
# You can only pick one!!
|
||||
#sync.enable = true;
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
#enable bluetooth
|
||||
bluetooth.enable = true;
|
||||
|
||||
pulseaudio.enable = false;
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
videoDrivers = ["nvidia"];
|
||||
|
||||
};
|
||||
|
||||
services.displayManager.enable = true;
|
||||
|
||||
services.avahi = {
|
||||
|
||||
enable = true;
|
||||
ipv4 = true;
|
||||
ipv6 = true;
|
||||
openFirewall = true;
|
||||
nssmdns4 = true;
|
||||
wideArea = true;
|
||||
|
||||
};
|
||||
|
||||
#networking
|
||||
|
||||
networking = {
|
||||
hostName = "laptop";
|
||||
|
||||
nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
|
||||
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# nix experimental features
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
substituters = ["https://hyprland.cachix.org"];
|
||||
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
|
||||
};
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.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";
|
||||
};
|
||||
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = {
|
||||
user = {
|
||||
name = "blacknull";
|
||||
email = "nathanblunkall5@gmail.com";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
environment.shells = with pkgs; [ zsh ];
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config.common.default = "*";
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||
};
|
||||
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
package = pkgs.pipewire;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
extraConfig.pipewire-pulse."92-low-latency" = {
|
||||
context.modules = [
|
||||
{
|
||||
name = "libpipewire-module-protocol-pulse";
|
||||
args = {
|
||||
pulse.min.req = "32/48000";
|
||||
pulse.default.req = "32/48000";
|
||||
pulse.max.req = "32/48000";
|
||||
pulse.min.quantum = "32/48000";
|
||||
pulse.max.quantum = "32/48000";
|
||||
};
|
||||
}
|
||||
];
|
||||
stream.properties = {
|
||||
node.latency = "32/48000";
|
||||
resample.quality = 1;
|
||||
};
|
||||
};
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
wireplumber.enable = true;
|
||||
|
||||
};
|
||||
|
||||
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
startWhenNeeded = true;
|
||||
network.port = 6600;
|
||||
network.listenAddress = "127.0.0.1";
|
||||
user = "nathan";
|
||||
musicDirectory = "/home/nathan/Music";
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "Audio1"
|
||||
}
|
||||
audio_output {
|
||||
type "fifo"
|
||||
name "visualizer"
|
||||
path "/tmp/mpd.fifo"
|
||||
format "44100:16:1"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.mpd.environment = {
|
||||
XDG_RUNTIME_DIR = "/run/user/1000";
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
programs.adb.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.nathan = {
|
||||
isNormalUser = true;
|
||||
description = "Nathan";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"adbusers"
|
||||
#school?
|
||||
"plugdev"
|
||||
];
|
||||
# packages supplied by home-manager
|
||||
};
|
||||
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
programs.zsh.enable = true;
|
||||
|
||||
home-manager.backupFileExtension = ".backup";
|
||||
home-manager.users = {
|
||||
root = inputs.root.homeManagerModule;
|
||||
# nathan = inputs.nathan.homeManagerModule;
|
||||
};
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
flake = "/home/nathan/.nixos";
|
||||
|
||||
clean = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
extraArgs = "--keep 5 --keep-since 3d";
|
||||
};
|
||||
};
|
||||
|
||||
# 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.
|
||||
# gstreamer
|
||||
gst_all_1.gstreamer
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-good
|
||||
gst_all_1.gst-plugins-bad
|
||||
gst_all_1.gst-plugins-ugly
|
||||
|
||||
];
|
||||
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
nerdfonts
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
#networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
#networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
39
system/configuration/hardware-configuration.nix
Normal file
39
system/configuration/hardware-configuration.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/78c0964d-c09e-4e31-8a73-eb719d79917a";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/AE5E-AC86";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
20
system/flake.nix
Executable file
20
system/flake.nix
Executable file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
description = "Unified System Configuration";
|
||||
|
||||
inputs = {
|
||||
|
||||
sddm.url = "./sddm";
|
||||
};
|
||||
|
||||
outputs = { self, sddm, ... }@inputs: {
|
||||
|
||||
nixosModule = { config, lib, pkgs, inputs, ... }: {
|
||||
imports = [
|
||||
./configuration/configuration.nix
|
||||
sddm.module
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
33
system/sddm/flake.nix
Normal file
33
system/sddm/flake.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
description = "sddm config";
|
||||
|
||||
inputs = {
|
||||
|
||||
theme.url = "./themes/tokyo-night";
|
||||
|
||||
};
|
||||
|
||||
outputs = { self, ... }@inputs: {
|
||||
|
||||
module = { config, lib, pkgs, ... }: {
|
||||
|
||||
imports = [];
|
||||
|
||||
qt.enable = true;
|
||||
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
autoNumlock = true;
|
||||
theme = "${inputs.theme.theme { inherit pkgs; }}";
|
||||
enableHidpi = true;
|
||||
extraPackages = with pkgs; [
|
||||
libsForQt5.qtsvg
|
||||
libsForQt5.qtquickcontrols2
|
||||
libsForQt5.qtgraphicaleffects
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
29
system/sddm/themes/sugar-dark/flake.nix
Normal file
29
system/sddm/themes/sugar-dark/flake.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
description = "Package Sugar Dark SDDM theme";
|
||||
|
||||
inputs = {
|
||||
|
||||
repo = {
|
||||
url = "github:MarianArlt/sddm-sugar-dark";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
outputs = { self, repo, ... }: {
|
||||
|
||||
theme = { pkgs }: pkgs.stdenv.mkDerivation {
|
||||
|
||||
name = "sugar-dark";
|
||||
|
||||
src = repo;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -R $src/* $out/
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
29
system/sddm/themes/tokyo-night/flake.nix
Normal file
29
system/sddm/themes/tokyo-night/flake.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
description = "Package Tokyo Night SDDM theme";
|
||||
|
||||
inputs = {
|
||||
|
||||
repo = {
|
||||
url = "github:siddrs/tokyo-night-sddm";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
outputs = { self, repo, ... }: {
|
||||
|
||||
theme = { pkgs }: pkgs.stdenv.mkDerivation {
|
||||
|
||||
name = "tokyo-night";
|
||||
|
||||
src = repo;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -R $src/* $out/
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user