refactor(devices): place configs in order and delete oksys
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
89ebaa520f
commit
7941c8cf35
13 changed files with 138 additions and 262 deletions
|
@ -82,14 +82,14 @@ I generate `.sops.yaml` from `.sops.nix`:
|
|||
```nix
|
||||
let
|
||||
wim = "somekey";
|
||||
oksys = "somekey2";
|
||||
binto = "somekey2";
|
||||
in {
|
||||
creation_rules = [
|
||||
{
|
||||
path_regex = "secrets/[^/]+\\.(yaml|json|env|ini)$";
|
||||
key_groups = [
|
||||
{
|
||||
age = [wim oksys];
|
||||
age = [wim binto];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ This directory encompasses every device's main configuration file.
|
|||
| `binto` | My desktop PC with a multi-monitor setup and an NVIDIA (cringe) 3070 |
|
||||
| `cluster` | Two Lenovo mini PCs that make use of [NixOS-pcsd](https://github.com/matt1432/nixos-pcsd) to form a cluster |
|
||||
| `nos` | My custom built NAS |
|
||||
| `oksys` | A very old Acer laptop that went from sailing the seas for years to becoming my web server and VPN host. It is now retired indefinitely. |
|
||||
| `servivi` | A gaming PC in a previous life, it is now used as a build farm and hosts game servers |
|
||||
| `wim` | My 2-1 Lenovo Laptop that I use for uni |
|
||||
|
||||
|
|
|
@ -1,34 +1,37 @@
|
|||
{
|
||||
config,
|
||||
jovian,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (config.vars) mainUser hostName;
|
||||
in {
|
||||
# ------------------------------------------------
|
||||
# Imports
|
||||
# ------------------------------------------------
|
||||
imports = [
|
||||
jovian.nixosModules.default
|
||||
./hardware-configuration.nix
|
||||
|
||||
../../modules/kmscon.nix
|
||||
../../modules/sshd.nix
|
||||
|
||||
./hardware-configuration.nix
|
||||
|
||||
./modules/desktop.nix
|
||||
|
||||
self.nixosModules.plymouth
|
||||
];
|
||||
|
||||
# State Version: DO NOT CHANGE
|
||||
system.stateVersion = "24.11";
|
||||
home-manager.users.${mainUser}.home.stateVersion = "24.11";
|
||||
|
||||
# ------------------------------------------------
|
||||
# User Settings
|
||||
# ------------------------------------------------
|
||||
vars = {
|
||||
mainUser = "mariah";
|
||||
hostName = "bbsteamie";
|
||||
promptMainColor = "pink";
|
||||
};
|
||||
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
theme = "steamos";
|
||||
};
|
||||
|
||||
users.users.${mainUser} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
|
@ -42,16 +45,13 @@ in {
|
|||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
home-manager.users.${mainUser} = {
|
||||
imports = [];
|
||||
|
||||
# No touchy
|
||||
home.stateVersion = "24.11";
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Montreal";
|
||||
|
||||
# No touchy
|
||||
system.stateVersion = "24.11";
|
||||
# ------------------------------------------------
|
||||
# `Self` Modules configuration
|
||||
# ------------------------------------------------
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
theme = "steamos";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
{
|
||||
config,
|
||||
jovian,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
jovian.nixosModules.default
|
||||
];
|
||||
|
||||
jovian = {
|
||||
steamos.useSteamOSConfig = true;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
}: let
|
||||
inherit (config.vars) mainUser hostName;
|
||||
in {
|
||||
# ------------------------------------------------
|
||||
# Imports
|
||||
# ------------------------------------------------
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
|
@ -23,26 +26,26 @@ in {
|
|||
self.nixosModules.desktop
|
||||
];
|
||||
|
||||
home-manager.users.${mainUser} = {
|
||||
imports = [
|
||||
../../home/firefox
|
||||
];
|
||||
|
||||
# State Version: DO NOT CHANGE
|
||||
home.stateVersion = "23.11";
|
||||
};
|
||||
# State Version: DO NOT CHANGE
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
# ------------------------------------------------
|
||||
# User Settings
|
||||
# ------------------------------------------------
|
||||
vars = {
|
||||
mainUser = "matt";
|
||||
hostName = "binto";
|
||||
promptMainColor = "purple";
|
||||
};
|
||||
|
||||
roles.desktop = {
|
||||
user = config.vars.mainUser;
|
||||
|
||||
mainMonitor = "desc:GIGA-BYTE TECHNOLOGY CO. LTD. G27QC 0x00000B1D";
|
||||
displayManager.duplicateScreen = false;
|
||||
|
||||
fontSize = 12.5;
|
||||
};
|
||||
|
||||
programs.adb = {
|
||||
enable = true;
|
||||
user = mainUser;
|
||||
};
|
||||
|
||||
users.users.${mainUser} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
|
@ -54,14 +57,6 @@ in {
|
|||
"libvirtd"
|
||||
];
|
||||
};
|
||||
home-manager.users.${mainUser} = {
|
||||
imports = [
|
||||
../../home/firefox
|
||||
];
|
||||
|
||||
# No touchy
|
||||
home.stateVersion = "23.11";
|
||||
};
|
||||
|
||||
networking = {
|
||||
inherit hostName;
|
||||
|
@ -69,9 +64,22 @@ in {
|
|||
firewall.enable = false;
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Montreal";
|
||||
|
||||
# No touchy
|
||||
system.stateVersion = "23.11";
|
||||
# ------------------------------------------------
|
||||
# `Self` Modules configuration
|
||||
# ------------------------------------------------
|
||||
roles.desktop = {
|
||||
user = mainUser;
|
||||
|
||||
mainMonitor = "desc:GIGA-BYTE TECHNOLOGY CO. LTD. G27QC 0x00000B1D";
|
||||
displayManager.duplicateScreen = false;
|
||||
|
||||
fontSize = 12.5;
|
||||
};
|
||||
|
||||
programs.adb = {
|
||||
enable = true;
|
||||
user = mainUser;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,6 +3,9 @@ deviceName: {config, ...}: let
|
|||
|
||||
clusterIP = config.services.pcsd.virtualIps.caddy-vip.ip;
|
||||
in {
|
||||
# ------------------------------------------------
|
||||
# Imports
|
||||
# ------------------------------------------------
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
|
@ -13,6 +16,13 @@ in {
|
|||
./modules/pcsd.nix
|
||||
];
|
||||
|
||||
# State Version: DO NOT CHANGE
|
||||
system.stateVersion = "24.05";
|
||||
home-manager.users.${mainUser}.home.stateVersion = "24.05";
|
||||
|
||||
# ------------------------------------------------
|
||||
# User Settings
|
||||
# ------------------------------------------------
|
||||
vars = {
|
||||
mainUser = "matt";
|
||||
hostName = deviceName;
|
||||
|
@ -32,13 +42,6 @@ in {
|
|||
];
|
||||
};
|
||||
|
||||
home-manager.users.${mainUser} = {
|
||||
imports = [];
|
||||
|
||||
# No touchy
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
|
||||
networking = {
|
||||
inherit hostName;
|
||||
resolvconf.enable = true;
|
||||
|
@ -53,9 +56,5 @@ in {
|
|||
firewall.enable = false;
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Montreal";
|
||||
|
||||
# No touchy
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{config, ...}: let
|
||||
inherit (config.vars) mainUser hostName;
|
||||
in {
|
||||
# ------------------------------------------------
|
||||
# Imports
|
||||
# ------------------------------------------------
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
|
@ -16,6 +19,13 @@ in {
|
|||
./modules/subtitles
|
||||
];
|
||||
|
||||
# State Version: DO NOT CHANGE
|
||||
system.stateVersion = "24.05";
|
||||
home-manager.users.${mainUser}.home.stateVersion = "24.05";
|
||||
|
||||
# ------------------------------------------------
|
||||
# User Settings
|
||||
# ------------------------------------------------
|
||||
vars = {
|
||||
mainUser = "matt";
|
||||
hostName = "nos";
|
||||
|
@ -31,22 +41,11 @@ in {
|
|||
];
|
||||
};
|
||||
|
||||
home-manager.users.${mainUser} = {
|
||||
imports = [];
|
||||
|
||||
# No touchy
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
|
||||
networking = {
|
||||
inherit hostName;
|
||||
resolvconf.enable = true;
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Montreal";
|
||||
|
||||
# No touchy
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
# Not currently operational
|
||||
{config, ...}: let
|
||||
inherit (config.vars) mainUser hostName;
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
../../modules/sshd.nix
|
||||
../../modules/tailscale.nix
|
||||
|
||||
./modules/remote-builder.nix
|
||||
];
|
||||
|
||||
vars = {
|
||||
mainUser = "matt";
|
||||
hostName = "oksys";
|
||||
neovimIde = false;
|
||||
};
|
||||
|
||||
users.users.${mainUser} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"adm"
|
||||
];
|
||||
};
|
||||
home-manager.users.${mainUser} = {
|
||||
imports = [];
|
||||
|
||||
# No touchy
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
|
||||
networking = {
|
||||
inherit hostName;
|
||||
resolvconf.enable = true;
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Montreal";
|
||||
|
||||
# No touchy
|
||||
system.stateVersion = "24.05";
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
config,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
|
||||
services.logind = {
|
||||
lidSwitchDocked = "ignore";
|
||||
lidSwitchExternalPower = "ignore";
|
||||
};
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
timeout = 2;
|
||||
|
||||
grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
};
|
||||
};
|
||||
initrd.availableKernelModules = [
|
||||
"uhci_hcd"
|
||||
"ehci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-label/NIXBOOT";
|
||||
fsType = "vfat";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 16 * 1024;
|
||||
}
|
||||
];
|
||||
|
||||
zramSwap.enable = true;
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = config.hardware.enableRedistributableFirmware;
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
{config, ...}: let
|
||||
servivi = "100.64.0.7";
|
||||
in {
|
||||
# https://nixos.wiki/wiki/Distributed_build
|
||||
home-manager.users.root = {
|
||||
home.file.".ssh/config".text =
|
||||
# ssh_config
|
||||
''
|
||||
Host ${servivi}
|
||||
# Prevent using ssh-agent or another keyfile, useful for testing
|
||||
IdentitiesOnly yes
|
||||
IdentityFile ${config.sops.secrets.nixremote.path}
|
||||
|
||||
# The weakly privileged user on the remote builder – if not set,
|
||||
# 'root' is used – which will hopefully fail
|
||||
User nixremote
|
||||
'';
|
||||
};
|
||||
|
||||
programs.ssh.knownHosts = {
|
||||
${servivi}.publicKey = "servivi ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMkNW0H4Fl6NFgahlgGbSvglg1DrX4yl1ht9Lp+vHE2A";
|
||||
};
|
||||
|
||||
nix = {
|
||||
buildMachines = [
|
||||
{
|
||||
hostName = servivi;
|
||||
system = "x86_64-linux";
|
||||
protocol = "ssh-ng";
|
||||
maxJobs = 1;
|
||||
speedFactor = 2;
|
||||
supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
||||
mandatoryFeatures = [];
|
||||
}
|
||||
];
|
||||
distributedBuilds = true;
|
||||
# optional, useful when the builder has a faster internet connection than yours
|
||||
extraOptions = ''
|
||||
builders-use-substitutes = true
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,10 +1,12 @@
|
|||
{config, ...}: let
|
||||
inherit (config.vars) mainUser hostName;
|
||||
in {
|
||||
# ------------------------------------------------
|
||||
# Imports
|
||||
# ------------------------------------------------
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
../../modules/arion
|
||||
../../modules/kmscon.nix
|
||||
../../modules/sshd.nix
|
||||
../../modules/tailscale.nix
|
||||
|
@ -15,6 +17,13 @@ in {
|
|||
./modules/nfs.nix
|
||||
];
|
||||
|
||||
# State Version: DO NOT CHANGE
|
||||
system.stateVersion = "24.05";
|
||||
home-manager.users.${mainUser}.home.stateVersion = "24.05";
|
||||
|
||||
# ------------------------------------------------
|
||||
# User Settings
|
||||
# ------------------------------------------------
|
||||
vars = {
|
||||
mainUser = "matt";
|
||||
hostName = "servivi";
|
||||
|
@ -43,24 +52,16 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
home-manager.users.${mainUser} = {
|
||||
imports = [];
|
||||
|
||||
# No touchy
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
|
||||
arion.enable = true;
|
||||
|
||||
networking = {
|
||||
inherit hostName;
|
||||
resolvconf.enable = true;
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Montreal";
|
||||
|
||||
# No touchy
|
||||
system.stateVersion = "24.05";
|
||||
# ------------------------------------------------
|
||||
# `Self` Modules configuration
|
||||
# ------------------------------------------------
|
||||
arion.enable = true;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
}: let
|
||||
inherit (config.vars) mainUser hostName;
|
||||
in {
|
||||
# ------------------------------------------------
|
||||
# Imports
|
||||
# ------------------------------------------------
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
|
@ -21,14 +24,54 @@ in {
|
|||
self.nixosModules.plymouth
|
||||
];
|
||||
|
||||
home-manager.users.${mainUser} = {
|
||||
imports = [
|
||||
../../home/firefox
|
||||
];
|
||||
|
||||
# State Version: DO NOT CHANGE
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
# State Version: DO NOT CHANGE
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
# ------------------------------------------------
|
||||
# User Settings
|
||||
# ------------------------------------------------
|
||||
vars = {
|
||||
mainUser = "matt";
|
||||
hostName = "wim";
|
||||
promptMainColor = "purple";
|
||||
};
|
||||
|
||||
users.users.${mainUser} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"input"
|
||||
"uinput"
|
||||
"adm"
|
||||
"video"
|
||||
"libvirtd"
|
||||
];
|
||||
};
|
||||
|
||||
networking = {
|
||||
inherit hostName;
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
wifi.backend = "wpa_supplicant";
|
||||
};
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
time.timeZone = "America/Montreal";
|
||||
|
||||
# ------------------------------------------------
|
||||
# `Self` Modules configuration
|
||||
# ------------------------------------------------
|
||||
roles.desktop = {
|
||||
user = config.vars.mainUser;
|
||||
user = mainUser;
|
||||
|
||||
mainMonitor = "eDP-1";
|
||||
isLaptop = true;
|
||||
|
@ -46,39 +89,4 @@ in {
|
|||
enable = true;
|
||||
theme = "dracula";
|
||||
};
|
||||
|
||||
users.users.${mainUser} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"input"
|
||||
"uinput"
|
||||
"adm"
|
||||
"video"
|
||||
"libvirtd"
|
||||
];
|
||||
};
|
||||
home-manager.users.${mainUser} = {
|
||||
imports = [
|
||||
../../home/firefox
|
||||
];
|
||||
|
||||
# No touchy
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
|
||||
networking = {
|
||||
inherit hostName;
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
wifi.backend = "wpa_supplicant";
|
||||
};
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Montreal";
|
||||
|
||||
# No touchy
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
|
|
|
@ -42,9 +42,9 @@
|
|||
mainInputs // otherInputs;
|
||||
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
secrets,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (import ./lib.nix inputs) mkVersion mkNixOS mkNixOnDroid mkPkgs;
|
||||
|
|
Loading…
Reference in a new issue