new host: palantir

This commit is contained in:
Victor Ișan 2026-01-27 14:36:35 +01:00
parent 5cfcbffafb
commit 1c7067aa61
6 changed files with 119 additions and 9 deletions

36
disko/simple-efi-gpt.nix Normal file
View File

@ -0,0 +1,36 @@
{ mainDisk, ... }:
{
disk.main = {
device = mainDisk;
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
name = "ESP";
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
name = "root";
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
}

View File

@ -10,7 +10,7 @@
let
system = "x86_64-linux";
release = "25.11";
mainDisk = "/dev/sdc";
mainDisk = "/dev/sda";
myUser = "victor";
in {
nixosConfigurations = {
@ -18,14 +18,20 @@
inherit system;
specialArgs = { inherit release mainDisk myUser; };
modules = [
disko.nixosModules.disko
./disko/btrfs-legacy.nix
./hosts/isengard.nix
./modules/base.nix
./modules/docker.nix
];
};
palantir = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit release mainDisk myUser disko; };
modules = [
./hosts/palantir.nix
./modules/base.nix
./modules/gaming.nix
];
};
};
};
}

View File

@ -1,8 +1,18 @@
{ config, pkgs, myUser, release, ... }:
{ config, pkgs, myUser, release, disko, mainDisk, ... }:
{
networking.hostName = "isengard";
imports = [
disko.nixosModules.disko
];
disko.devices = import ../disko/btrfs-legacy.nix {
inherit mainDisk;
};
boot.loader = {
grub.enable = true;
};
time.timeZone = "Europe/Bucharest";
programs.zsh.enable = true;

43
hosts/palantir.nix Normal file
View File

@ -0,0 +1,43 @@
{ config, pkgs, myUser, release, disko, mainDisk, ... }:
{
networking.hostName = "palantir";
imports = [
disko.nixosModules.disko
];
disko.devices = import ../disko/simple-efi-gpt.nix {
inherit mainDisk;
};
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
time.timeZone = "Europe/Bucharest";
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
users.users.${myUser} = {
isNormalUser = true;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOiNyGO4RAxSdxvn2ZIBZ2Ze4iVVMrBNmu/V9JO70PoT victor@battleship"
];
};
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOiNyGO4RAxSdxvn2ZIBZ2Ze4iVVMrBNmu/V9JO70PoT victor@battleship"
];
networking.useDHCP = true;
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
};
system.stateVersion = release;
}

View File

@ -6,10 +6,6 @@
auto-optimise-store = true;
};
boot.loader.grub = {
enable = true;
};
environment.systemPackages = with pkgs; [
git
curl

19
modules/gaming.nix Normal file
View File

@ -0,0 +1,19 @@
{ config, pkgs, myUser, release, lib, ... }:
{
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"steam"
"steam-unwrapped"
];
services.sunshine = {
enable = true;
autoStart = true;
capSysAdmin = true;
};
programs.steam = {
enable = true;
};
}