From 32e65af403acf626090c79af862a9b4c8ef2c06b Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Wed, 15 May 2024 19:32:39 +0200 Subject: [PATCH] try out cosmic --- flake.lock | 40 ++++++++++++++++++++++++++++++++- flake.nix | 6 +++++ modules/collections/desktop.nix | 1 - modules/graphical/cosmic.nix | 22 ++++++++++++++++++ modules/graphical/default.nix | 1 + systems/pc/configuration.nix | 3 ++- systems/vm/configuration.nix | 4 ---- 7 files changed, 70 insertions(+), 7 deletions(-) delete mode 100644 modules/collections/desktop.nix create mode 100644 modules/graphical/cosmic.nix diff --git a/flake.lock b/flake.lock index fc7e319..018d1e5 100644 --- a/flake.lock +++ b/flake.lock @@ -60,6 +60,22 @@ } }, "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1688025799, + "narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=", + "owner": "nix-community", + "repo": "flake-compat", + "rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { "flake": false, "locked": { "lastModified": 1696426674, @@ -175,6 +191,27 @@ "type": "github" } }, + "nixos-cosmic": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1715707961, + "narHash": "sha256-RW3Dq6hpupWYrArTRrIoYC61uXdsh/05UT5UWPLBnao=", + "owner": "lilyinstarlight", + "repo": "nixos-cosmic", + "rev": "953e1ae300211c0c3be925605e09e0675c45798e", + "type": "github" + }, + "original": { + "owner": "lilyinstarlight", + "repo": "nixos-cosmic", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1715148395, @@ -193,7 +230,7 @@ }, "nixos-wsl": { "inputs": { - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "flake-utils": "flake-utils", "nixpkgs": [ "nixpkgs" @@ -296,6 +333,7 @@ "home-manager": "home-manager_2", "home-manager-unstable": "home-manager-unstable", "nix-colors": "nix-colors", + "nixos-cosmic": "nixos-cosmic", "nixos-hardware": "nixos-hardware", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs_2", diff --git a/flake.nix b/flake.nix index 0ed16ac..043ce6e 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,10 @@ }; nix-colors.url = "github:misterio77/nix-colors"; nur = { url = "github:nix-community/NUR"; }; + nixos-cosmic = { + url = "github:lilyinstarlight/nixos-cosmic"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nur, @@ -31,6 +35,7 @@ home-manager, home-manager-unstable, nix-colors, + nixos-cosmic, }@inputs: let inherit (self) outputs; @@ -68,6 +73,7 @@ ./systems/pc/configuration.nix ({ config, pkgs, ... }: { nixpkgs.overlays = with outputs.overlays; [additions modifications unstable-packages nur.overlay]; }) agenix.nixosModules.default + nixos-cosmic.nixosModules.default home-manager-unstable.nixosModules.home-manager ]; }; diff --git a/modules/collections/desktop.nix b/modules/collections/desktop.nix deleted file mode 100644 index 8b13789..0000000 --- a/modules/collections/desktop.nix +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/graphical/cosmic.nix b/modules/graphical/cosmic.nix new file mode 100644 index 0000000..d09257e --- /dev/null +++ b/modules/graphical/cosmic.nix @@ -0,0 +1,22 @@ +{ config, pkgs, inputs, lib, ... }: +with lib; +let + cfg = config.custom.graphical.cosmic; +in +{ + options.custom.graphical.cosmic = { + enable = mkEnableOption "Enables cosmic"; + }; + + config = mkIf cfg.enable { + nix.settings = { + substituters = [ "https://cosmic.cachix.org/" ]; + trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ]; + }; + boot.kernelParams = [ "nvidia_drm.fbdev=1" ]; + services.desktopManager.cosmic.enable = true; + services.displayManager.cosmic-greeter.enable = true; + + }; +} + diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix index eebc54b..e392db9 100644 --- a/modules/graphical/default.nix +++ b/modules/graphical/default.nix @@ -3,6 +3,7 @@ imports = [ ./audio.nix ./code.nix + ./cosmic.nix ./emulators.nix ./gamemode.nix ./games.nix diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index 5cd7075..3ff6107 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -51,7 +51,8 @@ noise-supression.enable = true; obs.enable = true; openrgb.enable = true; - plasma.enable = true; + #plasma.enable = true; + cosmic.enable = true; shared.enable = true; }; }; diff --git a/systems/vm/configuration.nix b/systems/vm/configuration.nix index a42c54a..1559c80 100644 --- a/systems/vm/configuration.nix +++ b/systems/vm/configuration.nix @@ -19,9 +19,5 @@ graphical = { lxqt.enable = true; }; - services = { - nginx.enable = true; - nginx.https = false; - }; }; }