♻️ (neodymium/system) move around a lot of code
This commit is contained in:
parent
8449dd8553
commit
1815bf6ea1
|
@ -1,17 +1,11 @@
|
|||
{ pkgs, hyprland, ... }: {
|
||||
imports = [ ./hardware-configuration.nix ./system ];
|
||||
{ pkgs, ... }: {
|
||||
imports = [ ./system ];
|
||||
|
||||
# shorter timeout for systemd services
|
||||
systemd.extraConfig = ''
|
||||
DefaultTimeoutStopSec=10s
|
||||
'';
|
||||
|
||||
# enable thermald
|
||||
services.thermald.enable = true;
|
||||
|
||||
# udev
|
||||
services.udev.packages = [ pkgs.android-udev-rules ];
|
||||
|
||||
services.dbus.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
|
@ -19,27 +13,8 @@
|
|||
extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ];
|
||||
};
|
||||
|
||||
users = {
|
||||
# disable user creation/deletion
|
||||
mutableUsers = false;
|
||||
|
||||
# absolute gigachad
|
||||
users.laurent = {
|
||||
isNormalUser = true;
|
||||
initialPassword = "laurent";
|
||||
extraGroups = [ "wheel" "video" "docker" "adbusers" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
};
|
||||
programs.zsh.enable = true;
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit hyprland; };
|
||||
users.laurent = ./home;
|
||||
};
|
||||
|
||||
# enable gnome virtual file system
|
||||
services.gvfs.enable = true;
|
||||
|
||||
|
@ -49,5 +24,5 @@
|
|||
# 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 = "22.11"; # Did you read the comment?
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
@ -1,42 +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, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" "v4l2loopback" ];
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/b0ea5f1f-104f-4026-840a-4d46f3e827d1";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nixos" ];
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."nixenc".device =
|
||||
"/dev/disk/by-uuid/93d0b0d8-b586-48cf-acc2-025fba1eaadb";
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/6D10-BBAF";
|
||||
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.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
7
hosts/neodymium/system/adb/default.nix
Normal file
7
hosts/neodymium/system/adb/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }: {
|
||||
# udev rules
|
||||
services.udev.packages = [ pkgs.android-udev-rules ];
|
||||
|
||||
# adb users
|
||||
users.users.laurent.extraGroups = [ "adbusers" ];
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }: {
|
||||
{ pkgs, config, ... }: {
|
||||
# support for mounting windaube partitions
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
@ -10,4 +10,11 @@
|
|||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
imports = [ ./lanzaboot.nix ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" "v4l2loopback" ];
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./adb
|
||||
./age
|
||||
./audio
|
||||
./boot
|
||||
|
@ -12,5 +13,6 @@
|
|||
./networking
|
||||
./nix
|
||||
./security
|
||||
./users
|
||||
];
|
||||
}
|
||||
|
|
|
@ -19,10 +19,16 @@
|
|||
# tlp, power management
|
||||
services.tlp.enable = true;
|
||||
|
||||
# thermald, controls temperature
|
||||
services.thermald.enable = true;
|
||||
|
||||
# bluetooth
|
||||
hardware.bluetooth.enable = true;
|
||||
services.blueman.enable = true;
|
||||
|
||||
# backlight intensity
|
||||
programs.light.enable = true;
|
||||
|
||||
# paritions and filesystems
|
||||
imports = [ ./partitions.nix ];
|
||||
}
|
||||
|
|
23
hosts/neodymium/system/hardware/partitions.nix
Normal file
23
hosts/neodymium/system/hardware/partitions.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/b0ea5f1f-104f-4026-840a-4d46f3e827d1";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nixos" ];
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."nixenc".device =
|
||||
"/dev/disk/by-uuid/93d0b0d8-b586-48cf-acc2-025fba1eaadb";
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/6D10-BBAF";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }: {
|
||||
{ lib, ... }: {
|
||||
# set hostname
|
||||
networking.hostName = "neodymium";
|
||||
|
||||
|
@ -13,5 +13,13 @@
|
|||
allowedUDPPorts = [ ];
|
||||
};
|
||||
|
||||
# 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.wlp4s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
imports = [ ./wireguard.nix ];
|
||||
}
|
||||
|
|
|
@ -15,9 +15,6 @@
|
|||
options = "--delete-older-than 30d";
|
||||
};
|
||||
|
||||
# enable unfree
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix.settings = {
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
trusted-public-keys =
|
||||
|
|
28
hosts/neodymium/system/users/default.nix
Normal file
28
hosts/neodymium/system/users/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ pkgs, hyprland, ... }: {
|
||||
# disable user creation/deletion
|
||||
users.mutableUsers = false;
|
||||
|
||||
# setup home-manager
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit hyprland; };
|
||||
};
|
||||
|
||||
# configure users
|
||||
users = {
|
||||
# absolute gigachad
|
||||
users.laurent = {
|
||||
isNormalUser = true;
|
||||
initialPassword = "laurent";
|
||||
extraGroups = [ "wheel" "video" "docker" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
};
|
||||
|
||||
# configure users' home
|
||||
home-manager = {
|
||||
# gigachad's home
|
||||
users.laurent = ../../home;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue