From e788078cd6716eea82acb53376f15c25383e6e9c Mon Sep 17 00:00:00 2001 From: Redyf Date: Mon, 8 Jan 2024 22:28:33 -0300 Subject: [PATCH 1/2] Casual changes + new font --- flake.lock | 17 +++++ home/desktop/dev/misc.nix | 1 + .../graphical/wms/hyprland/default.nix | 2 +- home/desktop/system/fonts/default.nix | 2 +- hosts/redyf/configuration.nix | 75 +++++++++---------- 5 files changed, 55 insertions(+), 42 deletions(-) diff --git a/flake.lock b/flake.lock index d64aa307..4cd56074 100644 --- a/flake.lock +++ b/flake.lock @@ -587,6 +587,7 @@ "sf-mono-liga-src": "sf-mono-liga-src", "spicetify-nix": "spicetify-nix", "waybar-hyprland": "waybar-hyprland", + "white-rabbit": "white-rabbit", "xdg-portal-hyprland": "xdg-portal-hyprland" } }, @@ -752,6 +753,22 @@ "type": "github" } }, + "white-rabbit": { + "flake": false, + "locked": { + "lastModified": 1704755968, + "narHash": "sha256-xHg0ZUug+7Yka+opZzPo8yLSt4/nzvKFsuQ6V7ZwcnI=", + "owner": "redyf", + "repo": "white-rabbit", + "rev": "02dbb4a7f3eb27be15bc1c5ae46f80f0768a5638", + "type": "github" + }, + "original": { + "owner": "redyf", + "repo": "white-rabbit", + "type": "github" + } + }, "wlroots": { "flake": false, "locked": { diff --git a/home/desktop/dev/misc.nix b/home/desktop/dev/misc.nix index 61a1017b..344daaad 100644 --- a/home/desktop/dev/misc.nix +++ b/home/desktop/dev/misc.nix @@ -9,6 +9,7 @@ peek # Animated GIF screen recorder xclip unzip # Unzip files using the terminal + nerdfix # Fix obsolete nerd font icons traceroute # Tool to access the X clipboard from a console application tree-sitter # A parser generator tool and an incremental parsing library appimage-run # Run appimage files in the terminal diff --git a/home/desktop/graphical/wms/hyprland/default.nix b/home/desktop/graphical/wms/hyprland/default.nix index 1a15cd85..65412f17 100644 --- a/home/desktop/graphical/wms/hyprland/default.nix +++ b/home/desktop/graphical/wms/hyprland/default.nix @@ -254,7 +254,7 @@ in { "tile,title:^(kitty)$" "float,title:^(fly_is_kitty)$" "tile,^(Spotify)$" - "tile,^(neovide)$" + # "tile,^(neovide)$" "tile,^(wps)$" ]; diff --git a/home/desktop/system/fonts/default.nix b/home/desktop/system/fonts/default.nix index 88858dc8..6d44a9e3 100644 --- a/home/desktop/system/fonts/default.nix +++ b/home/desktop/system/fonts/default.nix @@ -1,12 +1,12 @@ {pkgs, ...}: { home.packages = with pkgs; [ - nerdfix # Fix obsolete nerd font icons noto-fonts dejavu_fonts font-awesome fira-code-symbols powerline-symbols material-design-icons + commit-mono (nerdfonts.override {fonts = ["IBMPlexMono" "CascadiaCode" "FiraCode" "FiraMono" "JetBrainsMono" "IntelOneMono" "Ubuntu"];}) ]; } diff --git a/hosts/redyf/configuration.nix b/hosts/redyf/configuration.nix index 61342f0c..02fea3f5 100644 --- a/hosts/redyf/configuration.nix +++ b/hosts/redyf/configuration.nix @@ -74,18 +74,19 @@ time.timeZone = "America/Bahia"; # Select internationalisation properties. - i18n.defaultLocale = "pt_BR.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "pt_BR.UTF-8"; - LC_IDENTIFICATION = "pt_BR.UTF-8"; - LC_MEASUREMENT = "pt_BR.UTF-8"; - LC_MONETARY = "pt_BR.UTF-8"; - LC_NAME = "pt_BR.UTF-8"; - LC_NUMERIC = "pt_BR.UTF-8"; - LC_PAPER = "pt_BR.UTF-8"; - LC_TELEPHONE = "pt_BR.UTF-8"; - LC_TIME = "pt_BR.UTF-8"; + i18n = { + defaultLocale = "pt_BR.UTF-8"; + extraLocaleSettings = { + LC_ADDRESS = "pt_BR.UTF-8"; + LC_IDENTIFICATION = "pt_BR.UTF-8"; + LC_MEASUREMENT = "pt_BR.UTF-8"; + LC_MONETARY = "pt_BR.UTF-8"; + LC_NAME = "pt_BR.UTF-8"; + LC_NUMERIC = "pt_BR.UTF-8"; + LC_PAPER = "pt_BR.UTF-8"; + LC_TELEPHONE = "pt_BR.UTF-8"; + LC_TIME = "pt_BR.UTF-8"; + }; }; # Enable programs @@ -101,23 +102,28 @@ }; }; - # Use overlays - nixpkgs.overlays = [ - ( - final: prev: { - sf-mono-liga-bin = prev.stdenvNoCC.mkDerivation rec { - pname = "sf-mono-liga-bin"; - version = "dev"; - src = inputs.sf-mono-liga-src; - dontConfigure = true; - installPhase = '' - mkdir -p $out/share/fonts/opentype - cp -R $src/*.otf $out/share/fonts/opentype/ - ''; - }; - } - ) - ]; + # Allow unfree packages + use overlays + nixpkgs = { + config = { + allowUnfree = true; + }; + overlays = [ + ( + final: prev: { + sf-mono-liga-bin = prev.stdenvNoCC.mkDerivation rec { + pname = "sf-mono-liga-bin"; + version = "dev"; + src = inputs.sf-mono-liga-src; + dontConfigure = true; + installPhase = '' + mkdir -p $out/share/fonts/opentype + cp -R $src/*.otf $out/share/fonts/opentype/ + ''; + }; + } + ) + ]; + }; fonts = { enableDefaultPackages = true; @@ -134,11 +140,6 @@ }; }; - # Allow unfree packages - nixpkgs.config = { - allowUnfree = true; - }; - # Enables docker in rootless mode virtualisation = { docker.rootless = { @@ -310,11 +311,5 @@ # }; # }; - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "22.11"; # Did you read the comment? } From 25219c0ad3a6dcbe33526c12db278aa38aaf8341 Mon Sep 17 00:00:00 2001 From: Redyf Date: Mon, 8 Jan 2024 22:28:56 -0300 Subject: [PATCH 2/2] feat: Install Nix on GitHub Actions --- .github/workflows/flake_check.yml | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/flake_check.yml diff --git a/.github/workflows/flake_check.yml b/.github/workflows/flake_check.yml new file mode 100644 index 00000000..9464470e --- /dev/null +++ b/.github/workflows/flake_check.yml @@ -0,0 +1,38 @@ +name: Nix Flake Check + +on: [pull_request] + +jobs: + check: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install Nix + uses: cachix/install-nix-action@v24 + + with: + nix_path: nixpkgs=channel:nixos-unstable + + - name: Install Nix Linting and Formatting Tools + run: nix-env -i statix nixpkgs-fmt -f '' + + - name: Run Statix Lint + run: statix fix + + - name: Run Nix Format + run: nix fmt + + - name: Nix Flake Checker + uses: DeterminateSystems/flake-checker-action@v5 + + - name: Commit + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: Auto lint/format + branch: dev