It builds!

This commit is contained in:
2024-10-18 10:57:09 -05:00
parent a11206680a
commit 0153012f90
11 changed files with 206 additions and 389 deletions

34
flake.lock generated
View File

@@ -215,11 +215,11 @@
"locked": {
"lastModified": 1,
"narHash": "sha256-SakyZnAhoToQmui5hozmLqkoLw6N/AHCgKF4tCP/sTQ=",
"path": "/nix/store/89k9izijgzj6cxvn6rmjmyf06a60s5wq-source/disko",
"path": "/nix/store/nb4nq461dir7sa4g5jc1s61k5qfflamx-source/disko",
"type": "path"
},
"original": {
"path": "/nix/store/89k9izijgzj6cxvn6rmjmyf06a60s5wq-source/disko",
"path": "/nix/store/nb4nq461dir7sa4g5jc1s61k5qfflamx-source/disko",
"type": "path"
}
},
@@ -1029,11 +1029,11 @@
"locked": {
"lastModified": 1,
"narHash": "sha256-7ipphehm+qDglyyFxGz2ZYf9uNbXCohPCFAGSI2QMb8=",
"path": "/nix/store/89k9izijgzj6cxvn6rmjmyf06a60s5wq-source/impermanence",
"path": "/nix/store/nb4nq461dir7sa4g5jc1s61k5qfflamx-source/impermanence",
"type": "path"
},
"original": {
"path": "/nix/store/89k9izijgzj6cxvn6rmjmyf06a60s5wq-source/impermanence",
"path": "/nix/store/nb4nq461dir7sa4g5jc1s61k5qfflamx-source/impermanence",
"type": "path"
}
},
@@ -1059,11 +1059,11 @@
"locked": {
"lastModified": 1,
"narHash": "sha256-jR1BIfyY+rRVIZkzMOT5PK5PLvH5hoWwviq0GE6pY4w=",
"path": "/nix/store/86dqmj7f0b6w0qcik01h0pkj55kxxcxi-source/home",
"path": "/nix/store/h9gv682ppvibhvnvjgxx58acg6342lin-source/home",
"type": "path"
},
"original": {
"path": "/nix/store/86dqmj7f0b6w0qcik01h0pkj55kxxcxi-source/home",
"path": "/nix/store/h9gv682ppvibhvnvjgxx58acg6342lin-source/home",
"type": "path"
}
},
@@ -1202,8 +1202,8 @@
"nixpkgs_11": {
"locked": {
"lastModified": 0,
"narHash": "sha256-9/79hjQc9+xyH+QxeMcRsA6hDyw6Z9Eo1/oxjvwirLk=",
"path": "/nix/store/s9hbmmf7hgg7imnm5q6ny7gznbh0amfy-source",
"narHash": "sha256-dOymOQ3AfNI4Z337yEwHGohrVQb4yPODCW9MDUyAc4w=",
"path": "/nix/store/m1szqwijms610n6325mwjswslha4nd92-source",
"type": "path"
},
"original": {
@@ -1449,11 +1449,11 @@
"locked": {
"lastModified": 1,
"narHash": "sha256-6oCDKhDSqJMWeODXDHD5XorN7/+KXBBIPZ2z+obwUNY=",
"path": "/nix/store/89k9izijgzj6cxvn6rmjmyf06a60s5wq-source/packages",
"path": "/nix/store/nb4nq461dir7sa4g5jc1s61k5qfflamx-source/packages",
"type": "path"
},
"original": {
"path": "/nix/store/89k9izijgzj6cxvn6rmjmyf06a60s5wq-source/packages",
"path": "/nix/store/nb4nq461dir7sa4g5jc1s61k5qfflamx-source/packages",
"type": "path"
}
},
@@ -1539,11 +1539,11 @@
"locked": {
"lastModified": 1,
"narHash": "sha256-hg0wqQn6BxQXLmfBINzZoaWpdSIlwwZxKbYz+4df83o=",
"path": "/nix/store/89k9izijgzj6cxvn6rmjmyf06a60s5wq-source/programs",
"path": "/nix/store/nb4nq461dir7sa4g5jc1s61k5qfflamx-source/programs",
"type": "path"
},
"original": {
"path": "/nix/store/89k9izijgzj6cxvn6rmjmyf06a60s5wq-source/programs",
"path": "/nix/store/nb4nq461dir7sa4g5jc1s61k5qfflamx-source/programs",
"type": "path"
}
},
@@ -1670,11 +1670,11 @@
"locked": {
"lastModified": 1,
"narHash": "sha256-Iek5h97Tc3MjuiLMbHC+K1bOk8QO5UCC5ZXG46erGzc=",
"path": "/nix/store/89k9izijgzj6cxvn6rmjmyf06a60s5wq-source/services",
"path": "/nix/store/nb4nq461dir7sa4g5jc1s61k5qfflamx-source/services",
"type": "path"
},
"original": {
"path": "/nix/store/89k9izijgzj6cxvn6rmjmyf06a60s5wq-source/services",
"path": "/nix/store/nb4nq461dir7sa4g5jc1s61k5qfflamx-source/services",
"type": "path"
}
},
@@ -1688,12 +1688,12 @@
},
"locked": {
"lastModified": 1,
"narHash": "sha256-018njfcELpo3GgfVxqyj0v/QNA5lBV7jdWlTQOzK8Ww=",
"path": "/nix/store/86dqmj7f0b6w0qcik01h0pkj55kxxcxi-source/system",
"narHash": "sha256-MHLXxQGzz62LRi8jmBQESoeCfH3BKGBOWplfb3UFFTU=",
"path": "/nix/store/h9gv682ppvibhvnvjgxx58acg6342lin-source/system",
"type": "path"
},
"original": {
"path": "/nix/store/86dqmj7f0b6w0qcik01h0pkj55kxxcxi-source/system",
"path": "/nix/store/h9gv682ppvibhvnvjgxx58acg6342lin-source/system",
"type": "path"
}
},

View File

@@ -29,7 +29,7 @@
bonus = null;
};
in rec {
in {
inputs.home-manager.useGlobalPkgs = true;
nixosConfigurations.${host} = nixpkgs.lib.nixosSystem {
@@ -101,13 +101,13 @@
};
})
inputs.system.nixosModule
inputs.home-manager.nixosModules.home-manager
core_inputs.system.nixosModule
core_inputs.home-manager.nixosModules.home-manager
];
};
packages.${iso_system}.default = nixosConfigurations.iso.config.system.build.isoImage;
packages.${iso_system}.default = self.nixosConfigurations.iso.config.system.build.isoImage;
homeConfigurations."nathan" = core_inputs.home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {

View File

@@ -1,291 +0,0 @@
# 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 = false;
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;
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. Its 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?
}

View File

@@ -4,7 +4,6 @@
./generic
./laptop
./homebox
./hardware-configuration.nix
];
sysconfig.laptop.enable = lib.mkDefault false;

View File

@@ -1,6 +1,6 @@
{ config, lib, ... }: {
options.sysconfig.generic.enable = {
options.sysconfig.generic.enable = lib.options.mkOption {
type = lib.types.bool;
default = true;
};

View File

@@ -6,8 +6,9 @@
{
options = {
sysconfig.homebox.enable = lib.mkEnableOption "uses homebox config";
options.sysconfig.homebox.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.sysconfig.homebox.enable {

View File

@@ -2,70 +2,215 @@
# 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, core_inputs, ... }:
{ config, lib, pkgs, ... }:
{
options = {
sysconfig.laptop.enable = lib.mkEnableOption "uses laptop config";
#imports = [ ./hardware-configuration.nix ];
options.sysconfig.laptop.enable = lib.options.mkOption {
type = lib.types.bool;
};
config = lib.mkIf config.sysconfig.laptop.enable {
assertions = [
{
assertion = !config.sysconfig.homebox.enable;
message = "sysconfig laptop conflicts with homebox";
}
];
sysconfig.generic.enable = lib.mkForce false;
nixpkgs.config.allowUnfree = true;
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
};
# 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;
extraPackages = with pkgs; [
nvidia-vaapi-driver
];
};
nvidia = {
modesetting.enable = true;
open = false; #suspend fails with open drivers
powerManagement.enable = true;
powerManagement.finegrained = false;
open = false;
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";
# #sync.enable = true;
# 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;
};
services = {
xserver = {
# Enable the X11 windowing system.
services.xserver = {
enable = true;
videoDrivers = ["nvidia"];
};
displayManager.enable = true;
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;
};
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;
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;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# 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
];
# 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. Its 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?
};
}

View File

@@ -1,39 +0,0 @@
# 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;
}

View File

@@ -1,11 +1,11 @@
{ config, lib, core_inputs, ... }: {
options.sysconfig.firstBoot = lib.options.mkOption {
options.sysconfig.opts.firstBoot = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.sysconfig.firstBoot {
config = lib.mkIf config.sysconfig.opts.firstBoot {
users.users.${core_inputs.user} = {
initialPassword = "7567";

View File

@@ -20,11 +20,13 @@
nixosModule = { config, lib, pkgs, core_inputs, ... }: {
imports = [
./configuration
./hardware-configuration.nix
# inputs.diskoConfig.module
# inputs.impermanenceConfig.module
inputs.srvcs.module
inputs.pckgs.module
inputs.prgms.module
./first_boot
];
options = {