From 9e3e04422ac7d94ca2253787f7e8aec80dce3c73 Mon Sep 17 00:00:00 2001 From: Yusuf Bera Ertan Date: Thu, 4 May 2023 03:13:26 +0300 Subject: [PATCH] a --- flake.lock | 67 ++++++++++++++++++++++++++++++--- flake.nix | 5 ++- hosts/tkaronto/default.nix | 2 + users/modules/code/default.nix | 34 +++++++++++++++++ users/modules/helix/default.nix | 4 +- users/patriot/default.nix | 2 +- users/patriot/stylix.nix | 64 ++++++++++++++++++++++--------- 7 files changed, 152 insertions(+), 26 deletions(-) create mode 100644 users/modules/code/default.nix diff --git a/flake.lock b/flake.lock index 8ae19ff..3d00d97 100644 --- a/flake.lock +++ b/flake.lock @@ -441,6 +441,22 @@ "type": "github" } }, + "flake-compat_4": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "locked": { "lastModified": 1678901627, @@ -486,6 +502,21 @@ "type": "github" } }, + "flake-utils_4": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "ghc-utils": { "flake": false, "locked": { @@ -907,7 +938,8 @@ "nixpkgs": "nixpkgs_3", "nixpkgs-wayland": "nixpkgs-wayland", "nur": "nur", - "stylix": "stylix" + "stylix": "stylix", + "vscode-extensions": "vscode-extensions" } }, "rust-analyzer-src": { @@ -1029,15 +1061,16 @@ ] }, "locked": { - "lastModified": 1680432579, - "narHash": "sha256-sIcl3DvrDdQZM5kBWY25ocxJsIQFPV4gm54l79ZysB0=", - "owner": "danth", + "lastModified": 1681281620, + "narHash": "sha256-SjX38nDKBrlQN0CbbUgHHYshlfewrjgQ4p0nKL4W4YI=", + "owner": "yusdacra", "repo": "stylix", - "rev": "4205a141bfcc0b9d1c04932ec7fdf0f86f99aaf6", + "rev": "e53b29d8e850bd7ee3012f5e4c7c0a1ded533a91", "type": "github" }, "original": { - "owner": "danth", + "owner": "yusdacra", + "ref": "fixed", "repo": "stylix", "type": "github" } @@ -1056,6 +1089,28 @@ "repo": "flake-utils", "type": "github" } + }, + "vscode-extensions": { + "inputs": { + "flake-compat": "flake-compat_4", + "flake-utils": "flake-utils_4", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1681693872, + "narHash": "sha256-gEy7sfcRiJypI0irVBWZ1xxyc+4MZPb5RqcC8krQi9s=", + "owner": "nix-community", + "repo": "nix-vscode-extensions", + "rev": "1c784113bfb7f0f0d82b32832fdf739f083e8d3a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-vscode-extensions", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index f483406..fc03e5c 100644 --- a/flake.nix +++ b/flake.nix @@ -34,10 +34,13 @@ nil.url = "github:oxalica/nil"; nil.inputs.nixpkgs.follows = "nixpkgs"; - stylix.url = "github:danth/stylix"; + stylix.url = "github:yusdacra/stylix/fixed"; stylix.inputs.nixpkgs.follows = "nixpkgs"; stylix.inputs.home-manager.follows = "home"; + vscode-extensions.url = "github:nix-community/nix-vscode-extensions"; + vscode-extensions.inputs.nixpkgs.follows = "nixpkgs"; + # needed for hyprland setup # hyprland.url = "github:hyprwm/Hyprland"; # hyprland.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/tkaronto/default.nix b/hosts/tkaronto/default.nix index 14bae89..9cfb4d7 100644 --- a/hosts/tkaronto/default.nix +++ b/hosts/tkaronto/default.nix @@ -113,6 +113,8 @@ }; }; + networking.firewall.allowedUDPPorts = [49152]; + # for tailscale networking.firewall.checkReversePath = "loose"; services.tailscale.enable = true; diff --git a/users/modules/code/default.nix b/users/modules/code/default.nix new file mode 100644 index 0000000..3bcf9f8 --- /dev/null +++ b/users/modules/code/default.nix @@ -0,0 +1,34 @@ +{ + pkgs, + inputs, + ... +}: { + # stylix.targets.vscode.enable = false; + programs.vscode = { + enable = true; + package = pkgs.vscodium; + extensions = with inputs.vscode-extensions.extensions.x86_64-linux.vscode-marketplace; [ + mkhl.direnv + bbenoist.nix + svelte.svelte-vscode + bradlc.vscode-tailwindcss + (rust-lang.rust-analyzer.overrideAttrs (old: { + src = old.src.overrideAttrs (old: { + outputHash = "sha256-k9eDTY9y2ejg4jTApji8X6UmKYK/eCLMZJbiYuoTuyY="; + }); + })) + # explodingcamera."1am" + ]; + userSettings = { + "files.associations" = { + "*.css" = "tailwindcss"; + }; + "editor.quickSuggestions" = { + "strings" = "on"; + }; + "editor.suggest.showStatusBar" = true; + "editor.formatOnSave" = true; + # "workbench.colorTheme" = "1am"; + }; + }; +} diff --git a/users/modules/helix/default.nix b/users/modules/helix/default.nix index 4b7ca20..e6f6c47 100644 --- a/users/modules/helix/default.nix +++ b/users/modules/helix/default.nix @@ -3,6 +3,7 @@ pkgs, ... }: { + stylix.targets.helix.enable = false; programs.helix = { enable = true; languages = [ @@ -17,6 +18,7 @@ } ]; settings = { + theme = "ferra"; editor = { soft-wrap.enable = true; line-number = "relative"; @@ -26,7 +28,7 @@ cursor-shape.insert = "block"; lsp = { display-messages = true; - display-inlay-hints = true; + display-inlay-hints = false; }; indent-guides = { render = true; diff --git a/users/patriot/default.nix b/users/patriot/default.nix index 1be2b55..084e715 100644 --- a/users/patriot/default.nix +++ b/users/patriot/default.nix @@ -111,7 +111,7 @@ in { # cli stuff ["zoxide" "zsh" "fzf" "starship" "direnv"] # dev stuff - ["helix" "git" "ssh"] + ["helix" "code" "git" "ssh"] ["lollypop"] ]; in diff --git a/users/patriot/stylix.nix b/users/patriot/stylix.nix index e499354..2b3025e 100644 --- a/users/patriot/stylix.nix +++ b/users/patriot/stylix.nix @@ -10,23 +10,53 @@ stylix.image = ./wallpaper.png; stylix.polarity = "dark"; - stylix.base16Scheme = { - "base00" = "04080e"; - "base01" = "36393e"; - "base02" = "686b6e"; - "base03" = "9b9c9f"; - "base04" = "cdcecf"; - "base05" = "ffffff"; - "base06" = "1d2126"; - "base07" = "e6e6e7"; - "base08" = "cf0466"; # splatoon 2 pink - "base09" = "2851f6"; # splatoon 1 blue - "base0A" = "6844e6"; # splatoon 3 purple - "base0B" = "17a80d"; # splatoon 2 green - "base0C" = "fea972"; # splatoon 3 fuzzy orange color - "base0D" = "fa5a00"; # splatoon 1 orange - "base0E" = "fffe27"; # splatoon 3 yellow - "base0F" = "bdbebc"; + # stylix.base16Scheme = { + # "base00" = "04080e"; + # "base01" = "36393e"; + # "base02" = "686b6e"; + # "base03" = "9b9c9f"; + # "base04" = "cdcecf"; + # "base05" = "ffffff"; + # "base06" = "1d2126"; + # "base07" = "e6e6e7"; + # "base08" = "cf0466"; # splatoon 2 pink + # "base09" = "2851f6"; # splatoon 1 blue + # "base0A" = "6844e6"; # splatoon 3 purple + # "base0B" = "17a80d"; # splatoon 2 green + # "base0C" = "fea972"; # splatoon 3 fuzzy orange color + # "base0D" = "fa5a00"; # splatoon 1 orange + # "base0E" = "fffe27"; # splatoon 3 yellow + # "base0F" = "bdbebc"; + # }; + stylix.base16Scheme = let + night = "#2b292d"; + ash = "#383539"; + umber = "#4d424b"; + bark = "#6F5D63"; + mist = "#D1D1E0"; + sage = "#B1B695"; + blush = "#fecdb2"; + coral = "#ffa07a"; + rose = "#F6B6C9"; + ember = "#e06b75"; + honey = "#F5D76E"; + in { + base00 = night; + base01 = ash; + base02 = umber; + base03 = bark; + base04 = blush; + base05 = mist; + base06 = mist; + base07 = bark; + base08 = ember; + base09 = honey; + base0A = rose; + base0B = sage; + base0C = bark; + base0D = coral; + base0E = blush; + base0F = umber; }; stylix.fonts = {