diff --git a/common/themes/default.nix b/common/themes/default.nix index d0a3622..6410b0d 100644 --- a/common/themes/default.nix +++ b/common/themes/default.nix @@ -8,7 +8,8 @@ let }; catppuccin-latte = { - image = ./wallpapers/eye.png; + # image = ./wallpapers/eye.png; + image = ./wallpapers/watercag.png; base16Scheme = "${inputs.catppuccin-base16}/base16/latte.yaml"; polarity = "light"; }; diff --git a/common/themes/wallpapers/crater.jpg b/common/themes/wallpapers/crater.jpg new file mode 100644 index 0000000..76895f1 Binary files /dev/null and b/common/themes/wallpapers/crater.jpg differ diff --git a/common/themes/wallpapers/watercag.png b/common/themes/wallpapers/watercag.png new file mode 100644 index 0000000..7093c2b Binary files /dev/null and b/common/themes/wallpapers/watercag.png differ diff --git a/devshells/visonum.nix b/devshells/visonum.nix index a5c22a8..68ff0c6 100644 --- a/devshells/visonum.nix +++ b/devshells/visonum.nix @@ -1,6 +1,7 @@ # Shell containing the tools I most commonly use for work -{ pkgs, upkgs, inputs, ... }: +{ pkgs, upkgs, ... }: pkgs.mkShell { + system = # REASON: purescript 0.15.7 and it's associated spago nativeBuildInputs = [ upkgs.purescript upkgs.spago pkgs.typescript pkgs.nodejs ]; } diff --git a/dotfiles/neovim/lua/my/plugins/themes/catppuccin.lua b/dotfiles/neovim/lua/my/plugins/themes/catppuccin.lua index cd620ea..47d3a07 100644 --- a/dotfiles/neovim/lua/my/plugins/themes/catppuccin.lua +++ b/dotfiles/neovim/lua/my/plugins/themes/catppuccin.lua @@ -12,7 +12,7 @@ function M.config() vim.g.catppuccin_flavour = H.variant("Catppuccin") catppuccin.setup({ - transparent_background = false, + transparent_background = true, integrations = { nvimtree = true }, }) diff --git a/flake.lock b/flake.lock index 6a305c5..619f863 100644 --- a/flake.lock +++ b/flake.lock @@ -24,17 +24,14 @@ }, "base16": { "inputs": { - "nixpkgs": [ - "stylix", - "nixpkgs" - ] + "fromYaml": "fromYaml" }, "locked": { - "lastModified": 1658847131, - "narHash": "sha256-X6Mml7cT0YR3WCD5fkUhpRVV5ZPcwdcDsND8r8xMqTE=", + "lastModified": 1689633990, + "narHash": "sha256-iwvQg2Vx0IIDWZaKo8Xmzxlv1YPHg+Kp/QSv8dRv0RY=", "owner": "SenchoPens", "repo": "base16.nix", - "rev": "6b404cda2e04ca3cf5ca7b877af9c469e1386acb", + "rev": "dddf2e1c04845d43c89a8e9e37d574519649a404", "type": "github" }, "original": { @@ -81,6 +78,28 @@ "type": "github" } }, + "deploy-rs": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "nixpkgs" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1686747123, + "narHash": "sha256-XUQK9kwHpTeilHoad7L4LjMCCyY13Oq383CoFADecRE=", + "owner": "serokell", + "repo": "deploy-rs", + "rev": "724463b5a94daa810abfc64a4f87faef4e00f984", + "type": "github" + }, + "original": { + "owner": "serokell", + "repo": "deploy-rs", + "type": "github" + } + }, "disko": { "inputs": { "nixpkgs": [ @@ -125,6 +144,22 @@ } }, "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1668681692, + "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "009399224d5e398d03b22badca40a37ac85412a1", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { "flake": false, "locked": { "lastModified": 1673956053, @@ -140,7 +175,7 @@ "type": "github" } }, - "flake-compat_2": { + "flake-compat_3": { "locked": { "lastModified": 1680531544, "narHash": "sha256-8qbiDTYb1kGaDADRXTItpcMKQ1TeQVkuof6oEwHUvVA=", @@ -155,7 +190,7 @@ "type": "github" } }, - "flake-compat_3": { + "flake-compat_4": { "flake": false, "locked": { "lastModified": 1673956053, @@ -289,7 +324,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1685518550, @@ -307,7 +342,7 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1685518550, @@ -325,7 +360,7 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1685518550, @@ -341,6 +376,22 @@ "type": "github" } }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1689549921, + "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, "grub2-themes": { "inputs": { "nixpkgs": [ @@ -447,11 +498,11 @@ ] }, "locked": { - "lastModified": 1686582345, - "narHash": "sha256-z4wLfa++k1d7Y/tQpQYub1D0K0OO9Wju0FZ8U53KUE0=", + "lastModified": 1687871164, + "narHash": "sha256-bBFlPthuYX322xOlpJvkjUBz0C+MOBjZdDOOJJ+G2jU=", "owner": "nix-community", "repo": "home-manager", - "rev": "e753d659c64c7d158433d87ef7d6151ca1d1817a", + "rev": "07c347bb50994691d7b0095f45ebd8838cf6bc38", "type": "github" }, "original": { @@ -487,15 +538,16 @@ "nixpkgs": [ "nixpkgs-unstable" ], + "systems": "systems", "wlroots": "wlroots", "xdph": "xdph" }, "locked": { - "lastModified": 1686588433, - "narHash": "sha256-qWuFScv2cokEaH1As3iH5J7fQeYoww6GghrtB96sS0g=", + "lastModified": 1691842957, + "narHash": "sha256-3sS7r5N9PFHBOpw07KphilCY6UMR/UCuvoZ1zTGi9LQ=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "528cfc28891431be116bcaed7e72d4f8497ed009", + "rev": "d20837bef8a41d6bf1732b0e8968b7f2feb9a93f", "type": "github" }, "original": { @@ -529,14 +581,18 @@ "nixpkgs": [ "hyprland", "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" ] }, "locked": { - "lastModified": 1684265364, - "narHash": "sha256-AxNnWbthsuNx73HDQr0eBxrcE3+yfl/WsaXZqUFmkpQ=", + "lastModified": 1691753796, + "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "8c279b9fb0f2b031427dc5ef4eab53f2ed835530", + "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", "type": "github" }, "original": { @@ -605,7 +661,7 @@ }, "neovim-nightly-overlay": { "inputs": { - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", "hercules-ci-effects": "hercules-ci-effects", "neovim-flake": "neovim-flake", @@ -665,6 +721,26 @@ "type": "github" } }, + "nixinate": { + "inputs": { + "nixpkgs": [ + "nixpkgs-unstable" + ] + }, + "locked": { + "lastModified": 1688141737, + "narHash": "sha256-qHrNMYWukOKmKVf6wXOGKj1xxUnOGjvTRbt/PLLXuBE=", + "owner": "matthewcroughan", + "repo": "nixinate", + "rev": "7902ae845e6cc5bd450e510cdf5e009a6e4a44d9", + "type": "github" + }, + "original": { + "owner": "matthewcroughan", + "repo": "nixinate", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1680213900, @@ -734,11 +810,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1686501370, - "narHash": "sha256-G0WuM9fqTPRc2URKP9Lgi5nhZMqsfHGrdEbrLvAPJcg=", + "lastModified": 1691654369, + "narHash": "sha256-gSILTEx1jRaJjwZxRlnu3ZwMn1FVNk80qlwiCX8kmpo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "75a5ebf473cd60148ba9aec0d219f72e5cf52519", + "rev": "ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e", "type": "github" }, "original": { @@ -750,7 +826,7 @@ }, "nixpkgs-wayland": { "inputs": { - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "lib-aggregate": "lib-aggregate", "nix-eval-jobs": "nix-eval-jobs", "nixpkgs": [ @@ -789,11 +865,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1686431482, - "narHash": "sha256-oPVQ/0YP7yC2ztNsxvWLrV+f0NQ2QAwxbrZ+bgGydEM=", + "lastModified": 1691693223, + "narHash": "sha256-9t8ZY1XNAsWqxAJmXgg+GXqF5chORMVnBT6PSHaRV3I=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d3bb401dcfc5a46ce51cdfb5762e70cc75d082d2", + "rev": "18784aac1013da9b442adf29b6c7c228518b5d3f", "type": "github" }, "original": { @@ -838,6 +914,7 @@ "inputs": { "agenix": "agenix", "catppuccin-base16": "catppuccin-base16", + "deploy-rs": "deploy-rs", "disko": "disko", "firefox-addons": "firefox-addons", "grub2-themes": "grub2-themes", @@ -848,6 +925,7 @@ "impermanence": "impermanence", "neovim-nightly-overlay": "neovim-nightly-overlay", "nixd": "nixd", + "nixinate": "nixinate", "nixpkgs": "nixpkgs_3", "nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-wayland": "nixpkgs-wayland", @@ -918,7 +996,7 @@ "stylix": { "inputs": { "base16": "base16", - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_4", "home-manager": [ "home-manager" ], @@ -927,11 +1005,11 @@ ] }, "locked": { - "lastModified": 1686044491, - "narHash": "sha256-AX+iGW94aEXJDVog9oR7sejDbnEnK9JFqxuZ7luS2eI=", + "lastModified": 1690905065, + "narHash": "sha256-7RP7PJlHlK7yTsKBwvzzin8TX0Iiu4YcRWCr633wApM=", "owner": "danth", "repo": "stylix", - "rev": "7bcf3ce6c9e9225e87d4e3b0c2e7d27a39954c02", + "rev": "5f7b55cc690b5ca02d1dc19175cab2ccdd408811", "type": "github" }, "original": { @@ -942,16 +1020,16 @@ }, "systems": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, @@ -985,21 +1063,52 @@ "type": "github" } }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "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" + } + }, "wlroots": { "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1686573751, - "narHash": "sha256-5vnFxEMvn4wzT+XKR5Jo8VSn1hXrdf/mWuTmdHhRFBs=", + "lastModified": 1691073628, + "narHash": "sha256-LlxE3o3UzRY7APYVLGNKM30DBMcDifCRIQiMVSbYLIc=", "owner": "wlroots", "repo": "wlroots", - "rev": "6e8fb5509f2c94d09d4efa0f9b1f40b37bf73863", + "rev": "c74f89d4f84bfed0284d3908aee5d207698c70c5", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", + "rev": "c74f89d4f84bfed0284d3908aee5d207698c70c5", "type": "gitlab" } }, @@ -1012,14 +1121,18 @@ "nixpkgs": [ "hyprland", "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" ] }, "locked": { - "lastModified": 1685385764, - "narHash": "sha256-r+XMyOoRXq+hlfjayb+fyi9kq2JK48TrwuNIAXqlj7U=", + "lastModified": 1691841170, + "narHash": "sha256-RCTm1/MVWYPnReMgyp7tr2ogGYo/pvw38jZaFwemgPU=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "4d9ff0c17716936e0b5ca577a39e263633901ed1", + "rev": "57a3a41ba6b358109e4fc25c6a4706b5f7d93c6b", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 7af1950..c6c99f7 100644 --- a/flake.nix +++ b/flake.nix @@ -80,6 +80,14 @@ # Disko disko.url = "github:nix-community/disko"; disko.inputs.nixpkgs.follows = "nixpkgs-unstable"; + + # Deploy-rs + deploy-rs.url = "github:serokell/deploy-rs"; + deploy-rs.inputs.nixpkgs.follows = "nixpkgs"; + + # Nixinate + nixinate.url = "github:matthewcroughan/nixinate"; + nixinate.inputs.nixpkgs.follows = "nixpkgs-unstable"; }; # }}} @@ -88,8 +96,7 @@ # {{{ Common helpers inherit (self) outputs; forAllSystems = nixpkgs.lib.genAttrs [ - "aarch64-linux" - "i686-linux" + # "aarch64-linux" TODO: purescript doesn't work on this one "x86_64-linux" "aarch64-darwin" "x86_64-darwin" @@ -136,23 +143,28 @@ # NixOS configuration entrypoint # Available through 'nixos-rebuild --flake .#... nixosConfigurations = - let - nixos = { system, hostname, user }: nixpkgs.lib.nixosSystem { - specialArgs = specialArgs system; + let nixos = { system, hostname, user }: nixpkgs.lib.nixosSystem { + system = system; + specialArgs = specialArgs system; - modules = [ - home-manager.nixosModules.home-manager - { - home-manager.users.${user} = import ./home/${hostname}.nix; - home-manager.extraSpecialArgs = specialArgs system; - home-manager.useUserPackages = true; - stylix.homeManagerIntegration.followSystem = false; - stylix.homeManagerIntegration.autoImport = false; - } + modules = [ + home-manager.nixosModules.home-manager + { + home-manager.users.${user} = import ./home/${hostname}.nix; + home-manager.extraSpecialArgs = specialArgs system; + home-manager.useUserPackages = true; + stylix.homeManagerIntegration.followSystem = false; + stylix.homeManagerIntegration.autoImport = false; + _module.args.nixinate = { + host = hostname; + sshUser = "adrielus"; + buildOn = "remote"; + }; + } - ./hosts/nixos/${hostname} - ]; - }; + ./hosts/nixos/${hostname} + ]; + }; in { tethys = nixos { @@ -161,17 +173,21 @@ user = "adrielus"; }; - euporie = nixos { - system = "x86_64-linux"; - hostname = "euporie"; - user = "guest"; - }; - lapetus = nixos { system = "x86_64-linux"; hostname = "lapetus"; user = "adrielus"; }; + + # Disabled because `flake check` complains about filesystems and bootloader + # options not being set. This is not an issue in practice, as this config is + # supposed to be used inside a VM, but there's not much I can do about it. + # euporie = nixos { + # system = "x86_64-linux"; + # hostname = "euporie"; + # user = "guest"; + # }; + }; # }}} # {{{ Home manager @@ -203,6 +219,27 @@ }; }; # }}} + # {{{ Deploy-rs nodes + deploy.nodes = + let deployNixos = hostname: { + user = "root"; + path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.${hostname}; + }; + in + { + lapetus.hostname = "lapetus"; + lapetus.sshOpts = [ "-t" ]; + lapetus.profiles.system = deployNixos "lapetus"; + }; + # }}} + # {{{ Checks + # This is highly advised, and will prevent many possible mistakes + # Taken from [the deploy-rs docs](https://github.com/serokell/deploy-rs). + checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib; + # }}} + # {{{ Apps + apps.x86_64-linux = (inputs.nixinate.nixinate.x86_64-linux self); + # }}} }; # {{{ Caching and whatnot diff --git a/home/features/cli/default.nix b/home/features/cli/default.nix index 2434b2b..804f881 100644 --- a/home/features/cli/default.nix +++ b/home/features/cli/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{ pkgs, inputs, ... }: { imports = [ ./exa.nix ./bat.nix @@ -32,5 +32,7 @@ tokei # Useless but fun line of code counter (sloc alternative) bottom # System monitor tldr # Example based cli docs + inputs.agenix.packages.${pkgs.system}.agenix # Secret encryption + inputs.deploy-rs.packages.${pkgs.system}.default # Deployment ]; } diff --git a/home/features/desktop/wezterm/wezterm.lua b/home/features/desktop/wezterm/wezterm.lua index 35158c9..f02dafc 100644 --- a/home/features/desktop/wezterm/wezterm.lua +++ b/home/features/desktop/wezterm/wezterm.lua @@ -51,6 +51,9 @@ config.colors.tab_bar = { }, } -- }}} +-- {{{ Other visual things +config.window_background_opacity = 0.6; +-- }}} -- }}} -- {{{ Main config options config.adjust_window_size_when_changing_font_size = false -- Makes it work with fixed window sizes. diff --git a/home/features/desktop/zathura.nix b/home/features/desktop/zathura.nix index e37457e..d8586fd 100644 --- a/home/features/desktop/zathura.nix +++ b/home/features/desktop/zathura.nix @@ -6,6 +6,10 @@ let base16-zathura = config.lib.stylix.colors { sha256 = "1zcrzll13d4lmyzibwdqkkdssyhr3c9s4yxhqigg3azsizk8adb4"; rev = "2caef8fff6a5412e05950c6105c5020a6f16ead2"; }; + + # REASON: fails otherwise :/ + # See [the troubleshooting section](https://github.com/SenchoPens/base16.nix/tree/main#%EF%B8%8F-troubleshooting). + check-parsed-config-yaml = false; }; in { diff --git a/home/features/wayland/hyprland/hyprland.conf b/home/features/wayland/hyprland/hyprland.conf index 6069d85..9a9db44 100644 --- a/home/features/wayland/hyprland/hyprland.conf +++ b/home/features/wayland/hyprland/hyprland.conf @@ -10,11 +10,18 @@ general { decoration { rounding = 10 # Rounded corners of 10px - blur = true - blur_size = 10 - blur_passes = 3 - active_opacity = 1.0 - inactive_opacity = 1.0 + active_opacity = 1 + inactive_opacity = 1 + + blur { + enabled = true + ignore_opacity = true + size = 10 + passes = 3 + contrast = 1 + brightness = 1.2 + noise = 0.05 + } } input { @@ -36,7 +43,7 @@ misc { # Configure the default hyprland branding disable_hyprland_logo = true disable_splash_rendering = true - # force_hypr_chan = true + force_hypr_chan = true } # Execute apps at launch diff --git a/home/lapetus.nix b/home/lapetus.nix index 18d37cd..0c74421 100644 --- a/home/lapetus.nix +++ b/home/lapetus.nix @@ -1,11 +1,8 @@ -{ pkgs, inputs, ... }: { +{ imports = [ ./global ]; # Arbitrary extra packages - home.packages = [ - # Clis - inputs.agenix.packages.${pkgs.system}.agenix # Secret encryption - ]; + home.packages = [ ]; # Set up my custom imperanence wrapper satellite.persistence = { diff --git a/home/tethys.nix b/home/tethys.nix index 6907ac6..54cc99a 100644 --- a/home/tethys.nix +++ b/home/tethys.nix @@ -35,7 +35,6 @@ # obs-studio # video recorder # Clis - inputs.agenix.packages.${pkgs.system}.agenix # Secret encryption sherlock # Search for usernames across different websites ]; diff --git a/hosts/nixos/common/global/default.nix b/hosts/nixos/common/global/default.nix index 2822aac..de6452b 100644 --- a/hosts/nixos/common/global/default.nix +++ b/hosts/nixos/common/global/default.nix @@ -16,7 +16,7 @@ let ./fish.nix ./locale.nix ./wireless - # ./tailscale.nix + ./tailscale.nix ../../../../common ]; in diff --git a/hosts/nixos/common/global/sudo.nix b/hosts/nixos/common/global/sudo.nix new file mode 100644 index 0000000..47d221e --- /dev/null +++ b/hosts/nixos/common/global/sudo.nix @@ -0,0 +1,12 @@ +{ pkgs, inputs, lib, ... }: { + security.sudo = { + enable = true; + extraRules = [{ + commands = [{ + command = lib.getExe inputs.deploy-rs.packages.${pkgs.system}.default; + options = [ "NOPASSWD" ]; + }]; + groups = [ "wheel" ]; + }]; + }; +} diff --git a/hosts/nixos/common/global/tailscale.nix b/hosts/nixos/common/global/tailscale.nix index 2a288bd..bfd9cb1 100644 --- a/hosts/nixos/common/global/tailscale.nix +++ b/hosts/nixos/common/global/tailscale.nix @@ -1,4 +1,9 @@ -{ +{ lib, ... }: { # enable the tailscale service - services.tailscale.enable = true; + services.tailscale = { + enable = true; + useRoutingFeatures = lib.mkDefault "client"; + }; + + environment.persistence."/persist/state".directories = [ "/var/lib/tailscale" ]; } diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 238f0cd..df3579f 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -2,4 +2,5 @@ { # example = import ./example.nix; + font-compat = import ./font-compat.nix; } diff --git a/modules/nixos/font-compat.nix b/modules/nixos/font-compat.nix new file mode 100644 index 0000000..636714c --- /dev/null +++ b/modules/nixos/font-compat.nix @@ -0,0 +1,7 @@ +{ lib, config, ... }: { + options.fonts.packages = lib.mkOption { + type = lib.types.listOf lib.types.package; + }; + + config.fonts.fonts = config.fonts.packages; +} diff --git a/overlays/default.nix b/overlays/default.nix index 1384144..dbd36fb 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -10,19 +10,6 @@ # ... # }); - # {{{ Wezterm - # # REASON: https://github.com/wez/wezterm/issues/3529 doesn't seem to be fixed on stable - # wezterm = prev.wezterm.overrideAttrs (_: { - # version = "unstable-2023-06-12"; - # src = prev.fetchFromGitHub { - # owner = "wez"; - # repo = "wezterm"; - # rev = "baf9d970816e015bee41ed5eb9186ef7f71c454c"; - # sha256 = "0pqfpn12963hfwdhgdwx9fwjngv6j2i6w9d20hcp1saxfd7q5l7m"; - # fetchSubmodules = true; - # }; - # }); - # }}} # {{{ Discordchatexporter discordchatexporter-cli = prev.discordchatexporter-cli.overrideAttrs (_: rec { version = "unstable-2023-06-21"; @@ -34,6 +21,22 @@ }; }); # }}} + # {{{ Discord + discord = + let + enableWayland = drv: bin: drv.overrideAttrs ( + old: { + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ final.makeWrapper ]; + postFixup = (old.postFixup or "") + '' + wrapProgram $out/bin/${bin} \ + --add-flags "--enable-features=UseOzonePlatform" \ + --add-flags "--ozone-platform=wayland" + ''; + } + ); + in + enableWayland prev.discord "discord"; + # }}} }; # Wayland version of plover diff --git a/overlays/plover.nix b/overlays/plover.nix index 6072b3a..07a00af 100644 --- a/overlays/plover.nix +++ b/overlays/plover.nix @@ -1,36 +1,36 @@ # Taken from [here](https://github.com/openstenoproject/plover/pull/1461#issuecomment-1094511201) # Wayland version of plover -(self: super: rec { +(final: prev: rec { python3Packages = { - plover-stroke = self.python3Packages.buildPythonPackage rec { + plover-stroke = final.python3Packages.buildPythonPackage rec { pname = "plover_stroke"; version = "1.0.1"; - src = super.python3Packages.fetchPypi { + src = prev.python3Packages.fetchPypi { inherit pname version; sha256 = "t+ZM0oDEwitFDC1L4due5IxCWEPzJbF3fi27HDyto8Q="; }; }; - rtf-tokenize = self.python3Packages.buildPythonPackage rec { + rtf-tokenize = final.python3Packages.buildPythonPackage rec { pname = "rtf_tokenize"; version = "1.0.0"; - src = super.python3Packages.fetchPypi { + src = prev.python3Packages.fetchPypi { inherit pname version; sha256 = "XD3zkNAEeb12N8gjv81v37Id3RuWroFUY95+HtOS1gg="; }; }; - pywayland_0_4_7 = super.python3Packages.pywayland.overridePythonAttrs + pywayland_0_4_7 = prev.python3Packages.pywayland.overridePythonAttrs (oldAttrs: rec { pname = "pywayland"; version = "0.4.7"; - src = super.python3Packages.fetchPypi { + src = prev.python3Packages.fetchPypi { inherit pname version; sha256 = "0IMNOPTmY22JCHccIVuZxDhVr41cDcKNkx8bp+5h2CU="; }; }); - } // super.python3Packages; - plover.dev = super.plover.dev.overridePythonAttrs + } // prev.python3Packages; + plover.dev = prev.plover.dev.overridePythonAttrs (oldAttrs: { - src = self.fetchFromGitHub { + src = final.fetchFromGitHub { owner = "openstenoproject"; repo = "plover"; rev = "fd5668a3ad9bd091289dd2e5e8e2c1dec063d51f"; @@ -43,13 +43,13 @@ python3Packages.pywayland_0_4_7 ]; nativeBuildInputs = (oldAttrs.nativeBuildInputs or [ ]) ++ [ - self.pkg-config + final.pkg-config ]; doCheck = false; # TODO: get tests working postPatch = '' sed -i /PyQt5/d setup.cfg substituteInPlace plover_build_utils/setup.py \ - --replace "/usr/share/wayland/wayland.xml" "${self.wayland}/share/wayland/wayland.xml" + --replace "/usr/share/wayland/wayland.xml" "${final.wayland}/share/wayland/wayland.xml" ''; }); }) diff --git a/pkgs/default.nix b/pkgs/default.nix index dd55738..bc0c55b 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -6,7 +6,6 @@ let plymouthThemes = pkgs.callPackage (import ./plymouth-themes.nix) { }; in { # example = pkgs.callPackage (import ./example.nix) {}; vimclip = pkgs.callPackage (import ./vimclip.nix) { }; - sherlock = pkgs.callPackage (import ./sherlock.nix) { }; wofi-pass = pkgs.callPackage (import ./wofi-pass.nix) { }; plymouthThemeCutsAlt = plymouthThemes.cuts_alt; diff --git a/pkgs/sherlock.nix b/pkgs/sherlock.nix deleted file mode 100644 index f564e08..0000000 --- a/pkgs/sherlock.nix +++ /dev/null @@ -1,51 +0,0 @@ -# Up to date version of [this](https://github.com/NixOS/nixpkgs/blob/nixos-22.11/pkgs/tools/security/sherlock/default.nix) -{ stdenv, lib, fetchFromGitHub, python3, makeWrapper }: -let - pyenv = python3.withPackages (pp: with pp; [ - beautifulsoup4 - certifi - colorama - lxml - pysocks - requests - requests-futures - soupsieve - stem - torrequest - pandas - ]); -in -stdenv.mkDerivation { - pname = "sherlock"; - version = "unstable-2023-02-27"; - - src = fetchFromGitHub { - owner = "sherlock-project"; - repo = "sherlock"; - rev = "61bb34b0213482164247df496a063b9e41b98f78"; - sha256 = "0lnwph8vvxj47bx3dys4f2g4zixp791xhhijwa4y81rihlr0q89l"; - }; - - nativeBuildInputs = [ makeWrapper ]; - - postPatch = '' - substituteInPlace sherlock/sherlock.py \ - --replace "os.path.dirname(__file__)" "\"$out/share\"" - ''; - - installPhase = '' - runHook preInstall - mkdir -p $out/bin $out/share - cp ./sherlock/*.py $out/bin/ - cp --recursive ./sherlock/resources/ $out/share - makeWrapper ${pyenv.interpreter} $out/bin/sherlock --add-flags "$out/bin/sherlock.py" - runHook postInstall - ''; - - checkPhase = '' - runHook preCheck - cd $srcRoot/sherlock - ${pyenv.interpreter} -m unittest tests.all.SherlockSiteCoverageTests --verbose - runHook postCheck - ''; -}