From d2e880c76edc738f686b2504ef6485e082fa7a2d Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 2 Jan 2024 19:53:26 -0600 Subject: [PATCH 01/15] Remove a bunch of gaming-centric packages from sway module --- modules/home-manager/foxtrot.nix | 2 +- modules/nixos/sway.nix | 30 +++++++++++++++--------------- nixos/foxtrot/default.nix | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/home-manager/foxtrot.nix b/modules/home-manager/foxtrot.nix index 0f30296..4e0bdfb 100644 --- a/modules/home-manager/foxtrot.nix +++ b/modules/home-manager/foxtrot.nix @@ -4,7 +4,7 @@ in { imports = with outputs.homeManagerModules; [ sway sway-laptop - hyprland + # hyprland ]; home = { diff --git a/modules/nixos/sway.nix b/modules/nixos/sway.nix index 831559a..188d3ae 100644 --- a/modules/nixos/sway.nix +++ b/modules/nixos/sway.nix @@ -47,34 +47,34 @@ systemPackages = with pkgs; [ brightnessctl feh - gimp + # gimp grim - inkscape - krita + # inkscape + # krita libinput libinput-gestures libnotify - lutris - nil - nixpkgs-fmt + # lutris + # nil + # nixpkgs-fmt noto-fonts pamixer - pavucontrol + # pavucontrol playerctl - pulseaudio + # pulseaudio pulsemixer - rclone - restic + # rclone + # restic slurp - steam + # steam swaybg swayidle swaylock - vlc - vulkan-tools + # vlc + # vulkan-tools waybar - weechat - wine + # weechat + # wine wl-clipboard zathura ]; diff --git a/nixos/foxtrot/default.nix b/nixos/foxtrot/default.nix index 826bb26..28f5012 100644 --- a/nixos/foxtrot/default.nix +++ b/nixos/foxtrot/default.nix @@ -19,7 +19,7 @@ podman postgres wifi - hyprland + # hyprland ]) ++ [ inputs.hardware.nixosModules.framework-13-7040-amd From 8a9a3ea0cb7da90ae610daf9ae523ca923829b01 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 4 Jan 2024 13:40:14 -0600 Subject: [PATCH 02/15] Add thablet stuff --- flake.nix | 28 +++++--------- modules/nixos/default.nix | 1 + modules/nixos/gnome.nix | 74 ++++++++++++++++++++++++++++++++++++ modules/nixos/sway.nix | 1 - nixos/thablet/default.nix | 79 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 164 insertions(+), 19 deletions(-) create mode 100644 modules/nixos/gnome.nix create mode 100644 nixos/thablet/default.nix diff --git a/flake.nix b/flake.nix index b90d846..fd52997 100644 --- a/flake.nix +++ b/flake.nix @@ -117,15 +117,11 @@ in { base = base; nixos = base; # alias - dragon = mkNixosSystem "x86_64-linux" [./nixos/dragon] (with outputs.homeManagerModules; [ - dragon - ]); - thinker = mkNixosSystem "x86_64-linux" [./nixos/thinker] (with outputs.homeManagerModules; [ - thinker - ]); - foxtrot = mkNixosSystem "x86_64-linux" [./nixos/foxtrot] (with outputs.homeManagerModules; [ - foxtrot - ]); + thablet = mkNixosSystem "x86_64-linux" [./nixos/thablet] [outputs.homeManagerModules.base]; + thinker = mkNixosSystem "x86_64-linux" [./nixos/thinker] [outputs.homeManagerModules.thinker]; + foxtrot = mkNixosSystem "x86_64-linux" [./nixos/foxtrot] [ + outputs.homeManagerModules.foxtrot + ]; beefcake = mkNixosSystem "x86_64-linux" [ inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev @@ -133,15 +129,11 @@ ] (with outputs.homeManagerModules; [ linux ]); - rascal = mkNixosSystem "x86_64-linux" [./nixos/rascal] (with outputs.homeManagerModules; [ - linux - ]); - musicbox = mkNixosSystem "x86_64-linux" [./nixos/musicbox] (with outputs.homeManagerModules; [ - sway - ]); - router = mkNixosSystem "x86_64-linux" [./nixos/router] (with outputs.homeManagerModules; [ - common - ]); + rascal = mkNixosSystem "x86_64-linux" [./nixos/rascal] [ + outputs.homeManagerModules.linux + ]; + musicbox = mkNixosSystem "x86_64-linux" [./nixos/musicbox] [outputs.homeManagerModules.sway]; + router = mkNixosSystem "x86_64-linux" [./nixos/router] [outputs.homeManagerModules.common]; }; # Standalone home-manager configuration entrypoint diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 4d7468e..367df2d 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -14,5 +14,6 @@ hyprland = import ./hyprland.nix; user-installed-applications = import ./user-installed-applications.nix; wifi = import ./wifi.nix; + gnome = import ./gnome.nix; kde-connect = import ./kde-connect.nix; } diff --git a/modules/nixos/gnome.nix b/modules/nixos/gnome.nix new file mode 100644 index 0000000..3d451f9 --- /dev/null +++ b/modules/nixos/gnome.nix @@ -0,0 +1,74 @@ +{pkgs, ...}: { + imports = [./pipewire.nix]; + + services.xserver.enable = true; + services.xserver.displayManager.gdm = { + enable = true; + }; + + hardware.pulseaudio.enable = false; + + services.xserver.desktopManager.gnome = { + enable = true; + }; + + programs.gnupg.agent = { + enable = true; + pinentryFlavor = "gnome3"; + enableSSHSupport = true; + }; + + xdg.portal = { + enable = true; + }; + + services.dbus.enable = true; + + services.gvfs = { + enable = true; + }; + + environment = { + variables = { + GTK_THEME = "Catppuccin-Mocha-Compact-Sapphire-Dark"; + VISUAL = "hx"; + PAGER = "less"; + MANPAGER = "less"; + }; + + systemPackages = with pkgs; [ + brightnessctl + feh + # gimp + grim + # inkscape + # krita + libinput + libinput-gestures + libnotify + # lutris + # nil + # nixpkgs-fmt + noto-fonts + pamixer + # pavucontrol + playerctl + # pulseaudio + pulsemixer + # rclone + # restic + slurp + # steam + swaybg + swayidle + swaylock + # vlc + # vulkan-tools + waybar + # weechat + # wine + wl-clipboard + zathura + ]; + }; +} diff --git a/modules/nixos/sway.nix b/modules/nixos/sway.nix index 188d3ae..d908220 100644 --- a/modules/nixos/sway.nix +++ b/modules/nixos/sway.nix @@ -21,7 +21,6 @@ extraPortals = with pkgs; [ xdg-desktop-portal-wlr - xdg-desktop-portal-gtk ]; }; diff --git a/nixos/thablet/default.nix b/nixos/thablet/default.nix new file mode 100644 index 0000000..f452cf7 --- /dev/null +++ b/nixos/thablet/default.nix @@ -0,0 +1,79 @@ +{ + flake, + inputs, + outputs, + lib, + config, + modulesPath, + ... +}: { + imports = + [ + (modulesPath + "/installer/scan/not-detected.nix") + inputs.disko.nixosModules.disko + flake.diskoConfigurations.standard + inputs.hardware.nixosModules.lenovo-thinkpad-x1-yoga + ] + ++ (with outputs.nixosModules; [ + desktop-usage + gnome + wifi + ]); + + nixpkgs = { + overlays = [ + outputs.overlays.additions + outputs.overlays.modifications + outputs.overlays.unstable-packages + ]; + config = { + allowUnfree = true; + }; + }; + + nix = { + registry = lib.mapAttrs (_: value: {flake = value;}) inputs; + nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry; + + settings = { + experimental-features = "nix-command flakes"; + auto-optimise-store = true; + }; + }; + + # not necessarily "base", but all my machines are UEFI so... + boot.loader.systemd-boot.enable = true; + + services.fprintd = { + enable = true; + # tod.enable = true; + # tod.driver = pkgs.libfprint-2-tod1-goodix; + }; + + environment.systemPackages = + #with pkgs; + []; + + programs.steam.enable = true; + programs.steam.remotePlay.openFirewall = true; + + networking = { + firewall = { + enable = true; + allowPing = true; + allowedTCPPorts = [22]; + allowedUDPPorts = []; + }; + }; + + boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; + + networking.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + system.stateVersion = "23.11"; +} From f44d8ab87df61f6c3630ef29d9639aee2cccb59c Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 4 Jan 2024 14:45:10 -0600 Subject: [PATCH 03/15] WIP reorg --- flake.nix | 96 +++++++++++---------------- modules/home-manager/common.nix | 4 +- modules/home-manager/default.nix | 3 + modules/home-manager/flanfam.nix | 12 ++++ modules/home-manager/flanfamkiosk.nix | 12 ++++ modules/nixos/default.nix | 3 + modules/nixos/flanfam.nix | 17 +++++ modules/nixos/flanfamkiosk.nix | 17 +++++ nixos/base/default.nix | 17 +++-- nixos/default.nix | 36 ++++++++++ nixos/thablet/default.nix | 20 +++++- 11 files changed, 171 insertions(+), 66 deletions(-) create mode 100644 modules/home-manager/flanfam.nix create mode 100644 modules/home-manager/flanfamkiosk.nix create mode 100644 modules/nixos/flanfam.nix create mode 100644 modules/nixos/flanfamkiosk.nix create mode 100644 nixos/default.nix diff --git a/flake.nix b/flake.nix index fd52997..feb97a3 100644 --- a/flake.nix +++ b/flake.nix @@ -46,24 +46,19 @@ systems = [ "aarch64-linux" - # "i686-linux" - "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ]; forAllSystems = nixpkgs.lib.genAttrs systems; - - color-schemes = (import ./lib/colors.nix inputs).schemes; - colors = color-schemes.catppuccin-mocha-sapphire; + in { + colors = (import ./lib/colors.nix inputs).schemes.catppuccin-mocha-sapphire; # colors = (import ./lib/colors.nix inputs).color-schemes.donokai; + font = { name = "IosevkaLyteTerm"; size = 12; }; - in { - colors = colors; - font = font; # Your custom packages # Acessible through 'nix build', 'nix shell', etc @@ -86,54 +81,41 @@ # NixOS configuration entrypoint # Available through 'nixos-rebuild --flake .#your-hostname' - nixosConfigurations = let - mkNixosSystem = system: modules: homeManagerModules: - nixpkgs.lib.nixosSystem { - system = system; - specialArgs = { - inherit inputs outputs system colors font; - flake = self; - }; - modules = - [ - inputs.sops-nix.nixosModules.sops - self.nixosModules.common - ] - ++ modules - ++ [ - inputs.home-manager.nixosModules.home-manager - { - home-manager = { - extraSpecialArgs = {inherit inputs outputs system colors font;}; - users.daniel = { - imports = homeManagerModules; - }; - }; - } - ]; - }; + nixosConfigurations = import ./nixos { + base = { + system = "x86_64-linux"; + modules = [./nixos/base]; + }; - base = mkNixosSystem "x86_64-linux" [./nixos/base] [outputs.homeManagerModules.base]; - in { - base = base; - nixos = base; # alias - thablet = mkNixosSystem "x86_64-linux" [./nixos/thablet] [outputs.homeManagerModules.base]; - thinker = mkNixosSystem "x86_64-linux" [./nixos/thinker] [outputs.homeManagerModules.thinker]; - foxtrot = mkNixosSystem "x86_64-linux" [./nixos/foxtrot] [ - outputs.homeManagerModules.foxtrot + thablet = { + system = "x86_64-linux"; + modules = [./nixos/thablet]; + }; + thinker = mkNixosSystem "x86_64-linux" [ + ./nixos/thinker + (danielWithModules [outputs.homeManagerModules.thinker]) ]; - beefcake = - mkNixosSystem "x86_64-linux" [ - inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev - ./nixos/beefcake - ] (with outputs.homeManagerModules; [ - linux - ]); - rascal = mkNixosSystem "x86_64-linux" [./nixos/rascal] [ - outputs.homeManagerModules.linux + foxtrot = mkNixosSystem "x86_64-linux" [ + ./nixos/foxtrot + (danielWithModules [outputs.homeManagerModules.foxtrot]) + ]; + beefcake = mkNixosSystem "x86_64-linux" [ + inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev + ./nixos/beefcake + (danielWithModules [outputs.homeManagerModules.linux]) + ]; + rascal = mkNixosSystem "x86_64-linux" [ + ./nixos/rascal + (danielWithModules [outputs.homeManagerModules.linux]) + ]; + musicbox = mkNixosSystem "x86_64-linux" [ + ./nixos/musicbox + (danielWithModules [outputs.homeManagerModules.sway]) + ]; + router = mkNixosSystem "x86_64-linux" [ + ./nixos/router + (danielWithModules [outputs.homeManagerModules.common]) ]; - musicbox = mkNixosSystem "x86_64-linux" [./nixos/musicbox] [outputs.homeManagerModules.sway]; - router = mkNixosSystem "x86_64-linux" [./nixos/router] [outputs.homeManagerModules.common]; }; # Standalone home-manager configuration entrypoint @@ -158,15 +140,15 @@ }; }; - # TODO: nix-on-droid for phone terminal usage? - # TODO: nix-darwin for work? - # TODO: nixos ISO? - # Disk partition schemes and functions diskoConfigurations = import ./disko; # Flake templates for easily setting up Nix in a project using common patterns I like templates = import ./templates/all.nix; + + # TODO: nix-on-droid for phone terminal usage? + # TODO: nix-darwin for work? + # TODO: nixos ISO? }; nixConfig = { diff --git a/modules/home-manager/common.nix b/modules/home-manager/common.nix index f933921..3c86df4 100644 --- a/modules/home-manager/common.nix +++ b/modules/home-manager/common.nix @@ -15,13 +15,13 @@ bat helix git - iex + # iex zellij broot nnn htop cargo - senpai + # senpai tmux ]; diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index b35db87..a1dcbd8 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -32,6 +32,9 @@ htop = import ./htop.nix; senpai = import ./senpai.nix; + flanfam = import ./flanfam.nix; + flanfamkiosk = import ./flanfamkiosk.nix; + base = import ./base.nix; dragon = import ./dragon.nix; thinker = import ./thinker.nix; diff --git a/modules/home-manager/flanfam.nix b/modules/home-manager/flanfam.nix new file mode 100644 index 0000000..32f5060 --- /dev/null +++ b/modules/home-manager/flanfam.nix @@ -0,0 +1,12 @@ +{...}: { + home-manager = { + users.flanfam = { + imports = [./common.nix]; + home = { + username = "flanfam"; + homeDirectory = "/home/flanfam"; + stateVersion = "23.11"; + }; + }; + }; +} diff --git a/modules/home-manager/flanfamkiosk.nix b/modules/home-manager/flanfamkiosk.nix new file mode 100644 index 0000000..b3bc46c --- /dev/null +++ b/modules/home-manager/flanfamkiosk.nix @@ -0,0 +1,12 @@ +{...}: { + home-manager = { + users.flanfamkiosk = { + imports = [./common.nix]; + home = { + username = "flanfamkiosk"; + homeDirectory = "/home/flanfamkiosk"; + stateVersion = "23.11"; + }; + }; + }; +} diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 367df2d..6d0b6c5 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -16,4 +16,7 @@ wifi = import ./wifi.nix; gnome = import ./gnome.nix; kde-connect = import ./kde-connect.nix; + + flanfam = import ./flanfam.nix; + flanfamkiosk = import ./flanfamkiosk.nix; } diff --git a/modules/nixos/flanfam.nix b/modules/nixos/flanfam.nix new file mode 100644 index 0000000..1b8aa2d --- /dev/null +++ b/modules/nixos/flanfam.nix @@ -0,0 +1,17 @@ +{...}: { + users.groups.flanfam = {}; + + users.users = { + flanfam = { + isNormalUser = true; + home = "/home/flanfam"; + createHome = true; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev" + ]; + group = "flanfam"; + extraGroups = ["users" "video"]; + packages = []; + }; + }; +} diff --git a/modules/nixos/flanfamkiosk.nix b/modules/nixos/flanfamkiosk.nix new file mode 100644 index 0000000..11b9256 --- /dev/null +++ b/modules/nixos/flanfamkiosk.nix @@ -0,0 +1,17 @@ +{...}: { + users.groups.flanfamkiosk = {}; + + users.users = { + flanfamkiosk = { + isNormalUser = true; + home = "/home/flanfamkiosk"; + createHome = true; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev" + ]; + group = "flanfamkiosk"; + extraGroups = ["users" "video"]; + packages = []; + }; + }; +} diff --git a/nixos/base/default.nix b/nixos/base/default.nix index 6c06cc1..6d70d4c 100644 --- a/nixos/base/default.nix +++ b/nixos/base/default.nix @@ -1,5 +1,5 @@ { - flake, + # flake, inputs, outputs, lib, @@ -11,11 +11,16 @@ [ (modulesPath + "/installer/scan/not-detected.nix") inputs.disko.nixosModules.disko - flake.diskoConfigurations.standard + # flake.diskoConfigurations.standard ] - ++ (with outputs.nixosModules; [ - desktop-usage - wifi + ++ ( + with outputs.nixosModules; [ + desktop-usage + wifi + ] + ) + ++ (with outputs.homeManagerModules; [ + sway ]); nixpkgs = { @@ -40,7 +45,7 @@ }; # not necessarily "base", but all my machines are UEFI so... - boot.loader.systemd-boot.enable = true; + # boot.loader.systemd-boot.enable = true; networking = { firewall = { diff --git a/nixos/default.nix b/nixos/default.nix new file mode 100644 index 0000000..4164167 --- /dev/null +++ b/nixos/default.nix @@ -0,0 +1,36 @@ +{ + base = { + system = "x86_64-linux"; + modules = [./base]; + }; + + thablet = { + system = "x86_64-linux"; + modules = [./thablet]; + }; + thinker = mkNixosSystem "x86_64-linux" [ + ./nixos/thinker + (danielWithModules [outputs.homeManagerModules.thinker]) + ]; + foxtrot = mkNixosSystem "x86_64-linux" [ + ./nixos/foxtrot + (danielWithModules [outputs.homeManagerModules.foxtrot]) + ]; + beefcake = mkNixosSystem "x86_64-linux" [ + inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev + ./nixos/beefcake + (danielWithModules [outputs.homeManagerModules.linux]) + ]; + rascal = mkNixosSystem "x86_64-linux" [ + ./nixos/rascal + (danielWithModules [outputs.homeManagerModules.linux]) + ]; + musicbox = mkNixosSystem "x86_64-linux" [ + ./nixos/musicbox + (danielWithModules [outputs.homeManagerModules.sway]) + ]; + router = mkNixosSystem "x86_64-linux" [ + ./nixos/router + (danielWithModules [outputs.homeManagerModules.common]) + ]; +} diff --git a/nixos/thablet/default.nix b/nixos/thablet/default.nix index f452cf7..ace98a3 100644 --- a/nixos/thablet/default.nix +++ b/nixos/thablet/default.nix @@ -18,6 +18,8 @@ desktop-usage gnome wifi + flanfam + flanfamkiosk ]); nixpkgs = { @@ -66,10 +68,26 @@ }; }; + # https://wiki.archlinux.org/title/Lenovo_ThinkPad_X1_Yoga_(Gen_3)#Using_acpi_call + systemd.services.activate-touch-hack = { + unitConfig = { + Description = "Touch wake Thinkpad X1 Yoga 3rd gen hack"; + After = ["suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target"]; + }; + + serviceConfig = { + ExecStart = '' + /bin/sh -c "echo '\\_SB.PCI0.LPCB.EC._Q2A' > /proc/acpi/call" + ''; + }; + + wantedBy = ["suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target"]; + }; + boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"]; boot.initrd.kernelModules = []; boot.kernelModules = ["kvm-intel"]; - boot.extraModulePackages = []; + boot.extraModulePackages = with config.boot.kernelPackages; [acpi_call]; networking.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; From 9b228e61bc8c2203265dd63e2ae315a7a00ddd8b Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 4 Jan 2024 14:58:14 -0600 Subject: [PATCH 04/15] WIP mapAttrs to convert basic configs to nixos systems --- flake.nix | 2 +- nixos/default.nix | 55 ++++++++++++++++++++++++++--------------------- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/flake.nix b/flake.nix index feb97a3..6a7ff5d 100644 --- a/flake.nix +++ b/flake.nix @@ -81,7 +81,7 @@ # NixOS configuration entrypoint # Available through 'nixos-rebuild --flake .#your-hostname' - nixosConfigurations = import ./nixos { + nixosConfigurations = builtins.mapAttrs (name: {}: (import ./nixos) { base = { system = "x86_64-linux"; modules = [./nixos/base]; diff --git a/nixos/default.nix b/nixos/default.nix index 4164167..e49ffa8 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -8,29 +8,34 @@ system = "x86_64-linux"; modules = [./thablet]; }; - thinker = mkNixosSystem "x86_64-linux" [ - ./nixos/thinker - (danielWithModules [outputs.homeManagerModules.thinker]) - ]; - foxtrot = mkNixosSystem "x86_64-linux" [ - ./nixos/foxtrot - (danielWithModules [outputs.homeManagerModules.foxtrot]) - ]; - beefcake = mkNixosSystem "x86_64-linux" [ - inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev - ./nixos/beefcake - (danielWithModules [outputs.homeManagerModules.linux]) - ]; - rascal = mkNixosSystem "x86_64-linux" [ - ./nixos/rascal - (danielWithModules [outputs.homeManagerModules.linux]) - ]; - musicbox = mkNixosSystem "x86_64-linux" [ - ./nixos/musicbox - (danielWithModules [outputs.homeManagerModules.sway]) - ]; - router = mkNixosSystem "x86_64-linux" [ - ./nixos/router - (danielWithModules [outputs.homeManagerModules.common]) - ]; + + thinker = { + system = "x86_64-linux"; + modules = [./thinker]; + }; + + foxtrot = { + system = "x86_64-linux"; + modules = [./foxtrot]; + }; + + beefcake = { + system = "x86_64-linux"; + modules = [./beefcake]; + }; + + rascal = { + system = "x86_64-linux"; + modules = [./rascal]; + }; + + musicbox = { + system = "x86_64-linux"; + modules = [./musicbox]; + }; + + router = { + system = "x86_64-linux"; + modules = [./router]; + }; } From 000ef1fb2c627962c070cf22e002edf14cf92aa5 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 4 Jan 2024 17:20:02 -0600 Subject: [PATCH 05/15] Progress on organization --- flake.nix | 95 ++++++--------- modules/home-manager/common.nix | 18 +-- modules/home-manager/default.nix | 76 ++++++------ modules/home-manager/fish.nix | 8 +- modules/home-manager/linux.nix | 4 +- modules/nixos/avahi.nix | 9 ++ modules/nixos/common.nix | 122 ++++++++++++------- modules/nixos/daniel.nix | 35 ++++++ modules/nixos/default.nix | 47 +++---- modules/nixos/printing.nix | 13 ++ modules/nixos/sway.nix | 8 +- nixos/base.nix | 14 +++ nixos/base/default.nix | 60 --------- nixos/{beefcake/default.nix => beefcake.nix} | 0 nixos/default.nix | 57 +++------ nixos/dragon.nix | 73 +++++++++++ nixos/dragon/default.nix | 120 ------------------ nixos/{foxtrot/default.nix => foxtrot.nix} | 17 --- nixos/{musicbox/default.nix => musicbox.nix} | 0 nixos/{rascal/default.nix => rascal.nix} | 0 nixos/{router/default.nix => router.nix} | 0 nixos/{thablet/default.nix => thablet.nix} | 2 - nixos/{thinker/default.nix => thinker.nix} | 0 23 files changed, 354 insertions(+), 424 deletions(-) create mode 100644 modules/nixos/avahi.nix create mode 100644 modules/nixos/daniel.nix create mode 100644 modules/nixos/printing.nix create mode 100644 nixos/base.nix delete mode 100644 nixos/base/default.nix rename nixos/{beefcake/default.nix => beefcake.nix} (100%) create mode 100644 nixos/dragon.nix delete mode 100644 nixos/dragon/default.nix rename nixos/{foxtrot/default.nix => foxtrot.nix} (92%) rename nixos/{musicbox/default.nix => musicbox.nix} (100%) rename nixos/{rascal/default.nix => rascal.nix} (100%) rename nixos/{router/default.nix => router.nix} (100%) rename nixos/{thablet/default.nix => thablet.nix} (95%) rename nixos/{thinker/default.nix => thinker.nix} (100%) diff --git a/flake.nix b/flake.nix index 6a7ff5d..ac8e02e 100644 --- a/flake.nix +++ b/flake.nix @@ -27,13 +27,8 @@ ssbm.url = "github:lytedev/ssbm-nix/my-nixpkgs"; ssbm.inputs.nixpkgs.follows = "nixpkgs"; - # doesn't support the forge mod loader yet + # TODO: doesn't support the forge mod loader yet # nix-minecraft.url = "github:Infinidoge/nix-minecraft"; - - # need to bump ishiiruka upstream I think - # slippi-desktop.url = "github:project-slippi/slippi-desktop-app"; - # slippi-desktop.flake = false; - # ssbm.inputs.slippi-desktop.follows = "slippi-desktop"; }; outputs = { @@ -81,63 +76,47 @@ # NixOS configuration entrypoint # Available through 'nixos-rebuild --flake .#your-hostname' - nixosConfigurations = builtins.mapAttrs (name: {}: (import ./nixos) { - base = { - system = "x86_64-linux"; - modules = [./nixos/base]; - }; - - thablet = { - system = "x86_64-linux"; - modules = [./nixos/thablet]; - }; - thinker = mkNixosSystem "x86_64-linux" [ - ./nixos/thinker - (danielWithModules [outputs.homeManagerModules.thinker]) - ]; - foxtrot = mkNixosSystem "x86_64-linux" [ - ./nixos/foxtrot - (danielWithModules [outputs.homeManagerModules.foxtrot]) - ]; - beefcake = mkNixosSystem "x86_64-linux" [ - inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev - ./nixos/beefcake - (danielWithModules [outputs.homeManagerModules.linux]) - ]; - rascal = mkNixosSystem "x86_64-linux" [ - ./nixos/rascal - (danielWithModules [outputs.homeManagerModules.linux]) - ]; - musicbox = mkNixosSystem "x86_64-linux" [ - ./nixos/musicbox - (danielWithModules [outputs.homeManagerModules.sway]) - ]; - router = mkNixosSystem "x86_64-linux" [ - ./nixos/router - (danielWithModules [outputs.homeManagerModules.common]) - ]; - }; + nixosConfigurations = builtins.mapAttrs (name: { + system, + modules, + ... + }: + nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs outputs system; + inherit (outputs) colors font; + flake = self; + }; + modules = + [ + self.nixosModules.common + ] + ++ modules; + }) (import ./nixos); # Standalone home-manager configuration entrypoint # Available through 'home-manager --flake .#your-username@your-hostname' homeConfigurations = { # TODO: non-system-specific home configurations? - "base-x86_64-linux" = let - system = "x86_64-linux"; - in - home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.${system}; - extraSpecialArgs = {inherit inputs outputs system colors font;}; - modules = with outputs.homeManagerModules; [linux]; - }; - "base-aarch64-darwin" = let - system = "aarch64-darwin"; - in - home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.${system}; - extraSpecialArgs = {inherit inputs outputs system colors font;}; - modules = with outputs.homeManagerModules; [macos]; - }; + # "base-x86_64-linux" = let + # system = "x86_64-linux"; + # in + # home-manager.lib.homeManagerConfiguration { + # pkgs = nixpkgs.legacyPackages.${system}; + # extraSpecialArgs = { + # inherit inputs outputs system; + # }; + # modules = with outputs.homeManagerModules; [linux]; + # }; + # "base-aarch64-darwin" = let + # system = "aarch64-darwin"; + # in + # home-manager.lib.homeManagerConfiguration { + # pkgs = nixpkgs.legacyPackages.${system}; + # extraSpecialArgs = {inherit inputs outputs system colors font;}; + # modules = with outputs.homeManagerModules; [macos]; + # }; }; # Disk partition schemes and functions diff --git a/modules/home-manager/common.nix b/modules/home-manager/common.nix index 3c86df4..5c45b71 100644 --- a/modules/home-manager/common.nix +++ b/modules/home-manager/common.nix @@ -15,26 +15,16 @@ bat helix git - # iex zellij broot nnn htop - cargo - # senpai tmux ]; - # TODO: specify an email? - # accounts.email.accounts = { - # primary = { - # address = "daniel@lyte.dev"; - # }; - # }; - home = { - username = lib.mkDefault "daniel"; - homeDirectory = lib.mkDefault "/home/daniel/.home"; + username = lib.mkDefault "lytedev"; + homeDirectory = lib.mkDefault "/home/lytedev"; stateVersion = lib.mkDefault "23.11"; sessionVariables = { @@ -45,9 +35,6 @@ }; packages = [ - # I use gawk for my fish prompt - pkgs.gawk - # text editor inputs.helix.packages.${system}.helix @@ -55,6 +42,7 @@ pkgs.nil pkgs.alejandra + # common scripts (pkgs.buildEnv { name = "my-scripts-common"; paths = [./scripts/common]; diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index a1dcbd8..66c6607 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -1,42 +1,34 @@ -# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module). -# These should be stuff you would like to share with others, not your personal configurations. -{ - # List your module files here - # my-module = import ./my-module.nix; - common = import ./common.nix; - melee = import ./melee.nix; - linux = import ./linux.nix; - cargo = import ./cargo.nix; - macos = import ./macos.nix; - iex = import ./iex.nix; - mako = import ./mako.nix; - git = import ./git.nix; - helix = import ./helix.nix; - bat = import ./bat.nix; - fish = import ./fish.nix; - kitty = import ./kitty.nix; - wezterm = import ./wezterm.nix; - zellij = import ./zellij.nix; - firefox = import ./firefox.nix; - broot = import ./broot.nix; - nnn = import ./nnn.nix; - waybar = import ./waybar.nix; - swaylock = import ./swaylock.nix; - desktop = import ./desktop.nix; - linux-desktop = import ./linux-desktop.nix; - sway = import ./sway.nix; - hyprland = import ./hyprland.nix; - ewwbar = import ./ewwbar.nix; - sway-laptop = import ./sway-laptop.nix; - tmux = import ./tmux.nix; - htop = import ./htop.nix; - senpai = import ./senpai.nix; - - flanfam = import ./flanfam.nix; - flanfamkiosk = import ./flanfamkiosk.nix; - - base = import ./base.nix; - dragon = import ./dragon.nix; - thinker = import ./thinker.nix; - foxtrot = import ./foxtrot.nix; -} +with builtins; + listToAttrs (map (name: { + name = name; + value = import ./${name}.nix; + }) [ + "common" + "melee" + "linux" + "cargo" + "macos" + "iex" + "mako" + "git" + "helix" + "bat" + "fish" + "kitty" + "wezterm" + "zellij" + "firefox" + "broot" + "nnn" + "waybar" + "swaylock" + "desktop" + "linux-desktop" + "sway" + "hyprland" + "ewwbar" + "sway-laptop" + "tmux" + "htop" + "senpai" + ]) diff --git a/modules/home-manager/fish.nix b/modules/home-manager/fish.nix index 7f68659..b6dc153 100644 --- a/modules/home-manager/fish.nix +++ b/modules/home-manager/fish.nix @@ -1,4 +1,10 @@ -{ +{pkgs, ...}: { + home = { + packages = [ + pkgs.gawk # used in prompt + ]; + }; + programs.fish = { enable = true; # I load long scripts from files for a better editing experience diff --git a/modules/home-manager/linux.nix b/modules/home-manager/linux.nix index c89c32f..9d8a8f8 100644 --- a/modules/home-manager/linux.nix +++ b/modules/home-manager/linux.nix @@ -3,9 +3,7 @@ pkgs, ... }: { - imports = with outputs.homeManagerModules; [ - common - ]; + imports = with outputs.homeManagerModules; [common]; home = { sessionVariables = { diff --git a/modules/nixos/avahi.nix b/modules/nixos/avahi.nix new file mode 100644 index 0000000..f64adc9 --- /dev/null +++ b/modules/nixos/avahi.nix @@ -0,0 +1,9 @@ +{ + # enable mDNS and discovery + services.avahi = { + enable = true; + reflector = true; + openFirewall = true; + nssmdns = true; + }; +} diff --git a/modules/nixos/common.nix b/modules/nixos/common.nix index 35413ad..b4aa3b6 100644 --- a/modules/nixos/common.nix +++ b/modules/nixos/common.nix @@ -3,16 +3,25 @@ lib, inputs, colors, - # outputs, + outputs, system, pkgs, + modulesPath, ... }: { networking.hostName = lib.mkDefault "nixoslyte"; - imports = [ - inputs.home-manager.nixosModules.home-manager - ]; + imports = + [ + (modulesPath + "/installer/scan/not-detected.nix") + # inputs.sops-nix.nixosModules.sops + inputs.disko.nixosModules.disko + inputs.home-manager.nixosModules.home-manager + ] + ++ (with outputs.nixosModules; [ + avahi + # daniel + ]); hardware.enableRedistributableFirmware = true; @@ -177,44 +186,6 @@ ''; }; - nix = { - settings = { - trusted-users = ["root" "daniel"]; - experimental-features = lib.mkDefault ["nix-command" "flakes"]; - substituters = [ - "https://cache.nixos.org/" - "https://helix.cachix.org" - "https://nix-community.cachix.org" - "https://nix.h.lyte.dev" - ]; - trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0=" - ]; - }; - - registry = { - self.flake = inputs.self; - - nixpkgs = { - from = { - id = "nixpkgs"; - type = "indirect"; - }; - flake = inputs.nixpkgs; - }; - }; - }; - - nixpkgs = { - config = { - allowUnfree = true; - }; - hostPlatform = lib.mkDefault "x86_64-linux"; - }; - programs = { fish = { enable = true; @@ -254,4 +225,71 @@ # # ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", MODE="0664", GROUP="uucp" # # ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="uucp"' # ''; + + nixpkgs = { + # You can add overlays here + overlays = [ + # Add overlays your own flake exports (from overlays and pkgs dir): + outputs.overlays.additions + outputs.overlays.modifications + outputs.overlays.unstable-packages + + # You can also add overlays exported from other flakes: + # neovim-nightly-overlay.overlays.default + + # Or define it inline, for example: + # (final: prev: { + # hi = final.hello.overrideAttrs (oldAttrs: { + # patches = [ ./change-hello-to-hi.patch ]; + # }); + # }) + ]; + # Configure your nixpkgs instance + config = { + # Disable if you don't want unfree packages + allowUnfree = true; + }; + }; + + nix = { + # This will add each flake input as a registry + # To make nix3 commands consistent with your flake + registry = lib.mapAttrs (_: value: {flake = value;}) inputs; + + # This will additionally add your inputs to the system's legacy channels + # Making legacy nix commands consistent as well, awesome! + nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry; + + settings = { + trusted-users = ["root" "daniel"]; + experimental-features = lib.mkDefault ["nix-command" "flakes"]; + substituters = [ + "https://cache.nixos.org/" + "https://helix.cachix.org" + "https://nix-community.cachix.org" + "https://nix.h.lyte.dev" + ]; + trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0=" + ]; + auto-optimise-store = true; + }; + + # registry = { + # self.flake = inputs.self; + + # nixpkgs = { + # from = { + # id = "nixpkgs"; + # type = "indirect"; + # }; + # flake = inputs.nixpkgs; + # }; + # }; + }; + + system.stateVersion = lib.mkDefault "23.11"; } diff --git a/modules/nixos/daniel.nix b/modules/nixos/daniel.nix new file mode 100644 index 0000000..1f7f6d1 --- /dev/null +++ b/modules/nixos/daniel.nix @@ -0,0 +1,35 @@ +{outputs, ...}: { + home-manager = { + users.daniel = { + # TODO: specify an email? + accounts.email.accounts = { + primary = { + address = "daniel@lyte.dev"; + }; + legacy = { + address = "wraithx2@gmail.com"; + }; + io = { + # TODO: finalize deprecation + address = "daniel@lytedev.io"; + }; + # TODO: may need to use a sops secret? put in another module? + # work = { + # address = "REDACTED"; + # }; + }; + + home = { + username = "daniel"; + homeDirectory = "/home/daniel/.home"; + }; + + imports = with outputs.homeManagerModules; [ + common + senpai + iex + cargo + ]; + }; + }; +} diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 6d0b6c5..d87d117 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -1,22 +1,27 @@ -# Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module). -# These should be stuff you would like to share with others, not your personal configurations. -{ - common = import ./common.nix; - melee = import ./melee.nix; - ewwbar = import ./ewwbar.nix; - desktop-usage = import ./desktop-usage.nix; - intel = import ./intel.nix; - pipewire = import ./pipewire.nix; - pipewire-low-latency = import ./pipewire-low-latency.nix; - podman = import ./podman.nix; - postgres = import ./postgres.nix; - sway = import ./sway.nix; - hyprland = import ./hyprland.nix; - user-installed-applications = import ./user-installed-applications.nix; - wifi = import ./wifi.nix; - gnome = import ./gnome.nix; - kde-connect = import ./kde-connect.nix; +with builtins; + listToAttrs (map (name: { + name = name; + value = import ./${name}.nix; + }) [ + "common" + "melee" + "ewwbar" + "desktop-usage" + "intel" + "pipewire" + "pipewire" + "podman" + "postgres" + "sway" + "hyprland" + "user-installed-applications" + "wifi" + "gnome" + "kde-connect" + "printing" + "avahi" - flanfam = import ./flanfam.nix; - flanfamkiosk = import ./flanfamkiosk.nix; -} + "daniel" + "flanfam" + "flanfamkiosk" + ]) diff --git a/modules/nixos/printing.nix b/modules/nixos/printing.nix new file mode 100644 index 0000000..11ddffc --- /dev/null +++ b/modules/nixos/printing.nix @@ -0,0 +1,13 @@ +{pkgs, ...}: { + services.printing.enable = true; + services.printing.browsing = true; + services.printing.browsedConf = '' + BrowseDNSSDSubTypes _cups,_print + BrowseLocalProtocols all + BrowseRemoteProtocols all + CreateIPPPrinterQueues All + + BrowseProtocols all + ''; + services.printing.drivers = [pkgs.gutenprint]; +} diff --git a/modules/nixos/sway.nix b/modules/nixos/sway.nix index d908220..9855e23 100644 --- a/modules/nixos/sway.nix +++ b/modules/nixos/sway.nix @@ -1,5 +1,9 @@ -{pkgs, ...}: { - imports = [./pipewire.nix]; +{ + pkgs, + outputs, + ... +}: { + imports = with outputs.nixosModules; [pipewire]; # services.xserver.libinput.enable = true; diff --git a/nixos/base.nix b/nixos/base.nix new file mode 100644 index 0000000..7a3e3ac --- /dev/null +++ b/nixos/base.nix @@ -0,0 +1,14 @@ +{ + outputs, + flake, + ... +}: { + # a minimal, familiar setup that I can bootstrap atop + imports = with outputs.nixosModules; [ + flake.diskoConfigurations.standard + desktop-usage + wifi + ]; + + boot.loader.systemd-boot.enable = true; +} diff --git a/nixos/base/default.nix b/nixos/base/default.nix deleted file mode 100644 index 6d70d4c..0000000 --- a/nixos/base/default.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ - # flake, - inputs, - outputs, - lib, - config, - modulesPath, - ... -}: { - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - inputs.disko.nixosModules.disko - # flake.diskoConfigurations.standard - ] - ++ ( - with outputs.nixosModules; [ - desktop-usage - wifi - ] - ) - ++ (with outputs.homeManagerModules; [ - sway - ]); - - nixpkgs = { - overlays = [ - outputs.overlays.additions - outputs.overlays.modifications - outputs.overlays.unstable-packages - ]; - config = { - allowUnfree = true; - }; - }; - - nix = { - registry = lib.mapAttrs (_: value: {flake = value;}) inputs; - nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry; - - settings = { - experimental-features = "nix-command flakes"; - auto-optimise-store = true; - }; - }; - - # not necessarily "base", but all my machines are UEFI so... - # boot.loader.systemd-boot.enable = true; - - networking = { - firewall = { - enable = true; - allowPing = true; - allowedTCPPorts = [22]; - allowedUDPPorts = []; - }; - }; - - system.stateVersion = "23.11"; -} diff --git a/nixos/beefcake/default.nix b/nixos/beefcake.nix similarity index 100% rename from nixos/beefcake/default.nix rename to nixos/beefcake.nix diff --git a/nixos/default.nix b/nixos/default.nix index e49ffa8..3ae4b0a 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -1,41 +1,16 @@ -{ - base = { - system = "x86_64-linux"; - modules = [./base]; - }; - - thablet = { - system = "x86_64-linux"; - modules = [./thablet]; - }; - - thinker = { - system = "x86_64-linux"; - modules = [./thinker]; - }; - - foxtrot = { - system = "x86_64-linux"; - modules = [./foxtrot]; - }; - - beefcake = { - system = "x86_64-linux"; - modules = [./beefcake]; - }; - - rascal = { - system = "x86_64-linux"; - modules = [./rascal]; - }; - - musicbox = { - system = "x86_64-linux"; - modules = [./musicbox]; - }; - - router = { - system = "x86_64-linux"; - modules = [./router]; - }; -} +with builtins; (listToAttrs (map (name: { + name = name; + value = { + system = "x86_64-linux"; + modules = [./${name}.nix]; + }; + }) [ + "base" + "thablet" + "thinker" + "foxtrot" + "beefcake" + "rascal" + "musicbox" + "router" + ])) diff --git a/nixos/dragon.nix b/nixos/dragon.nix new file mode 100644 index 0000000..709cb4b --- /dev/null +++ b/nixos/dragon.nix @@ -0,0 +1,73 @@ +{ + flake, + inputs, + outputs, + lib, + pkgs, + modulesPath, + ... +}: { + networking.hostName = "dragon"; + + # support interacting with the windows drive + boot.supportedFilesystems = ["ntfs"]; + + imports = + [ + (modulesPath + "/installer/scan/not-detected.nix") + inputs.disko.nixosModules.disko + flake.diskoConfigurations.standard + inputs.hardware.nixosModules.common-cpu-amd + inputs.hardware.nixosModules.common-pc-ssd + outputs.nixosModules.pipewire-low-latency + ] + ++ (with outputs.nixosModules; [ + common + melee + desktop-usage + podman + postgres + wifi + hyprland + printing + ewwbar + ]); + + services.printing.enable = true; + + # TODO: https://nixos.wiki/wiki/Remote_LUKS_Unlocking + + # hardware + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.systemd-boot.enable = true; + boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci"]; + boot.kernelModules = ["kvm-amd"]; + + hardware.bluetooth.enable = true; + powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; + + environment = { + systemPackages = with pkgs; [ + radeontop + ]; + }; + + networking = { + firewall = { + enable = true; + allowPing = true; + allowedTCPPorts = [22 7777]; + allowedUDPPorts = []; + }; + }; + + services.udev.packages = [ + pkgs.platformio + pkgs.openocd + ]; + programs.adb.enable = true; + users.users.daniel.extraGroups = ["adbusers"]; + + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + system.stateVersion = "23.11"; +} diff --git a/nixos/dragon/default.nix b/nixos/dragon/default.nix deleted file mode 100644 index d59f085..0000000 --- a/nixos/dragon/default.nix +++ /dev/null @@ -1,120 +0,0 @@ -{ - flake, - inputs, - outputs, - lib, - config, - pkgs, - modulesPath, - ... -}: { - networking.hostName = "dragon"; - - boot.supportedFilesystems = ["ntfs"]; - - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - inputs.disko.nixosModules.disko - flake.diskoConfigurations.standard - inputs.hardware.nixosModules.common-cpu-amd - inputs.hardware.nixosModules.common-pc-ssd - outputs.nixosModules.pipewire-low-latency - ] - ++ (with outputs.nixosModules; [ - melee - desktop-usage - podman - postgres - wifi - hyprland - ewwbar - ]) - ++ [ - # Or modules from other flakes (such as nixos-hardware): - # inputs.hardware.nixosModules.common-cpu-amd - # inputs.hardware.nixosModules.common-ssd - - # You can also split up your configuration and import pieces of it here: - # ./users.nix - ]; - - # TODO: https://nixos.wiki/wiki/Remote_LUKS_Unlocking - - nixpkgs = { - # You can add overlays here - overlays = [ - # Add overlays your own flake exports (from overlays and pkgs dir): - outputs.overlays.additions - outputs.overlays.modifications - outputs.overlays.unstable-packages - - # You can also add overlays exported from other flakes: - # neovim-nightly-overlay.overlays.default - - # Or define it inline, for example: - # (final: prev: { - # hi = final.hello.overrideAttrs (oldAttrs: { - # patches = [ ./change-hello-to-hi.patch ]; - # }); - # }) - ]; - # Configure your nixpkgs instance - config = { - # Disable if you don't want unfree packages - allowUnfree = true; - }; - }; - - nix = { - # This will add each flake input as a registry - # To make nix3 commands consistent with your flake - registry = lib.mapAttrs (_: value: {flake = value;}) inputs; - - # This will additionally add your inputs to the system's legacy channels - # Making legacy nix commands consistent as well, awesome! - nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry; - - settings = { - # Enable flakes and new 'nix' command - experimental-features = "nix-command flakes"; - # Deduplicate and optimize nix store - auto-optimise-store = true; - }; - }; - - # hardware - boot.loader.efi.canTouchEfiVariables = true; - boot.loader.systemd-boot.enable = true; - boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci"]; - boot.kernelModules = ["kvm-amd"]; - - hardware.bluetooth.enable = true; - powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; - services.printing.enable = true; - - environment = { - systemPackages = with pkgs; [ - radeontop - ]; - }; - - networking = { - firewall = { - enable = true; - allowPing = true; - allowedTCPPorts = [22 7777]; - allowedUDPPorts = []; - }; - }; - - services.udev.packages = [ - pkgs.platformio - pkgs.openocd - ]; - programs.adb.enable = true; - users.users.daniel.extraGroups = ["adbusers"]; - - # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - system.stateVersion = "23.11"; -} diff --git a/nixos/foxtrot/default.nix b/nixos/foxtrot.nix similarity index 92% rename from nixos/foxtrot/default.nix rename to nixos/foxtrot.nix index 28f5012..8e09504 100644 --- a/nixos/foxtrot/default.nix +++ b/nixos/foxtrot.nix @@ -135,23 +135,6 @@ powerOnBoot = false; }; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; - services.printing.enable = true; - services.printing.browsing = true; - services.printing.browsedConf = '' - BrowseDNSSDSubTypes _cups,_print - BrowseLocalProtocols all - BrowseRemoteProtocols all - CreateIPPPrinterQueues All - - BrowseProtocols all - ''; - services.printing.drivers = [pkgs.gutenprint]; - services.avahi = { - enable = true; - reflector = true; - openFirewall = true; - nssmdns = true; - }; services.fprintd = { enable = false; diff --git a/nixos/musicbox/default.nix b/nixos/musicbox.nix similarity index 100% rename from nixos/musicbox/default.nix rename to nixos/musicbox.nix diff --git a/nixos/rascal/default.nix b/nixos/rascal.nix similarity index 100% rename from nixos/rascal/default.nix rename to nixos/rascal.nix diff --git a/nixos/router/default.nix b/nixos/router.nix similarity index 100% rename from nixos/router/default.nix rename to nixos/router.nix diff --git a/nixos/thablet/default.nix b/nixos/thablet.nix similarity index 95% rename from nixos/thablet/default.nix rename to nixos/thablet.nix index ace98a3..8607d27 100644 --- a/nixos/thablet/default.nix +++ b/nixos/thablet.nix @@ -10,7 +10,6 @@ imports = [ (modulesPath + "/installer/scan/not-detected.nix") - inputs.disko.nixosModules.disko flake.diskoConfigurations.standard inputs.hardware.nixosModules.lenovo-thinkpad-x1-yoga ] @@ -43,7 +42,6 @@ }; }; - # not necessarily "base", but all my machines are UEFI so... boot.loader.systemd-boot.enable = true; services.fprintd = { diff --git a/nixos/thinker/default.nix b/nixos/thinker.nix similarity index 100% rename from nixos/thinker/default.nix rename to nixos/thinker.nix From b7027a4ab1104639e8a57ef784ddf53a9a59c765 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 4 Jan 2024 18:55:30 -0600 Subject: [PATCH 06/15] Passing checks --- modules/nixos/common.nix | 2 +- nixos/beefcake.nix | 8 ++++---- nixos/foxtrot.nix | 7 ++----- nixos/musicbox.nix | 2 -- nixos/router.nix | 1 - nixos/thinker.nix | 10 +++------- 6 files changed, 10 insertions(+), 20 deletions(-) diff --git a/modules/nixos/common.nix b/modules/nixos/common.nix index b4aa3b6..987ae5e 100644 --- a/modules/nixos/common.nix +++ b/modules/nixos/common.nix @@ -14,7 +14,7 @@ imports = [ (modulesPath + "/installer/scan/not-detected.nix") - # inputs.sops-nix.nixosModules.sops + inputs.sops-nix.nixosModules.sops inputs.disko.nixosModules.disko inputs.home-manager.nixosModules.home-manager ] diff --git a/nixos/beefcake.nix b/nixos/beefcake.nix index dab8a57..70ce320 100644 --- a/nixos/beefcake.nix +++ b/nixos/beefcake.nix @@ -8,16 +8,16 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x01 0x00 sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00 */ { - # inputs, + inputs, outputs, - modulesPath, config, pkgs, + system, ... }: { imports = [ - (modulesPath + "/installer/scan/not-detected.nix") outputs.nixosModules.intel + inputs.api-lyte-dev.nixosModules.${system}.api-lyte-dev # inputs.nix-minecraft.nixosModules.minecraft-servers ]; @@ -67,7 +67,7 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00 systemd.services.api-lyte-dev.environment.LOG_LEVEL = "debug"; sops = { - defaultSopsFile = ../../secrets/beefcake/secrets.yml; + defaultSopsFile = ../secrets/beefcake/secrets.yml; age = { sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"]; keyFile = "/var/lib/sops-nix/key.txt"; diff --git a/nixos/foxtrot.nix b/nixos/foxtrot.nix index 8e09504..33cb47b 100644 --- a/nixos/foxtrot.nix +++ b/nixos/foxtrot.nix @@ -11,8 +11,8 @@ imports = [ - inputs.disko.nixosModules.disko flake.diskoConfigurations.standard + inputs.hardware.nixosModules.framework-13-7040-amd ] ++ (with outputs.nixosModules; [ desktop-usage @@ -20,10 +20,7 @@ postgres wifi # hyprland - ]) - ++ [ - inputs.hardware.nixosModules.framework-13-7040-amd - ]; + ]); # use updated ppd for framework 13: # source: https://community.frame.work/t/tracking-ppd-v-tlp-for-amd-ryzen-7040/39423/137?u=lytedev diff --git a/nixos/musicbox.nix b/nixos/musicbox.nix index b86e718..172a0a9 100644 --- a/nixos/musicbox.nix +++ b/nixos/musicbox.nix @@ -1,6 +1,5 @@ { flake, - inputs, outputs, # lib, # config, @@ -11,7 +10,6 @@ imports = [ - inputs.disko.nixosModules.disko flake.diskoConfigurations.unencrypted ] ++ (with outputs.nixosModules; [ diff --git a/nixos/router.nix b/nixos/router.nix index 3c0e9ac..c856d0f 100644 --- a/nixos/router.nix +++ b/nixos/router.nix @@ -36,7 +36,6 @@ in { networking.useDHCP = false; imports = [ - inputs.disko.nixosModules.disko flake.diskoConfigurations.unencrypted ]; diff --git a/nixos/thinker.nix b/nixos/thinker.nix index 42d8229..128ded2 100644 --- a/nixos/thinker.nix +++ b/nixos/thinker.nix @@ -32,20 +32,16 @@ imports = [ - inputs.disko.nixosModules.disko flake.diskoConfigurations.thinker + inputs.hardware.nixosModules.lenovo-thinkpad-t480 + inputs.hardware.nixosModules.common-pc-laptop-ssd ] ++ (with outputs.nixosModules; [ desktop-usage podman postgres wifi - ]) - ++ [ - inputs.hardware.nixosModules.lenovo-thinkpad-t480 - inputs.hardware.nixosModules.common-pc-laptop-ssd - # ./relative-module.nix - ]; + ]); boot = { loader = { From 91a71561e4a43a81acd3c70a43d9eed5bf9769d0 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 4 Jan 2024 22:15:55 -0600 Subject: [PATCH 07/15] Thablet up and running maybe --- modules/home-manager/bat.nix | 2 +- modules/home-manager/common.nix | 3 - modules/home-manager/kitty.nix | 141 +++++++++++++------------ modules/home-manager/linux-desktop.nix | 1 + modules/home-manager/linux.nix | 8 +- modules/home-manager/sway.nix | 1 - modules/nixos/daniel.nix | 19 +++- nixos/base.nix | 3 + nixos/foxtrot.nix | 23 ++-- nixos/thablet.nix | 23 ++-- 10 files changed, 113 insertions(+), 111 deletions(-) diff --git a/modules/home-manager/bat.nix b/modules/home-manager/bat.nix index 836e58e..7f2ea6a 100644 --- a/modules/home-manager/bat.nix +++ b/modules/home-manager/bat.nix @@ -1,5 +1,5 @@ { - pkgs, + # pkgs, # colors, ... }: { diff --git a/modules/home-manager/common.nix b/modules/home-manager/common.nix index 5c45b71..7df6185 100644 --- a/modules/home-manager/common.nix +++ b/modules/home-manager/common.nix @@ -35,9 +35,6 @@ }; packages = [ - # text editor - inputs.helix.packages.${system}.helix - # tools I use when editing nix code pkgs.nil pkgs.alejandra diff --git a/modules/home-manager/kitty.nix b/modules/home-manager/kitty.nix index a045936..2ea556f 100644 --- a/modules/home-manager/kitty.nix +++ b/modules/home-manager/kitty.nix @@ -10,52 +10,53 @@ enableFishIntegration = true; }; settings = with colors.withHashPrefix; { - "font_family" = font.name; - "bold_font" = "${font.name} Heavy"; - "italic_font" = "${font.name} Italic"; - "bold_italic_font" = "${font.name} Heavy Italic"; - "font_size" = toString font.size; - "inactive_text_alpha" = "0.5"; - "copy_on_select" = true; + font_family = font.name; + bold_font = "${font.name} Heavy"; + italic_font = "${font.name} Italic"; + bold_italic_font = "${font.name} Heavy Italic"; + font_size = toString font.size; + inactive_text_alpha = "0.5"; + copy_on_select = true; + hide_window_decorations = "yes"; - "scrollback_lines" = 500000; + scrollback_lines = 500000; - "symbol_map" = "U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono"; + symbol_map = "U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono"; # use `kitty + list-fonts --psnames` to get the font's PostScript name - "allow_remote_control" = true; - "listen_on" = "unix:/tmp/kitty"; - "repaint_delay" = 3; - "input_delay" = 3; - "sync_to_monitor" = true; + allow_remote_control = true; + listen_on = "unix:/tmp/kitty"; + repaint_delay = 3; + input_delay = 3; + sync_to_monitor = true; - "adjust_line_height" = 0; - "window_padding_width" = "10.0"; - "window_margin_width" = "0.0"; + adjust_line_height = 0; + window_padding_width = "10.0"; + window_margin_width = "0.0"; - "confirm_os_window_close" = 0; + confirm_os_window_close = 0; - "enabled_layouts" = "splits:split_axis=vertical,stack"; + enabled_layouts = "splits:split_axis=vertical,stack"; - "shell_integration" = "disabled"; + shell_integration = "disabled"; - "enable_audio_bell" = true; - "visual_bell_duration" = "0.25"; - "visual_bell_color" = bg3; + enable_audio_bell = true; + visual_bell_duration = "0.25"; + visual_bell_color = bg3; - "url_style" = "single"; + url_style = "single"; - "strip_trailing_spaces" = "smart"; + strip_trailing_spaces = "smart"; # open_url_modifiers ctrl - "tab_bar_align" = "left"; - "tab_bar_style" = "separator"; - "tab_separator" = ''""''; - "tab_bar_edge" = "top"; - "tab_title_template" = ''"{fmt.fg.tab}{fmt.bg.tab} {activity_symbol}{title} "''; - "active_tab_font_style" = "normal"; + tab_bar_align = "left"; + tab_bar_style = "separator"; + tab_separator = ''""''; + tab_bar_edge = "top"; + tab_title_template = ''"{fmt.fg.tab}{fmt.bg.tab} {activity_symbol}{title} "''; + active_tab_font_style = "normal"; ## name: Catppuccin Kitty Mocha ## author: Catppuccin Org @@ -64,75 +65,75 @@ ## blurb: Soothing pastel theme for the high-spirited! # The basic colors - "foreground" = text; - "background" = bg; - "selection_foreground" = bg; - "selection_background" = text; + foreground = text; + background = bg; + selection_foreground = bg; + selection_background = text; # Cursor colors - "cursor" = text; - "cursor_text_color" = bg; + cursor = text; + cursor_text_color = bg; # URL underline color when hovering with mouse - "url_color" = primary; + url_color = primary; # Kitty window border colors - "active_border_color" = primary; - "inactive_border_color" = bg3; - "bell_border_color" = urgent; + active_border_color = primary; + inactive_border_color = bg3; + bell_border_color = urgent; # OS Window titlebar colors - "wayland_titlebar_color" = "system"; - "macos_titlebar_color" = "system"; + wayland_titlebar_color = "system"; + macos_titlebar_color = "system"; # Tab bar colors - "active_tab_foreground" = bg; - "active_tab_background" = primary; - "inactive_tab_foreground" = fgdim; - "inactive_tab_background" = bg2; - "tab_bar_background" = bg; + active_tab_foreground = bg; + active_tab_background = primary; + inactive_tab_foreground = fgdim; + inactive_tab_background = bg2; + tab_bar_background = bg; # Colors for marks (marked text in the terminal) - "mark1_foreground" = bg; - "mark1_background" = blue; - "mark2_foreground" = bg; - "mark2_background" = purple; - "mark3_foreground" = bg; - "mark3_background" = blue; + mark1_foreground = bg; + mark1_background = blue; + mark2_foreground = bg; + mark2_background = purple; + mark3_foreground = bg; + mark3_background = blue; # The 16 terminal colors # black - "color0" = colors.withHashPrefix."0"; - "color8" = colors.withHashPrefix."8"; + color0 = colors.withHashPrefix."0"; + color8 = colors.withHashPrefix."8"; # red - "color1" = colors.withHashPrefix."1"; - "color9" = colors.withHashPrefix."9"; + color1 = colors.withHashPrefix."1"; + color9 = colors.withHashPrefix."9"; # green - "color2" = colors.withHashPrefix."2"; - "color10" = colors.withHashPrefix."10"; + color2 = colors.withHashPrefix."2"; + color10 = colors.withHashPrefix."10"; # yellow - "color3" = colors.withHashPrefix."3"; - "color11" = colors.withHashPrefix."11"; + color3 = colors.withHashPrefix."3"; + color11 = colors.withHashPrefix."11"; # blue - "color4" = colors.withHashPrefix."4"; - "color12" = colors.withHashPrefix."12"; + color4 = colors.withHashPrefix."4"; + color12 = colors.withHashPrefix."12"; # magenta - "color5" = colors.withHashPrefix."5"; - "color13" = colors.withHashPrefix."13"; + color5 = colors.withHashPrefix."5"; + color13 = colors.withHashPrefix."13"; # cyan - "color6" = colors.withHashPrefix."6"; - "color14" = colors.withHashPrefix."14"; + color6 = colors.withHashPrefix."6"; + color14 = colors.withHashPrefix."14"; # white - "color7" = colors.withHashPrefix."7"; - "color15" = colors.withHashPrefix."15"; + color7 = colors.withHashPrefix."7"; + color15 = colors.withHashPrefix."15"; }; keybindings = { "ctrl+shift+1" = "change_font_size all 12.5"; diff --git a/modules/home-manager/linux-desktop.nix b/modules/home-manager/linux-desktop.nix index edf951c..4c22cdb 100644 --- a/modules/home-manager/linux-desktop.nix +++ b/modules/home-manager/linux-desktop.nix @@ -5,6 +5,7 @@ ... }: { imports = with outputs.homeManagerModules; [ + linux desktop firefox ]; diff --git a/modules/home-manager/linux.nix b/modules/home-manager/linux.nix index 9d8a8f8..096a6c7 100644 --- a/modules/home-manager/linux.nix +++ b/modules/home-manager/linux.nix @@ -1,10 +1,4 @@ -{ - outputs, - pkgs, - ... -}: { - imports = with outputs.homeManagerModules; [common]; - +{pkgs, ...}: { home = { sessionVariables = { MOZ_ENABLE_WAYLAND = "1"; diff --git a/modules/home-manager/sway.nix b/modules/home-manager/sway.nix index d8527f2..ffbc5fc 100644 --- a/modules/home-manager/sway.nix +++ b/modules/home-manager/sway.nix @@ -8,7 +8,6 @@ ... }: { imports = with outputs.homeManagerModules; [ - linux waybar mako swaylock diff --git a/modules/nixos/daniel.nix b/modules/nixos/daniel.nix index 1f7f6d1..e07161a 100644 --- a/modules/nixos/daniel.nix +++ b/modules/nixos/daniel.nix @@ -1,9 +1,18 @@ -{outputs, ...}: { +{ + outputs, + inputs, + system, + ... +}: { home-manager = { + extraSpecialArgs = { + inherit inputs outputs system; + inherit (outputs) colors font; + }; users.daniel = { - # TODO: specify an email? accounts.email.accounts = { primary = { + primary = true; address = "daniel@lyte.dev"; }; legacy = { @@ -26,9 +35,9 @@ imports = with outputs.homeManagerModules; [ common - senpai - iex - cargo + # senpai + # iex + # cargo ]; }; }; diff --git a/nixos/base.nix b/nixos/base.nix index 7a3e3ac..9559b4a 100644 --- a/nixos/base.nix +++ b/nixos/base.nix @@ -5,10 +5,13 @@ }: { # a minimal, familiar setup that I can bootstrap atop imports = with outputs.nixosModules; [ + # may need to be tweaked based on the machine's paritioning scheme flake.diskoConfigurations.standard + daniel desktop-usage wifi ]; + # TODO: may not work for UEFI? boot.loader.systemd-boot.enable = true; } diff --git a/nixos/foxtrot.nix b/nixos/foxtrot.nix index 33cb47b..62c4ce7 100644 --- a/nixos/foxtrot.nix +++ b/nixos/foxtrot.nix @@ -100,7 +100,7 @@ hardware.framework.amd-7040.preventWakeOnAC = true; boot = { - kernelPackages = pkgs.linuxPackages_latest; # seeing if using the stable kernel makes wow work + kernelPackages = pkgs.linuxPackages_latest; loader = { efi.canTouchEfiVariables = true; @@ -129,18 +129,23 @@ }; hardware.bluetooth = { enable = true; + # TODO: when resuming from hibernation, it would be nice if this would + # simply resume the power state at the time of hibernation powerOnBoot = false; }; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; + services.power-profiles-daemon = { + enable = true; + }; + powerManagement.powertop.enable = true; + + # disabled stuff here for posterity services.fprintd = { enable = false; # tod.enable = true; # tod.driver = pkgs.libfprint-2-tod1-goodix; }; - services.power-profiles-daemon = { - enable = true; - }; services.tlp = { enable = false; settings = { @@ -155,16 +160,6 @@ CPU_MAX_PERF_ON_AC = 100; }; }; - powerManagement.powertop.enable = true; - - networking = { - firewall = { - enable = true; - allowPing = true; - allowedTCPPorts = [22]; - allowedUDPPorts = []; - }; - }; system.stateVersion = "24.05"; } diff --git a/nixos/thablet.nix b/nixos/thablet.nix index 8607d27..e1813ed 100644 --- a/nixos/thablet.nix +++ b/nixos/thablet.nix @@ -7,6 +7,8 @@ modulesPath, ... }: { + networking.hostName = "thablet"; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") @@ -17,10 +19,17 @@ desktop-usage gnome wifi + daniel flanfam flanfamkiosk ]); + home-manager.users.daniel = { + imports = with outputs.homeManagerModules; [ + sway + ]; + }; + nixpkgs = { overlays = [ outputs.overlays.additions @@ -45,6 +54,7 @@ boot.loader.systemd-boot.enable = true; services.fprintd = { + # TODO: am I missing a driver? see arch wiki for this h/w enable = true; # tod.enable = true; # tod.driver = pkgs.libfprint-2-tod1-goodix; @@ -57,19 +67,12 @@ programs.steam.enable = true; programs.steam.remotePlay.openFirewall = true; - networking = { - firewall = { - enable = true; - allowPing = true; - allowedTCPPorts = [22]; - allowedUDPPorts = []; - }; - }; - # https://wiki.archlinux.org/title/Lenovo_ThinkPad_X1_Yoga_(Gen_3)#Using_acpi_call systemd.services.activate-touch-hack = { + enable = true; + description = "Touch wake Thinkpad X1 Yoga 3rd gen hack"; + unitConfig = { - Description = "Touch wake Thinkpad X1 Yoga 3rd gen hack"; After = ["suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target"]; }; From fe5931ff4e16e8645465ca92b42268125957b0c4 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 4 Jan 2024 22:20:10 -0600 Subject: [PATCH 08/15] Linux-specific fish aliases are not working --- modules/home-manager/linux.nix | 1 + modules/nixos/daniel.nix | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/home-manager/linux.nix b/modules/home-manager/linux.nix index 096a6c7..599dc06 100644 --- a/modules/home-manager/linux.nix +++ b/modules/home-manager/linux.nix @@ -7,6 +7,7 @@ programs.fish = { shellAliases = { + # TODO: these aren't working? sctl = "sudo systemctl"; bt = "bluetoothctl"; pa = "pulsemixer"; diff --git a/modules/nixos/daniel.nix b/modules/nixos/daniel.nix index e07161a..e5d4e00 100644 --- a/modules/nixos/daniel.nix +++ b/modules/nixos/daniel.nix @@ -35,9 +35,9 @@ imports = with outputs.homeManagerModules; [ common - # senpai - # iex - # cargo + senpai + iex + cargo ]; }; }; From 4239e603ada7df12439b168a82f50320588152a1 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 4 Jan 2024 22:24:18 -0600 Subject: [PATCH 09/15] WIP --- flake.nix | 3 +-- modules/home-manager/foxtrot.nix | 33 ----------------------------- modules/home-manager/sway.nix | 10 ++++----- modules/nixos/daniel.nix | 11 +++++++++- nixos/foxtrot.nix | 36 +++++++++++++++++++++++++++++++- nixos/router.nix | 1 - 6 files changed, 51 insertions(+), 43 deletions(-) delete mode 100644 modules/home-manager/foxtrot.nix diff --git a/flake.nix b/flake.nix index ac8e02e..f79b36d 100644 --- a/flake.nix +++ b/flake.nix @@ -85,7 +85,6 @@ inherit system; specialArgs = { inherit inputs outputs system; - inherit (outputs) colors font; flake = self; }; modules = @@ -114,7 +113,7 @@ # in # home-manager.lib.homeManagerConfiguration { # pkgs = nixpkgs.legacyPackages.${system}; - # extraSpecialArgs = {inherit inputs outputs system colors font;}; + # extraSpecialArgs = {inherit inputs outputs system;}; # modules = with outputs.homeManagerModules; [macos]; # }; }; diff --git a/modules/home-manager/foxtrot.nix b/modules/home-manager/foxtrot.nix deleted file mode 100644 index 4e0bdfb..0000000 --- a/modules/home-manager/foxtrot.nix +++ /dev/null @@ -1,33 +0,0 @@ -{outputs, ...}: let - scale = 1.25; -in { - imports = with outputs.homeManagerModules; [ - sway - sway-laptop - # hyprland - ]; - - home = { - stateVersion = "24.05"; - }; - - wayland.windowManager.hyprland = { - settings = { - # See https://wiki.hyprland.org/Configuring/Keywords/ for more - monitor = [ - "eDP-1,2256x1504@60,0x0,${toString scale}" - ]; - }; - }; - - wayland.windowManager.sway = { - config = { - output = { - "BOE 0x0BCA Unknown" = { - mode = "2256x1504@60Hz"; - scale = toString scale; - }; - }; - }; - }; -} diff --git a/modules/home-manager/sway.nix b/modules/home-manager/sway.nix index d8527f2..3865c88 100644 --- a/modules/home-manager/sway.nix +++ b/modules/home-manager/sway.nix @@ -8,11 +8,11 @@ ... }: { imports = with outputs.homeManagerModules; [ - linux - waybar - mako - swaylock - linux-desktop + # linux + # waybar + # mako + # swaylock + # linux-desktop ]; programs.wofi = { diff --git a/modules/nixos/daniel.nix b/modules/nixos/daniel.nix index 1f7f6d1..aee4fb8 100644 --- a/modules/nixos/daniel.nix +++ b/modules/nixos/daniel.nix @@ -1,5 +1,14 @@ -{outputs, ...}: { +{ + inputs, + system, + outputs, + ... +}: { home-manager = { + extraSpecialArgs = { + inherit inputs outputs system; + inherit (outputs) colors font; + }; users.daniel = { # TODO: specify an email? accounts.email.accounts = { diff --git a/nixos/foxtrot.nix b/nixos/foxtrot.nix index 33cb47b..ad19178 100644 --- a/nixos/foxtrot.nix +++ b/nixos/foxtrot.nix @@ -6,7 +6,9 @@ # config, pkgs, ... -}: { +}: let + scale = 1.25; +in { networking.hostName = "foxtrot"; imports = @@ -22,6 +24,38 @@ # hyprland ]); + home-manager.users.daniel = { + imports = with outputs.homeManagerModules; [ + sway + # sway-laptop + # hyprland + ]; + + home = { + stateVersion = "24.05"; + }; + + wayland.windowManager.hyprland = { + settings = { + # See https://wiki.hyprland.org/Configuring/Keywords/ for more + monitor = [ + "eDP-1,2256x1504@60,0x0,${toString scale}" + ]; + }; + }; + + wayland.windowManager.sway = { + config = { + output = { + "BOE 0x0BCA Unknown" = { + mode = "2256x1504@60Hz"; + scale = toString scale; + }; + }; + }; + }; + }; + # use updated ppd for framework 13: # source: https://community.frame.work/t/tracking-ppd-v-tlp-for-amd-ryzen-7040/39423/137?u=lytedev nixpkgs.overlays = [ diff --git a/nixos/router.nix b/nixos/router.nix index c856d0f..c0cb981 100644 --- a/nixos/router.nix +++ b/nixos/router.nix @@ -1,6 +1,5 @@ { flake, - inputs, lib, # outputs, # config, From b06f24fcb71d7ac87d2bec8c11db67ea5fa4c8f8 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 4 Jan 2024 22:29:12 -0600 Subject: [PATCH 10/15] Foxtrot builds --- modules/nixos/common.nix | 5 ++--- nixos/thablet.nix | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/nixos/common.nix b/modules/nixos/common.nix index 987ae5e..c8e8cda 100644 --- a/modules/nixos/common.nix +++ b/modules/nixos/common.nix @@ -2,7 +2,6 @@ config, lib, inputs, - colors, outputs, system, pkgs, @@ -20,7 +19,7 @@ ] ++ (with outputs.nixosModules; [ avahi - # daniel + daniel ]); hardware.enableRedistributableFirmware = true; @@ -149,7 +148,7 @@ useXkbConfig = true; earlySetup = true; - colors = with colors; [ + colors = with outputs.colors; [ bg red green diff --git a/nixos/thablet.nix b/nixos/thablet.nix index e1813ed..1de0865 100644 --- a/nixos/thablet.nix +++ b/nixos/thablet.nix @@ -19,7 +19,6 @@ desktop-usage gnome wifi - daniel flanfam flanfamkiosk ]); From 739c256785f1bd97f5743954e553dd8543544ffc Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 4 Jan 2024 22:36:22 -0600 Subject: [PATCH 11/15] Checks pass --- nixos/base.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/base.nix b/nixos/base.nix index 9559b4a..3fc083c 100644 --- a/nixos/base.nix +++ b/nixos/base.nix @@ -7,7 +7,6 @@ imports = with outputs.nixosModules; [ # may need to be tweaked based on the machine's paritioning scheme flake.diskoConfigurations.standard - daniel desktop-usage wifi ]; From f48badb047f57540691eea188f3ae03c6555fc44 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 4 Jan 2024 22:49:08 -0600 Subject: [PATCH 12/15] Add acpi_call kernel module for touch-after-suspend-fix hack --- nixos/thablet.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/thablet.nix b/nixos/thablet.nix index 1de0865..b357b12 100644 --- a/nixos/thablet.nix +++ b/nixos/thablet.nix @@ -86,7 +86,7 @@ boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"]; boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-intel"]; + boot.kernelModules = ["kvm-intel" "acpi_call"]; boot.extraModulePackages = with config.boot.kernelPackages; [acpi_call]; networking.useDHCP = lib.mkDefault true; From 0925b5746145b32fc8709eac4fc3029cf44029c3 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 5 Jan 2024 09:44:06 -0600 Subject: [PATCH 13/15] Add deno flake template and fix emoji script --- modules/home-manager/scripts/common/bin/emoji | 2 +- templates/all.nix | 4 ++ templates/deno/.envrc | 1 + templates/deno/.gitignore | 2 + templates/deno/.helix/languages.toml | 49 +++++++++++++++++++ templates/deno/deno.jsonc | 10 ++++ templates/deno/flake.nix | 23 +++++++++ templates/deno/src/mod.ts | 5 ++ 8 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 templates/deno/.envrc create mode 100644 templates/deno/.gitignore create mode 100644 templates/deno/.helix/languages.toml create mode 100644 templates/deno/deno.jsonc create mode 100644 templates/deno/flake.nix create mode 100644 templates/deno/src/mod.ts diff --git a/modules/home-manager/scripts/common/bin/emoji b/modules/home-manager/scripts/common/bin/emoji index 7955e0a..9ba2241 100755 --- a/modules/home-manager/scripts/common/bin/emoji +++ b/modules/home-manager/scripts/common/bin/emoji @@ -1,5 +1,5 @@ #!/usr/bin/env sh -r="$(< "$HOME/.emoji.txt" sk --height 40%)" +r="$(< "$HOME/.emoji.txt" fzf --height 40%)" echo "$r" | awk '$0=$1' | tr -d '\n' | clip echo "Copied $r emoji to your clipboard" diff --git a/templates/all.nix b/templates/all.nix index 60fbb0e..87b014a 100644 --- a/templates/all.nix +++ b/templates/all.nix @@ -3,4 +3,8 @@ path = ./rust; description = "A template for working on a Rust project"; }; + deno = { + path = ./deno; + description = "A template for working on a TypeScript and Deno project"; + }; } diff --git a/templates/deno/.envrc b/templates/deno/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/templates/deno/.envrc @@ -0,0 +1 @@ +use flake diff --git a/templates/deno/.gitignore b/templates/deno/.gitignore new file mode 100644 index 0000000..6abfe1b --- /dev/null +++ b/templates/deno/.gitignore @@ -0,0 +1,2 @@ +/target +/.direnv diff --git a/templates/deno/.helix/languages.toml b/templates/deno/.helix/languages.toml new file mode 100644 index 0000000..b05ee97 --- /dev/null +++ b/templates/deno/.helix/languages.toml @@ -0,0 +1,49 @@ +[language-server.deno] +command = "deno" +args = ["lsp"] +config.hostInfo = "helix" + +[[language]] +name = "javascript" +scope = "source.js" +injection-regex = "(js|javascript)" +language-id = "javascript" +file-types = ["js", "mjs", "cjs", "rules", "es6", "pac", "jakefile"] +shebangs = ["node"] +comment-token = "//" +language-servers = [ "deno" ] +indent = { tab-width = 2, unit = "\t" } +auto-format = true + +[[language]] +name = "jsx" +scope = "source.jsx" +injection-regex = "jsx" +language-id = "javascriptreact" +file-types = ["jsx"] +comment-token = "//" +language-servers = [ "deno" ] +indent = { tab-width = 2, unit = "\t" } +grammar = "javascript" +auto-format = true + +[[language]] +name = "typescript" +scope = "source.ts" +injection-regex = "(ts|typescript)" +file-types = ["ts", "mts", "cts"] +language-id = "typescript" +shebangs = ["deno", "ts-node"] +language-servers = [ "deno" ] +indent = { tab-width = 2, unit = "\t" } +auto-format = true + +[[language]] +name = "tsx" +scope = "source.tsx" +injection-regex = "(tsx)" +language-id = "typescriptreact" +file-types = ["tsx"] +language-servers = [ "deno" ] +indent = { tab-width = 2, unit = "\t" } +auto-format = true diff --git a/templates/deno/deno.jsonc b/templates/deno/deno.jsonc new file mode 100644 index 0000000..8d93ce9 --- /dev/null +++ b/templates/deno/deno.jsonc @@ -0,0 +1,10 @@ +{ + "tasks": { + "dev": "deno run -A --watch=src src/mod.ts", + }, + "fmt": { + "useTabs": true, + "semiColons": false, + "singleQuote": true, + }, +} diff --git a/templates/deno/flake.nix b/templates/deno/flake.nix new file mode 100644 index 0000000..e3c62d2 --- /dev/null +++ b/templates/deno/flake.nix @@ -0,0 +1,23 @@ +{ + inputs.nixpkgs.url = "github:NixOS/nixpkgs?rev=2c7f3c0fb7c08a0814627611d9d7d45ab6d75335"; + outputs = { + self, + nixpkgs, + }: let + inherit (self) outputs; + supportedSystems = ["x86_64-linux"]; + forEachSupportedSystem = nixpkgs.lib.genAttrs supportedSystems; + in { + devShells = forEachSupportedSystem (system: let + pkgs = import nixpkgs {inherit system;}; + in { + deno-dev = pkgs.mkShell { + buildInputs = with pkgs; [ + deno + ]; + }; + + default = outputs.devShells.${system}.deno-dev; + }); + }; +} diff --git a/templates/deno/src/mod.ts b/templates/deno/src/mod.ts new file mode 100644 index 0000000..747e199 --- /dev/null +++ b/templates/deno/src/mod.ts @@ -0,0 +1,5 @@ +console.log("Hello, world!") + +if (true) { + console.log("Truth!") +} From 1db1d422c56aebd9be003132e0c197d0464c2c12 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 5 Jan 2024 10:21:48 -0600 Subject: [PATCH 14/15] Update flake inputs --- flake.lock | 99 +++++++++++++++++++++++++++------------- modules/nixos/avahi.nix | 2 +- templates/deno/flake.nix | 2 +- templates/rust/flake.nix | 2 +- 4 files changed, 70 insertions(+), 35 deletions(-) diff --git a/flake.lock b/flake.lock index 997d3dd..7e4a1c3 100644 --- a/flake.lock +++ b/flake.lock @@ -50,11 +50,11 @@ ] }, "locked": { - "lastModified": 1699781810, - "narHash": "sha256-LD+PIUbm1yQmQmGIbSsc/PB1dtJtGqXFgxRc1C7LlfQ=", + "lastModified": 1704318910, + "narHash": "sha256-wOIJwAsnZhM0NlFRwYJRgO4Lldh8j9viyzwQXtrbNtM=", "owner": "nix-community", "repo": "disko", - "rev": "2d7d77878c5d70f66f3d676ff66708d8d4f9d7df", + "rev": "aef9a509db64a081186af2dc185654d78dc8e344", "type": "github" }, "original": { @@ -120,11 +120,11 @@ }, "hardware": { "locked": { - "lastModified": 1702453208, - "narHash": "sha256-0wRi9SposfE2wHqjuKt8WO2izKB/ASDOV91URunIqgo=", + "lastModified": 1704458188, + "narHash": "sha256-f6BYEuIqnbrs6J/9m1/1VdkJ6d63hO9kUC09kTPuOqE=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "7763c6fd1f299cb9361ff2abf755ed9619ef01d6", + "rev": "172385318068519900a7d71c1024242fa6af75f0", "type": "github" }, "original": { @@ -143,11 +143,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1701678371, - "narHash": "sha256-0pVtmLgjWNiR2fFqUf/5nh9r2VDTJT49ktKCJrd7mo4=", + "lastModified": 1704401390, + "narHash": "sha256-01Tkq958K2O7H451x8JMEDSGh344iwvhkcYsGVii+8k=", "owner": "helix-editor", "repo": "helix", - "rev": "fcd564fddfa9b8f3fd7d02686e1f8b8a97a9f92b", + "rev": "7e389b67c24dfe4466112c988b240c807e7e2414", "type": "github" }, "original": { @@ -164,11 +164,11 @@ ] }, "locked": { - "lastModified": 1701676655, - "narHash": "sha256-wP8i7hO2aLNJhYoTK3kqoymaCLgt4QcwWcO8d/A1CjQ=", + "lastModified": 1704383912, + "narHash": "sha256-Be7O73qoOj/z+4ZCgizdLlu+5BkVvO2KO299goZ9cW8=", "owner": "nix-community", "repo": "home-manager", - "rev": "948703f3e71f1332a0cb535ebaf5cb14946e3724", + "rev": "26b8adb300e50efceb51fff6859a1a6ba1ade4f7", "type": "github" }, "original": { @@ -189,11 +189,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1700592218, - "narHash": "sha256-vHzDbBrZ5EsfVUMLgjuugf6OqB+iOLjKLO9O5n2occ4=", + "lastModified": 1704455149, + "narHash": "sha256-9CDCJx9ls1qQ1/uOSUzXgw0smiaEfXz/wnB40r7dYKk=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "472926528428cd714c90f157e639fc0466611c8b", + "rev": "d8dbdc4a017e051b3dde2e93791e2495722bfa21", "type": "github" }, "original": { @@ -227,6 +227,24 @@ "type": "github" } }, + "hyprlang": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1704287638, + "narHash": "sha256-TuRXJGwtK440AXQNl5eiqmQqY4LZ/9+z/R7xC0ie3iA=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "6624f2bb66d4d27975766e81f77174adbe58ec97", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, "lexical": { "inputs": { "flake-utils": "flake-utils_2", @@ -251,11 +269,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1701718080, - "narHash": "sha256-6ovz0pG76dE0P170pmmZex1wWcQoeiomUZGggfH9XPs=", + "lastModified": 1702645756, + "narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2c7f3c0fb7c08a0814627611d9d7d45ab6d75335", + "rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1704194953, + "narHash": "sha256-RtDKd8Mynhe5CFnVT8s0/0yqtWFMM9LmCzXv/YKxnq4=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "bd645e8668ec6612439a9ee7e71f7eac4099d4f6", "type": "github" }, "original": { @@ -273,7 +307,7 @@ "helix": "helix", "home-manager": "home-manager", "hyprland": "hyprland", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "sops-nix": "sops-nix", "ssbm": "ssbm" } @@ -329,11 +363,11 @@ ] }, "locked": { - "lastModified": 1700362823, - "narHash": "sha256-/H7XgvrYM0IbkpWkcdfkOH0XyBM5ewSWT1UtaLvOgKY=", + "lastModified": 1703991717, + "narHash": "sha256-XfBg2dmDJXPQEB8EdNBnzybvnhswaiAkUeeDj7fa/hQ=", "owner": "Mic92", "repo": "sops-nix", - "rev": "49a87c6c827ccd21c225531e30745a9a6464775c", + "rev": "cfdbaf68d00bc2f9e071f17ae77be4b27ff72fa6", "type": "github" }, "original": { @@ -350,11 +384,11 @@ "slippi-desktop": "slippi-desktop" }, "locked": { - "lastModified": 1698158961, - "narHash": "sha256-A5YMOQEckHL85Ja23YKh7mVf5M5conwIsP9HNilUuFs=", + "lastModified": 1698159739, + "narHash": "sha256-2oCLXsVQrrkIpp6QSq2uljJHVDkR7TJKTZLn/8uFQHU=", "owner": "lytedev", "repo": "ssbm-nix", - "rev": "c363e7f901838ed10e8236ec908d321fb25e59d3", + "rev": "764ed659a34df9696fa8bf413ae66a7f4ae3d9fb", "type": "github" }, "original": { @@ -428,18 +462,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1699292815, - "narHash": "sha256-HXu98PyBMKEWLqiTb8viuLDznud/SdkdJsx5A5CWx7I=", + "lastModified": 1703963193, + "narHash": "sha256-ke8drv6PTrdQDruWbajrRJffP9A9PU6FRyjJGNZRTs4=", "owner": "wlroots", "repo": "wlroots", - "rev": "5de9e1a99d6642c2d09d589aa37ff0a8945dcee1", + "rev": "f81c3d93cd6f61b20ae784297679283438def8df", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "5de9e1a99d6642c2d09d589aa37ff0a8945dcee1", + "rev": "f81c3d93cd6f61b20ae784297679283438def8df", "type": "gitlab" } }, @@ -449,6 +483,7 @@ "hyprland", "hyprland-protocols" ], + "hyprlang": "hyprlang", "nixpkgs": [ "hyprland", "nixpkgs" @@ -459,11 +494,11 @@ ] }, "locked": { - "lastModified": 1697981233, - "narHash": "sha256-y8q4XUwx+gVK7i2eLjfR32lVo7TYvEslyzrmzYEaPZU=", + "lastModified": 1704400467, + "narHash": "sha256-IsEAKBCorRlN53FwFAMbyGLRsPVu/ZrWEJtCwykPds8=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "22e7a65ff9633e1dedfa5317fdffc49f68de2ff2", + "rev": "1c802128f6cc3db29a8ef01552b1a22f894eeefd", "type": "github" }, "original": { diff --git a/modules/nixos/avahi.nix b/modules/nixos/avahi.nix index f64adc9..03dd945 100644 --- a/modules/nixos/avahi.nix +++ b/modules/nixos/avahi.nix @@ -4,6 +4,6 @@ enable = true; reflector = true; openFirewall = true; - nssmdns = true; + nssmdns4 = true; }; } diff --git a/templates/deno/flake.nix b/templates/deno/flake.nix index e3c62d2..6391206 100644 --- a/templates/deno/flake.nix +++ b/templates/deno/flake.nix @@ -1,5 +1,5 @@ { - inputs.nixpkgs.url = "github:NixOS/nixpkgs?rev=2c7f3c0fb7c08a0814627611d9d7d45ab6d75335"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs?rev=bd645e8668ec6612439a9ee7e71f7eac4099d4f6"; outputs = { self, nixpkgs, diff --git a/templates/rust/flake.nix b/templates/rust/flake.nix index f3d957a..cae00dc 100644 --- a/templates/rust/flake.nix +++ b/templates/rust/flake.nix @@ -1,5 +1,5 @@ { - inputs.nixpkgs.url = "github:NixOS/nixpkgs?rev=2c7f3c0fb7c08a0814627611d9d7d45ab6d75335"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs?rev=bd645e8668ec6612439a9ee7e71f7eac4099d4f6"; outputs = { self, nixpkgs, From 7ca48ea2fcba5966c7fa8bde3bab10740010c230 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 5 Jan 2024 13:23:43 -0600 Subject: [PATCH 15/15] Add pass --- modules/home-manager/default.nix | 45 ++++++++++++++++---------------- modules/home-manager/pass.nix | 6 +++++ nixos/foxtrot.nix | 1 + 3 files changed, 30 insertions(+), 22 deletions(-) create mode 100644 modules/home-manager/pass.nix diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 66c6607..f10eb78 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -3,32 +3,33 @@ with builtins; name = name; value = import ./${name}.nix; }) [ - "common" - "melee" - "linux" + "bat" + "broot" "cargo" - "macos" - "iex" - "mako" + "common" + "desktop" + "ewwbar" + "firefox" + "fish" "git" "helix" - "bat" - "fish" + "htop" + "hyprland" + "iex" "kitty" + "linux" + "linux-desktop" + "macos" + "mako" + "melee" + "nnn" + "pass" + "senpai" + "sway" + "sway-laptop" + "swaylock" + "tmux" + "waybar" "wezterm" "zellij" - "firefox" - "broot" - "nnn" - "waybar" - "swaylock" - "desktop" - "linux-desktop" - "sway" - "hyprland" - "ewwbar" - "sway-laptop" - "tmux" - "htop" - "senpai" ]) diff --git a/modules/home-manager/pass.nix b/modules/home-manager/pass.nix new file mode 100644 index 0000000..1ed9380 --- /dev/null +++ b/modules/home-manager/pass.nix @@ -0,0 +1,6 @@ +{pkgs, ...}: { + programs.password-store = { + enable = true; + package = pkgs.pass.withExtensions (exts: [exts.pass-otp]); + }; +} diff --git a/nixos/foxtrot.nix b/nixos/foxtrot.nix index a28617b..34d457f 100644 --- a/nixos/foxtrot.nix +++ b/nixos/foxtrot.nix @@ -27,6 +27,7 @@ in { home-manager.users.daniel = { imports = with outputs.homeManagerModules; [ sway + pass # sway-laptop # hyprland ];