Compare commits
10 commits
cce35f8934
...
aa94855506
Author | SHA1 | Date | |
---|---|---|---|
aa94855506 | |||
b2a2bdbd8a | |||
47e0304b6d | |||
454249c104 | |||
85fd323785 | |||
af5cb9c7d1 | |||
f90a7b4e9a | |||
7c9d74e561 | |||
667f7d8199 | |||
e4813107c3 |
8 changed files with 49 additions and 38 deletions
|
@ -1,4 +1,9 @@
|
||||||
{ inputs, pkgs, ... }:
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
self,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -7,8 +12,8 @@
|
||||||
../../nix-os/nvidia.nix
|
../../nix-os/nvidia.nix
|
||||||
../../nix-os/docker.nix
|
../../nix-os/docker.nix
|
||||||
../../nix-os/razer.nix
|
../../nix-os/razer.nix
|
||||||
../../nix-os/desktopManagers/gnome.nix
|
../../nix-os/desktopManagers/cosmic.nix
|
||||||
../../nix-os/displayManagers/gdm.nix
|
../../nix-os/displayManagers/cosmic-greeter.nix
|
||||||
../../nix-os/shell.nix
|
../../nix-os/shell.nix
|
||||||
../../nix-os/virtualization.nix
|
../../nix-os/virtualization.nix
|
||||||
../../nix-os/polkit/disable-shutdown.nix
|
../../nix-os/polkit/disable-shutdown.nix
|
||||||
|
@ -36,6 +41,10 @@
|
||||||
hplip
|
hplip
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
self.overlays.cosmicPackages
|
||||||
|
];
|
||||||
|
|
||||||
# nixos-vscode-server module needs this
|
# nixos-vscode-server module needs this
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
services.vscode-server = {
|
services.vscode-server = {
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
self,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -11,8 +14,8 @@
|
||||||
../nix-os/gnupg.nix
|
../nix-os/gnupg.nix
|
||||||
../nix-os/polkit/network.nix
|
../nix-os/polkit/network.nix
|
||||||
|
|
||||||
../nix-os/desktopManagers/gnome.nix
|
../nix-os/desktopManagers/cosmic.nix
|
||||||
../nix-os/displayManagers/gdm.nix
|
../../nix-os/displayManagers/cosmic-greeter.nix
|
||||||
../nix-os/udev.nix
|
../nix-os/udev.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -25,6 +28,10 @@
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
hardware.sensor.iio.enable = true;
|
hardware.sensor.iio.enable = true;
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
self.overlays.cosmicPackages
|
||||||
|
];
|
||||||
|
|
||||||
networking.firewall.allowedTCPPortRanges = [
|
networking.firewall.allowedTCPPortRanges = [
|
||||||
# KDE Connect
|
# KDE Connect
|
||||||
rec { from = 1714; to = from + 50; }
|
rec { from = 1714; to = from + 50; }
|
||||||
|
|
|
@ -18,5 +18,8 @@
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
memorySize = 4096;
|
memorySize = 4096;
|
||||||
};
|
};
|
||||||
|
virtualisation.forwardPorts = [
|
||||||
|
{ from = "host"; host.port = 2222; guest.port = 22; }
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
4
lock.nix
4
lock.nix
|
@ -8,7 +8,7 @@
|
||||||
sha256 = "07wa6y7q4ql0x1jj08dignak2lra003inf2cxl4xxvyqdsspshp3";
|
sha256 = "07wa6y7q4ql0x1jj08dignak2lra003inf2cxl4xxvyqdsspshp3";
|
||||||
};
|
};
|
||||||
cosmic-modules = {
|
cosmic-modules = {
|
||||||
revision = "7d3dd56cca20e409261ff8c69867d38376f7ecae";
|
revision = "074bbcc4e3fa9ce4bee100de64506c3662c62299";
|
||||||
sha256 = "06i1gqwgrpcarmkszcnblx02804n86424sklw4mva0p47j9n7gww";
|
sha256 = "0rb0d20i05rjkhk3g5xld46l0ir055mbbbnlic4p3jvbqv9xqiqd";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,5 +11,9 @@
|
||||||
cosmic-term
|
cosmic-term
|
||||||
cosmic-files
|
cosmic-files
|
||||||
];
|
];
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
pavucontrol
|
||||||
|
];
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,8 +15,6 @@
|
||||||
action.id == "org.freedesktop.login1.inhibit-block-idle" ||
|
action.id == "org.freedesktop.login1.inhibit-block-idle" ||
|
||||||
action.id == "org.freedesktop.login1.inhibit-block-shutdown" ||
|
action.id == "org.freedesktop.login1.inhibit-block-shutdown" ||
|
||||||
action.id == "org.freedesktop.login1.inhibit-block-sleep" ||
|
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-hibernate-key" ||
|
||||||
action.id == "org.freedesktop.login1.inhibit-handle-lid-switch" ||
|
action.id == "org.freedesktop.login1.inhibit-handle-lid-switch" ||
|
||||||
action.id == "org.freedesktop.login1.inhibit-handle-power-key" ||
|
action.id == "org.freedesktop.login1.inhibit-handle-power-key" ||
|
||||||
|
|
|
@ -13,6 +13,7 @@ self = {
|
||||||
modifiedNixpkgs = import ./pkgs/top-level/impure.nix;
|
modifiedNixpkgs = import ./pkgs/top-level/impure.nix;
|
||||||
modifiedNixpkgsPure = import ./pkgs/top-level/default.nix;
|
modifiedNixpkgsPure = import ./pkgs/top-level/default.nix;
|
||||||
overlays = {
|
overlays = {
|
||||||
|
cosmicPackages = import ./pkgs/overlays/cosmic-packages.nix { inherit inputs; };
|
||||||
selfExpr = import ./pkgs/overlays/selfExpr.nix { nixpkgsPath = inputs.nixpkgs; };
|
selfExpr = import ./pkgs/overlays/selfExpr.nix { nixpkgsPath = inputs.nixpkgs; };
|
||||||
unstable = import ./pkgs/overlays/unstable.nix;
|
unstable = import ./pkgs/overlays/unstable.nix;
|
||||||
versionInfoFixup = import ./pkgs/overlays/version-info-fixup.nix { inherit inputs; };
|
versionInfoFixup = import ./pkgs/overlays/version-info-fixup.nix { inherit inputs; };
|
||||||
|
|
|
@ -1,46 +1,35 @@
|
||||||
{ inputs ? import ../../inputs.nix {}}:
|
{
|
||||||
|
inputs ? import ../../inputs.nix {},
|
||||||
|
rustPlatform ? null,
|
||||||
|
}:
|
||||||
|
|
||||||
self: super:
|
self: super:
|
||||||
|
|
||||||
let
|
let
|
||||||
nixos-cosmic = inputs.cosmic-modules;
|
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 {
|
futureNixpkgsSrc = builtins.fetchTarball {
|
||||||
name = "nixpkgs";
|
name = "nixpkgs";
|
||||||
url = "https://github.com/NixOS/nixpkgs/archive/c3aa7b8938b17aebd2deecf7be0636000d62a2b9.tar.gz";
|
url = "https://github.com/NixOS/nixpkgs/archive/${pinnedNixpkgsRev}.tar.gz";
|
||||||
sha256 = "1ds3yjcy52l8d3rkxr3b7h9c0c3nly079bgakjaasnfjj3xprrwr";
|
sha256 = pinnedNixpkgsNarHash;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Take rustPackages from staging nixpkgs
|
# Initialize pinned nixpkgs
|
||||||
futureNixpkgs = import futureNixpkgsSrc {
|
futureNixpkgs = import futureNixpkgsSrc {
|
||||||
localSystem = self.stdenv.buildPlatform;
|
localSystem = self.stdenv.buildPlatform;
|
||||||
config = self.config;
|
config = self.config;
|
||||||
} // (if self.stdenv.buildPlatform == self.stdenv.hostPlatform then {} else {
|
} // (if self.stdenv.buildPlatform == self.stdenv.hostPlatform then {} else {
|
||||||
crossSystem = self.stdenv.hostPlatform;
|
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
|
in
|
||||||
|
|
||||||
builtins.listToAttrs (
|
import "${nixos-cosmic}/pkgs" {
|
||||||
builtins.map (v: {name = v; value = cosmicNixpkgs.${v};}) cosmicPkgsDirs
|
final = self;
|
||||||
)
|
prev = super;
|
||||||
|
rustPlatform = if rustPlatform != null then rustPlatform else futureNixpkgs.rustPlatform;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue