treewide: add ironbar for niri

This commit is contained in:
Anthony Rodriguez 2024-11-13 23:19:57 +01:00
parent f8fef1e4ff
commit 587708328d
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
8 changed files with 193 additions and 51 deletions

View file

@ -63,6 +63,21 @@
}
},
"crane": {
"locked": {
"lastModified": 1730060262,
"narHash": "sha256-RMgSVkZ9H03sxC+Vh4jxtLTCzSjPq18UWpiM0gq6shQ=",
"owner": "ipetkov",
"repo": "crane",
"rev": "498d9f122c413ee1154e8131ace5a35a80d8fa76",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"crane_2": {
"inputs": {
"nixpkgs": [
"lanzaboote",
@ -419,9 +434,32 @@
"type": "github"
}
},
"lanzaboote": {
"ironbar": {
"inputs": {
"crane": "crane",
"naersk": "naersk",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1731364081,
"narHash": "sha256-7E1dh2H+36AJBO7PCHhLLEuxr2HDaEa6nif14pOoJXY=",
"owner": "JakeStanger",
"repo": "ironbar",
"rev": "a76957216b27f7d23128a02740cad2d78d9e4de6",
"type": "github"
},
"original": {
"owner": "JakeStanger",
"repo": "ironbar",
"type": "github"
}
},
"lanzaboote": {
"inputs": {
"crane": "crane_2",
"flake-compat": "flake-compat_3",
"flake-parts": "flake-parts_2",
"flake-utils": "flake-utils_2",
@ -429,7 +467,7 @@
"nixpkgs"
],
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
"rust-overlay": "rust-overlay"
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1718178907,
@ -479,6 +517,24 @@
}
},
"naersk": {
"inputs": {
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1721727458,
"narHash": "sha256-r/xppY958gmZ4oTfLiHN0ZGuQ+RSTijDblVgVLFi1mw=",
"owner": "nix-community",
"repo": "naersk",
"rev": "3fb418eaf352498f6b6c30592e3beb63df42ef11",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "naersk",
"type": "github"
}
},
"naersk_2": {
"inputs": {
"nixpkgs": [
"nvf",
@ -510,7 +566,7 @@
"nvf",
"nixpkgs"
],
"rust-overlay": "rust-overlay_2"
"rust-overlay": "rust-overlay_3"
},
"locked": {
"lastModified": 1714571717,
@ -530,7 +586,7 @@
"inputs": {
"niri-stable": "niri-stable",
"niri-unstable": "niri-unstable",
"nixpkgs": "nixpkgs_4",
"nixpkgs": "nixpkgs_5",
"nixpkgs-stable": "nixpkgs-stable_2",
"xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
@ -689,6 +745,22 @@
"type": "github"
}
},
"nixpkgs_10": {
"locked": {
"lastModified": 1726871744,
"narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a1d92660c6b3b7c26fb883500a80ea9d33321be2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1715266358,
@ -723,18 +795,16 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1731139594,
"narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=",
"lastModified": 1730272153,
"narHash": "sha256-B5WRZYsRlJgwVHIV6DvidFN7VX7Fg9uuwkRW9Ha8z+w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2",
"rev": "2d2a9ddbe3f2c00747398f3dc9b05f7f2ebb0f53",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_5": {
@ -754,6 +824,22 @@
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1731139594,
"narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1726871744,
"narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=",
@ -769,7 +855,7 @@
"type": "github"
}
},
"nixpkgs_7": {
"nixpkgs_8": {
"locked": {
"lastModified": 1656753965,
"narHash": "sha256-BCrB3l0qpJokOnIVc3g2lHiGhnjUi0MoXiw6t1o8H1E=",
@ -785,7 +871,7 @@
"type": "github"
}
},
"nixpkgs_8": {
"nixpkgs_9": {
"locked": {
"lastModified": 1711404521,
"narHash": "sha256-cYhDZ3RYLiXAi4LQDGuQjjDDbtP00Wd/Vjal/jWyTuA=",
@ -801,22 +887,6 @@
"type": "github"
}
},
"nixpkgs_9": {
"locked": {
"lastModified": 1726871744,
"narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a1d92660c6b3b7c26fb883500a80ea9d33321be2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nmd": {
"flake": false,
"locked": {
@ -839,7 +909,7 @@
"flake-utils": "flake-utils_3",
"mnw": "mnw",
"nil": "nil",
"nixpkgs": "nixpkgs_6",
"nixpkgs": "nixpkgs_7",
"nmd": "nmd",
"plugin-alpha-nvim": "plugin-alpha-nvim",
"plugin-bufdelete-nvim": "plugin-bufdelete-nvim",
@ -2618,7 +2688,7 @@
},
"portfolio": {
"inputs": {
"nixpkgs": "nixpkgs_8"
"nixpkgs": "nixpkgs_9"
},
"locked": {
"lastModified": 1730891412,
@ -2663,8 +2733,8 @@
},
"rnix-lsp": {
"inputs": {
"naersk": "naersk",
"nixpkgs": "nixpkgs_7",
"naersk": "naersk_2",
"nixpkgs": "nixpkgs_8",
"utils": "utils_2"
},
"locked": {
@ -2689,11 +2759,12 @@
"deploy-rs": "deploy-rs",
"firefox-addons": "firefox-addons",
"home-manager": "home-manager_2",
"ironbar": "ironbar",
"lanzaboote": "lanzaboote",
"niri": "niri",
"nix-index-db": "nix-index-db",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_6",
"nvf": "nvf",
"plasma-manager": "plasma-manager",
"portfolio": "portfolio",
@ -2703,6 +2774,27 @@
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"ironbar",
"nixpkgs"
]
},
"locked": {
"lastModified": 1730341826,
"narHash": "sha256-RFaeY7EWzXOmAL2IQEACbnrEza3TgD5UQApHR4hGHhY=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "815d1b3ee71716fc91a7bd149801e1f04d45fbc5",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_2": {
"inputs": {
"flake-utils": [
"lanzaboote",
@ -2727,7 +2819,7 @@
"type": "github"
}
},
"rust-overlay_2": {
"rust-overlay_3": {
"inputs": {
"flake-utils": [
"nvf",
@ -2754,7 +2846,7 @@
"type": "github"
}
},
"rust-overlay_3": {
"rust-overlay_4": {
"inputs": {
"nixpkgs": [
"wezterm",
@ -2897,7 +2989,7 @@
},
"treefmt-nix": {
"inputs": {
"nixpkgs": "nixpkgs_9"
"nixpkgs": "nixpkgs_10"
},
"locked": {
"lastModified": 1730321837,
@ -2955,7 +3047,7 @@
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay_3",
"rust-overlay": "rust-overlay_4",
"zlib": "zlib"
},
"locked": {

View file

@ -13,6 +13,7 @@
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
treefmtEval = eachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
in {
imports = [./modules];
devShells = eachSystem (pkgs: {
default = pkgs.mkShell {
packages = [
@ -24,7 +25,6 @@
};
});
formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
nixosModules = import ./modules;
nixosConfigurations = let
lib' = import ./lib {inherit inputs lib';};
in
@ -58,15 +58,17 @@
ags.url = "github:Aylur/ags";
basix.url = "github:notashelf/basix";
deploy-rs.url = "github:serokell/deploy-rs";
ironbar = {
url = "github:JakeStanger/ironbar";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
niri.url = "github:sodiboo/niri-flake";
nvf.url = "github:notashelf/nvf";
portfolio.url = "github:nezia1/portfolio";
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";

View file

@ -0,0 +1,36 @@
{inputs, ...}: {
imports = [inputs.ironbar.homeManagerModules.default];
programs.ironbar = {
enable = true;
systemd = true;
config = {
position = "top";
anchor_to_edges = true;
center = [
{
type = "focused";
show_icon = true;
show_title = true;
icon_size = 20;
truncate = "end";
}
];
end = [
{type = "volume";}
{type = "clock";}
{type = "tray";}
];
};
style = ''
.tray {
margin-top: 5px;
padding: 10px;
border-radius: 50px;
}
.tray .item {
border-radius: 50px;
min-height: 25px;
padding: 0;
'';
};
}

View file

@ -7,6 +7,7 @@
...
}: let
colors = inputs.basix.schemeData.base16.${osConfig.theme.scheme}.palette;
inherit (lib) getExe mkIf;
in {
imports = [./binds.nix];
@ -91,6 +92,10 @@ in {
"DISPLAY" = ":0";
"_JAVA_AWT_WM_NONREPARENTING" = "1"; # https://wiki.archlinux.org/title/Sway#Java_applications
};
spawn-at-startup = [
(mkIf config.programs.ironbar.enable {command = [(getExe inputs.ironbar.packages.${pkgs.system}.default)];})
];
};
};

View file

@ -9,7 +9,7 @@ in {
system = "x86_64-linux";
modules = [
./vamos
inputs.self.nixosModules.theme
../modules
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
];
};
@ -18,7 +18,7 @@ in {
system = "x86_64-linux";
modules = [
./solaire
inputs.self.nixosModules.theme
../modules
];
};

View file

@ -28,7 +28,7 @@ in {
"${home}/services/udiskie.nix"
"${home}/programs/niri"
"${home}/programs/ags"
"${home}/programs/ironbar"
"${home}/programs/fuzzel.nix"
"${home}/programs/swaybg.nix"
"${home}/programs/swaylock.nix"

View file

@ -1,3 +1,3 @@
{
theme = import ./theme;
imports = [./theme];
}

View file

@ -1,19 +1,26 @@
{pkgs, ...}: {
fonts = {
fontDir = {
enable = true;
decompressFonts = true;
};
packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
noto-fonts-extra
(nerdfonts.override {fonts = ["IntelOneMono"];})
intel-one-mono
];
enableDefaultPackages = false;
fontconfig.defaultFonts = {
fontconfig = {
enable = true;
defaultFonts = {
serif = ["Noto Serif"];
sansSerif = ["Inter"];
monospace = ["IntoneMono NF"];
sansSerif = ["Inter Medium"];
monospace = ["Intel One Mono"];
emoji = ["Noto Color Emoji"];
};
};
};
}