From ed9ae0bd0728afd7c99197593fb0198aa72667ba Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 28 Jun 2024 21:36:19 -0500 Subject: [PATCH] Various fixes --- flake.nix | 35 ++++++++++- lib/internal.md | 1 + modules/home-manager/default.nix | 3 +- nixos/foxtrot.nix | 99 ++++++++++---------------------- nixos/thablet.nix | 32 ++++------- 5 files changed, 79 insertions(+), 91 deletions(-) diff --git a/flake.nix b/flake.nix index c91d7bc..3206761 100644 --- a/flake.nix +++ b/flake.nix @@ -151,6 +151,7 @@ homeManagerModules = import ./modules/home-manager { inherit home-manager helix nixosModules homeManagerModules pubkey overlays colors; + inherit (nixpkgs) lib; flakeInputs = self.inputs; }; @@ -211,7 +212,30 @@ system = "x86_64-linux"; modules = with nixosModules; [ common + + outputs.diskoConfigurations.standard + hardware.nixosModules.framework-13-7040-amd + + graphical-workstation + development-tools + laptop + gaming + ./nixos/foxtrot.nix + + { + home-manager.users.daniel = { + imports = with homeManagerModules; [ + pass + senpai + iex + cargo + firefox-no-tabs + linux-desktop-environment-config + slippi.homeManagerModules.default + ]; + }; + } ]; }; @@ -219,6 +243,15 @@ system = "x86_64-linux"; modules = with nixosModules; [ common + + outputs.diskoConfigurations.standard + hardware.nixosModules.lenovo-thinkpad-x1-yoga + + graphical-workstation + development-tools + laptop + gaming + ./nixos/thablet.nix ]; }; @@ -243,7 +276,7 @@ router = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = with nixosModules; [ - diskoConfiguration.unencrypted + outputs.diskoConfiguration.unencrypted common ./nixos/router.nix ]; diff --git a/lib/internal.md b/lib/internal.md index c4cff35..469f4e4 100644 --- a/lib/internal.md +++ b/lib/internal.md @@ -80,6 +80,7 @@ nix-shell --packages git --run "sudo nix run \ # install nix-shell --packages git \ --run "sudo nixos-install \ + --no-write-lock-file \ --flake 'git+https://git.lyte.dev/lytedev/nix#${FLAKE_ATTR}' \ --option trusted-substituters 'https://cache.nixos.org https://nix.h.lyte.dev' \ --option trusted-public-keys 'cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0='" diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index c2567c0..aaec67e 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -1,5 +1,6 @@ { colors, + lib, flakeInputs, homeManagerModules, home-manager, @@ -462,7 +463,7 @@ programs.helix = { enable = true; - package = helix.packages.${system}.helix; + package = lib.mkForce helix.packages.${system}.helix; languages = { language-server = { lexical = { diff --git a/nixos/foxtrot.nix b/nixos/foxtrot.nix index c52604f..5b647f8 100644 --- a/nixos/foxtrot.nix +++ b/nixos/foxtrot.nix @@ -1,32 +1,6 @@ -{ - lib, - # config, - inputs, - outputs, - pkgs, - ... -}: let - scale = 1.5; -in { +{pkgs, ...}: { networking.hostName = "foxtrot"; - imports = with outputs.nixosModules; [ - { - nixpkgs.overlays = [ - outputs.overlays.modifications - ]; - } - outputs.diskoConfigurations.standard - inputs.hardware.nixosModules.framework-13-7040-amd - desktop-usage - # gnome - printing - kde-plasma - podman - lutris - postgres - wifi - # hyprland - steam + imports = [ { # laptop power management services.upower.enable = true; @@ -77,13 +51,6 @@ in { }; home-manager.users.daniel = { - imports = with outputs.homeManagerModules; [ - sway - pass - firefox-no-tabs - # wallpaper-manager - # hyprland - ]; home = { stateVersion = "24.05"; pointerCursor = { @@ -91,41 +58,37 @@ in { }; }; - wayland.windowManager.hyprland = { - settings = { - env = [ - "EWW_BAR_MON,0" - ]; - # See https://wiki.hyprland.org/Configuring/Keywords/ for more - monitor = [ - "eDP-1,2256x1504@60,0x0,${toString scale}" - ]; - }; - }; + # wayland.windowManager.hyprland = { + # settings = { + # env = [ + # "EWW_BAR_MON,0" + # ]; + # # 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"; - position = "0,0"; - scale = toString scale; - }; + # wayland.windowManager.sway = { + # config = { + # output = { + # "BOE 0x0BCA Unknown" = { + # mode = "2256x1504@60Hz"; + # position = "0,0"; + # scale = toString scale; + # }; - "Dell Inc. DELL U2720Q D3TM623" = { - # desktop left vertical monitor - mode = "1920x1080@60Hz"; - # transform = "90"; - # scale = "1.5"; - position = "${toString (builtins.floor (2256 / scale))},0"; - }; - }; - }; - }; - }; - - home-manager.users.valerie = { - home.stateVersion = "24.05"; + # "Dell Inc. DELL U2720Q D3TM623" = { + # # desktop left vertical monitor + # mode = "1920x1080@60Hz"; + # # transform = "90"; + # # scale = "1.5"; + # position = "${toString (builtins.floor (2256 / scale))},0"; + # }; + # }; + # }; + # }; }; hardware.opengl.extraPackages = [ diff --git a/nixos/thablet.nix b/nixos/thablet.nix index 6d7867b..42c0a48 100644 --- a/nixos/thablet.nix +++ b/nixos/thablet.nix @@ -1,31 +1,11 @@ { - inputs, - outputs, lib, config, - modulesPath, ... }: { networking.hostName = "thablet"; - imports = with outputs.nixosModules; [ - (modulesPath + "/installer/scan/not-detected.nix") - outputs.diskoConfigurations.standard - inputs.hardware.nixosModules.lenovo-thinkpad-x1-yoga - desktop-usage - fonts - steam - # gnome - kde-plasma - wifi - flanfam - flanfamkiosk - ]; - home-manager.users.daniel = { - imports = with outputs.homeManagerModules; [ - sway - ]; }; boot.loader.systemd-boot.enable = true; @@ -71,5 +51,15 @@ powerOnBoot = true; }; - system.stateVersion = "23.11"; + networking = { + firewall = let + terraria = 7777; + stardew-valley = 24642; + in { + allowedTCPPorts = [terraria stardew-valley]; + allowedUDPPorts = [terraria stardew-valley]; + }; + }; + + system.stateVersion = "24.05"; }