Initial commit
This commit is contained in:
29
hosts/orion/configuration.nix
Normal file
29
hosts/orion/configuration.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{ modulesPath, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
|
||||
../../nixos/home-manager.nix
|
||||
../../nixos/nix.nix
|
||||
../../nixos/users.nix
|
||||
../../nixos/utils.nix
|
||||
|
||||
../../server-modules/ssh.nix
|
||||
../../server-modules/caddy.nix
|
||||
../../server-modules/bitwarden.nix
|
||||
../../server-modules/firewall.nix
|
||||
../../server-modules/copyparty.nix
|
||||
../../server-modules/home-assistant.nix
|
||||
../../server-modules/glance.nix
|
||||
|
||||
./disk-config.nix
|
||||
./hardware-configuration.nix
|
||||
./variables.nix
|
||||
];
|
||||
|
||||
home-manager.users."${config.var.username}" = import ./home.nix;
|
||||
|
||||
# Don't touch this
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
55
hosts/orion/disk-config.nix
Normal file
55
hosts/orion/disk-config.nix
Normal file
@@ -0,0 +1,55 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
disko.devices = {
|
||||
disk.disk1 = {
|
||||
device = lib.mkDefault "/dev/sda";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
name = "boot";
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
esp = {
|
||||
name = "ESP";
|
||||
size = "500M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
name = "root";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "pool";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = {
|
||||
pool = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "100%FREE";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
24
hosts/orion/hardware-configuration.nix
Normal file
24
hosts/orion/hardware-configuration.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
# 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 = [ ];
|
||||
|
||||
# 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";
|
||||
}
|
||||
40
hosts/orion/home.nix
Normal file
40
hosts/orion/home.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
# Mostly user-specific configuration
|
||||
./variables.nix
|
||||
|
||||
# Programs
|
||||
#../../home/programs/nvf
|
||||
../../home/programs/shell
|
||||
#../../home/programs/fetch
|
||||
../../home/programs/git
|
||||
#../../home/programs/lazygit
|
||||
|
||||
# Scripts
|
||||
#../../home/scripts # All scripts
|
||||
];
|
||||
|
||||
home = {
|
||||
inherit (config.var) username;
|
||||
homeDirectory = "/home/" + config.var.username;
|
||||
|
||||
packages = with pkgs; [
|
||||
# Utils
|
||||
btop
|
||||
|
||||
# Provide relevant terminfo
|
||||
kitty
|
||||
ghostty
|
||||
];
|
||||
|
||||
# Don't touch this
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
42
hosts/orion/variables.nix
Normal file
42
hosts/orion/variables.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
# Choose your theme here:
|
||||
../../themes/catppuccin.nix
|
||||
];
|
||||
|
||||
config.var = {
|
||||
hostname = "orion";
|
||||
username = "kiri";
|
||||
configDirectory = "/home/" + config.var.username + "/.config/nixos"; # The path of the nixos configuration directory
|
||||
|
||||
keyboardLayout = "us";
|
||||
|
||||
location = "Meterik";
|
||||
timeZone = "Europe/Amsterdam";
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
timeLocale = "en_DK.UTF-8";
|
||||
numericLocale = "en_IE.UTF-8";
|
||||
otherLocale = "nl_NL.UTF-8";
|
||||
|
||||
git = {
|
||||
username = "kiri";
|
||||
email = "mail@jelles.net";
|
||||
};
|
||||
|
||||
autoUpgrade = false;
|
||||
autoGarbageCollector = true;
|
||||
};
|
||||
|
||||
# Let this here
|
||||
options = {
|
||||
var = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user