Compare commits

...

10 commits

8 changed files with 49 additions and 38 deletions

View file

@ -1,4 +1,9 @@
{ inputs, pkgs, ... }:
{
inputs,
pkgs,
self,
...
}:
{
imports = [
@ -7,8 +12,8 @@
../../nix-os/nvidia.nix
../../nix-os/docker.nix
../../nix-os/razer.nix
../../nix-os/desktopManagers/gnome.nix
../../nix-os/displayManagers/gdm.nix
../../nix-os/desktopManagers/cosmic.nix
../../nix-os/displayManagers/cosmic-greeter.nix
../../nix-os/shell.nix
../../nix-os/virtualization.nix
../../nix-os/polkit/disable-shutdown.nix
@ -36,6 +41,10 @@
hplip
];
nixpkgs.overlays = [
self.overlays.cosmicPackages
];
# nixos-vscode-server module needs this
programs.nix-ld.enable = true;
services.vscode-server = {

View file

@ -1,4 +1,7 @@
{ config, lib, pkgs, ... }:
{
self,
...
}:
{
imports = [
@ -11,8 +14,8 @@
../nix-os/gnupg.nix
../nix-os/polkit/network.nix
../nix-os/desktopManagers/gnome.nix
../nix-os/displayManagers/gdm.nix
../nix-os/desktopManagers/cosmic.nix
../../nix-os/displayManagers/cosmic-greeter.nix
../nix-os/udev.nix
];
@ -25,6 +28,10 @@
networking.firewall.enable = true;
hardware.sensor.iio.enable = true;
nixpkgs.overlays = [
self.overlays.cosmicPackages
];
networking.firewall.allowedTCPPortRanges = [
# KDE Connect
rec { from = 1714; to = from + 50; }

View file

@ -18,5 +18,8 @@
virtualisation = {
memorySize = 4096;
};
virtualisation.forwardPorts = [
{ from = "host"; host.port = 2222; guest.port = 22; }
];
};
}

View file

@ -8,7 +8,7 @@
sha256 = "07wa6y7q4ql0x1jj08dignak2lra003inf2cxl4xxvyqdsspshp3";
};
cosmic-modules = {
revision = "7d3dd56cca20e409261ff8c69867d38376f7ecae";
sha256 = "06i1gqwgrpcarmkszcnblx02804n86424sklw4mva0p47j9n7gww";
revision = "074bbcc4e3fa9ce4bee100de64506c3662c62299";
sha256 = "0rb0d20i05rjkhk3g5xld46l0ir055mbbbnlic4p3jvbqv9xqiqd";
};
}

View file

@ -11,5 +11,9 @@
cosmic-term
cosmic-files
];
environment.systemPackages = with pkgs; [
pavucontrol
];
services.gnome.gnome-keyring.enable = true;
};
}

View file

@ -15,8 +15,6 @@
action.id == "org.freedesktop.login1.inhibit-block-idle" ||
action.id == "org.freedesktop.login1.inhibit-block-shutdown" ||
action.id == "org.freedesktop.login1.inhibit-block-sleep" ||
action.id == "org.freedesktop.login1.inhibit-delay-shutdown" ||
action.id == "org.freedesktop.login1.inhibit-delay-sleep" ||
action.id == "org.freedesktop.login1.inhibit-handle-hibernate-key" ||
action.id == "org.freedesktop.login1.inhibit-handle-lid-switch" ||
action.id == "org.freedesktop.login1.inhibit-handle-power-key" ||

View file

@ -13,6 +13,7 @@ self = {
modifiedNixpkgs = import ./pkgs/top-level/impure.nix;
modifiedNixpkgsPure = import ./pkgs/top-level/default.nix;
overlays = {
cosmicPackages = import ./pkgs/overlays/cosmic-packages.nix { inherit inputs; };
selfExpr = import ./pkgs/overlays/selfExpr.nix { nixpkgsPath = inputs.nixpkgs; };
unstable = import ./pkgs/overlays/unstable.nix;
versionInfoFixup = import ./pkgs/overlays/version-info-fixup.nix { inherit inputs; };

View file

@ -1,46 +1,35 @@
{ inputs ? import ../../inputs.nix {}}:
{
inputs ? import ../../inputs.nix {},
rustPlatform ? null,
}:
self: super:
let
nixos-cosmic = inputs.cosmic-modules;
cosmicPkgsMainDir = builtins.readDir "${nixos-cosmic}/pkgs";
cosmicPkgsDirs = builtins.filter (v: cosmicPkgsMainDir."${v}" == "directory") (builtins.attrNames cosmicPkgsMainDir);
# Pinned unstable nixpkgs
# Pinned unstable nixpkgs from cosmic-modules
cosmicModulesLock = builtins.fromJSON (builtins.readFile "${nixos-cosmic}/flake.lock");
pinnedNixpkgsRev = cosmicModulesLock.nodes.nixpkgs.locked.rev;
pinnedNixpkgsNarHash = cosmicModulesLock.nodes.nixpkgs.locked.narHash;
futureNixpkgsSrc = builtins.fetchTarball {
name = "nixpkgs";
url = "https://github.com/NixOS/nixpkgs/archive/c3aa7b8938b17aebd2deecf7be0636000d62a2b9.tar.gz";
sha256 = "1ds3yjcy52l8d3rkxr3b7h9c0c3nly079bgakjaasnfjj3xprrwr";
url = "https://github.com/NixOS/nixpkgs/archive/${pinnedNixpkgsRev}.tar.gz";
sha256 = pinnedNixpkgsNarHash;
};
# Take rustPackages from staging nixpkgs
# Initialize pinned nixpkgs
futureNixpkgs = import futureNixpkgsSrc {
localSystem = self.stdenv.buildPlatform;
config = self.config;
} // (if self.stdenv.buildPlatform == self.stdenv.hostPlatform then {} else {
crossSystem = self.stdenv.hostPlatform;
});
futureRustPackages = futureNixpkgs.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
)
import "${nixos-cosmic}/pkgs" {
final = self;
prev = super;
rustPlatform = if rustPlatform != null then rustPlatform else futureNixpkgs.rustPlatform;
}