From 253f60127d4abff537b58246a9cbc175fb803455 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Sat, 28 Sep 2024 15:10:57 +0100 Subject: [PATCH] Add cosmic desktop and enable --- flake.lock | 94 +++++++++++++++++++++++++++++++--- flake.nix | 13 +++-- system/cosmic.nix | 8 +++ system/default.nix | 10 +++- system/desktop.nix | 4 +- system/home/desktop.nix | 4 +- system/home/plasma/default.nix | 7 +-- system/home/sway/default.nix | 2 - 8 files changed, 118 insertions(+), 24 deletions(-) create mode 100644 system/cosmic.nix diff --git a/flake.lock b/flake.lock index 4fff3c01..c9e8e89a 100644 --- a/flake.lock +++ b/flake.lock @@ -115,6 +115,22 @@ } }, "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1717312683, + "narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=", + "owner": "nix-community", + "repo": "flake-compat", + "rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { "flake": false, "locked": { "lastModified": 1673956053, @@ -243,6 +259,27 @@ "type": "github" } }, + "nixos-cosmic": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": "nixpkgs_2", + "nixpkgs-stable": "nixpkgs-stable", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1727487343, + "narHash": "sha256-aY4Qq1tY5zTTbIkaxGwK6r5MRAaKNIqgD7z96TnC3o0=", + "owner": "lilyinstarlight", + "repo": "nixos-cosmic", + "rev": "b4f5f62726ada74385f2eec846b47b7fafa876b6", + "type": "github" + }, + "original": { + "owner": "lilyinstarlight", + "repo": "nixos-cosmic", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1726937504, @@ -259,22 +296,38 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs-stable": { "locked": { - "lastModified": 1726838390, - "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", - "owner": "nixos", + "lastModified": 1727264057, + "narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", + "rev": "759537f06e6999e141588ff1c9be7f3a5c060106", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1727348695, + "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "plasma-manager": { "inputs": { "home-manager": [ @@ -303,11 +356,36 @@ "home-manager": "home-manager", "iosevka-custom": "iosevka-custom", "nix-index-database": "nix-index-database", - "nixpkgs": "nixpkgs_2", + "nixos-cosmic": "nixos-cosmic", + "nixpkgs": [ + "nixos-cosmic", + "nixpkgs-stable" + ], "plasma-manager": "plasma-manager", "stylix": "stylix" } }, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "nixos-cosmic", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1727404165, + "narHash": "sha256-kZCiYpQJBZ3kL9QymS88mCxpQwqo8KqvZeHk6LATuY8=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "76f0a61e733259e1034dd6523e039d04932ffefc", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "stylix": { "inputs": { "base16": "base16", @@ -317,7 +395,7 @@ "base16-kitty": "base16-kitty", "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "flake-utils": "flake-utils", "gnome-shell": "gnome-shell", "home-manager": [ diff --git a/flake.nix b/flake.nix index bdefac0e..dfa4f2d3 100644 --- a/flake.nix +++ b/flake.nix @@ -2,12 +2,19 @@ description = "Evie's machine configurations"; nixConfig = { - extra-substituters = [ "https://nix.xenia.me.uk" ]; - extra-trusted-public-keys = [ "nix.xenia.me.uk:tlgwOaG5KMLjQUk2YaErS8mAG69ZCr3PaHXZYi+Y5eI=" ]; + extra-substituters = [ + "https://nix.xenia.me.uk" + "https://cosmic.cachix.org/" + ]; + extra-trusted-public-keys = [ + "nix.xenia.me.uk:tlgwOaG5KMLjQUk2YaErS8mAG69ZCr3PaHXZYi+Y5eI=" + "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" + ]; }; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + nixpkgs.follows = "nixos-cosmic/nixpkgs-stable"; + nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic"; home-manager = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/system/cosmic.nix b/system/cosmic.nix new file mode 100644 index 00000000..1a37136e --- /dev/null +++ b/system/cosmic.nix @@ -0,0 +1,8 @@ +{ inputs, ... }: +{ + imports = [ inputs.nixos-cosmic.nixosModules.default ]; + services = { + desktopManager.cosmic.enable = true; + displayManager.cosmic-greeter.enable = true; + }; +} diff --git a/system/default.nix b/system/default.nix index c3466442..d41739f0 100644 --- a/system/default.nix +++ b/system/default.nix @@ -30,8 +30,14 @@ ]; auto-optimise-store = true; download-buffer-size = "2G"; - substituters = [ "https://nix.xenia.me.uk" ]; - trusted-public-keys = [ "nix.xenia.me.uk:tlgwOaG5KMLjQUk2YaErS8mAG69ZCr3PaHXZYi+Y5eI=" ]; + substituters = [ + "https://nix.xenia.me.uk" + "https://cosmic.cachix.org/" + ]; + trusted-public-keys = [ + "nix.xenia.me.uk:tlgwOaG5KMLjQUk2YaErS8mAG69ZCr3PaHXZYi+Y5eI=" + "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" + ]; }; channel.enable = true; gc = { diff --git a/system/desktop.nix b/system/desktop.nix index e29b02a6..9d1ad462 100644 --- a/system/desktop.nix +++ b/system/desktop.nix @@ -1,6 +1,6 @@ { pkgs, username, ... }: { - imports = [ ./plasma.nix ]; + imports = [ ./cosmic.nix ]; home-manager.users.${username}.imports = [ ./home/desktop.nix ]; nixpkgs.config.chromium.commandLineArgs = "--password-store='gnome-libsecret' --enable-features=UseOzonePlatform --ozone-platform=wayland"; hardware.bluetooth.enable = true; @@ -37,7 +37,7 @@ gtk.iconCache.enable = true; services = { dbus.packages = [ pkgs.gcr ]; - flatpak.enable = true; + # flatpak.enable = true; printing.enable = true; pipewire = { enable = true; diff --git a/system/home/desktop.nix b/system/home/desktop.nix index 4279c67b..56a69727 100644 --- a/system/home/desktop.nix +++ b/system/home/desktop.nix @@ -1,7 +1,6 @@ { config, pkgs, ... }: { imports = [ - ./plasma/default.nix ./emacs/default.nix ./terminal/default.nix ./browser/default.nix @@ -9,6 +8,9 @@ ./services/email/default.nix ]; home.packages = with pkgs; [ + wl-clipboard + protonmail-bridge-gui + libreoffice-fresh webcord signal-desktop whatsapp-for-linux diff --git a/system/home/plasma/default.nix b/system/home/plasma/default.nix index 932ea034..42d59b73 100644 --- a/system/home/plasma/default.nix +++ b/system/home/plasma/default.nix @@ -7,12 +7,7 @@ { stylix.targets.kde.enable = false; imports = [ inputs.plasma-manager.homeManagerModules.plasma-manager ]; - home.packages = with pkgs; [ - protonmail-bridge-gui - libreoffice-qt-fresh - rc2nix - wl-clipboard - ]; + home.packages = with pkgs; [ rc2nix ]; services.gpg-agent.pinentryPackage = pkgs.pinentry-qt; programs.plasma = { enable = true; diff --git a/system/home/sway/default.nix b/system/home/sway/default.nix index e88fb952..2c613d26 100644 --- a/system/home/sway/default.nix +++ b/system/home/sway/default.nix @@ -8,12 +8,10 @@ imports = [ ./waybar/default.nix ]; stylix.targets.swaylock.useImage = false; # Using swaylock-effects instead home.packages = with pkgs; [ - libreoffice-fresh ffmpeg grim slurp swappy - wl-clipboard swayimg swaybg (writeShellScriptBin "swaylockfx" ''