feat (hosts/mystra)!: server configuration

This commit is contained in:
Henri Saudubray 2026-02-17 13:29:37 +01:00
parent 217802ef93
commit e87b3e2955
Signed by: hms
GPG key ID: 7065F57ED8856128
7 changed files with 152 additions and 10 deletions

34
flake.lock generated
View file

@ -1,5 +1,26 @@
{
"nodes": {
"disko": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1746728054,
"narHash": "sha256-eDoSOhxGEm2PykZFa/x9QG5eTH0MJdiJ9aR00VAofXE=",
"owner": "nix-community",
"repo": "disko",
"rev": "ff442f5d1425feb86344c028298548024f21256d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "disko",
"rev": "ff442f5d1425feb86344c028298548024f21256d",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@ -45,11 +66,11 @@
]
},
"locked": {
"lastModified": 1768814707,
"narHash": "sha256-hiEtU10R8X8LuFCx0olNTaFGWV1CWF9aagd3wwfcKXE=",
"lastModified": 1771243101,
"narHash": "sha256-p/qTbQU5wQEqbKWF8M0bZWuryUCrPsWrJB0GlNF1k6M=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "f80fde12cd9d5ff02b1c6eb612b853c1ac5ecc32",
"rev": "6d52ea6d66cb333c611c7b0e16dd24a05c9263e7",
"type": "github"
},
"original": {
@ -61,11 +82,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1770770419,
"narHash": "sha256-iKZMkr6Cm9JzWlRYW/VPoL0A9jVKtZYiU4zSrVeetIs=",
"lastModified": 1771208521,
"narHash": "sha256-X01Q3DgSpjeBpapoGA4rzKOn25qdKxbPnxHeMLNoHTU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6c5e707c6b5339359a9a9e215c5e66d6d802fd7a",
"rev": "fa56d7d6de78f5a7f997b0ea2bc6efd5868ad9e8",
"type": "github"
},
"original": {
@ -77,6 +98,7 @@
},
"root": {
"inputs": {
"disko": "disko",
"home-manager": "home-manager",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs"

View file

@ -7,10 +7,18 @@
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixos-wsl.url = "github:nix-community/NixOS-WSL/release-25.11";
nixos-wsl.inputs.nixpkgs.follows = "nixpkgs";
disko.url = "github:nix-community/disko/ff442f5d1425feb86344c028298548024f21256d";
disko.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
{ nixpkgs, home-manager, nixos-wsl, ... }@inputs:
{
nixpkgs,
home-manager,
nixos-wsl,
disko,
...
}@inputs:
{
nixosConfigurations.selune = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
@ -40,6 +48,16 @@
./home
];
};
nixosConfigurations.mystra = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./hosts/mystra
disko.nixosModules.disko
home-manager.nixosModules.home-manager
./home
];
};
homeManagerModules.default = ./home;
};
}

View file

@ -18,8 +18,6 @@
zoxide
just
xclip
tinymist
texliveFull
];
# Bash configuration
@ -32,7 +30,6 @@
"rm" = "rm -i";
};
# Custom files
stateVersion = "25.11";
};

View file

@ -18,6 +18,8 @@
gnome-solanum
mattermost-desktop
evolution
tinymist
texliveFull
]
++ (with gnomeExtensions; [
blur-my-shell

31
hosts/mystra/default.nix Normal file
View file

@ -0,0 +1,31 @@
{ pkgs, ... }:
{
imports = [
./hardware-configuration.nix
./disk-config.nix
../../nixos/common.nix
];
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
};
services.openssh.enable = true;
environment.systemPackages = [
pkgs.curl
pkgs.gitMinimal
];
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG/RpQqBYdXKNjLLpRWq04NJHD7mODOjwjpmqnQ6qppp hms@nixos-selune"
];
users.users.hms.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG/RpQqBYdXKNjLLpRWq04NJHD7mODOjwjpmqnQ6qppp hms@nixos-selune"
];
networking.hostName = "mystra";
system.stateVersion = "25.11";
}

View file

@ -0,0 +1,55 @@
{ lib, ... }:
{
disko.devices = {
disk.disk1 = {
device = lib.mkDefault "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
name = "root";
size = "100%";
content = {
type = "lvm_pv";
vg = "pool";
};
};
};
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
root = {
size = "100%FREE";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [
"defaults"
];
};
};
};
};
};
};
}

View file

@ -0,0 +1,17 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}