From 186dc37971785a8033c663a9ba4258b6f8a55838 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 9 Oct 2023 15:09:02 -0500 Subject: [PATCH] Add foxtrot --- flake.nix | 3 ++ modules/home-manager/default.nix | 2 ++ modules/home-manager/foxtrot.nix | 6 ++++ modules/home-manager/sway-laptop.nix | 6 ++++ modules/home-manager/thinker.nix | 6 +--- nixos/foxtrot/default.nix | 54 ++++++++++++++++++++++++++++ 6 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 modules/home-manager/foxtrot.nix create mode 100644 modules/home-manager/sway-laptop.nix create mode 100644 nixos/foxtrot/default.nix diff --git a/flake.nix b/flake.nix index ca81d8f..942db43 100644 --- a/flake.nix +++ b/flake.nix @@ -105,6 +105,9 @@ thinker = mkNixosUnstableSystem "x86_64-linux" [./nixos/thinker] (with outputs.homeManagerModules; [ thinker ]); + foxtrot = mkNixosUnstableSystem "x86_64-linux" [./nixos/foxtrot] (with outputs.homeManagerModules; [ + foxtrot + ]); beefcake = mkNixosUnstableSystem "x86_64-linux" [ inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index eab13e2..3d05e55 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -23,7 +23,9 @@ desktop = import ./desktop.nix; linux-desktop = import ./linux-desktop.nix; sway = import ./sway.nix; + sway-laptop = import ./sway-laptop.nix; dragon = import ./dragon.nix; thinker = import ./thinker.nix; + foxtrot = import ./foxtrot.nix; } diff --git a/modules/home-manager/foxtrot.nix b/modules/home-manager/foxtrot.nix new file mode 100644 index 0000000..e32aa73 --- /dev/null +++ b/modules/home-manager/foxtrot.nix @@ -0,0 +1,6 @@ +{outputs, ...}: { + imports = with outputs.homeManagerModules; [ + sway + sway-laptop + ]; +} diff --git a/modules/home-manager/sway-laptop.nix b/modules/home-manager/sway-laptop.nix new file mode 100644 index 0000000..b83bd34 --- /dev/null +++ b/modules/home-manager/sway-laptop.nix @@ -0,0 +1,6 @@ +{ + wayland.windowManager.sway = { + # TODO: firefox initial open on workspace 2 + # TODO: kitty initial open on workspace 1 + }; +} diff --git a/modules/home-manager/thinker.nix b/modules/home-manager/thinker.nix index 7e53e6f..e32aa73 100644 --- a/modules/home-manager/thinker.nix +++ b/modules/home-manager/thinker.nix @@ -1,10 +1,6 @@ {outputs, ...}: { imports = with outputs.homeManagerModules; [ sway + sway-laptop ]; - - wayland.windowManager.sway = { - # TODO: firefox initial open on workspace 2 - # TODO: kitty initial open on workspace 1 - }; } diff --git a/nixos/foxtrot/default.nix b/nixos/foxtrot/default.nix new file mode 100644 index 0000000..5299257 --- /dev/null +++ b/nixos/foxtrot/default.nix @@ -0,0 +1,54 @@ +{ + flake, + inputs, + outputs, + lib, + # config, + pkgs, + ... +}: { + networking.hostName = "foxtrot"; + + imports = + [ + inputs.disko.nixosModules.disko + flake.diskoConfigurations.standard + ] + ++ (with outputs.nixosModules; [ + desktop-usage + podman + postgres + wifi + ]) + ++ [ + inputs.hardware.nixosModules.common-cpu-amd + inputs.hardware.nixosModules.common-pc-laptop-ssd + ]; + + # TODO: hibernation? does sleep suffice? + # TODO: perform a hardware scan + + boot = { + loader = { + efi.canTouchEfiVariables = true; + systemd-boot.enable = true; + }; + # kernelParams = ["boot.shell_on_fail"]; + kernelPackages = pkgs.linuxPackages_latest; + initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci"]; + }; + hardware.bluetooth.enable = true; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + services.printing.enable = true; + + networking = { + firewall = { + enable = true; + allowPing = true; + allowedTCPPorts = [22]; + allowedUDPPorts = []; + }; + }; + + system.stateVersion = "23.11"; +}