add host Remilia

This commit is contained in:
2021-05-31 02:48:14 +05:30
parent 8952fafe65
commit 02fa695a0f
25 changed files with 98 additions and 32 deletions

6
flake.lock generated
View File

@@ -202,11 +202,11 @@
},
"stable": {
"locked": {
"lastModified": 1619486598,
"narHash": "sha256-ZEvJ+uItcKLQ9uSjGbQFE6Euu9w1Y98x0TWydXIgHAI=",
"lastModified": 1622197592,
"narHash": "sha256-MS2v6/oDzW5uej8fnjg0v//WWVvEdNooP4plG2AdMGQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d4e7af972158a14ebdd9c828b1c2e07e2ce7ef1c",
"rev": "85960bea533dc2d89dff8836d8a0a1239ddd5c9c",
"type": "github"
},
"original": {

View File

@@ -1,7 +1,7 @@
{
inputs = {
stable.url = github:nixos/nixpkgs/nixos-20.09;
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable;
stable.url = github:nixos/nixpkgs/nixos-20.09;
home-manager = {
url = github:nix-community/home-manager;
inputs.nixpkgs.follows = "nixpkgs";
@@ -15,7 +15,7 @@
nvim.url = github:nix-community/neovim-nightly-overlay;
};
outputs = inputs@{self, nixpkgs, ... }:
outputs = inputs@{self, nixpkgs, stable, ... }:
inputs.utils.lib.eachDefaultSystem (system:
let
overlays = [
@@ -47,26 +47,14 @@
homeDirectory = "/home/natto";
username = "natto";
};
/*
ottan = inputs.home-manager.lib.homeManagerConfiguration {
system = "aarch64-linux";
configuration = { lib, ... }: {
imports = [
./home/ottan.nix
];
nixpkgs.overlays = self.packages.aarch64-linux.overlays;
};
homeDirectory = "/home/ottan";
username = "ottan";
};
*/
};
nixosConfigurations = {
#Home laptop
Satori = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./satori.nix
./hosts/personal/satori.nix
inputs.agenix.nixosModules.age
inputs.home-manager.nixosModules.home-manager
{
@@ -74,23 +62,33 @@
}
];
};
#Home server (RPi4)
Marisa = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
./marisa.nix
inputs.home-manager.nixosModules.home-manager
./hosts/servers/marisa.nix
{
nixpkgs.pkgs = self.packages.aarch64-linux;
}
];
};
#idk, maybe to try cross compiling Marisa on home laptop later?
Marisus = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
./marisa.nix
# inputs.home-manager.nixosModules.home-manager
./hosts/servers/marisa.nix
{
nixpkgs.pkgs = self.packages.x86_64-linux // {crossSystem.config = "aarch64-unknown-linux-gnu";};
nixpkgs.pkgs = (self.packages.x86_64-linux) // {crossSystem.config = "aarch64-unknown-linux-gnu";};
}
];
};
#Oracle Cloud VM
Remilia = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/servers/remilia.nix
{
nixpkgs.pkgs = self.packages.x86_64-linux;
}
];
};

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -2,15 +2,14 @@
{
imports =
[
# <nixpkgs/nixos/modules/profiles/all-hardware.nix>
./marisa/pkgs.nix
./pkgs.nix
./stuff.nix
./marisa/networking.nix
./marisa/stuff.nix
./marisa/hardware.nix
./marisa/boot.nix
./marisa/services.nix
./marisa/cachix.nix
./configs/nvim.nix
../../configs/nvim.nix
];
system.stateVersion = "21.05";
}

View File

@@ -5,7 +5,6 @@
gnumake
htop
vim
tailscale
wireguard
];
programs = {

15
hosts/servers/remilia.nix Executable file
View File

@@ -0,0 +1,15 @@
{lib, config, ...}:
{
imports =
[
./pkgs.nix
./stuff.nix
./remilia/networking.nix
./remilia/hardware.nix
./remilia/boot.nix
./remilia/services.nix
../../configs/nvim.nix
];
programs.gnupg.agent.enable = lib.mkForce false;
system.stateVersion = "21.11";
}

13
hosts/servers/remilia/boot.nix Executable file
View File

@@ -0,0 +1,13 @@
{config, ...}:
{
boot = {
initrd.kernelModules = [ "bochs_drm" ];
initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" ];
kernelModules = [ "kvm-amd" ];
kernelParams = [ "console=ttyS0" "console=tty1" "nvme.shutdown_timeout=10" "libiscsi.debug_libiscsi_eh=1" ];
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
}

View File

@@ -0,0 +1,20 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d91adce2-9059-4a8a-86e7-dee6ecc85b2b";
fsType = "ext4";
};
swapDevices = [
{
device="/swapfile";
size = 7168;
priority = 0;
}
];
}

View File

@@ -0,0 +1,13 @@
{config, ...}:
{
networking = {
useDHCP = false;
hostName = "Remilia";
firewall.allowedTCPPorts = [ 22 80 ];
interfaces = {
ens3 = {
useDHCP = true;
};
};
};
}

View File

@@ -0,0 +1,12 @@
{config, ...}:
{
services = {
openssh = {
enable = true;
permitRootLogin = "yes";
};
};
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHingN2Aho+KGgEvBMjtoez+W1svl9uVoa4vG0d646j"
];
}

View File

@@ -19,9 +19,6 @@
];
};
};
fonts.fonts = with pkgs; [
fira-mono
];
documentation.enable = false;
users.extraUsers.root = {
shell = pkgs.zsh;