From c21e9b2c8351e8f3d8518cb8f49e2b5f14fd4e27 Mon Sep 17 00:00:00 2001 From: Daniel Meiburg Date: Thu, 28 Sep 2023 23:12:25 +0200 Subject: [PATCH] add p14s config --- dotfiles | 2 +- home.nix | 1 + hosts/firefly/configuration.nix | 2 ++ hosts/p14s/configuration.nix | 33 +++++++++++++++++++++ hosts/p14s/hardware-configuration.nix | 41 +++++++++++++++++++++++++++ hosts/workstation.nix | 2 -- 6 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 hosts/p14s/configuration.nix create mode 100644 hosts/p14s/hardware-configuration.nix diff --git a/dotfiles b/dotfiles index 484242c..261b4c3 160000 --- a/dotfiles +++ b/dotfiles @@ -1 +1 @@ -Subproject commit 484242c9dcab97d89eba98f784615a4e6829772b +Subproject commit 261b4c3691dfacd55aefea5db722253436dde289 diff --git a/home.nix b/home.nix index 04c453e..bc29019 100644 --- a/home.nix +++ b/home.nix @@ -23,6 +23,7 @@ mpv ffmpeg xdg-utils + networkmanagerapplet # All of the below is for sway wl-clipboard bemenu diff --git a/hosts/firefly/configuration.nix b/hosts/firefly/configuration.nix index e102619..e4a6256 100644 --- a/hosts/firefly/configuration.nix +++ b/hosts/firefly/configuration.nix @@ -6,6 +6,8 @@ ./hardware-configuration.nix ../workstation.nix ]; + networking.hostName = "firefly"; # Define your hostname. + nix.settings.experimental-features = [ "nix-command" "flakes" ]; boot.loader.systemd-boot.enable = true; diff --git a/hosts/p14s/configuration.nix b/hosts/p14s/configuration.nix new file mode 100644 index 0000000..b1f579b --- /dev/null +++ b/hosts/p14s/configuration.nix @@ -0,0 +1,33 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ../workstation.nix + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Setup keyfile + boot.initrd.secrets = { + "/crypto_keyfile.bin" = null; + }; + + networking.hostName = "p14s"; # Define your hostname. + + # 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/p14s/hardware-configuration.nix b/hosts/p14s/hardware-configuration.nix new file mode 100644 index 0000000..7fe1e98 --- /dev/null +++ b/hosts/p14s/hardware-configuration.nix @@ -0,0 +1,41 @@ +# 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" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/3f61976b-b99f-4d7f-b950-05dbe42df017"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-dd6baa94-e503-4586-bf11-2b74a699e22c".device = "/dev/disk/by-uuid/dd6baa94-e503-4586-bf11-2b74a699e22c"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/963E-FF34"; + 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.enp2s0f0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/workstation.nix b/hosts/workstation.nix index 67dad6b..c386ed8 100644 --- a/hosts/workstation.nix +++ b/hosts/workstation.nix @@ -3,8 +3,6 @@ { hardware.opengl.enable = true; - networking.hostName = "firefly"; # Define your hostname. - networking.networkmanager.enable = true; time.timeZone = "Europe/Berlin";