From f72599896e2f8fc6f0857774da889fbc73c3cca6 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Wed, 2 Oct 2024 19:59:58 +0200 Subject: [PATCH] niri: add ags, mako and swaybg --- flake.lock | 99 ++++++++++++++++++++++++-------- flake.nix | 2 + home/profiles/vamos/default.nix | 8 +-- home/programs/ags/default.nix | 20 +++++++ home/programs/editors/neovim.nix | 1 + home/programs/niri/default.nix | 3 + home/programs/swaybg.nix | 19 ++++++ hosts/default.nix | 2 +- 8 files changed, 124 insertions(+), 30 deletions(-) create mode 100644 home/programs/ags/default.nix create mode 100644 home/programs/swaybg.nix diff --git a/flake.lock b/flake.lock index 5442891..51f04e7 100644 --- a/flake.lock +++ b/flake.lock @@ -1,10 +1,29 @@ { "nodes": { + "ags": { + "inputs": { + "nixpkgs": "nixpkgs", + "systems": "systems" + }, + "locked": { + "lastModified": 1727303518, + "narHash": "sha256-lO5JMynTxNZxg/+E4/Y9reeLGIz/M8cEue+Re4cP6qo=", + "owner": "Aylur", + "repo": "ags", + "rev": "cd543afec4d9ed708990e5ba52184716809bf248", + "type": "github" + }, + "original": { + "owner": "Aylur", + "repo": "ags", + "type": "github" + } + }, "basix": { "inputs": { "flake-compat": "flake-compat", "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1727493962, @@ -132,7 +151,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1710146030, @@ -150,7 +169,7 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1710146030, @@ -305,7 +324,7 @@ "flake-parts": "flake-parts_3", "niri-stable": "niri-stable", "niri-unstable": "niri-unstable", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixpkgs-stable": "nixpkgs-stable", "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" @@ -374,11 +393,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1715266358, - "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", + "lastModified": 1725634671, + "narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f1010e0469db743d14519a1efd37e23f8513d714", + "rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c", "type": "github" }, "original": { @@ -442,11 +461,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1727634051, - "narHash": "sha256-S5kVU7U82LfpEukbn/ihcyNt2+EvG7Z5unsKW9H/yFA=", + "lastModified": 1715266358, + "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "06cf0e1da4208d3766d898b7fdab6513366d45b9", + "rev": "f1010e0469db743d14519a1efd37e23f8513d714", "type": "github" }, "original": { @@ -473,6 +492,22 @@ } }, "nixpkgs_4": { + "locked": { + "lastModified": 1727634051, + "narHash": "sha256-S5kVU7U82LfpEukbn/ihcyNt2+EvG7Z5unsKW9H/yFA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "06cf0e1da4208d3766d898b7fdab6513366d45b9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1726871744, "narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=", @@ -488,7 +523,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1656753965, "narHash": "sha256-BCrB3l0qpJokOnIVc3g2lHiGhnjUi0MoXiw6t1o8H1E=", @@ -504,7 +539,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1726871744, "narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=", @@ -542,7 +577,7 @@ "flake-utils": "flake-utils_2", "mnw": "mnw", "nil": "nil", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nmd": "nmd", "plugin-alpha-nvim": "plugin-alpha-nvim", "plugin-bufdelete-nvim": "plugin-bufdelete-nvim", @@ -646,7 +681,7 @@ "plugin-vim-vsnip": "plugin-vim-vsnip", "plugin-which-key": "plugin-which-key", "rnix-lsp": "rnix-lsp", - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1727647833, @@ -2305,7 +2340,7 @@ "rnix-lsp": { "inputs": { "naersk": "naersk", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "utils": "utils" }, "locked": { @@ -2324,16 +2359,17 @@ }, "root": { "inputs": { + "ags": "ags", "basix": "basix", "flake-parts": "flake-parts_2", "flake-utils": "flake-utils", "home-manager": "home-manager", "niri": "niri", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nvf": "nvf", "plasma-manager": "plasma-manager", - "systems": "systems_3", + "systems": "systems_4", "treefmt-nix": "treefmt-nix", "wezterm": "wezterm" } @@ -2388,16 +2424,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" } }, @@ -2417,6 +2453,21 @@ } }, "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_4": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -2431,7 +2482,7 @@ "type": "github" } }, - "systems_4": { + "systems_5": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -2448,7 +2499,7 @@ }, "treefmt-nix": { "inputs": { - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1727431250, diff --git a/flake.nix b/flake.nix index c6d832c..5297c58 100644 --- a/flake.nix +++ b/flake.nix @@ -59,6 +59,8 @@ inputs.home-manager.follows = "home-manager"; }; + ags.url = "github:Aylur/ags"; + niri = { url = "github:sodiboo/niri-flake"; }; diff --git a/home/profiles/vamos/default.nix b/home/profiles/vamos/default.nix index dc02b68..0fad2ff 100644 --- a/home/profiles/vamos/default.nix +++ b/home/profiles/vamos/default.nix @@ -1,15 +1,13 @@ -{ - self, - pkgs, - ... -}: { +{self, ...}: { imports = [ "${self}/home/services/udiskie.nix" "${self}/home/programs" "${self}/home/programs/niri" + "${self}/home/programs/ags" "${self}/home/programs/fuzzel.nix" + "${self}/home/programs/swaybg.nix" "${self}/home/terminal/emulators/foot.nix" diff --git a/home/programs/ags/default.nix b/home/programs/ags/default.nix new file mode 100644 index 0000000..b8705b4 --- /dev/null +++ b/home/programs/ags/default.nix @@ -0,0 +1,20 @@ +{ + inputs, + pkgs, + ... +}: { + imports = [inputs.ags.homeManagerModules.default]; + programs.ags = { + enable = true; + + # null or path, leave as null if you don't want hm to manage the config + configDir = ./src; + + # additional packages to add to gjs's runtime + extraPackages = with pkgs; [ + gtksourceview + webkitgtk + accountsservice + ]; + }; +} diff --git a/home/programs/editors/neovim.nix b/home/programs/editors/neovim.nix index fadf0af..90437ff 100644 --- a/home/programs/editors/neovim.nix +++ b/home/programs/editors/neovim.nix @@ -98,6 +98,7 @@ nix.enable = true; clang.enable = true; python.enable = true; + ts.enable = true; }; treesitter = { diff --git a/home/programs/niri/default.nix b/home/programs/niri/default.nix index cdeef4b..f0714ff 100644 --- a/home/programs/niri/default.nix +++ b/home/programs/niri/default.nix @@ -1,4 +1,5 @@ { + self, inputs, config, lib, @@ -16,6 +17,8 @@ in { name = "Bibata-Modern-Classic"; }; + services.mako = {enable = true;}; + programs.niri = { settings = { environment."NIXOS_OZONE_WL" = "1"; diff --git a/home/programs/swaybg.nix b/home/programs/swaybg.nix new file mode 100644 index 0000000..975e5d9 --- /dev/null +++ b/home/programs/swaybg.nix @@ -0,0 +1,19 @@ +# stolen from https://raw.githubusercontent.com/carlsvelz/dotfiles/a7a109b2e19f73062b4961e7be75836e6d13408c/home/wayland/swaybg.nix +{ + pkgs, + lib, + nixosConfig, + ... +}: { + systemd.user.services.swaybg = { + Unit = { + Description = "Wayland wallpaper daemon"; + PartOf = ["graphical-session.target"]; + }; + Service = { + ExecStart = builtins.trace nixosConfig.theme.wallpaper "${lib.getExe pkgs.swaybg} -i ${nixosConfig.theme.wallpaper} -m fill"; + Restart = "on-failure"; + }; + Install.WantedBy = ["graphical-session.target"]; + }; +} diff --git a/hosts/default.nix b/hosts/default.nix index e7dcedc..f230165 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -26,7 +26,7 @@ self.nixosModules.theme { - theme.wallpaper = lib.mkDefault ../wallpapers/nix-wallpaper-nineish-catppuccin-frappe-alt.svg; + theme.wallpaper = lib.mkDefault ../wallpapers/lucy-edgerunners-wallpaper.jpg; theme.scheme = lib.mkDefault "catppuccin-frappe"; }