Skip to content

Commit

Permalink
Merge pull request #1 from ExpidusOS/feat/miso
Browse files Browse the repository at this point in the history
feat: use shoyu/miso
  • Loading branch information
RossComputerGuy authored Jan 1, 2025
2 parents 0632044 + aa55de0 commit 1036215
Show file tree
Hide file tree
Showing 28 changed files with 316 additions and 369 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish to GitHub Pages

on:
push:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: stable
- run: flutter pub get
- uses: bluefireteam/flutter-gh-pages@v7
with:
baseHref: /
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# genesis
# Genesis Shell

Next generation desktop & mobile shell

## Why Flutter?

Flutter supports mobile and desktop devices. Since the goal is to provide
a convergence experience, it would make sense to use a framework designed
for both mobile and desktop devices. The adaptive and responsive nature
of Flutter along side with it's easy to use developer tools makes it
a great contender.
Binary file added assets/wallpaper/desktop/dark-sand.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/wallpaper/desktop/default.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/wallpaper/desktop/lake.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/wallpaper/desktop/mountains.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/wallpaper/desktop/tokyo-road.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/wallpaper/mobile/default.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/wallpaper/mobile/neon-tokyo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/wallpaper/mobile/road-flash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
103 changes: 94 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

151 changes: 110 additions & 41 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,65 +2,134 @@
description = "Next generation mobile/desktop shell";

inputs = {
nixpkgs.url = "github:ExpidusOS/nixpkgs/feat/flutter-3-26-pre";
nixpkgs.url = "github:NixOS/nixpkgs/release-24.11";
systems.url = "github:nix-systems/default-linux";
flake-utils.url = "github:numtide/flake-utils";
nixos-apple-silicon = {
url = "github:tpwrules/nixos-apple-silicon/release-2024-12-25";
inputs.nixpkgs.follows = "nixpkgs";
};
shoyu = {
url = "github:MidstallSoftware/shoyu";
inputs = {
nixpkgs.follows = "nixpkgs";
systems.follows = "systems";
flake-utils.follows = "flake-utils";
nixos-apple-silicon.follows = "nixos-apple-silicon";
};
};
};

outputs = { self, nixpkgs, systems, flake-utils }:
outputs =
{
self,
nixpkgs,
systems,
flake-utils,
nixos-apple-silicon,
shoyu,
...
}:
let
inherit (nixpkgs) lib;
in
flake-utils.lib.eachSystem (import systems) (system:
flake-utils.lib.eachSystem (import systems) (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
pkgs = nixpkgs.legacyPackages.${system}.appendOverlays [
(
pkgs: prev: with pkgs; {
pkgsAsahi = (
if stdenv.hostPlatform.isAarch64 then
pkgs.appendOverlays [
nixos-apple-silicon.overlays.default
(pkgsAsahi: prev: {
mesa = pkgsAsahi.mesa-asahi-edge.overrideAttrs (
f: p: {
meta.platforms = prev.mesa.meta.platforms;
}
);
})
]
else
null
);

genesis-shell = pkgs.flutter327.buildFlutterApplication {
pname = "genesis-shell";
version = "${shortVersion}+git-${shortRev}";

src = lib.cleanSource self;

flutterBuildFlags = [
"--dart-define=COMMIT_HASH=${shortRev}"
];

buildInputs = with pkgs; [
pkgs.shoyu
];

pubspecLock = lib.importJSON ./pubspec.lock.json;

gitHashes = {
expidus = "sha256-EaOzIJvuZ5Bs75zslMCTb9ChkOX7lNUEUvsbDItyqG0=";
miso = "sha256-EznEUokD0nSON/4XRHe/HT+ybPAdNtoUwXCPEla6i1Y=";
};

meta = {
description = "Next generation mobile/desktop shell.";
homepage = "https://expidusos.com";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ RossComputerGuy ];
platforms = [
"x86_64-linux"
"aarch64-linux"
];
};
};
}
)
shoyu.overlays.default
];

deps = builtins.fromJSON (lib.readFile ./deps.json);
shortRev = self.shortRev or (lib.substring 7 7 lib.fakeHash);
shortRevCodes = lib.map lib.strings.charToInt (lib.stringToCharacters shortRev);
buildCode = lib.foldr (a: b: "${toString a}${toString b}") "" shortRevCodes;

shortVersion = "1.0.0";
version = "${shortVersion}+${buildCode}";
in {
packages.default = pkgs.flutter326.buildFlutterApplication {
pname = "genesis-shell";
version = "${shortVersion}+git-${shortRev}";

src = lib.cleanSource self;

flutterBuildFlags = [
"--dart-define=COMMIT_HASH=${shortRev}"
];

buildInputs = with pkgs; [
gtk-layer-shell
];

pubspecLock = lib.importJSON ./pubspec.lock.json;

gitHashes = {
expidus = "sha256-MJWcL4MDbM4Oz1eaWZZrQQoVNeJMyl0/oWQlmdQcMKg=";
mkDevShell =
pkgs:
pkgs.mkShell {
packages = with pkgs; [
flutter327
pkg-config
gtk3
yq
pkgs.shoyu
];
};

meta = {
description = "Next generation mobile/desktop shell.";
homepage = "https://expidusos.com";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ RossComputerGuy ];
platforms = [ "x86_64-linux" "aarch64-linux" ];
in
{
packages =
{
default = pkgs.genesis-shell;
}
// lib.optionalAttrs (pkgs.pkgsAsahi != null) {
asahi = pkgs.pkgsAsahi.genesis-shell;
};
};

devShells.default = pkgs.mkShell {
inherit (self.packages.${system}.default) pname version name;
devShells =
{
default = mkDevShell pkgs;
}
// lib.optionalAttrs (pkgs.pkgsAsahi != null) {
asahi = mkDevShell pkgs.pkgsAsahi;
};

packages = with pkgs; [
flutter326
pkg-config
gtk3
gtk-layer-shell
yq
];
};
});
legacyPackages = pkgs;
}
);
}
21 changes: 1 addition & 20 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,13 @@ import 'dart:io';

import 'package:expidus/expidus.dart';

import 'views/action_dialog.dart';
import 'views/backdrop.dart';
import 'views/desktop.dart';
import 'views/panel.dart';
import 'views/user_drawer.dart';

void main(List<String> args) {
final mode = args.length > 0 ? args[0] : 'desktop';
final monitor = args.length > 1 ? args[1] : null;

runApp(ExpidusAppConfig(
ExpidusApp(
title: 'Genesis Shell',
home: switch (mode) {
'action-dialog' => ActionDialogView(monitor: monitor),
'backdrop' => BackdropView(monitor: monitor),
'desktop' => DesktopView(monitor: monitor),
'panel' => PanelView(monitor: monitor),
'user-drawer' => UserDrawerView(monitor: monitor),
(_) => throw Exception('Invalid mode $mode'),
},
),
windowSize: const Size(0, 50),
windowLayer: ExpidusWindowLayerConfig(
fixedSize: true,
monitor: monitor,
home: const DesktopView(),
),
));
}
Loading

0 comments on commit 1036215

Please sign in to comment.