Compare commits

...

18 commits

Author SHA1 Message Date
f85b7d9211 hosts/vm-base: add core-destkop 2024-08-08 16:49:01 +02:00
7e38202a05 Merge branch 'cosmic' 2024-08-08 16:48:29 +02:00
99a59bfb6b pkgs/overlay/cosmic-packages: build cosmic using locked nixpkgs
but with future rust

cosmic didn't work at all when I just made it using futureNixpkgs.
2024-08-08 16:47:36 +02:00
6b1ea56d8b nixos/cosmic: move overlay and substituters to hosts/vm-cosmic
use cosmic-packages overlay
2024-08-08 07:14:07 +02:00
dae61508df pkgs/overlays/cosmic: create 2024-08-08 06:15:52 +02:00
ec8be03e7f hosts/vm-cosmic: use vm-base 2024-08-08 06:05:24 +02:00
24a9a407d7 Merge branch 'main' into cosmic 2024-08-08 06:05:05 +02:00
e5d2edff9a inputs: add cosmic-modules 2024-08-08 04:05:43 +02:00
ac2bd4cd00 vm-cosmic: delete 2024-08-08 04:02:19 +02:00
b3550dc00a Merge branch 'main' into cosmic 2024-08-08 04:01:19 +02:00
3009a03edc Merge branch 'main' into cosmic 2024-07-06 06:17:43 +02:00
756547a1f6 Merge branch 'main' into cosmic 2024-05-31 18:22:24 +02:00
7202e30fa7 Merge branch 'main' into cosmic 2024-05-31 14:35:46 +02:00
9fffce71cd Cosmic+Cosmic greeter: Align to upstream changes 2024-04-19 22:51:28 +02:00
755958c603 Merge branch 'main' into cosmic 2024-04-19 21:57:21 +02:00
b79c776d97 cosmic: add binary cache server 2024-03-13 14:30:01 +01:00
cb4d369d96 Merge branch 'main' into cosmic 2024-03-13 14:29:05 +01:00
f84333b9a5 Cosmic: init
this desktop environment is still in alpha (or pre alpha)
2024-03-08 09:06:58 +01:00
7 changed files with 93 additions and 0 deletions

View file

@ -5,6 +5,7 @@
"${modulesPath}/virtualisation/qemu-vm.nix" "${modulesPath}/virtualisation/qemu-vm.nix"
../nix-os/account.nix ../nix-os/account.nix
../nix-os/core.nix ../nix-os/core.nix
../nix-os/core-desktop.nix
../nix-os/locale.nix ../nix-os/locale.nix
../nix-os/polkit/disable-shutdown.nix ../nix-os/polkit/disable-shutdown.nix
../nix-os/shell.nix ../nix-os/shell.nix

17
hosts/vm-cosmic.nix Normal file
View file

@ -0,0 +1,17 @@
{ inputs, ... }:
{
imports = [
./vm-base.nix
../nix-os/desktopManagers/cosmic.nix
../nix-os/displayManagers/cosmic-greeter.nix
];
config = {
nixpkgs.overlays = [(import ../pkgs/overlays/cosmic-packages.nix { inherit inputs; })];
nix.settings = {
substituters = [ "https://cosmic.cachix.org/" ];
trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ];
};
};
}

View file

@ -15,5 +15,10 @@ let self = {
url = "https://github.com/NixOS/nixpkgs/archive/${lock.nixpkgs.revision}.tar.gz"; url = "https://github.com/NixOS/nixpkgs/archive/${lock.nixpkgs.revision}.tar.gz";
sha256 = "${lock.nixpkgs.sha256}"; sha256 = "${lock.nixpkgs.sha256}";
}; };
cosmic-modules = builtins.fetchTarball {
name = "cosmic-modules";
url = "https://github.com/lilyinstarlight/nixos-cosmic/archive/${lock.cosmic-modules.revision}.tar.gz";
sha256 = "${lock.cosmic-modules.sha256}";
};
}; };
in self in self

View file

@ -7,4 +7,8 @@
revision = "883180e6550c1723395a3a342f830bfc5c371f6b"; revision = "883180e6550c1723395a3a342f830bfc5c371f6b";
sha256 = "01axrf25mahbxmp6vgfgx09dflbyaavr5liynkp6rpm4lkacr27f"; sha256 = "01axrf25mahbxmp6vgfgx09dflbyaavr5liynkp6rpm4lkacr27f";
}; };
cosmic-modules = {
revision = "d8b2b9aee034c10ca67848653171f576f87434a8";
sha256 = "03i8smxgx2fdb9kkys81dihb5yja3nk9wjs1rx5h7f3b5kii1fd7";
};
} }

View file

@ -0,0 +1,10 @@
{ inputs, lib, pkgs, ... }:
{
imports = [
"${inputs.cosmic-modules}/nixos/cosmic/module.nix"
];
config = {
services.desktopManager.cosmic.enable = true;
};
}

View file

@ -0,0 +1,10 @@
{ inputs, lib, pkgs, ... }:
{
imports = [
"${inputs.cosmic-modules}/nixos/cosmic-greeter/module.nix"
];
config = {
services.displayManager.cosmic-greeter.enable = true;
};
}

View file

@ -0,0 +1,46 @@
{ inputs ? import ../../inputs.nix {}}:
self: super:
let
nixos-cosmic = inputs.cosmic-modules;
cosmicPkgsMainDir = builtins.readDir "${nixos-cosmic}/pkgs";
cosmicPkgsDirs = builtins.filter (v: cosmicPkgsMainDir."${v}" == "directory") (builtins.attrNames cosmicPkgsMainDir);
# FIXME: use unstable nixpkgs when rust 1.80 will be available in unstable
stagingNixpkgsSrc = builtins.fetchTarball {
name = "nixpkgs";
url = "https://github.com/NixOS/nixpkgs/archive/b79cec4237cd0f655562890bf927466c68b48d68.tar.gz";
sha256 = "1mswisq9iwffg2d6rfxvr27mvi4w853d9rn222s2g76445d0iqh8";
};
# Take rustPackages from staging nixpkgs
stagingNixpkgs = import stagingNixpkgsSrc {
localSystem = self.stdenv.buildPlatform;
config = self.config;
} // (if self.stdenv.buildPlatform == self.stdenv.hostPlatform then {} else {
crossSystem = self.stdenv.hostPlatform;
});
futureRustPackages = stagingNixpkgs.rustPackages;
# Create nixpkgs with future rust
nixpkgsWithFutureRust = self.extend (futureSelf: futureSuper: {
rustPackages = futureRustPackages;
});
# Create cosmicPkgs that contains cosmic packages built from nixpkgs with future rust
cosmicOverlay = cosmicSelf: cosmicSuper: builtins.listToAttrs (
builtins.map (v: {name = v; value = nixpkgsWithFutureRust.callPackage "${nixos-cosmic}/pkgs/${v}/package.nix" {};}) cosmicPkgsDirs
);
cosmicNixpkgs = import inputs.nixpkgs {
localSystem = self.stdenv.buildPlatform;
config = self.config;
overlays = [ cosmicOverlay ];
} // (if self.stdenv.buildPlatform == self.stdenv.hostPlatform then {} else {
crossSystem = self.stdenv.hostPlatform;
});
in
builtins.listToAttrs (
builtins.map (v: {name = v; value = cosmicNixpkgs.${v};}) cosmicPkgsDirs
)