Compare commits
18 commits
f5f02b7e76
...
f85b7d9211
Author | SHA1 | Date | |
---|---|---|---|
f85b7d9211 | |||
7e38202a05 | |||
99a59bfb6b | |||
6b1ea56d8b | |||
dae61508df | |||
ec8be03e7f | |||
24a9a407d7 | |||
e5d2edff9a | |||
ac2bd4cd00 | |||
b3550dc00a | |||
3009a03edc | |||
756547a1f6 | |||
7202e30fa7 | |||
9fffce71cd | |||
755958c603 | |||
b79c776d97 | |||
cb4d369d96 | |||
f84333b9a5 |
7 changed files with 93 additions and 0 deletions
|
@ -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
17
hosts/vm-cosmic.nix
Normal 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=" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -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
|
||||||
|
|
4
lock.nix
4
lock.nix
|
@ -7,4 +7,8 @@
|
||||||
revision = "883180e6550c1723395a3a342f830bfc5c371f6b";
|
revision = "883180e6550c1723395a3a342f830bfc5c371f6b";
|
||||||
sha256 = "01axrf25mahbxmp6vgfgx09dflbyaavr5liynkp6rpm4lkacr27f";
|
sha256 = "01axrf25mahbxmp6vgfgx09dflbyaavr5liynkp6rpm4lkacr27f";
|
||||||
};
|
};
|
||||||
|
cosmic-modules = {
|
||||||
|
revision = "d8b2b9aee034c10ca67848653171f576f87434a8";
|
||||||
|
sha256 = "03i8smxgx2fdb9kkys81dihb5yja3nk9wjs1rx5h7f3b5kii1fd7";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
10
nix-os/desktopManagers/cosmic.nix
Normal file
10
nix-os/desktopManagers/cosmic.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ inputs, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
"${inputs.cosmic-modules}/nixos/cosmic/module.nix"
|
||||||
|
];
|
||||||
|
config = {
|
||||||
|
services.desktopManager.cosmic.enable = true;
|
||||||
|
};
|
||||||
|
}
|
10
nix-os/displayManagers/cosmic-greeter.nix
Normal file
10
nix-os/displayManagers/cosmic-greeter.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ inputs, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
"${inputs.cosmic-modules}/nixos/cosmic-greeter/module.nix"
|
||||||
|
];
|
||||||
|
config = {
|
||||||
|
services.displayManager.cosmic-greeter.enable = true;
|
||||||
|
};
|
||||||
|
}
|
46
pkgs/overlays/cosmic-packages.nix
Normal file
46
pkgs/overlays/cosmic-packages.nix
Normal 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
|
||||||
|
)
|
Loading…
Reference in a new issue