systems -> hosts

moved functions to /lib

inputs over imports

turned each module file into a nixosModule

moved registry and $NIX_PATH pinning to /modules/pinning.nix
This commit is contained in:
Gerg-L 2023-06-22 22:55:43 -04:00
parent ee2beea680
commit f43d0b741c
42 changed files with 224 additions and 240 deletions

View file

@ -0,0 +1,88 @@
_: {
pkgs,
config,
...
}: {
localModules = {
remoteBuild.enable = true;
DE.gnome.enable = true;
DM = {
lightdm.enable = true;
autoLogin = true;
loginUser = "games";
};
theming = {
enable = true;
kmscon.enable = true;
};
};
nixpkgs.allowedUnfree = [
"nvidia-x11"
"nvidia-persistenced"
"steam"
"steam-original"
];
environment = {
systemPackages = builtins.attrValues {
inherit
(pkgs)
neovim
heroic
legendary-gl
prismlauncher
pcmanfm #file manager
librewolf #best browser
obs-studio
vlc
webcord
;
};
etc = {
"jdks/17".source = pkgs.openjdk17 + /bin;
"jdks/8".source = pkgs.openjdk8 + /bin;
};
};
networking = {
hostName = "game-laptop";
networkmanager.enable = true;
};
#user managment
sops.secrets.root.neededForUsers = true;
users = {
mutableUsers = false;
users = {
games = {
useDefaultShell = true;
uid = 1000;
isNormalUser = true;
extraGroups = ["audio"];
initialHashedPassword = "";
};
"root" = {
uid = 0;
home = "/root";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAuO/3IF+AjH8QjW4DAUV7mjlp2Mryd+1UnpAUofS2yA gerg@gerg-phone"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILpYY2uw0OH1Re+3BkYFlxn0O/D8ryqByJB/ljefooNc gerg@gerg-windows"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJWbwkFJmRBgyWyWU+w3ksZ+KuFw9uXJN3PwqqE7Z/i8 gerg@gerg-desktop"
];
passwordFile = config.sops.secrets.root.path;
};
};
};
hardware.bluetooth.enable = true;
services.blueman.enable = true;
boot = {
initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci"];
kernelModules = ["kvm-amd"];
kernelPackages = pkgs.linuxPackages_latest;
};
swapDevices = [
{
device = "/swapfile";
size = 16 * 1024;
}
];
system.stateVersion = "23.05";
}

View file

@ -0,0 +1,39 @@
{disko, ...}: {disks ? [], ...}: {
dummyvalue = {inherit disks;};
imports = [disko.nixosModules.disko];
disko.devices = {
disk.nvme0n1 = {
device = "/dev/disk/by-id/nvme-WDC_PC_SN530_SDBPNPZ-512G-1006_21311N802456";
type = "disk";
content = {
type = "table";
format = "gpt";
partitions = [
{
name = "ESP";
start = "1MiB";
end = "1GiB";
bootable = true;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
}
{
name = "root";
start = "1GiB";
end = "100%";
part-type = "primary";
bootable = true;
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
}
];
};
};
};
}

View file

@ -0,0 +1,27 @@
_: {config, ...}: {
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.latest;
prime = {
sync.enable = true;
amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:0";
};
nvidiaPersistenced = true;
nvidiaSettings = false;
modesetting.enable = true;
};
services.xserver = {
videoDrivers = ["nvidia"];
#disable DPMS
monitorSection = ''
Option "DPMS" "false"
'';
#disable screen blanking in total
serverFlagsSection = ''
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
Option "BlankTime" "0"
'';
};
}

View file

@ -0,0 +1,30 @@
root: ENC[AES256_GCM,data:ZHWgqJt4zMWuN/8rkmOQngBvw85MRCXsbLpgKj4Hzd8cDvvr6HIwsECiZZHh8Yp5FDL5t2IokIEf4KT8mqvm1bhakvWyMtP3tw==,iv:RTNPLxCDm+bsu70EbasUfxCtgp1+86aW+aFQECZTAPU=,tag:uDbUE3vw0kc30WsKLOtVbw==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1egxes320renph0uevtmnsz4d5aw0z794c5nwrk2z6249wv2yevgqx9cf90
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBpU2NMRHVkRDV1ekpvZUJz
WDlFWjh5SU1EY3FOSFpNUmhLd3Z2N0VtdjM4Ck1RMWFkenZvV3NESnhSNnF4MnBL
dmwvdU4rbmRxTnI3R1lRWUw4NkFTZFEKLS0tIHBLWVMzTmhsbU5ORkVld2VBR0hD
SlZBR1ZmRENXRVVaVXlEVnNvOEN1YkUKrIvpZHRRxYBj83kchgGWVNPsrGnmnWEh
80avkBy/6iCYmGEJ7PA4qxAea6jTOfaX+WbVm/jbmXpBEmE/NjPL5w==
-----END AGE ENCRYPTED FILE-----
- recipient: age180y8kdtdlqelayyz9mq2c7xv248rh4gdfr3amjzvdcjrz6wdaqmsj762pp
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBqRXMySTF5VGRkK0N6NTZt
Sml4N3hjNXVLcXpmME1KSm1yTDZNVzdscEZNClk0TlZEUmNLN09PM0tMOHc1ZkJH
OTdzdVBSVkVpeHN5UVZvMTV1MW80RXMKLS0tIDR6SVcwWmtnWkV2UTRnb2lmZEdU
OHNBcUxydUJpMVdON21rMHBiNFRRRk0KokksVnVDldZvC7tqjjDVsU7z3Uh0ytQ3
tLdO8k+HxRYfFqhgfq2z7vTzHOVcZRvgiihYV4kLR9lnivpL6uOB+A==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2023-03-11T20:03:05Z"
mac: ENC[AES256_GCM,data:buZBqAIO8IAHUu2tXzvUcMcvBL0r/Y5cCSrVvFHlAaUyNCkXktW0ZvW6n3mdEhKx8GzVYlvW5p9iDEkeyrD6YwcFVqXyW2tI0at1TevJwFc17AFXOPYRF7V2QrPX6lvLoZtxBcKeqXfn8mO+2QSyhYIheuln99YilHVYtLzujfk=,iv:v+E18iYaExTx66OGyJUCn5ygVNCDx54PekgrQo98V8U=,tag:+Ktm/mAHwq8h+IZ8eMnIhA==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.7.3