feat(nixos): Bootstrapping nyx :)
This commit is contained in:
parent
01532dc425
commit
f1490bebf3
5 changed files with 120 additions and 34 deletions
|
@ -1,25 +1,6 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
{lib, ...}: let
|
||||
inherit (lib.marleyos) enabled;
|
||||
in {
|
||||
imports = [./autorandr.nix];
|
||||
|
||||
home.keyboard.options = ["apple:alupckeys"];
|
||||
|
||||
# FIXME: Remove once we are on NixOS
|
||||
targets.genericLinux = enabled;
|
||||
|
||||
# FIXME: Remove this once nvim is set up
|
||||
home.packages = with pkgs; [
|
||||
alejandra
|
||||
nil
|
||||
statix
|
||||
manix
|
||||
];
|
||||
|
||||
marleyos = {
|
||||
isDesktop = true;
|
||||
nixGL = enabled;
|
||||
|
@ -74,10 +55,10 @@ in {
|
|||
# kanata = enabled;
|
||||
syncthing = enabled;
|
||||
};
|
||||
xorg = {
|
||||
xsession = enabled;
|
||||
i3 = enabled;
|
||||
};
|
||||
#xorg = {
|
||||
# xsession = enabled;
|
||||
# i3 = enabled;
|
||||
#};
|
||||
};
|
||||
|
||||
home.stateVersion = "24.05";
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
pkgs,
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
nix = {
|
||||
package = pkgs.lix;
|
||||
package = lib.mkForce pkgs.lix;
|
||||
|
||||
# Pin system <nixpkgs> to flake nixpkgs version.
|
||||
# i.e. for use in pkgs = import <nixpkgs> {}.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
_: {
|
||||
programs.autorandr = {
|
||||
services.autorandr = {
|
||||
enable = true;
|
||||
|
||||
profiles = {
|
||||
|
@ -16,10 +16,6 @@ _: {
|
|||
mode = "1920x1200";
|
||||
position = "0x0";
|
||||
rate = "59.95";
|
||||
extraConfig = # sh
|
||||
''
|
||||
x-prop-non_desktop 0
|
||||
'';
|
||||
};
|
||||
"HDMI-0" = {
|
||||
enable = true;
|
||||
|
@ -27,10 +23,6 @@ _: {
|
|||
mode = "1680x1050";
|
||||
position = "1920x0";
|
||||
rate = "59.97";
|
||||
extraConfig = # sh
|
||||
''
|
||||
x-prop-non_desktop 0
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
71
systems/x86_64-linux/nyx/default.nix
Normal file
71
systems/x86_64-linux/nyx/default.nix
Normal file
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.marleyos) enabled;
|
||||
in {
|
||||
imports = [./hardware-configuration.nix ./autorandr.nix];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "nyx";
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
|
||||
displayManager.lightdm.enable = true;
|
||||
desktopManager.deepin.enable = true;
|
||||
|
||||
xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
};
|
||||
|
||||
printing.enable = true;
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.marley = {
|
||||
isNormalUser = true;
|
||||
description = "Marley Rae";
|
||||
extraGroups = ["networkmanager" "wheel"];
|
||||
};
|
||||
|
||||
programs.firefox.enable = true;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = [pkgs.vim pkgs.git];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
41
systems/x86_64-linux/nyx/hardware-configuration.nix
Normal file
41
systems/x86_64-linux/nyx/hardware-configuration.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
# 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" "usb_storage" "uas" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/7c6b8929-607a-4c3c-bf1f-93c78854f48e";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/492C-D0DF";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/327c1e55-b66b-4751-816a-b39610658a2b"; }
|
||||
];
|
||||
|
||||
# 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.enp4s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
Loading…
Reference in a new issue