mirror of
https://github.com/kaesaecracker/nixos-configuration.git
synced 2025-01-18 02:20:14 +01:00
transform the other hosts to flake
This commit is contained in:
parent
5944fe5cca
commit
f41cd58e54
|
@ -22,14 +22,11 @@
|
|||
zsh.enable = true;
|
||||
htop.enable = true;
|
||||
iotop.enable = true;
|
||||
git.enable = true;
|
||||
nano = {
|
||||
enable = true;
|
||||
syntaxHighlight = true;
|
||||
};
|
||||
git = {
|
||||
enable = true;
|
||||
package = pkgs.gitFull;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
24
flake.nix
24
flake.nix
|
@ -19,7 +19,6 @@
|
|||
}: let
|
||||
common-modules = [
|
||||
lix-module.nixosModules.default
|
||||
home-manager.nixosModules.home-manager
|
||||
./common
|
||||
];
|
||||
in {
|
||||
|
@ -29,9 +28,32 @@
|
|||
modules =
|
||||
common-modules
|
||||
++ [
|
||||
home-manager.nixosModules.home-manager
|
||||
./hosts/vinzenz-lpt2
|
||||
];
|
||||
};
|
||||
vinzenz-pc2 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules =
|
||||
common-modules
|
||||
++ [
|
||||
home-manager.nixosModules.home-manager
|
||||
./hosts/vinzenz-pc2
|
||||
];
|
||||
};
|
||||
hetzner-vpn1 = nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules =
|
||||
common-modules
|
||||
++ [
|
||||
./hosts/hetzner-vpn1
|
||||
|
||||
{
|
||||
# uncomment for build check on non arm system (requires --impure)
|
||||
# nixpkgs.buildPlatform = builtins.currentSystem;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
9
hosts/hetzner-vpn1/default.nix
Normal file
9
hosts/hetzner-vpn1/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./hardware.nix
|
||||
./environment.nix
|
||||
];
|
||||
config = {
|
||||
networking.hostName = "hetzner-vpn1";
|
||||
};
|
||||
}
|
|
@ -24,18 +24,11 @@
|
|||
pc2 = "vinzenz-pc2.donkey-pentatonic.ts.net";
|
||||
in {
|
||||
imports = [
|
||||
(import ./modules {
|
||||
hostName = "hetzner-vpn1";
|
||||
enableHomeManager = false;
|
||||
})
|
||||
../../users/vinzenz.nix
|
||||
../../users/ronja.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
my = {
|
||||
enabledUsers = ["ronja" "vinzenz"];
|
||||
tailscale.enable = true;
|
||||
};
|
||||
|
||||
users.users = {
|
||||
root.openssh.authorizedKeys.keys = [
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICdYqY3Y1/f1bsAi5Qfyr/UWuX9ixu96IeAlhoQaJkbf''
|
|
@ -96,7 +96,6 @@
|
|||
|
||||
services.udev.extraRules = ''
|
||||
ATTR{address}=="96:00:02:87:7f:c9", NAME="eth0"
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -5,5 +5,7 @@
|
|||
];
|
||||
config = {
|
||||
networking.hostName = "vinzenz-lpt2";
|
||||
|
||||
nix.settings.extra-platforms = ["aarch64-linux"];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@
|
|||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH''
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming''
|
||||
];
|
||||
#
|
||||
|
||||
#users.users.ronja.openssh.authorizedKeys.keys = [
|
||||
# ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ronja-ssh-host-key''
|
||||
#];
|
||||
#
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
|
|
9
hosts/vinzenz-pc2/default.nix
Normal file
9
hosts/vinzenz-pc2/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./hardware.nix
|
||||
./environment.nix
|
||||
];
|
||||
config = {
|
||||
networking.hostName = "vinzenz-pc2";
|
||||
};
|
||||
}
|
|
@ -1,26 +1,18 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
(import ./modules {
|
||||
hostName = "vinzenz-pc2";
|
||||
enableHomeManager = true;
|
||||
})
|
||||
../../home
|
||||
../../home/gnome.nix
|
||||
../../users/vinzenz.nix
|
||||
../../modules/desktop-environment.nix
|
||||
../../modules/gnome.nix
|
||||
../../modules/gaming.nix
|
||||
../../modules/printing.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
my = {
|
||||
enabledUsers = ["vinzenz" "ronja"];
|
||||
tailscale.enable = true;
|
||||
desktop = {
|
||||
enableGnome = true;
|
||||
enableGaming = true;
|
||||
enablePrinting = true;
|
||||
};
|
||||
buildtools = {
|
||||
native = true;
|
||||
dotnet = true;
|
||||
rust = true;
|
||||
jetbrains-remote-server = true;
|
||||
};
|
||||
home-manager.users = {
|
||||
vinzenz = import ../../home/vinzenz;
|
||||
ronja = import ../../home/ronja;
|
||||
};
|
||||
|
||||
users.users.vinzenz.openssh.authorizedKeys.keys = [
|
||||
|
@ -39,7 +31,7 @@
|
|||
port = 8542;
|
||||
host = "100.125.93.127"; # tailscale
|
||||
withoutConnectionToken = true;
|
||||
extraPackages = with pkgs; [nodejs gitFull gh direnv];
|
||||
extraPackages = with pkgs; [nodejs git gh direnv];
|
||||
};
|
||||
|
||||
virtualisation.podman = {
|
|
@ -1,12 +1,12 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
../../modules/desktop-hardware.nix
|
||||
../../modules/amd-graphics.nix
|
||||
];
|
||||
config = {
|
||||
my.hardware = {
|
||||
enableCommonDesktopSettings = true;
|
||||
amd = {
|
||||
cpu = true;
|
||||
gpu = true;
|
||||
};
|
||||
};
|
||||
# amd cpu
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage"
|
24
modules/amd-graphics.nix
Normal file
24
modules/amd-graphics.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
boot.kernelModules = ["amdgpu"];
|
||||
services.xserver.videoDrivers = ["amdgpu"];
|
||||
|
||||
hardware.opengl = {
|
||||
extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
];
|
||||
extraPackages32 = with pkgs; [
|
||||
driversi686Linux.amdvlk
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nvtopPackages.amd
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.my.hardware.amd;
|
||||
in {
|
||||
options.my.hardware.amd = {
|
||||
cpu = lib.mkEnableOption "amd cpu";
|
||||
gpu = lib.mkEnableOption "amd gpu";
|
||||
radeon = lib.mkEnableOption "amd legacy gpu"; # old hardware, dont judge
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.cpu {
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.gpu {
|
||||
boot.kernelModules = ["amdgpu"];
|
||||
services.xserver.videoDrivers = ["amdgpu"];
|
||||
|
||||
hardware.opengl = {
|
||||
extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
];
|
||||
extraPackages32 = with pkgs; [
|
||||
driversi686Linux.amdvlk
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nvtopPackages.amd
|
||||
];
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.radeon {
|
||||
boot.kernelModules = ["radeon"];
|
||||
services.xserver.videoDrivers = ["radeon"];
|
||||
environment.systemPackages = with pkgs; [
|
||||
radeontop
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue