This commit is contained in:
iofq 2023-04-23 23:57:06 -05:00
commit 1a5d89af7a
29 changed files with 911 additions and 0 deletions

15
hosts/configuration.nix Executable file
View file

@ -0,0 +1,15 @@
{ config, pkgs, username, ... }:
{
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
time.timeZone = "America/Chicago";
users.users.${username} = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
};
environment.systemPackages = with pkgs; [
curl
];
system.stateVersion = "22.11"; # Did you read the comment?
}

45
hosts/default.nix Normal file
View file

@ -0,0 +1,45 @@
{ lib, nixpkgs, username, home-manager, ... }:
let
system = "x86_64-linux"; # System architecture
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true; # Allow proprietary software
};
lib = nixpkgs.lib;
in
{
t14 = lib.nixosSystem { # Laptop profile
inherit system;
specialArgs = {
inherit username;
host = {
hostName = "t14";
};
};
modules = [
./configuration.nix
./t14/configuration.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit username;
host = {
hostName = "t14";
};
};
home-manager.users.${username} = {
imports = [
./home.nix
./t14/home.nix
];
};
}
];
};
}

14
hosts/home.nix Executable file
View file

@ -0,0 +1,14 @@
{ username, pkgs, ... }:
{
imports = ( import ../modules/programs );
home = {
inherit username;
stateVersion = "22.11";
packages = with pkgs; [
htop
appimage-run
ripgrep
];
};
xdg.enable = true;
}

25
hosts/t14/configuration.nix Executable file
View file

@ -0,0 +1,25 @@
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./nano.nix
];
networking.hostName = "t14"; # Define your hostname.
environment.systemPackages = with pkgs; [
cryptsetup
];
fonts = {
fonts = with pkgs; [
spleen
];
};
programs.light.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
};
nixpkgs.config.allowUnfree = true;
system.stateVersion = "22.11"; # Did you read the comment?
}

View file

@ -0,0 +1,40 @@
# 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 = [ "nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/f56e8356-3915-4ff8-957c-de7f9a72b326";
fsType = "btrfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/346A-5AF5";
fsType = "vfat";
};
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.enp2s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp7s0f3u2.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;
}

15
hosts/t14/home.nix Executable file
View file

@ -0,0 +1,15 @@
{ username, pkgs, ... }:
{
imports = [
../../modules/wayland
../../modules/librewolf
];
home = {
packages = with pkgs; [
neofetch
discord
signal-desktop
pulseaudio
];
};
}

16
hosts/t14/nano.nix Normal file
View file

@ -0,0 +1,16 @@
{ ... }:
{
services.udev.extraRules = ''
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="2b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="3b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="4b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1807", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1808", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0000", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0004", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="1011", MODE="0660", GROUP="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="1015", MODE="0660", GROUP="plugdev"
'';
}