diff --git a/flake.lock b/flake.lock index 3c7797b..05db225 100755 --- a/flake.lock +++ b/flake.lock @@ -326,11 +326,11 @@ ] }, "locked": { - "lastModified": 1723272683, - "narHash": "sha256-a/12MxX9f49zkjTEo0RayjvUuwB+l6kApmuQklZ0ip8=", + "lastModified": 1723274093, + "narHash": "sha256-vCVVcRHRvSTlOMfA8yupoMrO91JVIvdsSpA1fvlOxtw=", "owner": "iofq", "repo": "nvim.nix", - "rev": "adef2193d6fcae7b1e5678ea46cf466e5cad5456", + "rev": "b25deb86c142b675351a34c37add06cef9b25b2b", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 35d8c1d..825ae95 100755 --- a/flake.nix +++ b/flake.nix @@ -2,17 +2,17 @@ description = "Home Manager && NixOS configuration"; inputs = { nix-index-database.url = "github:nix-community/nix-index-database"; - nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + nixos-hardware.url = "github:NixOS/nixos-hardware"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; - nixpkgs.url = "github:nixos/nixpkgs/24.05"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; sops-nix.url = "github:Mic92/sops-nix"; tfa.url = "github:iofq/2fa"; treefmt-nix.url = "github:numtide/treefmt-nix"; home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; + url = "github:nix-community/home-manager/release-24.05"; + inputs.nixpkgs.follows = "nixpkgs"; }; nvim = { url = "github:iofq/nvim.nix"; @@ -37,9 +37,9 @@ steam = pkgs.writeShellScriptBin "steam" '' flatpak run com.valvesoftware.Steam -pipewire "$@" ''; - inherit (inputs.nvim.packages.${final.system}) full; inherit (inputs.tfa.packages.${final.system}) twofa; }) + inputs.nvim.overlays.default ]; }; eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system}); diff --git a/home-manager/shared/programs/min.nix b/home-manager/shared/programs/min.nix index 1656bc3..5013598 100644 --- a/home-manager/shared/programs/min.nix +++ b/home-manager/shared/programs/min.nix @@ -1,5 +1,6 @@ {...}: { imports = [ ./shell + ./nvim ]; } diff --git a/home-manager/shared/programs/nvim/default.nix b/home-manager/shared/programs/nvim/default.nix index a6cd6c7..b46f651 100755 --- a/home-manager/shared/programs/nvim/default.nix +++ b/home-manager/shared/programs/nvim/default.nix @@ -1,5 +1,5 @@ {pkgs, ...}: { home.packages = with pkgs; [ - neovim + nvim-pkg ]; } diff --git a/home-manager/shared/programs/shell/default.nix b/home-manager/shared/programs/shell/default.nix index 53be966..4d366a5 100755 --- a/home-manager/shared/programs/shell/default.nix +++ b/home-manager/shared/programs/shell/default.nix @@ -10,6 +10,7 @@ home = { packages = with pkgs; [ tree + eza ]; }; programs.bash = { @@ -21,11 +22,10 @@ "exit" ]; shellAliases = { - la = "ls -lahrt --color=auto"; + la = "eza -lahrt"; ll = "la"; ":q" = "exit"; mpv = "mpv --no-keepaspect-window"; - sus = "systemctl suspend"; hms = "home-manager switch --flake $NIX_FLAKE#${host.username}"; rbs = "sudo nixos-rebuild switch --flake $NIX_FLAKE#${host.hostName}"; update = "nix flake update $NIX_FLAKE && rbs && hms"; @@ -69,7 +69,7 @@ bind '"\C-k": previous-history' bind '"\C-j": next-history' function cd { - cmd="ls --color=auto" + cmd="eza" builtin cd "$@" && $cmd } exists "kubectl" && source <(kubectl completion bash) diff --git a/home-manager/shared/wayland/alacritty/default.nix b/home-manager/shared/wayland/alacritty/default.nix index 7aec4bd..f7293b8 100755 --- a/home-manager/shared/wayland/alacritty/default.nix +++ b/home-manager/shared/wayland/alacritty/default.nix @@ -27,31 +27,46 @@ _: { style = "Block"; unfocused_hollow = true; }; + # https://github.com/EdenEast/nightfox.nvim/blob/main/extra/terafox/alacritty.toml colors = { draw_bold_text_with_bright_colors = true; primary = { - background = "#090410"; - foreground = "#bababd"; + background = "#152528"; + foreground = "#e6eaea"; + }; + cursor = { + text = "#e6eaea"; + cursor = "#cbd9d8"; }; normal = { - black = "#090410"; - red = "#b02f30"; - green = "#037538"; - yellow = "#c59820"; - blue = "#2e528c"; - magenta = "#764783"; - cyan = "#277c8a"; - white = "#bababd"; + black = "#2f3239"; + red = "#e85c51"; + green = "#7aa4a1"; + yellow = "#fda47f"; + blue = "#5a93aa"; + magenta = "#ad5c7c"; + cyan = "#a1cdd8"; + white = "#ebebeb"; }; bright = { - black = "#95A5A6"; - red = "#b02f30"; - green = "#00853e"; - yellow = "#c59820"; - blue = "#2e528c"; - magenta = "#764783"; - cyan = "#277c8a"; - white = "#ECF0F1"; + black = "#4e5157"; + red = "#eb746b"; + green = "#8eb2af"; + yellow = "#fdb292"; + blue = "#73a3b7"; + magenta = "#b97490"; + cyan = "#afd4de"; + white = "#eeeeee"; + }; + dim = { + black = "#282a30"; + red = "#c54e45"; + green = "#688b89"; + yellow = "#d78b6c"; + blue = "#4d7d90"; + magenta = "#934e69"; + cyan = "#89aeb8"; + white = "#c8c8c8"; }; vi_mode_cursor = { text = "CellBackground"; diff --git a/home-manager/shared/wayland/default.nix b/home-manager/shared/wayland/default.nix index ead407c..fafa184 100644 --- a/home-manager/shared/wayland/default.nix +++ b/home-manager/shared/wayland/default.nix @@ -1,8 +1,11 @@ -{pkgs, ...}: { +{ + pkgs, + config, + ... +}: { imports = [ ./librewolf ./alacritty - ./sway ./hyprland ./xdg ./audio @@ -14,6 +17,9 @@ gammastep sway-contrib.grimshot ]; + home.sessionVariables = { + MOZ_DBUS_REMOTE = 1; + }; programs.bemenu = { enable = true; settings = { @@ -22,4 +28,36 @@ prompt = "open"; }; }; + services.gammastep = { + enable = true; + dawnTime = "6:00-8:00"; + duskTime = "20:00-22:00"; + latitude = 43.0; + longitude = -89.0; + temperature.day = 6000; + temperature.night = 3500; + }; + programs.swaylock = { + enable = true; + package = pkgs.swaylock-effects; + settings = { + color = "#152528"; + daemonize = true; + clock = true; + ignore-empty-password = true; + }; + }; + services.swayidle = { + enable = true; + events = [ + { + event = "before-sleep"; + command = "${config.programs.swaylock.package}/bin/swaylock"; + } + { + event = "lock"; + command = "${config.programs.swaylock.package}/bin/swaylock"; + } + ]; + }; } diff --git a/home-manager/shared/wayland/hyprland/default.nix b/home-manager/shared/wayland/hyprland/default.nix index c657861..b642ffe 100644 --- a/home-manager/shared/wayland/hyprland/default.nix +++ b/home-manager/shared/wayland/hyprland/default.nix @@ -33,7 +33,7 @@ ]; }; master = { - new_is_master = "no"; + new_status = "slave"; no_gaps_when_only = 1; }; input = { @@ -113,7 +113,7 @@ 10) ); windowrulev2 = [ - "workspace 9, class:^(WebCord|webcord|Webcord)$" + "workspace 9, class:^(Discord|discord)$" "workspace 9, class:^(Signal|signal)$" "tile, class:^(Minecraft|minecraft)$" "opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$" @@ -124,6 +124,15 @@ ]; }; }; + services.hyprpaper = { + enable = true; + settings = { + preload = ["/home/pape"]; + wallpaper = ",/home/pape"; + ipc = "off"; + splash = false; + }; + }; programs.waybar = { enable = true; systemd.enable = true; @@ -200,7 +209,7 @@ } window#waybar { - background: #090410; + background: #152528; color: #bababd; } @@ -215,7 +224,7 @@ margin: 2px; padding-left: 8px; padding-right: 8px; - background-color: #090410; + background-color: #152528; } button { @@ -230,12 +239,12 @@ #workspaces button { padding: 0 4px; - background-color: #090410; + background-color: #152528; color: #666666; } #workspaces button.active { - background-color: #090410; + background-color: #152528; color:#bababd; border-top: 2px solid #bababd; } @@ -254,7 +263,7 @@ #tray { padding: 2px; - background-color: #090410; + background-color: #152528; border-top: 2px solid #666666; color: #bababd; } @@ -287,7 +296,7 @@ } label:focus { - background-color: #090410; + background-color: #152528; } #temperature.critical { diff --git a/home-manager/shared/wayland/sway/default.nix b/home-manager/shared/wayland/sway/default.nix index ecd3725..3dea858 100644 --- a/home-manager/shared/wayland/sway/default.nix +++ b/home-manager/shared/wayland/sway/default.nix @@ -10,7 +10,6 @@ home.sessionVariables = { # needed for Sway and Firefox to play nice XDG_CURRENT_DESKTOP = "sway"; - MOZ_DBUS_REMOTE = 1; }; systemd.user.services.autotiling = { Install = { @@ -23,15 +22,6 @@ RestartSec = 5; }; }; - services.gammastep = { - enable = true; - dawnTime = "6:00-8:00"; - duskTime = "20:00-22:00"; - latitude = 43.0; - longitude = -89.0; - temperature.day = 6000; - temperature.night = 3500; - }; wayland.windowManager.sway = { enable = true; wrapperFeatures.gtk = true; @@ -199,64 +189,4 @@ }; }; }; - programs.swaylock = { - enable = true; - package = pkgs.swaylock-effects; - settings = { - color = "#764783"; - daemonize = true; - clock = true; - ignore-empty-password = true; - }; - }; - services.swayidle = { - enable = true; - events = [ - { - event = "before-sleep"; - command = "${config.programs.swaylock.package}/bin/swaylock"; - } - { - event = "lock"; - command = "${config.programs.swaylock.package}/bin/swaylock"; - } - ]; - }; - services.kanshi = { - enable = true; - profiles = { - nodock = { - outputs = [ - { - criteria = "eDP-1"; - } - ]; - }; - dock = { - outputs = [ - { - criteria = "HDMI-A-1"; - status = "enable"; - mode = "1920x1080@60Hz"; - position = "0,0"; - } - ]; - }; - bothdock = { - outputs = [ - { - criteria = "eDP-1"; - status = "enable"; - position = "0,1080"; - } - { - criteria = "HDMI-A-1"; - status = "enable"; - mode = "1920x1080@60Hz"; - position = "0,0"; - } - ]; - }; - }; - }; } diff --git a/nixos/t14/configuration.nix b/nixos/t14/configuration.nix index 6c86bf9..e279f58 100755 --- a/nixos/t14/configuration.nix +++ b/nixos/t14/configuration.nix @@ -29,6 +29,7 @@ in { # Networking networking = { hostId = "1185c58e"; + nameservers = ["1.1.1.1#one.one.one.one"]; networkmanager = { enable = true; dns = "systemd-resolved"; @@ -108,6 +109,13 @@ in { }; }; + # workaround for wait-online killing nixos build + systemd.services.NetworkManager-wait-online = { + serviceConfig = { + ExecStart = ["" "${pkgs.networkmanager}/bin/nm-online -q"]; + }; + }; + hardware.opengl = { enable = true; setLdLibraryPath = true; @@ -116,6 +124,7 @@ in { pkgs.libGL ]; }; + # Set a sane system-wide default font fonts.packages = with pkgs; [ (nerdfonts.override {fonts = ["UbuntuMono"];})