mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-29 07:10:51 +01:00
chore: init lisanew
This commit is contained in:
parent
a238cf6014
commit
1a904cc93c
5 changed files with 107 additions and 0 deletions
10
lib/luj.nix
10
lib/luj.nix
|
@ -57,6 +57,16 @@ let
|
||||||
vpn = "fd7a:115c:a1e0::c";
|
vpn = "fd7a:115c:a1e0::c";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
lisanew = {
|
||||||
|
inherit tld;
|
||||||
|
arch = "x86_64-linux";
|
||||||
|
nixpkgs_version = inputs.nixpkgs;
|
||||||
|
hm_version = inputs.home-manager;
|
||||||
|
ipv4 = {
|
||||||
|
public = "163.172.91.82";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
x2100 = {
|
x2100 = {
|
||||||
inherit tld;
|
inherit tld;
|
||||||
arch = "x86_64-linux";
|
arch = "x86_64-linux";
|
||||||
|
|
31
machines/lisanew/default.nix
Normal file
31
machines/lisanew/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware.nix
|
||||||
|
./home-julien.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
deployment.tags = [ "server" ];
|
||||||
|
|
||||||
|
disko = import ./disko.nix;
|
||||||
|
|
||||||
|
services.fail2ban.enable = true;
|
||||||
|
|
||||||
|
networking.useNetworkd = true;
|
||||||
|
systemd.network = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
networks = {
|
||||||
|
"10-wan" = {
|
||||||
|
matchConfig.Name = "enp0s20";
|
||||||
|
networkConfig = {
|
||||||
|
DHCP = "ipv4";
|
||||||
|
};
|
||||||
|
|
||||||
|
linkConfig.RequiredForOnline = "routable";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
}
|
36
machines/lisanew/disko.nix
Normal file
36
machines/lisanew/disko.nix
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
{
|
||||||
|
devices = {
|
||||||
|
disk = {
|
||||||
|
main = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/disk/by-id/ata-HGST_HTE721010A9E630_JR10034M34EVTK";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
boot = {
|
||||||
|
size = "1M";
|
||||||
|
type = "EF02"; # for grub MBR
|
||||||
|
};
|
||||||
|
ESP = {
|
||||||
|
size = "512M";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
root = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
22
machines/lisanew/hardware.nix
Normal file
22
machines/lisanew/hardware.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
boot.loader.grub.enable = true;
|
||||||
|
boot.initrd.availableKernelModules = [ "ahci" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
swapDevices = [ { device = "/dev/disk/by-uuid/b2563fcf-18af-43da-b2d2-3e7b84f72421"; } ];
|
||||||
|
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
8
machines/lisanew/home-julien.nix
Normal file
8
machines/lisanew/home-julien.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
_: {
|
||||||
|
|
||||||
|
luj.hmgr.julien = {
|
||||||
|
luj.programs.neovim.enable = true;
|
||||||
|
luj.programs.ssh-client.enable = true;
|
||||||
|
luj.programs.git.enable = true;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue