aboutsummaryrefslogtreecommitdiff
path: root/hosts/underworld
diff options
context:
space:
mode:
authorMiran Bastaja <miran.bastaja04@gmail.com>2023-11-27 00:51:57 +0100
committerMiran Bastaja <miran.bastaja04@gmail.com>2023-11-27 00:51:57 +0100
commitb9893bfea01b1a9d98b22d4fc5d2ff6afc5dc5d7 (patch)
tree96d273de6f41692d7b26cf6e5a8e63493a41db6e /hosts/underworld
parentedb323ce346ee7f935fec7f8ed2ddc6d697cd0f1 (diff)
parent5017b0f8aa2a9a301527a911c5316136595e48b6 (diff)
Merge branch 'main' of codeberg.org:miranb/nixos-config
Diffstat (limited to 'hosts/underworld')
-rw-r--r--hosts/underworld/default.nix89
-rw-r--r--hosts/underworld/hardware.nix39
-rw-r--r--hosts/underworld/home.nix24
3 files changed, 152 insertions, 0 deletions
diff --git a/hosts/underworld/default.nix b/hosts/underworld/default.nix
new file mode 100644
index 0000000..bcdc5a6
--- /dev/null
+++ b/hosts/underworld/default.nix
@@ -0,0 +1,89 @@
+{ config, pkgs, flakeRoot, inputs, ... }: {
+ imports = [
+ # Include the results of the hardware scan.
+ ./hardware.nix
+ ./home.nix
+ (flakeRoot + /share/system/steam.nix)
+ (flakeRoot + /share/system/hyprland.nix)
+ #(flakeRoot + /share/system/spotifyd.nix)
+ { _module.args = { inherit inputs; }; }
+ ];
+
+ nixpkgs.config.allowUnfree = true;
+ nix.gc = {
+ dates = "weekly";
+ automatic = true;
+ persistent = true;
+ randomizedDelaySec = "15min";
+ };
+
+ # Use the systemd-boot EFI boot loader.
+ boot = {
+ loader.systemd-boot.enable = true;
+ loader.efi.canTouchEfiVariables = true;
+ };
+
+ networking = {
+ hostName = "underworld";
+ useNetworkd = true;
+
+ firewall = {
+ enable = true;
+ allowedTCPPorts = [ 80 443 34197 ];
+ };
+ };
+
+ time.timeZone = "Europe/Zagreb";
+ i18n.defaultLocale = "en_US.UTF-8";
+
+ # Enable sound.
+ sound.enable = true;
+ services.pipewire = {
+ enable = true;
+ alsa.enable = true;
+ pulse.enable = true;
+ };
+
+ programs.gnupg.agent = {
+ enable = true;
+ enableSSHSupport = true;
+ };
+
+ virtualisation.podman = {
+ enable = true;
+ dockerCompat = true;
+ autoPrune.enable = true;
+ };
+
+ users.users = {
+ osiris = {
+ isNormalUser = true;
+ extraGroups = [ "wheel" "video" "network" "podman" ];
+ };
+ guest = {
+ isNormalUser = true;
+ extraGroups = [ "video" "network" ];
+ };
+ };
+
+ programs.zsh.enable = true;
+ users.defaultUserShell = pkgs.zsh;
+
+ fonts.packages = with pkgs; [
+ noto-fonts
+ noto-fonts-cjk
+ noto-fonts-emoji
+ proggyfonts
+ (nerdfonts.override { fonts = [ "FiraCode" ]; })
+ overpass
+ inter
+ ];
+
+ # This value determines the NixOS release from which the default
+ # settings for stateful data, like file locations and database versions
+ # on your system were taken. It‘s perfectly fine and recommended to leave
+ # this value at the release version of the first install of this system.
+ # Before changing this value read the documentation for this option
+ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
+ system.stateVersion = "23.05"; # Did you read the comment?
+}
diff --git a/hosts/underworld/hardware.nix b/hosts/underworld/hardware.nix
new file mode 100644
index 0000000..a99d2a3
--- /dev/null
+++ b/hosts/underworld/hardware.nix
@@ -0,0 +1,39 @@
+# 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 = [ "nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-amd" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/fc1a2a05-efb0-45e7-83f2-2b9dae515b0a";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/FEB7-A352";
+ fsType = "vfat";
+ };
+
+ swapDevices =
+ [ { device = "/dev/disk/by-uuid/f16d9af0-4043-4d39-a8d6-e788451f8e9e"; }
+ ];
+
+ # 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.enp1s0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
+
+ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/hosts/underworld/home.nix b/hosts/underworld/home.nix
new file mode 100644
index 0000000..c7cdb1b
--- /dev/null
+++ b/hosts/underworld/home.nix
@@ -0,0 +1,24 @@
+{ pkgs
+, flakeRoot
+, inputs
+, ...
+}: {
+ home-manager = {
+ useGlobalPkgs = true;
+ useUserPackages = true;
+ sharedModules = [{ imports = [ (flakeRoot + /share/home/hyprdesktop.nix) ]; }];
+ extraSpecialArgs = { inherit inputs; };
+ };
+
+ home-manager.users.osiris = {
+ imports = [
+ (flakeRoot + /share/home/gallery-dl.nix)
+ ];
+
+ home.stateVersion = "23.05";
+ };
+
+ home-manager.users.root = {
+ home.stateVersion = "23.05";
+ };
+}