init
This commit is contained in:
parent
9a5c615abe
commit
3b9e973426
8 changed files with 123 additions and 1 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[submodule "nixpkgs"]
|
||||
path = nixpkgs
|
||||
url = https://github.com/NixOS/nixpkgs.git
|
|
@ -1,2 +1,7 @@
|
|||
# nixos
|
||||
# Morph Deployment
|
||||
|
||||
Common configs are in /common
|
||||
|
||||
Host specific are in /hosts
|
||||
|
||||
To deploy, run `morph deploy network.nix switch`
|
||||
|
|
20
common/default.nix
Normal file
20
common/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./users.nix
|
||||
];
|
||||
nix.package = pkgs.lix;
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
wget
|
||||
curl
|
||||
htop
|
||||
tmux
|
||||
openssl
|
||||
git
|
||||
];
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
networking.firewall.enable = false;
|
||||
services.openssh.enable = true;
|
||||
}
|
14
common/users.nix
Normal file
14
common/users.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
nix.settings.trusted-users = [ "@wheel" ];
|
||||
users.users.ezri = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHp8yRnahmUS7l8STsx0pH25O4xTWGYQyQEWeKWxeM7gbkTNPGpiUswmsHgN8Ng0+FwjIw0FHkjQeLSMH9OTSB4= ipad0esp"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJdN4a3yJUlKIaVezOe4hE8fRK9DkGSzwoZ9vfpsBsHh ide0"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICY1V1im0gnXKWdR/H0Q0tajQFQqnDXoNVG3X8/RseI3 lap0"
|
||||
];
|
||||
};
|
||||
}
|
53
hosts/stella.nix
Normal file
53
hosts/stella.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/e31f5386-8b86-4aa0-9666-606680bcd10f";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
networking.useDHCP = lib.mkDefault false;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/vda";
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "stella";
|
||||
search = ["wolfgirl.systems"];
|
||||
nameservers = [ "9.9.9.10" "149.112.112.10" ];
|
||||
dhcpcd.enable = false;
|
||||
interfaces = {
|
||||
enp1s0.ipv4.addresses = [{
|
||||
address = "198.8.59.4";
|
||||
prefixLength = 27;
|
||||
}];
|
||||
};
|
||||
defaultGateway = {
|
||||
address = "198.8.59.1";
|
||||
interface = "enp1s0";
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
swapDevices = [ {
|
||||
device = "/swapfile";
|
||||
size = 4*1024;
|
||||
randomEncryption.enable = true;
|
||||
}];
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
19
network.nix
Normal file
19
network.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
let
|
||||
pkgs = import ./nixpkgs {};
|
||||
in
|
||||
{
|
||||
network = {
|
||||
description = "wolfgirl.systems";
|
||||
inherit pkgs;
|
||||
};
|
||||
|
||||
"stella" = { pkgs, ... }: {
|
||||
deployment = {
|
||||
targetHost = "198.8.59.4";
|
||||
};
|
||||
imports = [
|
||||
./hosts/stella.nix
|
||||
./common
|
||||
];
|
||||
};
|
||||
}
|
1
nixpkgs
Submodule
1
nixpkgs
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 30439d93eb8b19861ccbe3e581abf97bdc91b093
|
7
shell.nix
Normal file
7
shell.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs ? import <nixpkgs> {}}:
|
||||
|
||||
pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
morph
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue