From 669c1d3b3f33c61badc07831055c57cc17c70df9 Mon Sep 17 00:00:00 2001 From: get Date: Fri, 12 Apr 2024 07:09:49 +0200 Subject: [PATCH] Different host configuration --- hosts/default.nix | 15 +++++- hosts/dyonisos/profile.nix | 9 ---- .../configuration.nix => lars/default.nix} | 4 -- hosts/lars/dyonisos/configuration.nix | 11 ++++ hosts/{ => lars}/dyonisos/default.nix | 1 + .../dyonisos/hardware-configuration.nix | 0 hosts/lars/dyonisos/profile.nix | 9 ++++ hosts/{ => lars}/dyonisos/programs.nix | 0 hosts/lars/kronos/configuration.nix | 11 ++++ hosts/lars/kronos/default.nix | 9 ++++ hosts/lars/kronos/hardware-configuration.nix | 38 ++++++++++++++ hosts/lars/kronos/profile.nix | 10 ++++ hosts/lars/kronos/programs.nix | 50 +++++++++++++++++++ 13 files changed, 153 insertions(+), 14 deletions(-) delete mode 100644 hosts/dyonisos/profile.nix rename hosts/{dyonisos/configuration.nix => lars/default.nix} (94%) create mode 100644 hosts/lars/dyonisos/configuration.nix rename hosts/{ => lars}/dyonisos/default.nix (92%) rename hosts/{ => lars}/dyonisos/hardware-configuration.nix (100%) create mode 100644 hosts/lars/dyonisos/profile.nix rename hosts/{ => lars}/dyonisos/programs.nix (100%) create mode 100644 hosts/lars/kronos/configuration.nix create mode 100644 hosts/lars/kronos/default.nix create mode 100644 hosts/lars/kronos/hardware-configuration.nix create mode 100644 hosts/lars/kronos/profile.nix create mode 100644 hosts/lars/kronos/programs.nix diff --git a/hosts/default.nix b/hosts/default.nix index 9915003..0984725 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -3,6 +3,7 @@ let inherit (inputs) self; inherit (self) lib; in { + # Vali vali = lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit lib inputs self; }; @@ -14,11 +15,23 @@ in { ]; }; + # Lars dyonisos = lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit lib inputs self; }; modules = [ - ./dyonisos + ./lars/dyonisos + ../modules + inputs.home-manager.nixosModules.home-manager + inputs.agenix.nixosModules.default + ]; + }; + + kronos = lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit lib inputs self; }; + modules = [ + ./lars/kronos ../modules inputs.home-manager.nixosModules.home-manager inputs.agenix.nixosModules.default diff --git a/hosts/dyonisos/profile.nix b/hosts/dyonisos/profile.nix deleted file mode 100644 index eb75946..0000000 --- a/hosts/dyonisos/profile.nix +++ /dev/null @@ -1,9 +0,0 @@ -_: { - imports = [ - ../../options/boot/grub-boot.nix - ../../options/desktop/fonts.nix - ../../options/common/networking.nix - ../../options/common/pin-registry.nix - ../../options/common/preserve-system.nix - ]; -} diff --git a/hosts/dyonisos/configuration.nix b/hosts/lars/default.nix similarity index 94% rename from hosts/dyonisos/configuration.nix rename to hosts/lars/default.nix index 5b766ea..95ee0e7 100644 --- a/hosts/dyonisos/configuration.nix +++ b/hosts/lars/default.nix @@ -7,10 +7,6 @@ programs.kdeconnect.enable = true; myOptions = { other = { - system = { - hostname = "dyonisos"; - username = "lars"; - }; home-manager = { enable = true; enableDirenv = true; diff --git a/hosts/lars/dyonisos/configuration.nix b/hosts/lars/dyonisos/configuration.nix new file mode 100644 index 0000000..a702148 --- /dev/null +++ b/hosts/lars/dyonisos/configuration.nix @@ -0,0 +1,11 @@ +{ config, inputs, pkgs, ... }: +{ + myOptions = { + other = { + system = { + hostname = "dyonisos"; + username = "lars"; + }; + }; + }; +} diff --git a/hosts/dyonisos/default.nix b/hosts/lars/dyonisos/default.nix similarity index 92% rename from hosts/dyonisos/default.nix rename to hosts/lars/dyonisos/default.nix index fc2f103..cf0eaab 100644 --- a/hosts/dyonisos/default.nix +++ b/hosts/lars/dyonisos/default.nix @@ -1,5 +1,6 @@ _: { imports = [ + ../. ./configuration.nix ./programs.nix ./hardware-configuration.nix diff --git a/hosts/dyonisos/hardware-configuration.nix b/hosts/lars/dyonisos/hardware-configuration.nix similarity index 100% rename from hosts/dyonisos/hardware-configuration.nix rename to hosts/lars/dyonisos/hardware-configuration.nix diff --git a/hosts/lars/dyonisos/profile.nix b/hosts/lars/dyonisos/profile.nix new file mode 100644 index 0000000..d4fe1e8 --- /dev/null +++ b/hosts/lars/dyonisos/profile.nix @@ -0,0 +1,9 @@ +_: { + imports = [ + ../../../options/boot/grub-boot.nix + ../../../options/desktop/fonts.nix + ../../../options/common/networking.nix + ../../../options/common/pin-registry.nix + ../../../options/common/preserve-system.nix + ]; +} diff --git a/hosts/dyonisos/programs.nix b/hosts/lars/dyonisos/programs.nix similarity index 100% rename from hosts/dyonisos/programs.nix rename to hosts/lars/dyonisos/programs.nix diff --git a/hosts/lars/kronos/configuration.nix b/hosts/lars/kronos/configuration.nix new file mode 100644 index 0000000..d5a65ed --- /dev/null +++ b/hosts/lars/kronos/configuration.nix @@ -0,0 +1,11 @@ +{ config, inputs, pkgs, ... }: +{ + myOptions = { + other = { + system = { + hostname = "kronos"; + username = "lars"; + }; + }; + }; +} diff --git a/hosts/lars/kronos/default.nix b/hosts/lars/kronos/default.nix new file mode 100644 index 0000000..cf0eaab --- /dev/null +++ b/hosts/lars/kronos/default.nix @@ -0,0 +1,9 @@ +_: { + imports = [ + ../. + ./configuration.nix + ./programs.nix + ./hardware-configuration.nix + ./profile.nix + ]; +} diff --git a/hosts/lars/kronos/hardware-configuration.nix b/hosts/lars/kronos/hardware-configuration.nix new file mode 100644 index 0000000..8a45163 --- /dev/null +++ b/hosts/lars/kronos/hardware-configuration.nix @@ -0,0 +1,38 @@ +# 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" "thunderbolt" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/bca69c91-6f66-4b21-b90e-15b4bc21a405"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/8683-FD07"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0f0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/lars/kronos/profile.nix b/hosts/lars/kronos/profile.nix new file mode 100644 index 0000000..40caaa7 --- /dev/null +++ b/hosts/lars/kronos/profile.nix @@ -0,0 +1,10 @@ +_: { + imports = [ + ../../../options/boot/grub-boot.nix + ../../../options/desktop/fonts.nix + ../../../options/common/networking.nix + ../../options/common/gpu/nvidia.nix + ../../../options/common/pin-registry.nix + ../../../options/common/preserve-system.nix + ]; +} diff --git a/hosts/lars/kronos/programs.nix b/hosts/lars/kronos/programs.nix new file mode 100644 index 0000000..b487c30 --- /dev/null +++ b/hosts/lars/kronos/programs.nix @@ -0,0 +1,50 @@ +{ config, inputs, pkgs, ... }: +let + username = config.myOptions.other.system.username; +in { + home-manager.users.${username} = { + home.packages = let + fenix = inputs.fenix.packages.${pkgs.system}; + + in with pkgs; [ + neofetch + git + trash-cli + element-desktop + steam + libreoffice-fresh + ventoy-full + lazygit + # obsidian + neofetch + zip + vlc + zathura + alacritty + unzip + gcc + bibata-cursors + networkmanagerapplet + xclip + pamixer + pcmanfm + ffmpeg_6-full + (fenix.complete.withComponents [ + "cargo" + "clippy" + "rust-src" + "rustc" + "rustfmt" + ]) + polkit + fastfetch + alsa-utils + gdb + tree + smartmontools + python3 + rustdesk + neovim + ]; + }; +}