feat: init sakura
This commit is contained in:
parent
c6dfc675a9
commit
f3fe014558
4 changed files with 115 additions and 0 deletions
|
@ -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
50
hosts/sakura/default.nix
Normal 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";
|
||||
};
|
||||
}
|
37
hosts/sakura/hardware-configuration.nix
Normal file
37
hosts/sakura/hardware-configuration.nix
Normal 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
18
hosts/sakura/home.nix
Normal 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";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue