Compare commits
2 commits
c82766f62a
...
f84333b9a5
Author | SHA1 | Date | |
---|---|---|---|
f84333b9a5 | |||
a975e7fb14 |
4 changed files with 70 additions and 1 deletions
17
nix-os-configs/vm-cosmic.nix
Normal file
17
nix-os-configs/vm-cosmic.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../nix-os/core.nix
|
||||
../nix-os/docker.nix
|
||||
../nix-os/desktop/cosmic.nix
|
||||
#../nix-os/desktop/kde-plasma.nix
|
||||
../nix-os/shell.nix
|
||||
../nix-os/virtualization.nix
|
||||
../nix-os/polkit/disable-shutdown.nix
|
||||
../nix-os/locale.nix
|
||||
../nix-os/adb.nix
|
||||
../nix-os/account.nix
|
||||
../nix-os/xdg-default-apps.nix
|
||||
];
|
||||
}
|
51
nix-os/desktop/cosmic.nix
Normal file
51
nix-os/desktop/cosmic.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
nixos-cosmic = builtins.fetchGit {
|
||||
url = "https://github.com/lilyinstarlight/nixos-cosmic.git";
|
||||
# rev = "c1f1dc29d6c187fd563776837ab53faafa111721";
|
||||
};
|
||||
cosmicModule = import "${nixos-cosmic}" {system = "x86_64-linux";};
|
||||
cosmicPkgsMainDir = builtins.readDir "${nixos-cosmic}/pkgs";
|
||||
cosmicPkgsDirs = builtins.filter (v: cosmicPkgsMainDir."${v}" == "directory") (builtins.attrNames cosmicPkgsMainDir);
|
||||
cosmicPkgsOverlay = final: prev: builtins.listToAttrs (
|
||||
builtins.map (v: {name = v; value = final.callPackage "${nixos-cosmic}/pkgs/${v}/package.nix" {};}) cosmicPkgsDirs
|
||||
);
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
cosmicModule
|
||||
"${nixos-cosmic}/nixos/cosmic-greeter/module.nix"
|
||||
"${nixos-cosmic}/nixos/cosmic/module.nix"
|
||||
];
|
||||
config = {
|
||||
services.xserver.desktopManager.cosmic.enable = true;
|
||||
services.xserver.displayManager.cosmic-greeter.enable = true;
|
||||
nixpkgs.overlays = [ cosmicPkgsOverlay ];
|
||||
};
|
||||
options = {
|
||||
cosmic-applets = lib.mkOption {default = pkgs.cosmic-applets;};
|
||||
cosmic-applibrary = lib.mkOption {default = pkgs.cosmic-applibrary;};
|
||||
cosmic-bg = lib.mkOption {default = pkgs.cosmic-bg;};
|
||||
cosmic-comp = lib.mkOption {default = pkgs.cosmic-comp;};
|
||||
cosmic-design-demo = lib.mkOption {default = pkgs.cosmic-design;};
|
||||
cosmic-edit = lib.mkOption {default = pkgs.cosmic-edit;};
|
||||
cosmic-files = lib.mkOption {default = pkgs.cosmic-files;};
|
||||
cosmic-greeter = lib.mkOption {default = pkgs.cosmic-greeter;};
|
||||
cosmic-icons = lib.mkOption {default = pkgs.cosmic-icons;};
|
||||
cosmic-launcher = lib.mkOption {default = pkgs.cosmic-launcher;};
|
||||
cosmic-notifications = lib.mkOption {default = pkgs.cosmic-notifications;};
|
||||
cosmic-osd = lib.mkOption {default = pkgs.cosmic-osd;};
|
||||
cosmic-panel = lib.mkOption {default = pkgs.cosmic-panel;};
|
||||
cosmic-protocols = lib.mkOption {default = pkgs.cosmic-protocols;};
|
||||
cosmic-randr = lib.mkOption {default = pkgs.cosmic-randr;};
|
||||
cosmic-screenshot = lib.mkOption {default = pkgs.cosmic-screenshot;};
|
||||
cosmic-session = lib.mkOption {default = pkgs.cosmic-session;};
|
||||
cosmic-settings = lib.mkOption {default = pkgs.cosmic-settings;};
|
||||
cosmic-settings-daemon = lib.mkOption {default = pkgs.cosmic-settings;};
|
||||
cosmic-term = lib.mkOption {default = pkgs.cosmic-term;};
|
||||
cosmic-workspaces-epoch = lib.mkOption {default = pkgs.cosmic-workspaces;};
|
||||
wrapCosmicAppsHook = lib.mkOption {default = pkgs.wrapCosmicAppsHook;};
|
||||
xdg-desktop-portal-cosmic = lib.mkOption {default = pkgs.xdg-desktop-portal-cosmic;};
|
||||
};
|
||||
}
|
|
@ -42,7 +42,7 @@ in
|
|||
scrollback_lines 10000
|
||||
window_border_width 0.5
|
||||
window_padding_width 3
|
||||
${if config.services.xserver.desktopManager.gnome.enable then "hide_window_decorations yes" else null}
|
||||
${if config.services.xserver.desktopManager.gnome.enable then "hide_window_decorations yes" else ""}
|
||||
background_opacity 0.8
|
||||
dynamic_background_opacity yes
|
||||
'';
|
||||
|
|
1
vm-cosmic.sh
Executable file
1
vm-cosmic.sh
Executable file
|
@ -0,0 +1 @@
|
|||
nix-build '<nixos-unstable/nixos>' -A vm -I nixpkgs=channel:nixos-unstable -I nixos-config=./nix-os-configs/vm-cosmic.nix $@ && $(ls ./result/bin/run-*) -m 4096 && rm *.qcow2
|
Loading…
Reference in a new issue