Rename opti to plexy
This commit is contained in:
parent
edf361f212
commit
4039b069cc
5 changed files with 195 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
description = "Opti NixOS Flake";
|
description = "Wekuz's NixOS config";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||||
|
|
@ -17,15 +17,15 @@
|
||||||
|
|
||||||
outputs = { nixpkgs, home-manager, disko, ... }: {
|
outputs = { nixpkgs, home-manager, disko, ... }: {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
opti = nixpkgs.lib.nixosSystem {
|
plexy = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/opti
|
./hosts/plexy
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.wekuz = import ./hosts/opti/home.nix;
|
home-manager.users.wekuz = import ./hosts/plexy/home.nix;
|
||||||
}
|
}
|
||||||
disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
];
|
];
|
||||||
|
|
|
||||||
76
hosts/plexy/default.nix
Normal file
76
hosts/plexy/default.nix
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./hardware-configuration.nix ./disko-config.nix ];
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
package = pkgs.nixVersions.stable;
|
||||||
|
|
||||||
|
optimise.automatic = true;
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 2w";
|
||||||
|
};
|
||||||
|
settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
|
extraOptions = ''
|
||||||
|
min-free = 512000000
|
||||||
|
max-free = 2000000000
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.loader = {
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
timeout = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
|
|
||||||
|
hardware.graphics = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [ intel-media-driver intel-vaapi-driver ];
|
||||||
|
};
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Tallinn";
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "plexy";
|
||||||
|
networkmanager.enable = true;
|
||||||
|
nftables.enable = true;
|
||||||
|
firewall.allowedTCPPorts = [ 22 80 443 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings.PasswordAuthentication = false;
|
||||||
|
settings.PermitRootLogin = "no";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation = {
|
||||||
|
docker = {
|
||||||
|
enable = true;
|
||||||
|
autoPrune = {
|
||||||
|
enable = true;
|
||||||
|
dates = "weekly";
|
||||||
|
randomizedDelaySec = "30min";
|
||||||
|
flags = [ "--all" "--volumes" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.variables.EDITOR = "nvim";
|
||||||
|
|
||||||
|
users.users.wekuz = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" "networkmanager" "docker" ];
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBs3aPxyJpVGytuVSO3va2WybKNFMR241o8DCJQbBEWV"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
}
|
||||||
50
hosts/plexy/disko-config.nix
Normal file
50
hosts/plexy/disko-config.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
{
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
main = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/disk/by-id/nvme-eui.00000000000000000c82d58020000000";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
boot = {
|
||||||
|
size = "500M";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
primary = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = [ "-f" ]; # Override existing partition
|
||||||
|
subvolumes = {
|
||||||
|
"/rootfs" = {
|
||||||
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
|
mountpoint = "/";
|
||||||
|
};
|
||||||
|
"/home" = {
|
||||||
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
|
mountpoint = "/home";
|
||||||
|
};
|
||||||
|
"/home/wekuz" = { };
|
||||||
|
"/nix" = {
|
||||||
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
|
mountpoint = "/nix";
|
||||||
|
};
|
||||||
|
# TODO: /log
|
||||||
|
};
|
||||||
|
|
||||||
|
mountpoint = "/part-root";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
14
hosts/plexy/hardware-configuration.nix
Normal file
14
hosts/plexy/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules =
|
||||||
|
[ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
51
hosts/plexy/home.nix
Normal file
51
hosts/plexy/home.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.username = "wekuz";
|
||||||
|
home.homeDirectory = "/home/wekuz";
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
neofetch
|
||||||
|
|
||||||
|
# Utilities
|
||||||
|
neovim
|
||||||
|
tmux
|
||||||
|
zip
|
||||||
|
xz
|
||||||
|
unzip
|
||||||
|
p7zip
|
||||||
|
zstd
|
||||||
|
ripgrep
|
||||||
|
file
|
||||||
|
which
|
||||||
|
btop
|
||||||
|
ncdu
|
||||||
|
lm_sensors
|
||||||
|
pciutils
|
||||||
|
usbutils
|
||||||
|
smartmontools
|
||||||
|
|
||||||
|
# Networking
|
||||||
|
mtr
|
||||||
|
iperf3
|
||||||
|
wget
|
||||||
|
dnsutils
|
||||||
|
ldns
|
||||||
|
ethtool
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
user = {
|
||||||
|
name = "Wekuz";
|
||||||
|
email = "wekuz@duck.com";
|
||||||
|
};
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh = { enable = true; };
|
||||||
|
|
||||||
|
home.stateVersion = "25.11";
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue