aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdback <tyler@tdback.net>2025-01-07 22:08:48 -0500
committertdback <tyler@tdback.net>2025-01-07 22:08:48 -0500
commite54fa1d0e91abc1c8cac223c79bddc34729c2e3e (patch)
treeafc04f5da4dfc51ba01488d835938f5be261f351
parent6de68f7a08aa364d7a69a82d02d8508c5a03a197 (diff)
feat: try out cosmic on the desktop
-rw-r--r--flake.lock77
-rw-r--r--flake.nix6
-rw-r--r--modules/profiles/cosmic/default.nix42
-rw-r--r--users/tdback/desktop.nix24
4 files changed, 136 insertions, 13 deletions
diff --git a/flake.lock b/flake.lock
index 82b6297..fa489d6 100644
--- a/flake.lock
+++ b/flake.lock
@@ -45,6 +45,22 @@
"type": "github"
}
},
+ "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"
+ }
+ },
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -87,6 +103,29 @@
"type": "github"
}
},
+ "nixos-cosmic": {
+ "inputs": {
+ "flake-compat": "flake-compat",
+ "nixpkgs": [
+ "nixpkgs"
+ ],
+ "nixpkgs-stable": "nixpkgs-stable",
+ "rust-overlay": "rust-overlay"
+ },
+ "locked": {
+ "lastModified": 1736214624,
+ "narHash": "sha256-Pi70vbASZ1O9cR8RO5d2hBiNjIJBKKLoABl4sxWyOgg=",
+ "owner": "lilyinstarlight",
+ "repo": "nixos-cosmic",
+ "rev": "0830abeebf3b2d1bae44652ffb2c89cf0d56ddaa",
+ "type": "github"
+ },
+ "original": {
+ "owner": "lilyinstarlight",
+ "repo": "nixos-cosmic",
+ "type": "github"
+ }
+ },
"nixpkgs": {
"locked": {
"lastModified": 1734875076,
@@ -103,6 +142,22 @@
"type": "github"
}
},
+ "nixpkgs-stable": {
+ "locked": {
+ "lastModified": 1736061677,
+ "narHash": "sha256-DjkQPnkAfd7eB522PwnkGhOMuT9QVCZspDpJJYyOj60=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "cbd8ec4de4469333c82ff40d057350c30e9f7d36",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-24.11",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1734649271,
@@ -123,10 +178,32 @@
"inputs": {
"agenix": "agenix",
"home-manager": "home-manager_2",
+ "nixos-cosmic": "nixos-cosmic",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}
},
+ "rust-overlay": {
+ "inputs": {
+ "nixpkgs": [
+ "nixos-cosmic",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1736130662,
+ "narHash": "sha256-z+WGez9oTR2OsiUWE5ZhIpETqM1ogrv6Xcd24WFi6KQ=",
+ "owner": "oxalica",
+ "repo": "rust-overlay",
+ "rev": "2f5d4d9cd31cc02c36e51cb2e21c4b25c4f78c52",
+ "type": "github"
+ },
+ "original": {
+ "owner": "oxalica",
+ "repo": "rust-overlay",
+ "type": "github"
+ }
+ },
"systems": {
"locked": {
"lastModified": 1681028828,
diff --git a/flake.nix b/flake.nix
index bcef212..249ae74 100644
--- a/flake.nix
+++ b/flake.nix
@@ -10,6 +10,10 @@
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
+ nixos-cosmic = {
+ url = "github:lilyinstarlight/nixos-cosmic";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
};
outputs = { ... } @ inputs: let
@@ -20,7 +24,7 @@
(mkSystem "woodpecker" inputs.nixpkgs [
{
type = "profiles";
- modules = [ "common" "fstrim" "libvirtd" "nvidia" "pipewire" "security" "steam" "wireshark" "x11" ];
+ modules = [ "common" "cosmic" "fstrim" "libvirtd" "nvidia" "pipewire" "security" "steam" "wireshark" ];
}
])
(mkSystem "sparrow" inputs.nixpkgs [
diff --git a/modules/profiles/cosmic/default.nix b/modules/profiles/cosmic/default.nix
new file mode 100644
index 0000000..0e35d7c
--- /dev/null
+++ b/modules/profiles/cosmic/default.nix
@@ -0,0 +1,42 @@
+{ inputs, pkgs, ... }:
+{
+ imports = [
+ inputs.nixos-cosmic.nixosModules.default
+ ];
+
+ # Set up binary substituter so we don't have to build everything from source.
+ # If this is a first time setup, comment out the code below the nix.settings
+ # attrset and run `sudo nixos-rebuild test` to update the substituters.
+ nix.settings = {
+ substituters = [ "https://cosmic.cachix.org" ];
+ trusted-public-keys = [
+ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
+ ];
+ };
+
+ # Use nvidia's experimental framebuffer device to remove a "phantom display"
+ # detected by `cosmic-randr list`.
+ boot.kernelParams = [ "nvidia_drm.fbdev=1" ];
+
+ # Enable `zwlr_data_control_manager_v1` protocol in cosmic-comp to fix the
+ # clipboard manager not working properly.
+ environment.sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1;
+
+ # Enable COSMIC!
+ services.desktopManager.cosmic.enable = true;
+ services.displayManager.cosmic-greeter.enable = true;
+
+ # Don't use flatpaks, which will pull in `cosmic-store`.
+ services.flatpak.enable = false;
+
+ # Don't include these packages either.
+ environment.cosmic.excludePackages = with pkgs; [
+ cosmic-edit
+ cosmic-player
+ ];
+
+ # Install any additional fonts.
+ fonts.packages = with pkgs; [
+ iosevka-comfy.comfy-motion-fixed
+ ];
+}
diff --git a/users/tdback/desktop.nix b/users/tdback/desktop.nix
index 6f0da18..7b47c94 100644
--- a/users/tdback/desktop.nix
+++ b/users/tdback/desktop.nix
@@ -18,36 +18,36 @@ let
in
{
imports = [
- ./modules/alacritty
- ./modules/dunst
+ #./modules/alacritty
+ #./modules/dunst
./modules/email
./modules/firefox
./modules/irc
./modules/mpd
./modules/ncmpcpp
./modules/neomutt
- ./modules/polybar
- ./modules/rofi
+ #./modules/polybar
+ #./modules/rofi
./modules/tmux
- ./modules/x11
+ #./modules/x11
];
home.packages = with pkgs.unstable; [
clang
- feh
+ #feh
(ffmpeg.override { withXcb = true; })
- flameshot
+ #flameshot
gimp
gitu
- mpc-cli
+ #mpc-cli
mpv
- pavucontrol
- pamixer
+ #pavucontrol
+ #pamixer
pciutils
signal-desktop
- sxiv
+ #sxiv
tidal-dl
- xclip
+ #xclip
yt-dlp
zathura
];