Replace ren
This commit is contained in:
parent
48143906d5
commit
731583bcd5
6 changed files with 74 additions and 10 deletions
14
systems/ren/hardware.nix
Normal file
14
systems/ren/hardware.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
boot.loader.grub = {
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
device = "nodev";
|
||||
};
|
||||
fileSystems."/boot" = { device = "/dev/disk/by-uuid/0683-2D32"; fsType = "vfat"; };
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
|
||||
boot.initrd.kernelModules = [ "nvme" ];
|
||||
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
|
||||
system.stateVersion = "23.11";
|
||||
}
|
||||
31
systems/ren/system.nix
Normal file
31
systems/ren/system.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
agenix,
|
||||
jellyfin-exporter,
|
||||
nixpkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
system = system;
|
||||
specialArgs = {
|
||||
# This selects the package for the current system and passes it
|
||||
exporter-pkg = jellyfin-exporter.packages.${system}.default;
|
||||
system = system;
|
||||
};
|
||||
|
||||
modules = [
|
||||
{
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
zramSwap.enable = true;
|
||||
networking.hostName = "Ren";
|
||||
networking.domain = "";
|
||||
services.openssh.enable = true;
|
||||
}
|
||||
./users.nix
|
||||
./hardware.nix
|
||||
agenix.nixosModules.default
|
||||
];
|
||||
}
|
||||
26
systems/ren/users.nix
Normal file
26
systems/ren/users.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
users.users.ren = {
|
||||
isNormalUser = true;
|
||||
home = "/home/ren";
|
||||
hashedPassword = "$y$j9T$KjOwguW/7P9GvbNg6Yy.k/$8xf3aqnJ909HSjxtpe854RKdiXiPpbOLt.aiuJSfeC0";
|
||||
openssh.authorizedKeys.keys = [
|
||||
(builtins.readFile ../../keys/hetzner.pub)
|
||||
(builtins.readFile ../../keys/asus.pub)
|
||||
(builtins.readFile ../../keys/macbook.pub)
|
||||
];
|
||||
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
];
|
||||
};
|
||||
|
||||
age.secrets.hetzner-key = {
|
||||
file = ../../keys/hetzner.priv;
|
||||
owner = "ren";
|
||||
};
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
(builtins.readFile ../../keys/hetzner.pub)
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue