From ae61694ecc90e380563c83ac8f7a26146e2974f5 Mon Sep 17 00:00:00 2001 From: noe Date: Sat, 23 Dec 2023 17:44:54 -0500 Subject: [PATCH] drone: add system + kde --- .sops.yaml | 10 ++++- nixos/features/kde.nix | 11 +++++ nixos/hosts/drone/default.nix | 16 +++++++ nixos/hosts/drone/hardware-configuration.nix | 45 ++++++++++++++++++++ 4 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 nixos/features/kde.nix create mode 100644 nixos/hosts/drone/default.nix create mode 100644 nixos/hosts/drone/hardware-configuration.nix diff --git a/.sops.yaml b/.sops.yaml index e9293dc..efe48a9 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -7,7 +7,8 @@ keys: &all - &m_cider age1kjsga2kf95lu7p5stqr5d9p87jquyypnx97cycj6jvhsm9zkn93quexx4r - &m_aerial age1jc6ghxfgxe3gx53xa55azxan447cfxaqfqeh5y5yzqapj7mw7ajql8kv02 - &m_blueberry age12p9lw3zgufcg7qx375t9lwtckzwgj0tkn2pt9uj3tnx9sn3ucqgsf5ctdd - - &m_keylime age1pvmyk2ukaaq0xqx6wcst4smlfh2l76camukfv03ykfr0qdhuce6quttryy + - &m_keylime age14luf58rfmzfg49624x6t67ahc0v3f0q2l0ely0he34y4skvmwg2qxdzdad + - &m_drone age1faccfe85637hme39xyzgmvjn6ku9c4aapfmpfc35hswj5emhnedssrg2cq creation_rules: - path_regex: secrets/[^/]+\.(yaml|json|env|ini)$ @@ -55,3 +56,10 @@ creation_rules: - *op_noe_2 - *op_noe_3 - *m_keylime + - path_regex: secrets/drone/[^/]+\.(yaml|json|env|ini)$ + key_groups: + - age: + - *op_noe + - *op_noe_2 + - *op_noe_3 + - *m_drone diff --git a/nixos/features/kde.nix b/nixos/features/kde.nix new file mode 100644 index 0000000..15a06ac --- /dev/null +++ b/nixos/features/kde.nix @@ -0,0 +1,11 @@ +{ pkgs, ... }: { + services.xserver = { + displayManager.sddm = { + enable = true; + wayland.enable = true; + }; + desktopManager.plasma5.enable = true; + }; + + programs.xwayland.enable = true; +} diff --git a/nixos/hosts/drone/default.nix b/nixos/hosts/drone/default.nix new file mode 100644 index 0000000..d2490b5 --- /dev/null +++ b/nixos/hosts/drone/default.nix @@ -0,0 +1,16 @@ +{ lib, config, pkgs, outputs, ... }: { + imports = [ + ./hardware-configuration.nix + ../../client.nix + + ../../features/wifi.nix + ../../features/kde.nix + ../../features/tailscale.nix + ../../features/sound + ]; + + home-manager.users.noe = import ../../../home-manager/noe/hosts/drone.nix; + + networking.hostName = "drone"; + system.stateVersion = "24.05"; +} diff --git a/nixos/hosts/drone/hardware-configuration.nix b/nixos/hosts/drone/hardware-configuration.nix new file mode 100644 index 0000000..8b8101e --- /dev/null +++ b/nixos/hosts/drone/hardware-configuration.nix @@ -0,0 +1,45 @@ +# 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 = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/e0b8ad1f-0df0-4b4f-bbfa-1d25a72860b9"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/BE53-E543"; + fsType = "vfat"; + }; + + fileSystems."/tmp" = + { device = "/dev/disk/by-uuid/bc0d58a9-3bd5-4dd6-8087-3cc22324ba11"; + fsType = "ext4"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/52ede635-0667-4039-ad12-6456b87d36cf"; } + ]; + + # 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.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} +