Made a new machine: Solis. It is the Latin word for sun, as it is my personal server.

This commit is contained in:
KoenDR06 2024-04-01 22:06:44 +02:00
parent adee460e81
commit 4fd8fb6e6f
7 changed files with 172 additions and 8 deletions

View file

@ -1,4 +1,4 @@
{
r{
description = "Your new nix config";
inputs = {
@ -71,6 +71,12 @@
./machines/terra/configuration.nix
];
};
solis = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
./machines/solis/configuration.nix
];
};
};
};
}

View file

@ -52,15 +52,12 @@
programs.home-manager.enable = true;
programs.git = {
enable = true;
userName = "KoenDR06"; userEmail =
"koen.de.ruiter@hotmail.com";
userName = "KoenDR06";
userEmail = "koen.de.ruiter@hotmail.com";
};
programs.firefox.enable = true;
programs.gh.enable = true;
programs.zsh = {
shellAliases = {
update = "sudo nixos-rebuild switch --flake .#laptop-koen";
};
oh-my-zsh = {
enable = true;
plugins = [ "git" ];

View file

@ -0,0 +1,54 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
imports = [];
nixpkgs = {
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
];
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
};
home = {
username = "horseman";
homeDirectory = "/home/horseman";
};
# Enable programs
home.packages = with pkgs; [
htop
zoxide
];
programs.home-manager.enable = true;
programs.git = {
enable = true;
userName = "KoenDR06";
userEmail = "koen.de.ruiter@hotmail.com";
};
programs.gh.enable = true;
programs.zsh = {
oh-my-zsh = {
enable = true;
plugins = [ "git" ];
theme = "agnoster";
};
};
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "23.05";
}

View file

@ -31,7 +31,7 @@
extraSpecialArgs = { inherit inputs outputs; };
users = {
# Import your home-manager configuration
horseman = import ../../home-manager/home.nix;
horseman = import ../../home-manager/apps.nix;
};
};

View file

@ -0,0 +1,73 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
imports = [
inputs.home-manager.nixosModules.home-manager
./hardware-configuration.nix
];
home-manager = {
extraSpecialArgs = { inherit inputs outputs; };
users = {
horseman = import ../../home-manager/home.nix;
};
};
nixpkgs = {
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
];
config = {
allowUnfree = true;
};
};
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
nix.nixPath = ["/etc/nix/path"];
environment.etc =
lib.mapAttrs'
(name: value: {
name = "nix/path/${name}";
value.source = value.flake;
})
config.nix.registry;
nix.settings = {
experimental-features = "nix-command flakes";
auto-optimise-store = true;
};
networking.hostName = "solis";
boot.loader.systemd-boot.enable = true;
users.users = {
horseman = {
initialPassword = "1234";
isNormalUser = true;
openssh.authorizedKeys.keys = [
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
];
extraGroups = ["wheel"];
};
};
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.11";
}

View file

@ -0,0 +1,34 @@
# 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 + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "ohci_pci" "ehci_pci" "pata_atiixp" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/74211087-d087-49d5-bc58-eb49748a51f0";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/bfe8c490-e8d7-438e-b95b-5bc5743bb23b"; }
];
# 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.enp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -74,7 +74,7 @@
extraSpecialArgs = { inherit inputs outputs; };
users = {
# Import your home-manager configuration
horseman = import ../../home-manager/home.nix;
horseman = import ../../home-manager/apps.nix;
};
};