feat: init sakura

This commit is contained in:
notohh 2023-05-12 05:26:48 -04:00
parent c6dfc675a9
commit f3fe014558
Signed by: notohh
GPG key ID: BD47506D475EE86D
4 changed files with 115 additions and 0 deletions

View file

@ -20,5 +20,15 @@ inputs: {
sshOpts = ["-t"];
magicRollback = false;
};
sakura = {
hostname = "192.168.1.25";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.sakura;
};
sshUser = "notoh";
sshOpts = ["-t"];
magicRollback = false;
};
};
}

50
hosts/sakura/default.nix Normal file
View file

@ -0,0 +1,50 @@
{
config,
pkgs,
...
}: {
imports = [
./hardware-configuration.nix
../../modules
];
boot.loader = {
grub = {
enable = true;
configurationLimit = 3;
device = "/dev/sda";
useOSProber = false;
};
};
networking = {
hostName = "sakura";
};
services.xserver = {
layout = "us";
xkbVariant = "";
};
virtualisation.docker.enable = true;
users = {
defaultUserShell = pkgs.nushell;
users.notoh = {
isNormalUser = true;
description = "notoh";
extraGroups = ["networkmanager" "wheel" "docker"];
};
};
environment.systemPackages = with pkgs; [
wget
nfs-utils
pinentry-curses
];
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "curses";
};
}

View file

@ -0,0 +1,37 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/8c99d37a-4599-4ef2-830c-8752854d0493";
fsType = "ext4";
};
swapDevices = [
{device = "/dev/disk/by-uuid/96c98d32-fdb4-4055-8112-46f9b5680181";}
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.ens18.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

18
hosts/sakura/home.nix Normal file
View file

@ -0,0 +1,18 @@
{
config,
pkgs,
...
}: {
imports = [
../../home
];
systemd.user.startServices = "sd-switch";
programs.home-manager.enable = true;
home = {
username = "notoh";
homeDirectory = "/home/notoh";
stateVersion = "23.05";
};
}