chore: Move several programs to flakes

This commit is contained in:
DashieTM 2024-05-20 21:31:07 +02:00
parent d79f636669
commit cd44f31f45
11 changed files with 708 additions and 589 deletions

View file

@ -14,10 +14,6 @@ let
}; };
in in
{ {
imports = [
inputs.hyprland.nixosModules.default
];
services.xserver.displayManager.session = [ services.xserver.displayManager.session = [
{ {
manage = "desktop"; manage = "desktop";

957
nix/flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -16,24 +16,25 @@
sops-nix.url = "github:Mic92/sops-nix"; sops-nix.url = "github:Mic92/sops-nix";
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
hyprlock.url = "github:hyprwm/hyprlock"; hyprlock.url = "github:hyprwm/hyprlock";
Hyprspace = { Hyprspace = {
url = "github:KZDKM/Hyprspace"; url = "github:KZDKM/Hyprspace";
inputs.hyprland.follows = "hyprland"; # Hyprspace uses latest Hyprland. We declare this to keep them in sync.
inputs.hyprland.follows = "nixpkgs";
}; };
ironbar = { ironbar = {
url = "github:JakeStanger/ironbar"; url = "github:JakeStanger/ironbar";
}; };
rust-overlay = {
url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz";
};
anyrun.url = "github:Kirottu/anyrun"; anyrun.url = "github:Kirottu/anyrun";
oxicalc.url = "github:DashieTM/OxiCalc";
oxishut.url = "github:DashieTM/OxiShut";
oxinoti.url = "github:DashieTM/OxiNoti";
oxidash.url = "github:DashieTM/OxiDash";
oxipaste.url = "github:DashieTM/OxiPaste";
reset.url = "github:Xetibo/ReSet";
}; };
outputs = { ... }@inputs: outputs = { ... }@inputs:
@ -43,12 +44,6 @@
config = { config = {
allowUnfree = true; allowUnfree = true;
}; };
overlays = [
# because allowing rust nightly is too hard by default....
(import
inputs.rust-overlay
)
];
}; };
base_imports = [ base_imports = [
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager

View file

@ -1,48 +0,0 @@
{ pkgs
, lib
, fetchFromGitHub
}:
let
toolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal);
rustPlatform = pkgs.makeRustPlatform {
cargo = toolchain;
rustc = toolchain;
};
in
rustPlatform.buildRustPackage rec {
pname = "oxicalc";
version = "0.2.4";
src = fetchFromGitHub {
owner = "DashieTM";
repo = "OxiCalc";
rev = "${version}";
hash = "sha256-7qrnA0jnLg2mckpxCe66+axU3jE6nOBu7HefmP8I2Xc=";
};
cargoHash = "sha256-nxLXT9SVorsgj7qzwX8Ipx8SDvyTYMAcpepTg62QL7o=";
nativeBuildInputs = with pkgs;[
pkg-config
wrapGAppsHook4
];
buildInputs = with pkgs;[
gtk4
libadwaita
];
postInstall = ''
install -D --mode=444 $src/${pname}.desktop $out/share/applications/${pname}.desktop
install -D --mode=444 $src/${pname}.svg $out/share/pixmaps/${pname}.svg
'';
meta = with lib; {
description = "A small, simple calculator written in rust/gtk4";
homepage = "https://github.com/DashieTM/OxiCalc";
changelog = "https://github.com/DashieTM/OxiCalc/releases/tag/${version}";
license = licenses.gpl3;
maintainers = with maintainers; [ DashieTM ];
mainProgram = "oxicalc";
};
}

View file

@ -1,46 +0,0 @@
{ pkgs
, lib
, fetchFromGitHub
}:
let
toolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal);
rustPlatform = pkgs.makeRustPlatform {
cargo = toolchain;
rustc = toolchain;
};
in
rustPlatform.buildRustPackage rec {
pname = "oxidash";
version = "1.0";
src = fetchFromGitHub {
owner = "DashieTM";
repo = "OxiDash";
rev = "${version}";
hash = "sha256-GVkmqwn3mHriMHUfEej4LW0MaYURqtsftC5L+Cox+5E=";
};
cargoHash = "sha256-seFHiBht0vc+iqQw5bd22qVvdhCMqDthWuth3NTm8OY=";
nativeBuildInputs = with pkgs;[
pkg-config
glib
wrapGAppsHook4
];
buildInputs = with pkgs;[
dbus
gtk4
gtk4-layer-shell
libadwaita
];
meta = with lib; {
description = "A work in progress notification daemon made with rust and gtk.";
homepage = "https://github.com/DashieTM/OxiDash";
changelog = "https://github.com/DashieTM/OxiDash/releases/tag/${version}";
license = licenses.gpl3;
maintainers = with maintainers; [ DashieTM ];
mainProgram = "oxidash";
};
}

View file

@ -1,44 +0,0 @@
{ pkgs
, lib
, fetchFromGitHub
}:
let
toolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal);
rustPlatform = pkgs.makeRustPlatform {
cargo = toolchain;
rustc = toolchain;
};
in
rustPlatform.buildRustPackage rec {
pname = "oxinoti";
version = "1.0";
src = fetchFromGitHub {
owner = "DashieTM";
repo = "OxiNoti";
rev = "${version}";
hash = "sha256-fsrtLb14mCuYb1ibJAzPCrPNXdlcU/J7ZGYoVfppFBM=";
};
cargoHash = "sha256-jIdev6K5MQ8jASDo1KWU89rSLd9UhI2MhTT4l7pP+tA=";
nativeBuildInputs = with pkgs;[
pkg-config
wrapGAppsHook4
];
buildInputs = with pkgs;[
dbus
gtk3
gtk-layer-shell
];
meta = with lib; {
description = "A work in progress notification daemon made with rust and gtk.";
homepage = "https://github.com/DashieTM/OxiNoti";
changelog = "https://github.com/DashieTM/OxiNoti/releases/tag/${version}";
license = licenses.gpl3;
maintainers = with maintainers; [ DashieTM ];
mainProgram = "oxinoti";
};
}

View file

@ -1,45 +0,0 @@
{ pkgs
, lib
, fetchFromGitHub
}:
let
toolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal);
rustPlatform = pkgs.makeRustPlatform {
cargo = toolchain;
rustc = toolchain;
};
in
rustPlatform.buildRustPackage rec {
pname = "oxipaste";
version = "1.0";
src = fetchFromGitHub {
owner = "DashieTM";
repo = "OxiPaste";
rev = "${version}";
hash = "sha256-2copt808b4cpmE8HO2H960xLs7OegvOUYYS/6z7fNMk=";
};
cargoHash = "sha256-RXaL5y0hohP9VJ7IJCEfdJjyxwY2l555xSwRa9ZiNKc=";
nativeBuildInputs = with pkgs;[
pkg-config
wrapGAppsHook4
];
buildInputs = with pkgs;[
dbus
gtk4
libadwaita
gtk4-layer-shell
];
meta = with lib; {
description = "A work in progress notification daemon made with rust and gtk.";
homepage = "https://github.com/DashieTM/OxiPaste";
changelog = "https://github.com/DashieTM/OxiPaste/releases/tag/${version}";
license = licenses.gpl3;
maintainers = with maintainers; [ DashieTM ];
mainProgram = "oxipaste";
};
}

View file

@ -1,45 +0,0 @@
{ pkgs
, lib
, fetchFromGitHub
}:
let
toolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal);
rustPlatform = pkgs.makeRustPlatform {
cargo = toolchain;
rustc = toolchain;
};
in
rustPlatform.buildRustPackage rec {
pname = "oxishut";
version = "1.0";
src = fetchFromGitHub {
owner = "DashieTM";
repo = "OxiShut";
rev = "${version}";
hash = "sha256-aCNnNxmIHq+IjjviWNGSHfdXT55s367GTAeQoaTZ/KA=";
};
cargoHash = "sha256-UeoBSHwMGfhkgRT7kmelcG3/omtB03Wh4IZrTy3yf3Y=";
nativeBuildInputs = with pkgs;[
pkg-config
glib
wrapGAppsHook4
];
buildInputs = with pkgs;[
gtk4
libadwaita
gtk4-layer-shell
];
meta = with lib; {
description = "";
homepage = "https://github.com/DashieTM/OxiShut";
changelog = "https://github.com/DashieTM/OxiShut/releases/tag/${version}";
license = licenses.gpl3;
maintainers = with maintainers; [ DashieTM ];
mainProgram = "oxishut";
};
}

View file

@ -1,53 +0,0 @@
{ pkgs
, lib
, fetchFromGitHub
}:
let
toolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal);
rustPlatform = pkgs.makeRustPlatform {
cargo = toolchain;
rustc = toolchain;
};
in
rustPlatform.buildRustPackage rec {
pname = "reset";
version = "1.2.0";
src = fetchFromGitHub {
owner = "Xetibo";
repo = "ReSet";
rev = "${version}";
hash = "sha256-6n7IaYQAw0VSkQFO1wXwQjuGbhvheiV6ZJDkpaEIeLU=";
};
cargoHash = "sha256-S3Z2tHQuv17Dvg2VMFDeOvDzyLfIPROcFMsYOoCscqM=";
nativeBuildInputs = with pkgs;[
pkg-config
glib
wrapGAppsHook4
];
buildInputs = with pkgs;[
gtk4
libadwaita
pulseaudio
dbus
gdk-pixbuf
gnome.adwaita-icon-theme
];
postInstall = ''
install -D --mode=444 $src/${pname}.desktop $out/share/applications/${pname}.desktop
install -D --mode=444 $src/src/resources/icons/ReSet.svg $out/share/pixmaps/ReSet.svg
'';
meta = with lib; {
description = "";
homepage = "https://github.com/Xetibo/ReSet";
changelog = "https://github.com/Xetibo/ReSet/releases/tag/${version}";
license = licenses.gpl3;
maintainers = with maintainers; [ DashieTM ];
mainProgram = "reset";
};
}

View file

@ -48,32 +48,23 @@ in
brave brave
greetd.regreet greetd.regreet
sops sops
(callPackage flake-checker
../override/oxinoti.nix
{ })
(callPackage
../override/oxidash.nix
{ })
(callPackage
../override/oxicalc.nix
{ })
(callPackage
../override/oxipaste.nix
{ })
(callPackage
../override/oxishut.nix
{ })
(callPackage (callPackage
../override/streamdeck.nix ../override/streamdeck.nix
{ }) { })
(callPackage
../override/reset.nix
{ })
(callPackage (callPackage
../override/cambalache.nix ../override/cambalache.nix
{ }) { })
]; ];
#my own programs
programs.oxicalc.enable = true;
programs.oxinoti.enable = true;
programs.oxidash.enable = true;
programs.oxishut.enable = true;
programs.oxipaste.enable = true;
programs.reset.enable = true;
home.username = "dashie"; home.username = "dashie";
home.homeDirectory = "/home/dashie"; home.homeDirectory = "/home/dashie";
home.stateVersion = "24.05"; home.stateVersion = "24.05";

View file

@ -1,10 +1,15 @@
{ inputs, pkgs, mod, ... }: { inputs, pkgs, mod, ... }:
let let
base_imports = [ base_imports = [
inputs.hyprland.homeManagerModules.default
inputs.hyprlock.homeManagerModules.default inputs.hyprlock.homeManagerModules.default
inputs.anyrun.homeManagerModules.default inputs.anyrun.homeManagerModules.default
inputs.ironbar.homeManagerModules.default inputs.ironbar.homeManagerModules.default
inputs.oxicalc.homeManagerModules.default
inputs.oxishut.homeManagerModules.default
inputs.oxinoti.homeManagerModules.default
inputs.oxidash.homeManagerModules.default
inputs.oxipaste.homeManagerModules.default
inputs.reset.homeManagerModules.default
inputs.nix-flatpak.homeManagerModules.nix-flatpak inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
]; ];