diff options
-rw-r--r-- | flake.nix | 11 | ||||
-rw-r--r-- | hosts/ahmed/remote-builder/default.nix | 1 | ||||
-rw-r--r-- | hosts/ahmed/ssh/default.nix | 1 | ||||
-rw-r--r-- | hosts/ali/desktop-environment/window-manager.nix | 1 | ||||
-rw-r--r-- | hosts/omar/configuration.nix | 63 | ||||
-rw-r--r-- | hosts/omar/desktop-environment/default.nix | 18 | ||||
-rw-r--r-- | hosts/omar/desktop-environment/input.nix | 10 | ||||
-rw-r--r-- | hosts/omar/desktop-environment/window-manager.nix | 37 | ||||
-rw-r--r-- | hosts/omar/hardware-configuration.nix | 54 | ||||
-rw-r--r-- | hosts/omar/wireless-networking/default.nix | 16 | ||||
-rw-r--r-- | metadata.toml | 4 |
11 files changed, 0 insertions, 216 deletions
@@ -94,17 +94,6 @@ ] ++ builtins.attrValues (import ./modules/nixos); }; - omar = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = - [ - {_module.args = args;} - home-manager.nixosModules.home-manager - agenix.nixosModules.default - ./hosts/omar/configuration.nix - ] - ++ builtins.attrValues (import ./modules/nixos); - }; ali = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = diff --git a/hosts/ahmed/remote-builder/default.nix b/hosts/ahmed/remote-builder/default.nix index 63031a6..50f9595 100644 --- a/hosts/ahmed/remote-builder/default.nix +++ b/hosts/ahmed/remote-builder/default.nix @@ -13,7 +13,6 @@ # This is matched with the ssh config IdentityFile on the client-side. openssh.authorizedKeys.keys = [ metadata.hosts.muhammed.sshPubKey - metadata.hosts.omar.sshPubKey ]; }; users.groups.remotebuilder = {}; diff --git a/hosts/ahmed/ssh/default.nix b/hosts/ahmed/ssh/default.nix index ff3be34..4912bf5 100644 --- a/hosts/ahmed/ssh/default.nix +++ b/hosts/ahmed/ssh/default.nix @@ -14,7 +14,6 @@ users.users = lib.genAttrs ["root" "linus"] (_: { openssh.authorizedKeys.keys = [ metadata.hosts.muhammed.sshPubKey - metadata.hosts.omar.sshPubKey # Identity used by Termios on iPhone. "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBPbGet0Mn5+HMeRBXeOkSYqGqbefFZ4kE9aYemyDp9D" diff --git a/hosts/ali/desktop-environment/window-manager.nix b/hosts/ali/desktop-environment/window-manager.nix index d36fc14..f777e3c 100644 --- a/hosts/ali/desktop-environment/window-manager.nix +++ b/hosts/ali/desktop-environment/window-manager.nix @@ -1,7 +1,6 @@ {pkgs, ...}: { services.xserver.windowManager.dwm.enable = true; - # FIXME: Deduplicate this with omar's config (noting the difference in BAT0 vs BAT1). # Show battery and clock in status bar. This is a background daemon which # updates the root window, which DWM uses for status. systemd.user.services.dwm-battery = { diff --git a/hosts/omar/configuration.nix b/hosts/omar/configuration.nix deleted file mode 100644 index 62a6d69..0000000 --- a/hosts/omar/configuration.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: { - imports = [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - - ../../shared/nixos/common-nix-settings - ../../shared/nixos/common-shell-settings - ../../shared/nixos-and-darwin/common-hm-settings - ../../shared/nixos/zfs-impermenance - ../../shared/nixos/persist-ssh-host-keys - ../../shared/nixos/danish - - ./wireless-networking - ./desktop-environment - ]; - - boot.loader.grub = { - # Use the GRUB 2 boot loader. - enable = true; - - # Install grub on the main HDD. - device = "/dev/sda"; - - # ZFS on root requires GRUB to be able to read the pool. - # The pool was created with `-o compatibility=grub2`. - zfsSupport = true; - }; - - # The host id is required by ZFS. - # It is used to (among other things) avoid multiple hosts modifying the same dataset unsafely. - # This was randomly generated. - networking.hostId = "b6e8e80a"; - - # Should match containing folder. - networking.hostName = "omar"; - - # Create the main user. - users.users.linus = { - isNormalUser = true; - hashedPassword = "$y$j9T$UmZES4WC8FWrjBvdazq2e/$rzneAKZeySwSVKiSZJfXC.fciiQdGqxB5uyRaPQ6OF."; - extraGroups = ["wheel"]; - }; - users.mutableUsers = false; - - home-manager.users.linus = { - imports = [ - # I am planning on using this host when traveling. - ../../shared/home-manager/development-full - ../../shared/home-manager/firefox - ]; - home.stateVersion = "24.11"; - }; - - # Enable the OpenSSH daemon. - services.openssh.enable = true; - - system.stateVersion = "24.11"; -} diff --git a/hosts/omar/desktop-environment/default.nix b/hosts/omar/desktop-environment/default.nix deleted file mode 100644 index 52800e0..0000000 --- a/hosts/omar/desktop-environment/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -# This module configures a desktop environment specific to this host. -{ - imports = [ - ./window-manager.nix - ./input.nix - ]; - - # Enable the X11 windowing system. - services.xserver.enable = true; - - # Enable sound. - # hardware.pulseaudio.enable = true; - # OR - # services.pipewire = { - # enable = true; - # pulse.enable = true; - # }; -} diff --git a/hosts/omar/desktop-environment/input.nix b/hosts/omar/desktop-environment/input.nix deleted file mode 100644 index 63cddca..0000000 --- a/hosts/omar/desktop-environment/input.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - # Configure keymap in X11 - services.xserver.xkb.layout = "dk"; - services.xserver.xkb.options = "caps:escape"; - - console.useXkbConfig = true; - - # Enable touchpad support (enabled default in most desktopManager). - services.libinput.enable = true; -} diff --git a/hosts/omar/desktop-environment/window-manager.nix b/hosts/omar/desktop-environment/window-manager.nix deleted file mode 100644 index 0a6d878..0000000 --- a/hosts/omar/desktop-environment/window-manager.nix +++ /dev/null @@ -1,37 +0,0 @@ -{pkgs, ...}: { - services.xserver.windowManager.dwm.enable = true; - - # Show battery and clock in status bar. This is a background daemon which - # updates the root window, which DWM uses for status. - systemd.user.services.dwm-battery = { - description = "Battery status update"; - partOf = ["graphical-session.target"]; - wantedBy = ["graphical-session.target"]; - - serviceConfig.ExecStart = pkgs.writeShellScript "dwm-battery" '' - while true; do - echo -n "$(date +%H:%M) - "; - - # See: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-power - case "$(cat /sys/class/power_supply/BAT0/status)" in - Charging) echo -n "🔋 " ;; - Discharging) echo -n "🪫 " ;; - "Not charging") echo -n "🪫 " ;; - Full) echo -n "🔋 " ;; - Unknown) echo -n "? " ;; - ""|*) echo -n "?? " ;; - esac - - echo -n "$(cat /sys/class/power_supply/BAT0/capacity)%" - - echo - sleep 5 - done | ${pkgs.dwm-setstatus}/bin/dwm-setstatus - ''; - }; - - environment.systemPackages = with pkgs; [ - st - dmenu - ]; -} diff --git a/hosts/omar/hardware-configuration.nix b/hosts/omar/hardware-configuration.nix deleted file mode 100644 index 611bfa3..0000000 --- a/hosts/omar/hardware-configuration.nix +++ /dev/null @@ -1,54 +0,0 @@ -# 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 = ["uhci_hcd" "ehci_pci" "ahci" "usb_storage" "sd_mod"]; - boot.initrd.kernelModules = []; - boot.kernelModules = []; - boot.extraModulePackages = []; - - fileSystems."/" = { - device = "rpool/local/root"; - fsType = "zfs"; - }; - - fileSystems."/nix" = { - device = "rpool/local/nix"; - fsType = "zfs"; - }; - - fileSystems."/persist" = { - device = "rpool/safe/persist"; - fsType = "zfs"; - }; - - fileSystems."/home" = { - device = "rpool/safe/home"; - fsType = "zfs"; - }; - - swapDevices = [ - {device = "/dev/disk/by-uuid/a719dc89-0c69-4384-b9f7-b82b2a0f5cf1";} - ]; - - # 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.enp9s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/omar/wireless-networking/default.nix b/hosts/omar/wireless-networking/default.nix deleted file mode 100644 index fa6a036..0000000 --- a/hosts/omar/wireless-networking/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -# This module configures wireless networking using WPA. -{...}: { - # Enables wireless support via wpa_supplicant. - networking.wireless.enable = true; - - # wpa_supplicant needs a configuration file. That file contains plaintext - # passwords and should NOT be added to the configuration. Instead, let's - # store it persistently. - # - # I created that file with the following commands: - # mkdir -p /persist/etc/ - # echo '# Allow frontend (e.g. wpa_cli) to be used by all users in 'wheel' group. - # ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel' >/persist/etc/wpa_supplicant.conf - # And then I added the network={} blocks for the networks I know. - environment.etc."wpa_supplicant.conf".source = "/persist/etc/wpa_supplicant.conf"; -} diff --git a/metadata.toml b/metadata.toml index 296c11d..abff3ca 100644 --- a/metadata.toml +++ b/metadata.toml @@ -7,7 +7,3 @@ sshPubKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOodiSwTcZcaZxqLyHjI2MGe1CpIBvI [hosts.muhammed] ipAddress = "192.168.68.111" sshPubKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDcmUCfFA/arYpT0zBWoOXcyxN5bgk5cMrWgTIol5RsHB82VzoS+LG3IV4IwBz4QALaCj5DlhfbasGKMkFRgFvLerEtBleIb58RtOXIOf6TIUaqpyHB3h2CjdwrbmyjjWEl9W2BTpadrR5uPr0HoeED8dCFYE5cPjrSELtrYxEW0o1DBJw8bXfpgyYB21loBzrcOhRsrPSaS0gYHZLGY7Av7FGfncVZDLNYL0/pZ/t0UWD6JF+6FgOdGWAuuwSt5WR9DVxGilVG5aFktDB14fNPEBIVf7tkT4/McAihR/u344yaiUWA4bV7w039Ubhn9NdnoBSvGrP6jTy/zDgq5ywFj8aqcdlahxtELNWgxYYrI8HZzvITKo1FU7BOcUN1vNS4npOvyWBl7s3jFCO+R2E/BoyjfsjYTylacpepf26D87U32jNsh39OKdHxRF3/qmMGYa1L7N4M0iT9WFEMCcKB/MMAcHgE25vWPQaY1orU8X8NZPhxjfIVcw1rqcjwCryNwb1ZOMTIEc9kbGiP99MhE7ZA0yvHZfMezeymSwg1kN+iJDTp24gSsFtYuz5vm9lRu/PzfU9lNlp2KHdaLISUouSCCHPgF7zZSWtXa1B920zrAg2Fco8/Iymh+Fa0UNnrbnfyQTgLeNT12SLD4Y5gHimUsuq8tFkxjR6WffmrRw==" - -[hosts.omar] -ipAddress = "192.168.68.121" -sshPubKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPL4c3/PvblXuLFk308W5b3DzkjNu601lib65s9aIgc6 linus@omar" |