feat: add computer "toothless"
This commit is contained in:
parent
8dd5ce867a
commit
cdeffe8308
5 changed files with 182 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +1,6 @@
|
||||||
**/*~
|
**/*~
|
||||||
**/#*.*#
|
**/#*.*#
|
||||||
**/.#*.*
|
**/.#*.*
|
||||||
|
|
||||||
|
**/.pre-commit-config.yaml
|
||||||
|
**/result
|
||||||
|
|
83
computers/toothless/default.nix
Normal file
83
computers/toothless/default.nix
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./disks.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.loader = {
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
console = {
|
||||||
|
font = "Lat2-Terminus16";
|
||||||
|
keyMap = "us";
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
displayManager.sddm = {
|
||||||
|
wayland = {
|
||||||
|
enable = true;
|
||||||
|
compositor = "kwin";
|
||||||
|
};
|
||||||
|
extraPackages = [
|
||||||
|
pkgs.where-is-my-sddm-theme
|
||||||
|
];
|
||||||
|
enable = true;
|
||||||
|
theme = "where_is_my_sddm_theme";
|
||||||
|
};
|
||||||
|
|
||||||
|
desktopManager.plasma6 = {
|
||||||
|
enable = true;
|
||||||
|
enableQt5Integration = false;
|
||||||
|
notoPackage = pkgs.noto-fonts-lgc-plus;
|
||||||
|
};
|
||||||
|
|
||||||
|
pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
wireplumber.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
xserver.xkb = {
|
||||||
|
layout = "us";
|
||||||
|
options = "eurosign:e,ctrl:nocaps";
|
||||||
|
};
|
||||||
|
|
||||||
|
libinput.enable = true;
|
||||||
|
openssh.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
user = {
|
||||||
|
name = "Artur Manuel";
|
||||||
|
email = "balkenix@outlook.com";
|
||||||
|
signingKey = "~/.ssh/id_ed25519";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
neovim.enable = true;
|
||||||
|
chromium.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = builtins.attrValues {
|
||||||
|
inherit
|
||||||
|
(pkgs)
|
||||||
|
nil
|
||||||
|
statix
|
||||||
|
deadnix
|
||||||
|
chromium
|
||||||
|
alejandra
|
||||||
|
wget
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
time.timeZone = "Europe/London";
|
||||||
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
|
system.stateVersion = "24.11";
|
||||||
|
}
|
67
computers/toothless/disks.nix
Normal file
67
computers/toothless/disks.nix
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
{
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
main = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/disk/by-id/nvme-WDC_PC_SN520_SDAPNUW-256G-1014_20270F804683";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
ESP = {
|
||||||
|
size = "512M";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = ["defaults"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
luks = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "luks";
|
||||||
|
name = "utero";
|
||||||
|
passwordFile = "/tmp/secret.key"; # Interactive
|
||||||
|
settings = {
|
||||||
|
allowDiscards = true;
|
||||||
|
};
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = ["-f"];
|
||||||
|
subvolumes = {
|
||||||
|
"/@root" = {
|
||||||
|
mountpoint = "/";
|
||||||
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"/@home" = {
|
||||||
|
mountpoint = "/home";
|
||||||
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"/@nix" = {
|
||||||
|
mountpoint = "/nix";
|
||||||
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"/@swap" = {
|
||||||
|
mountpoint = "/.swapvol";
|
||||||
|
swap.swapfile.size = "8G";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
28
computers/toothless/hardware-configuration.nix
Normal file
28
computers/toothless/hardware-configuration.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# 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" "usbhid" "sd_mod"];
|
||||||
|
boot.initrd.kernelModules = [];
|
||||||
|
boot.kernelModules = ["kvm-amd"];
|
||||||
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
|
# 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.enp8s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
|
@ -10,7 +10,7 @@
|
||||||
modules =
|
modules =
|
||||||
extraModules
|
extraModules
|
||||||
++ [
|
++ [
|
||||||
./computers/${host}
|
../computers/${host}
|
||||||
({config, ...}: {
|
({config, ...}: {
|
||||||
config = {
|
config = {
|
||||||
nix = {
|
nix = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue