mirror of
https://github.com/kmein/niveum
synced 2026-03-20 20:01:08 +01:00
chore: move configs to system directories
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
# 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, pkgs, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) retiolumAddresses;
|
||||
@@ -9,25 +5,10 @@ in
|
||||
{
|
||||
imports = [ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./hdmi.nix
|
||||
<niveum/configs/default.nix>
|
||||
<niveum/configs/battery.nix>
|
||||
<niveum/configs/wpa_supplicant.nix>
|
||||
{
|
||||
programs.steam.enable = true;
|
||||
nixpkgs.config.steam.java = true;
|
||||
}
|
||||
{
|
||||
services.xserver.displayManager.sessionCommands =
|
||||
let
|
||||
intern = "LVDS-1";
|
||||
extern = "HDMI-1";
|
||||
pulseaudioCard = "alsa_card.pci-0000_00_1b.0";
|
||||
pulseaudioProfile = "output:hdmi-stereo+input:analog-stereo";
|
||||
in toString (pkgs.writers.writeDash "hdmi-on" ''
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --output ${intern} --primary --auto --output ${extern} --above ${intern} --auto
|
||||
${pkgs.pulseaudio}/bin/pactl set-card-profile ${pulseaudioCard} ${pulseaudioProfile}
|
||||
'');
|
||||
}
|
||||
];
|
||||
|
||||
niveum = {
|
||||
@@ -36,21 +17,17 @@ in
|
||||
promptColours.success = "green";
|
||||
};
|
||||
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces = {
|
||||
enp0s25.useDHCP = true;
|
||||
wlp3s0.useDHCP = true;
|
||||
wwp0s20u4i6.useDHCP = true;
|
||||
networking = {
|
||||
useDHCP = false;
|
||||
interfaces = {
|
||||
enp0s25.useDHCP = true;
|
||||
wlp3s0.useDHCP = true;
|
||||
wwp0s20u4i6.useDHCP = true;
|
||||
};
|
||||
wireless.interfaces = [ "wlp3s0" ];
|
||||
retiolum = retiolumAddresses.manakish;
|
||||
networking.hostName = "manakish";
|
||||
};
|
||||
networking.wireless.interfaces = [ "wlp3s0" ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git vim
|
||||
];
|
||||
|
||||
networking.retiolum = retiolumAddresses.manakish;
|
||||
|
||||
networking.hostName = "manakish";
|
||||
|
||||
system.stateVersion = "20.09"; # Did you read the comment?
|
||||
}
|
||||
|
||||
@@ -1,40 +1,37 @@
|
||||
# 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")
|
||||
];
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
kernelModules = [];
|
||||
luks.devices."crypted".device = "/dev/disk/by-uuid/493cb228-c292-4f71-9f38-dcb3e96dec47";
|
||||
};
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
extraModulePackages = [ ];
|
||||
loader.grub = {
|
||||
enable = true;
|
||||
version = 2;
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
device = "/dev/sda";
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/ff47c479-e6d4-4cd6-93f1-9685f4018bc6";
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/ff47c479-e6d4-4cd6-93f1-9685f4018bc6";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/493cb228-c292-4f71-9f38-dcb3e96dec47";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/D4AC-91B0";
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/D4AC-91B0";
|
||||
fsType = "vfat";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
zramSwap.enable = true;
|
||||
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
version = 2;
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
device = "/dev/sda";
|
||||
};
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
}
|
||||
|
||||
13
systems/manakish/hdmi.nix
Normal file
13
systems/manakish/hdmi.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.xserver.displayManager.sessionCommands =
|
||||
let
|
||||
intern = "LVDS-1";
|
||||
extern = "HDMI-1";
|
||||
pulseaudioCard = "alsa_card.pci-0000_00_1b.0";
|
||||
pulseaudioProfile = "output:hdmi-stereo+input:analog-stereo";
|
||||
in toString (pkgs.writers.writeDash "hdmi-on" ''
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --output ${intern} --primary --auto --output ${extern} --above ${intern} --auto
|
||||
${pkgs.pulseaudio}/bin/pactl set-card-profile ${pulseaudioCard} ${pulseaudioProfile}
|
||||
'');
|
||||
}
|
||||
Reference in New Issue
Block a user