add t14 sys platform
This commit is contained in:
parent
b64c85e314
commit
e6a8a66432
71
home/platforms/fabian@t14/default.nix
Normal file
71
home/platforms/fabian@t14/default.nix
Normal file
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
flakes,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./systemd
|
||||
./isolation.nix
|
||||
];
|
||||
|
||||
nix.registry = {
|
||||
"system".to = {
|
||||
type = "path";
|
||||
path = "/home/fabian/nix";
|
||||
};
|
||||
|
||||
"nixpkgs".flake = flakes.nixpkgs;
|
||||
"unstable".flake = flakes.unstable;
|
||||
};
|
||||
|
||||
local = {
|
||||
baseline.enable = true;
|
||||
|
||||
services = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
prompt = "%B[%~] \${vcs_info_msg_0_}%b";
|
||||
};
|
||||
accounts.enable = true;
|
||||
gpg = {
|
||||
enable = true;
|
||||
defaultKey = "7206D8EE2474F3DF18EA876F0EC1691FF8C1A81F";
|
||||
};
|
||||
};
|
||||
|
||||
apps = {
|
||||
terminal.enable = true;
|
||||
neovim.enable = true;
|
||||
gaming.enable = true;
|
||||
yubikey.enable = true;
|
||||
browsers.enable = true;
|
||||
defaultDesktopPack.enable = true;
|
||||
};
|
||||
|
||||
gui = {
|
||||
enable = true;
|
||||
monitors = {
|
||||
eDP-1 = {
|
||||
primary = true;
|
||||
position = "0x0";
|
||||
mode = "1920x1080";
|
||||
rate = "60.00";
|
||||
fingerprint = "00ffffffffffff000dae0a1400000000291d0104a51f11780328659759548e271e505400000001010101010101010101010101010101363680a0703820403020a60035ad10000018000000fe004e3134304843412d4541450a20000000fe00434d4e0a202020202020202020000000fe004e3134304843412d4541450a200002";
|
||||
initialI3Workspace = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
];
|
||||
|
||||
username = "fabian";
|
||||
homeDirectory = "/home/fabian";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
}
|
22
home/platforms/fabian@t14/isolation.nix
Normal file
22
home/platforms/fabian@t14/isolation.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
home.isolation = {
|
||||
enable = true;
|
||||
btrfsSupport = true;
|
||||
defaults = {
|
||||
static = true;
|
||||
bindHome = "home/";
|
||||
persist = {
|
||||
base = "shenvs";
|
||||
btrfs = true;
|
||||
};
|
||||
};
|
||||
|
||||
modulesUnder = ./shenvs;
|
||||
};
|
||||
}
|
13
home/platforms/fabian@t14/shenvs/c.nix
Normal file
13
home/platforms/fabian@t14/shenvs/c.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{pkgs, ...}: {
|
||||
static = true;
|
||||
|
||||
packages = with pkgs; [
|
||||
binutils
|
||||
cmake
|
||||
curl
|
||||
gdb
|
||||
gnumake
|
||||
rustup
|
||||
valgrind
|
||||
];
|
||||
}
|
11
home/platforms/fabian@t14/shenvs/python.nix
Normal file
11
home/platforms/fabian@t14/shenvs/python.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{pkgs, ...}: {
|
||||
static = true;
|
||||
|
||||
packages = with pkgs; [
|
||||
pipenv
|
||||
(python310.withPackages (packages:
|
||||
with packages; [
|
||||
setuptools
|
||||
]))
|
||||
];
|
||||
}
|
10
home/platforms/fabian@t14/systemd/default.nix
Normal file
10
home/platforms/fabian@t14/systemd/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
systemd.user.tmpfiles.rules = [
|
||||
"d %t/tmp 0700 fabian fabian 24h"
|
||||
];
|
||||
}
|
|
@ -19,6 +19,7 @@
|
|||
graphics.enable = true;
|
||||
virtualisation.enable = true;
|
||||
androidSupport.enable = true;
|
||||
|
||||
users = {
|
||||
fabian = {
|
||||
enable = true;
|
||||
|
@ -47,7 +48,7 @@
|
|||
};
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.defaultLocale = "en_US.UTF-8"; #todo: move to baseline?
|
||||
|
||||
time.timeZone = "America/Costa_Rica";
|
||||
time.timeZone = "America/Costa_Rica"; #todo: move to baseline?
|
||||
}
|
||||
|
|
68
sys/platforms/t14/default.nix
Normal file
68
sys/platforms/t14/default.nix
Normal file
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
flakes,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
flakes.home-manager.nixosModules.home-manager
|
||||
flakes.impermanence.nixosModule
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
local.sys = {
|
||||
baseline.enable = true;
|
||||
|
||||
yubikey.enable = true;
|
||||
audio.enable = true;
|
||||
graphics.enable = true;
|
||||
androidSupport.enable = true;
|
||||
bluetooth.enable = true;
|
||||
|
||||
users = {
|
||||
fabian = {
|
||||
enable = true;
|
||||
unixId = 1002;
|
||||
};
|
||||
vanessa.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "t14";
|
||||
networkmanager.enable = true;
|
||||
|
||||
useDHCP = false; # The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||
interfaces.enp7s0.useDHCP = true; # Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||
interfaces.wlp6s0.useDHCP = true; # replicates the default behaviour.
|
||||
};
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
tmp.useTmpfs = true;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8"; #todo: move to baseline?
|
||||
|
||||
time.timeZone = "America/Costa_Rica"; #todo: move to baseline?
|
||||
|
||||
###### MODULARIZE AFTER THIS
|
||||
|
||||
services = {
|
||||
fwupd.enable = true;
|
||||
thinkfan.enable = true;
|
||||
tlp.enable = true;
|
||||
tp-auto-kbbl.enable = true;
|
||||
pcscd.enable = true;
|
||||
};
|
||||
|
||||
hardware.acpilight.enable = true;
|
||||
|
||||
services.fprintd.enable = true;
|
||||
}
|
62
sys/platforms/t14/hardware-configuration.nix
Normal file
62
sys/platforms/t14/hardware-configuration.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
flakes,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
services.xserver.videoDrivers = ["i915" "modesetting" "fbdev"];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "sdhci_pci"];
|
||||
kernelModules = ["dm-snapshot"];
|
||||
luks.devices."tomb" = {
|
||||
device = "/dev/disk/by-uuid/0b2b9aec-c239-4cce-948d-4411d9300c1d";
|
||||
preLVM = true;
|
||||
};
|
||||
};
|
||||
kernelModules = ["kvm-intel"];
|
||||
extraModulePackages = [];
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/2774158f-8ec5-4ba1-a4fb-a37f55b8bb38";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=root"];
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/A7E5-EEAB";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
"/nix" = {
|
||||
device = "/dev/disk/by-uuid/2774158f-8ec5-4ba1-a4fb-a37f55b8bb38";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=nix"];
|
||||
};
|
||||
|
||||
"/home" = {
|
||||
device = "/dev/disk/by-uuid/2774158f-8ec5-4ba1-a4fb-a37f55b8bb38";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=home"];
|
||||
};
|
||||
|
||||
"/toplevel" = {
|
||||
device = "/dev/disk/by-uuid/2774158f-8ec5-4ba1-a4fb-a37f55b8bb38";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
Loading…
Reference in a new issue