Begin Dendritic rewrite
This commit is contained in:
164
default.nix
164
default.nix
@@ -1,109 +1,112 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
{ self, inputs, ... }: {
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
flake.nixosConfigurations."laptop" = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
|
||||||
{
|
modules = [
|
||||||
|
self.nixosModules.laptop
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
imports = [ # Include the results of the hardware scan.
|
flake.nixosModules.laptop = { config, pkgs, ... }:
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
{
|
||||||
|
|
||||||
boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
|
config = {
|
||||||
|
|
||||||
hardware = {
|
boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
|
||||||
nvidia = {
|
|
||||||
modesetting.enable = true;
|
|
||||||
powerManagement.enable = true;
|
|
||||||
powerManagement.finegrained = true;
|
|
||||||
open = false;
|
|
||||||
nvidiaSettings = true;
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
||||||
|
|
||||||
prime = {
|
hardware = {
|
||||||
|
nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = true;
|
||||||
|
powerManagement.finegrained = true;
|
||||||
|
open = false;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
|
||||||
|
prime = {
|
||||||
# Make sure to use the correct Bus ID values for your system!
|
# Make sure to use the correct Bus ID values for your system!
|
||||||
intelBusId = "PCI:0:2:0";
|
intelBusId = "PCI:0:2:0";
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
# WARNING: sync and offload are mutually exclusive.
|
# WARNING: sync and offload are mutually exclusive.
|
||||||
# You can only pick one!!
|
# You can only pick one!!
|
||||||
#sync.enable = true;
|
#sync.enable = true;
|
||||||
offload = {
|
offload = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableOffloadCmd = true;
|
enableOffloadCmd = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
defaultSopsFile = ./secrets.yaml;
|
defaultSopsFile = ./secrets.yaml;
|
||||||
secrets = {
|
secrets = {
|
||||||
"nathan/pass" = {
|
"nathan/pass" = {
|
||||||
neededForUsers = true;
|
neededForUsers = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
remoteBuildKey = {};
|
remoteBuildKey = {};
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.wyoming.satellite.user = "nathan";
|
|
||||||
|
|
||||||
sysconfig = {
|
|
||||||
|
|
||||||
services = {
|
|
||||||
wyoming = {
|
|
||||||
enable = true;
|
|
||||||
satellite = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
remoteBuildClient = true;
|
services.wyoming.satellite.user = "nathan";
|
||||||
|
|
||||||
users = {
|
sysconfig = {
|
||||||
nathan = {
|
|
||||||
isSuperuser = true;
|
host = "laptop";
|
||||||
extraGroups = [ "networkmanager" ];
|
|
||||||
hashedPasswordFile = config.sops.secrets."nathan/pass".path;
|
services = {
|
||||||
shell = pkgs.zsh;
|
wyoming = {
|
||||||
home-manager = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
standalone = false;
|
satellite = true;
|
||||||
extraModules = [
|
};
|
||||||
{
|
};
|
||||||
homeconfig = {
|
|
||||||
minimal = false;
|
|
||||||
virtual-machines = true;
|
|
||||||
hyprland.enable = true;
|
|
||||||
hyprlock.enable = true;
|
|
||||||
wal.enable = true;
|
|
||||||
mpd.enable = true;
|
|
||||||
hyprpanel.enable = true;
|
|
||||||
calcurse.enable = true;
|
|
||||||
rofi.enable = true;
|
|
||||||
firefox.enable = true;
|
|
||||||
git.enable = true;
|
|
||||||
nh.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
#monitor=eDP-1, addreserved, 40,0,0,0
|
remoteBuildClient = true;
|
||||||
wayland.windowManager.hyprland.extraConfig = ''
|
|
||||||
monitor=eDP-1,1920x1080@60,0x0,1
|
|
||||||
bind = CTRL SHIFT, XF86Launch2, exec, bash -c 'if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then pkexec --user root /nix/var/nix/profiles/system/bin/switch-to-configuration switch; else pkexec --user root /nix/var/nix/profiles/system/specialisation/docked/bin/switch-to-configuration switch; fi'
|
|
||||||
bind = ALT, Escape, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
}
|
users = {
|
||||||
];
|
nathan = {
|
||||||
|
isSuperuser = true;
|
||||||
|
extraGroups = [ "networkmanager" ];
|
||||||
|
hashedPasswordFile = config.sops.secrets."nathan/pass".path;
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
home-manager = {
|
||||||
|
enable = true;
|
||||||
|
standalone = false;
|
||||||
|
extraModules = [
|
||||||
|
{
|
||||||
|
homeconfig = {
|
||||||
|
minimal = false;
|
||||||
|
virtual-machines = true;
|
||||||
|
hyprland.enable = true;
|
||||||
|
hyprlock.enable = true;
|
||||||
|
wal.enable = true;
|
||||||
|
mpd.enable = true;
|
||||||
|
hyprpanel.enable = true;
|
||||||
|
calcurse.enable = true;
|
||||||
|
rofi.enable = true;
|
||||||
|
firefox.enable = true;
|
||||||
|
git.enable = true;
|
||||||
|
nh.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
#monitor=eDP-1, addreserved, 40,0,0,0
|
||||||
|
wayland.windowManager.hyprland.extraConfig = ''
|
||||||
|
monitor=eDP-1,1920x1080@60,0x0,1
|
||||||
|
bind = CTRL SHIFT, XF86Launch2, exec, bash -c 'if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then pkexec --user root /nix/var/nix/profiles/system/bin/switch-to-configuration switch; else pkexec --user root /nix/var/nix/profiles/system/specialisation/docked/bin/switch-to-configuration switch; fi'
|
||||||
|
bind = ALT, Escape, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
@@ -112,7 +115,8 @@
|
|||||||
# this value at the release version of the first install of this system.
|
# this value at the release version of the first install of this system.
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "23.05"; # Did you read the comment?
|
system.stateVersion = "23.05"; # Did you read the comment?
|
||||||
};
|
};
|
||||||
|
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
38
flake.nix
38
flake.nix
@@ -1,38 +0,0 @@
|
|||||||
{
|
|
||||||
|
|
||||||
description = "System Configuration";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
url = "github:nix-community/home-manager/release-25.11";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
olympus = {
|
|
||||||
#url = "git+https://gitea.esotericbytes.com/Blunkall-Technologies/Olympus";
|
|
||||||
url = "git+file:///home/nathan/Projects/Olympus";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
inputs.home-manager.follows = "home-manager";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs, olympus, ... }: let
|
|
||||||
host = "laptop";
|
|
||||||
|
|
||||||
in {
|
|
||||||
|
|
||||||
nixosConfigurations."${host}" = nixpkgs.lib.nixosSystem {
|
|
||||||
|
|
||||||
specialArgs = olympus.inputs;
|
|
||||||
|
|
||||||
modules = [
|
|
||||||
{ sysconfig.host = host; }
|
|
||||||
./configuration.nix
|
|
||||||
olympus.profiles.laptop
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,39 +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, ... }:
|
|
||||||
|
|
||||||
{
|
flake.nixosModules.laptop = { 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 = [ ];
|
imports =
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
boot.extraModulePackages = [ ];
|
];
|
||||||
|
|
||||||
fileSystems."/" =
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||||
{ device = "/dev/disk/by-uuid/78c0964d-c09e-4e31-8a73-eb719d79917a";
|
boot.initrd.kernelModules = [ ];
|
||||||
fsType = "ext4";
|
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user