diff --git a/flake.lock b/flake.lock
index 1ba535e..be689de 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,12 +1,126 @@
{
"nodes": {
+ "base16": {
+ "inputs": {
+ "fromYaml": "fromYaml"
+ },
+ "locked": {
+ "lastModified": 1708890466,
+ "narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=",
+ "owner": "SenchoPens",
+ "repo": "base16.nix",
+ "rev": "665b3c6748534eb766c777298721cece9453fdae",
+ "type": "github"
+ },
+ "original": {
+ "owner": "SenchoPens",
+ "repo": "base16.nix",
+ "type": "github"
+ }
+ },
+ "base16-fish": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1622559957,
+ "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
+ "owner": "tomyun",
+ "repo": "base16-fish",
+ "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
+ "type": "github"
+ },
+ "original": {
+ "owner": "tomyun",
+ "repo": "base16-fish",
+ "type": "github"
+ }
+ },
+ "base16-foot": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1696725948,
+ "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=",
+ "owner": "tinted-theming",
+ "repo": "base16-foot",
+ "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce",
+ "type": "github"
+ },
+ "original": {
+ "owner": "tinted-theming",
+ "repo": "base16-foot",
+ "type": "github"
+ }
+ },
+ "base16-helix": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1720809814,
+ "narHash": "sha256-numb3xigRGnr/deF7wdjBwVg7fpbTH7reFDkJ75AJkY=",
+ "owner": "tinted-theming",
+ "repo": "base16-helix",
+ "rev": "34f41987bec14c0f3f6b2155c19787b1f6489625",
+ "type": "github"
+ },
+ "original": {
+ "owner": "tinted-theming",
+ "repo": "base16-helix",
+ "type": "github"
+ }
+ },
+ "base16-kitty": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1665001328,
+ "narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=",
+ "owner": "kdrag0n",
+ "repo": "base16-kitty",
+ "rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805",
+ "type": "github"
+ },
+ "original": {
+ "owner": "kdrag0n",
+ "repo": "base16-kitty",
+ "type": "github"
+ }
+ },
+ "base16-tmux": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1696725902,
+ "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=",
+ "owner": "tinted-theming",
+ "repo": "base16-tmux",
+ "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7",
+ "type": "github"
+ },
+ "original": {
+ "owner": "tinted-theming",
+ "repo": "base16-tmux",
+ "type": "github"
+ }
+ },
+ "base16-vim": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1716150083,
+ "narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=",
+ "owner": "tinted-theming",
+ "repo": "base16-vim",
+ "rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d",
+ "type": "github"
+ },
+ "original": {
+ "owner": "tinted-theming",
+ "repo": "base16-vim",
+ "type": "github"
+ }
+ },
"catppuccin": {
"locked": {
- "lastModified": 1731232837,
- "narHash": "sha256-0aIwr/RC/oe7rYkfJb47xjdEQDSNcqpFGsEa+EPlDEs=",
+ "lastModified": 1730458408,
+ "narHash": "sha256-JQ+SphQn13bdibKUrBBBznYehXX4xJrxD1ifBp6vSWw=",
"owner": "catppuccin",
"repo": "nix",
- "rev": "32359bf226fe874d3b7a0a5753d291a4da9616fe",
+ "rev": "191fbf2d81a63fad8f62f1233c0051f09b75d0ad",
"type": "github"
},
"original": {
@@ -21,7 +135,6 @@
"flake-utils": [
"flake-utils"
],
- "nix-github-actions": "nix-github-actions",
"nixpkgs": [
"nixpkgs"
],
@@ -30,11 +143,11 @@
]
},
"locked": {
- "lastModified": 1731527002,
- "narHash": "sha256-dI9I6suECoIAmbS4xcrqF8r2pbmed8WWm5LIF1yWPw8=",
+ "lastModified": 1728263678,
+ "narHash": "sha256-gyUVsPAWY9AgVKjrNPoowrIr5BvK4gI0UkDXvv8iSxA=",
"owner": "zhaofengli",
"repo": "colmena",
- "rev": "e3ad42138015fcdf2524518dd564a13145c72ea1",
+ "rev": "b0a62f234fae02a006123e661ff70e62af16106b",
"type": "github"
},
"original": {
@@ -111,6 +224,22 @@
"type": "github"
}
},
+ "flake-compat_4": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1673956053,
+ "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
@@ -156,11 +285,11 @@
"systems": "systems"
},
"locked": {
- "lastModified": 1731533236,
- "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
+ "lastModified": 1726560853,
+ "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
+ "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
@@ -187,6 +316,43 @@
"type": "github"
}
},
+ "flake-utils_3": {
+ "inputs": {
+ "systems": [
+ "stylix",
+ "systems"
+ ]
+ },
+ "locked": {
+ "lastModified": 1710146030,
+ "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "fromYaml": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1689549921,
+ "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=",
+ "owner": "SenchoPens",
+ "repo": "fromYaml",
+ "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84",
+ "type": "github"
+ },
+ "original": {
+ "owner": "SenchoPens",
+ "repo": "fromYaml",
+ "type": "github"
+ }
+ },
"git-hooks": {
"inputs": {
"flake-compat": [
@@ -243,6 +409,23 @@
"type": "github"
}
},
+ "gnome-shell": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1713702291,
+ "narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=",
+ "owner": "GNOME",
+ "repo": "gnome-shell",
+ "rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934",
+ "type": "github"
+ },
+ "original": {
+ "owner": "GNOME",
+ "ref": "46.1",
+ "repo": "gnome-shell",
+ "type": "github"
+ }
+ },
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -250,11 +433,11 @@
]
},
"locked": {
- "lastModified": 1731535640,
- "narHash": "sha256-2EckCJn4wxran/TsRiCOFcmVpep2m9EBKl99NBh2GnM=",
+ "lastModified": 1730837930,
+ "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "35b055009afd0107b69c286fca34d2ad98940d57",
+ "rev": "2f607e07f3ac7e53541120536708e824acccfaa8",
"type": "github"
},
"original": {
@@ -285,6 +468,27 @@
"type": "github"
}
},
+ "home-manager_3": {
+ "inputs": {
+ "nixpkgs": [
+ "stylix",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1724435763,
+ "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=",
+ "owner": "nix-community",
+ "repo": "home-manager",
+ "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "home-manager",
+ "type": "github"
+ }
+ },
"ixx": {
"inputs": {
"flake-utils": [
@@ -359,27 +563,6 @@
"type": "github"
}
},
- "nix-github-actions": {
- "inputs": {
- "nixpkgs": [
- "colmena",
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1729742964,
- "narHash": "sha256-B4mzTcQ0FZHdpeWcpDYPERtyjJd/NIuaQ9+BV1h+MpA=",
- "owner": "nix-community",
- "repo": "nix-github-actions",
- "rev": "e04df33f62cdcf93d73e9a04142464753a16db67",
- "type": "github"
- },
- "original": {
- "owner": "nix-community",
- "repo": "nix-github-actions",
- "type": "github"
- }
- },
"nix-index-database": {
"inputs": {
"nixpkgs": [
@@ -387,11 +570,11 @@
]
},
"locked": {
- "lastModified": 1731209121,
- "narHash": "sha256-BF7FBh1hIYPDihdUlImHGsQzaJZVLLfYqfDx41wjuF0=",
+ "lastModified": 1730604744,
+ "narHash": "sha256-/MK6QU4iOozJ4oHTfZipGtOgaT/uy/Jm4foCqHQeYR4=",
"owner": "Mic92",
"repo": "nix-index-database",
- "rev": "896019f04b22ce5db4c0ee4f89978694f44345c3",
+ "rev": "cc2ddbf2df8ef7cc933543b1b42b845ee4772318",
"type": "github"
},
"original": {
@@ -411,11 +594,11 @@
]
},
"locked": {
- "lastModified": 1731548914,
- "narHash": "sha256-UtYkHq8OdZcz2Q/r7gh+3HFGVgX9AFfYDrMjAVO6sj4=",
+ "lastModified": 1730944043,
+ "narHash": "sha256-DIYTHa57pQQc9ARiMpJWYkaoiTaQPLH7Y4qK0J10Khk=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
- "rev": "00e11784c89ecd236ff045acd7a447e0fe5b80df",
+ "rev": "0a959b25ff573f079ed032f88d8c988561b96a96",
"type": "github"
},
"original": {
@@ -426,11 +609,11 @@
},
"nixos-hardware": {
"locked": {
- "lastModified": 1731403644,
- "narHash": "sha256-T9V7CTucjRZ4Qc6pUEV/kpgNGzQbHWfGcfK6JJLfUeI=",
+ "lastModified": 1730919458,
+ "narHash": "sha256-yMO0T0QJlmT/x4HEyvrCyigGrdYfIXX3e5gWqB64wLg=",
"owner": "NixOS",
"repo": "nixos-hardware",
- "rev": "f6581f1c3b137086e42a08a906bdada63045f991",
+ "rev": "e1cc1f6483393634aee94514186d21a4871e78d7",
"type": "github"
},
"original": {
@@ -470,11 +653,11 @@
},
"nixpkgs-stable": {
"locked": {
- "lastModified": 1731386116,
- "narHash": "sha256-lKA770aUmjPHdTaJWnP3yQ9OI1TigenUqVC3wweqZuI=",
+ "lastModified": 1730741070,
+ "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "689fed12a013f56d4c4d3f612489634267d86529",
+ "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
"type": "github"
},
"original": {
@@ -502,11 +685,11 @@
},
"nixpkgs_2": {
"locked": {
- "lastModified": 1731570228,
- "narHash": "sha256-mLuo8lZViwYdQQkA+hs6kTCPzAw1VR6O0jtXS1eC+Yc=",
+ "lastModified": 1731119255,
+ "narHash": "sha256-rDHKmBBUu7XSK+68yXEI9TJVc2TaQH7SVieP9pH3h7k=",
"owner": "xinyangli",
"repo": "nixpkgs",
- "rev": "8cb7e7a9ead084be01f290e26602f40815ea36fe",
+ "rev": "ca12ccda69b37abe3ea78dab388b0bfe638eb743",
"type": "github"
},
"original": {
@@ -516,6 +699,22 @@
"type": "github"
}
},
+ "nixpkgs_3": {
+ "locked": {
+ "lastModified": 1725194671,
+ "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
"nixvim": {
"inputs": {
"devshell": "devshell",
@@ -544,11 +743,11 @@
},
"nur": {
"locked": {
- "lastModified": 1731569820,
- "narHash": "sha256-5i2hiBMnhqLVXpnmPwvLJKB5Tn816Z+9UmC5EcL2av4=",
+ "lastModified": 1730959878,
+ "narHash": "sha256-UZ6oSptjE04ooORHvvR+kiGnr/nhzWgYwGryxUkKAv0=",
"owner": "nix-community",
"repo": "NUR",
- "rev": "6e804f7059440328e36f002f6eead1fd9b8eef43",
+ "rev": "bc4d2a3b71c75d81cc247b1bf991b63f75358004",
"type": "github"
},
"original": {
@@ -594,7 +793,8 @@
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable",
"nur": "nur",
- "sops-nix": "sops-nix"
+ "sops-nix": "sops-nix",
+ "stylix": "stylix"
}
},
"sops-nix": {
@@ -605,11 +805,11 @@
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
- "lastModified": 1731364708,
- "narHash": "sha256-HC0anOL+KmUQ2hdRl0AtunbAckasxrkn4VLmxbW/WaA=",
+ "lastModified": 1730883027,
+ "narHash": "sha256-pvXMOJIqRW0trsW+FzRMl6d5PbsM4rWfD5lcKCOrrwI=",
"owner": "Mic92",
"repo": "sops-nix",
- "rev": "4c91d52db103e757fc25b58998b0576ae702d659",
+ "rev": "c5ae1e214ff935f2d3593187a131becb289ea639",
"type": "github"
},
"original": {
@@ -618,6 +818,36 @@
"type": "github"
}
},
+ "stylix": {
+ "inputs": {
+ "base16": "base16",
+ "base16-fish": "base16-fish",
+ "base16-foot": "base16-foot",
+ "base16-helix": "base16-helix",
+ "base16-kitty": "base16-kitty",
+ "base16-tmux": "base16-tmux",
+ "base16-vim": "base16-vim",
+ "flake-compat": "flake-compat_4",
+ "flake-utils": "flake-utils_3",
+ "gnome-shell": "gnome-shell",
+ "home-manager": "home-manager_3",
+ "nixpkgs": "nixpkgs_3",
+ "systems": "systems_3"
+ },
+ "locked": {
+ "lastModified": 1725416430,
+ "narHash": "sha256-DkF49DlcaZHV9v3m5ctQnC9qNqsEdfNhwjQArx5Q+Zw=",
+ "owner": "xinyangli",
+ "repo": "stylix",
+ "rev": "7aad490478518af03367dabfb5811b3f87ea93a1",
+ "type": "github"
+ },
+ "original": {
+ "owner": "xinyangli",
+ "repo": "stylix",
+ "type": "github"
+ }
+ },
"systems": {
"locked": {
"lastModified": 1681028828,
@@ -648,6 +878,21 @@
"type": "github"
}
},
+ "systems_3": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
"treefmt-nix": {
"inputs": {
"nixpkgs": [
diff --git a/flake.nix b/flake.nix
index 42f1e30..959d920 100644
--- a/flake.nix
+++ b/flake.nix
@@ -52,6 +52,12 @@
catppuccin = {
url = "github:catppuccin/nix";
};
+
+ stylix = {
+ url = "github:xinyangli/stylix";
+ # inputs.nixpkgs.follows = "nixpkgs";
+ # inputs.home-manager.follows = "home-manager";
+ };
};
outputs =
@@ -135,7 +141,6 @@
modules = [
self.nixosModules.default
nur.nixosModules.nur
- catppuccin.nixosModules.catppuccin
] ++ modules;
};
in
diff --git a/home/xin/calcite.nix b/home/xin/calcite.nix
index e0b4693..654aedc 100644
--- a/home/xin/calcite.nix
+++ b/home/xin/calcite.nix
@@ -36,21 +36,13 @@ in
home.packages = with pkgs; [
thunderbird
remmina
- qq
- wechat-uos
];
# Theme
catppuccin = {
enable = true;
- accent = "peach";
flavor = "mocha";
};
- # Missing from catppuccin module
- services.swaync.style = pkgs.fetchurl {
- url = "https://github.com/catppuccin/swaync/releases/download/v0.2.3/mocha.css";
- hash = "sha256-Hie/vDt15nGCy4XWERGy1tUIecROw17GOoasT97kIfc=";
- };
xdg.enable = true;
@@ -92,7 +84,6 @@ in
zellij = {
enable = true;
};
-
gui = {
niri.enable = true;
waybar.enable = true;
diff --git a/machines/calcite/configuration.nix b/machines/calcite/configuration.nix
index aaa71d0..7235179 100644
--- a/machines/calcite/configuration.nix
+++ b/machines/calcite/configuration.nix
@@ -4,9 +4,7 @@
lib,
...
}:
-let
- inherit (lib) mkForce getExe;
-in
+
{
imports = [
# Include the results of the hardware scan.
@@ -16,6 +14,7 @@ in
];
commonSettings = {
+ auth.enable = true;
nix = {
enableMirrors = true;
signing.enable = true;
@@ -44,7 +43,7 @@ in
# TPM2TOOLS_TCTI and TPM2_PKCS11_TCTI env variables
tctiEnvironment.enable = true;
};
- # services.gnome.gnome-keyring.enable = lib.mkForce false;
+ services.gnome.gnome-keyring.enable = lib.mkForce false;
security.pam.services.login.enableGnomeKeyring = lib.mkForce false;
services.ssh-tpm-agent.enable = true;
@@ -99,49 +98,14 @@ in
LC_TIME = "en_US.utf8";
};
- # ====== GUI ======
+ services.displayManager = {
+ enable = true;
+ defaultSession = "niri";
+ };
programs.niri.enable = true;
- environment.sessionVariables.NIXOS_OZONE_WL = "1";
- security.pam.services.gtklock = { }; # Required by gtklock
- catppuccin = {
- enable = true;
- accent = "rosewater";
- flavor = "mocha";
- };
-
- xdg.portal = {
- enable = true;
- extraPortals = [
- pkgs.xdg-desktop-portal-gtk
- pkgs.xdg-desktop-portal-gnome
- ];
- configPackages = [ pkgs.niri ];
- };
-
- systemd.user.services.xdg-desktop-portal-gtk.after = [ "graphical-session.target" ];
-
- services.greetd =
- let
- niri-login-config = pkgs.writeText "niri-login-config.kdl" ''
- animations {
- off
- }
- hotkey-overlay {
- skip-at-startup
- }
- '';
- in
- {
- enable = true;
- vt = 1;
- settings = {
- default_session = {
- command = "${pkgs.dbus}/bin/dbus-run-session -- ${getExe pkgs.niri} -c ${niri-login-config} -- ${getExe pkgs.greetd.gtkgreet} -l -c niri-session -s ${pkgs.magnetic-catppuccin-gtk}/share/themes/Catppuccin-GTK-Dark/gtk-3.0/gtk.css";
- };
- };
- };
+ services.xserver.displayManager.gdm.enable = true;
# Keyboard mapping on internal keyboard
services.keyd = {
@@ -265,6 +229,7 @@ in
# IM
element-desktop
tdesktop
+ qq
# Password manager
bitwarden
@@ -335,6 +300,8 @@ in
exporters.blackbox.enable = true;
};
+ custom.stylix.enable = false;
+
services.ollama = {
enable = true;
acceleration = "cuda";
@@ -344,6 +311,7 @@ in
services.gvfs.enable = true;
services.flatpak.enable = true;
+ xdg.portal.enable = true;
# Fonts
fonts = {
diff --git a/machines/calcite/network.nix b/machines/calcite/network.nix
index 31203ad..89e9255 100644
--- a/machines/calcite/network.nix
+++ b/machines/calcite/network.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, lib, ... }:
+{ config, pkgs, ... }:
{
imports = [ ];
@@ -10,6 +10,7 @@
dns = "systemd-resolved";
};
};
+ systemd.services.NetworkManager-wait-online.enable = false;
services.resolved = {
enable = true;
@@ -24,7 +25,6 @@
services.dae.enable = true;
services.dae.configFile = "/var/lib/dae/config.dae";
- systemd.services.dae.after = lib.mkIf (config.networking.networkmanager.enable) [ "NetworkManager-wait-online.service" ];
custom.sing-box = {
enable = false;
@@ -46,13 +46,14 @@
# Use nftables to manager firewall
networking.nftables.enable = true;
+ # Add gsconnect, open firewall
+ programs.kdeconnect = {
+ enable = true;
+ package = pkgs.gnomeExtensions.gsconnect;
+ };
+
programs.wireshark = {
enable = true;
package = pkgs.wireshark-qt;
};
-
- programs.kdeconnect = {
- enable = true;
- package = pkgs.valent;
- };
}
diff --git a/modules/home-manager/gui/bwmountains.jpg b/modules/home-manager/gui/bwmountains.jpg
deleted file mode 100755
index 41ca976..0000000
Binary files a/modules/home-manager/gui/bwmountains.jpg and /dev/null differ
diff --git a/modules/home-manager/gui/default.nix b/modules/home-manager/gui/default.nix
index 5528027..dae49a8 100644
--- a/modules/home-manager/gui/default.nix
+++ b/modules/home-manager/gui/default.nix
@@ -1,20 +1,7 @@
-{ config, lib, ... }:
-let
- inherit (lib) mkOption types;
- cfg = config.custom-hm.gui;
-in
{
imports = [
./niri.nix
./fuzzel.nix
- ./gtklock.nix
./waybar.nix
];
-
- options.custom-hm.gui = {
- wallpaper = mkOption {
- type = types.path;
- default = ./bwmountains.jpg;
- };
- };
}
diff --git a/modules/home-manager/gui/fuzzel.nix b/modules/home-manager/gui/fuzzel.nix
index 3b4e880..8b27240 100644
--- a/modules/home-manager/gui/fuzzel.nix
+++ b/modules/home-manager/gui/fuzzel.nix
@@ -1,9 +1,4 @@
-{
- config,
- pkgs,
- lib,
- ...
-}:
+{ config, lib, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.custom-hm.gui.fuzzel;
@@ -14,28 +9,6 @@ in
};
config = mkIf cfg.enable {
- programs.fuzzel = {
- enable = true;
- settings = {
- main = {
- fields = "filename,name,exec,generic";
- y-margin = 30;
- width = 40;
- font = "Ubuntu";
- use-bold = true;
- line-height = 30;
- };
- };
- };
- home.packages = with pkgs; [
- networkmanager_dmenu
- networkmanagerapplet
- ];
- xdg.configFile."networkmanager-dmenu/config.ini".text = ''
- [dmenu]
- dmenu_command = fuzzel --dmenu
- wifi_chars = ▂▄▆█
- wifi_icons =
- '';
+ programs.fuzzel.enable = true;
};
}
diff --git a/modules/home-manager/gui/gtklock.nix b/modules/home-manager/gui/gtklock.nix
deleted file mode 100644
index 69b3ce9..0000000
--- a/modules/home-manager/gui/gtklock.nix
+++ /dev/null
@@ -1,128 +0,0 @@
-# modified from https://github.com/isabelroses/dotfiles/blob/2fd4d2d0cb8254cad5ce4b089d81114e1b88ad02/modules/extra/home-manager/gtklock.nix
-{
- lib,
- pkgs,
- config,
- ...
-}:
-let
- cfg = config.custom-hm.gui.gtklock;
-
- inherit (lib.modules) mkIf;
- inherit (lib.options)
- mkOption
- mkEnableOption
- mkPackageOption
- literalExpression
- ;
- inherit (lib.strings) optionalString concatStringsSep;
- inherit (lib.lists) optionals;
- inherit (lib.types)
- oneOf
- str
- path
- listOf
- either
- package
- nullOr
- attrs
- ;
- inherit (lib.generators) toINI;
-
- # the main config includes two very niche options: style (which takes a path) and modules, which takes a list of module paths
- # concatted by ";"
- # for type checking purposes, I prefer templating the main section of the config and let the user safely choose options
- # extraConfig takes an attrset, and converts it to the correct INI format - it's mostly just strings and integers, so that's fine
- baseConfig = ''
- [main]
- ${optionalString (cfg.config.gtk-theme != "") "gtk-theme=${cfg.config.gtk-theme}"}
- ${optionalString (cfg.config.style != "") "style=${cfg.config.style}"}
- ${optionalString (cfg.config.modules != [ ]) "modules=${concatStringsSep ";" cfg.config.modules}"}
- '';
-
- finalConfig = baseConfig + optionals (cfg.extraConfig != null) (toINI { } cfg.extraConfig);
-in
-{
- options.custom-hm.gui.gtklock = {
- enable = mkEnableOption "GTK-based lockscreen for Wayland";
- package = mkPackageOption pkgs "gtklock" { };
-
- config = {
- gtk-theme = mkOption {
- type = str;
- default = "";
- description = ''
- GTK theme to use for gtklock.
- '';
- example = "Adwaita-dark";
- };
-
- style = mkOption {
- type = oneOf [
- str
- path
- ];
- default = pkgs.writeText "gtklock-style.css" ''
- window {
- background-image: url("${config.custom-hm.gui.wallpaper}");
- background-size: cover;
- background-repeat: no-repeat;
- background-position: center;
- }
- '';
- description = ''
- The css file to be used for gtklock.
- '';
- example = literalExpression ''
- pkgs.writeText "gtklock-style.css" '''
- window {
- background-size: cover;
- background-repeat: no-repeat;
- background-position: center;
- }
- '''
- '';
- };
-
- modules = mkOption {
- type = listOf (either package str);
- default = [
- # "${pkgs.gtklock-playerctl-module.outPath}/lib/gtklock/playerctl-module.so"
- ];
- description = ''
- A list of gtklock modulesto use. Can either be packages, absolute paths, or strings.
- '';
- example = literalExpression ''
- [
- "${pkgs.gtklock-powerbar-module.outPath}/lib/gtklock/powerbar-module.so"
- "${pkgs.gtklock-playerctl-module.outPath}/lib/gtklock/playerctl-module.so"
- ];
- '';
- };
- };
-
- extraConfig = mkOption {
- type = nullOr attrs;
- default =
- {
- };
- description = ''
- Extra configuration to append to gtklock configuration file.
- Mostly used for appending module configurations.
- '';
- example = literalExpression ''
- countdown = {
- countdown-position = "top-right";
- justify = "right";
- countdown = 20;
- }
- '';
- };
- };
-
- config = mkIf cfg.enable {
- home.packages = [ cfg.package ];
-
- xdg.configFile."gtklock/config.ini".source = pkgs.writeText "gtklock-config.ini" finalConfig;
- };
-}
diff --git a/modules/home-manager/gui/niri.nix b/modules/home-manager/gui/niri.nix
index 8eb07b6..a80e692 100644
--- a/modules/home-manager/gui/niri.nix
+++ b/modules/home-manager/gui/niri.nix
@@ -5,52 +5,38 @@
...
}:
let
- inherit (lib) mkIf mkEnableOption getExe;
+ inherit (lib) mkIf mkEnableOption;
cfg = config.custom-hm.gui.niri;
- wallpaper = config.custom-hm.gui.wallpaper;
- xwayland-satellite = pkgs.xwayland-satellite.overrideAttrs (drv: rec {
- src = pkgs.fetchFromGitHub {
- owner = "Supreeeme";
- repo = "xwayland-satellite";
- rev = "3e6f892d20d918479e67d1e6c90c4be824a9d4ab";
- hash = "sha256-W1UUok7DPi4IXCYtc273FbVH1ifuCIcl+oO6CDqt8Dk=";
- };
- cargoDeps = drv.cargoDeps.overrideAttrs (
- lib.const {
- name = "xwayland-satellite-vendor.tar.gz";
- inherit src;
- outputHash = "sha256-/nK4cVgelaMtpym18RYNafPUFnMOG4uHRpVO8bOS3ow=";
- }
- );
- });
+ wallpaper = pkgs.fetchurl {
+ url = "https://github.com/NixOS/nixos-artwork/blob/master/wallpapers/nixos-wallpaper-catppuccin-mocha.png?raw=true";
+ hash = "sha256-fmKFYw2gYAYFjOv4lr8IkXPtZfE1+88yKQ4vjEcax1s=";
+ };
in
{
- imports = [
- ./themes.nix
- ];
-
options.custom-hm.gui.niri = {
enable = mkEnableOption "niri";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
+ xwayland-satellite
cosmic-files
];
-
- systemd.user.services.xwayland-satellite = {
- Install = {
- WantedBy = [ "graphical-session.target" ];
- };
- Unit = {
- PartOf = [ "graphical-session.target" ];
- After = [ "graphical-session.target" ];
- };
- Service = {
- ExecStart = "${xwayland-satellite}/bin/xwayland-satellite";
- Restart = "on-failure";
- };
+ home.pointerCursor = {
+ name = "Bibata-Modern-Ice";
+ size = 24;
+ package = pkgs.bibata-cursors;
+ gtk.enable = true;
};
+ gtk = {
+ enable = true;
+ theme = {
+ name = "Catppuccin-GTK-Dark";
+ package = pkgs.magnetic-catppuccin-gtk;
+ };
+ gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
+ };
+ services.network-manager-applet.enable = true;
systemd.user.services.swaybg = {
Install = {
@@ -66,14 +52,12 @@ in
};
};
- services.swaync = {
+ programs.swaylock = {
enable = true;
- };
-
- custom-hm.gui.gtklock = {
- enable = true;
- config = {
- gtk-theme = "Catppuccin-GTK-Dark";
+ settings = {
+ show-failed-attempts = true;
+ daemonize = true;
+ scaling = "fill";
};
};
@@ -91,7 +75,7 @@ in
events = [
{
event = "lock";
- command = "${getExe pkgs.gtklock}";
+ command = "${pkgs.swaylock}/bin/swaylock";
}
{
event = "before-sleep";
diff --git a/modules/home-manager/gui/themes.nix b/modules/home-manager/gui/themes.nix
deleted file mode 100644
index ad0de1c..0000000
--- a/modules/home-manager/gui/themes.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ config, pkgs, ... }:
-{
- config = {
- home.pointerCursor = {
- name = "Bibata-Modern-Ice";
- size = 24;
- package = pkgs.bibata-cursors;
- gtk.enable = true;
- };
- gtk = {
- enable = true;
- theme = {
- name = "Catppuccin-GTK-Dark";
- package = pkgs.magnetic-catppuccin-gtk;
- };
- gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
- };
- };
-}
diff --git a/modules/home-manager/gui/waybar.css b/modules/home-manager/gui/waybar.css
index eaed007..6a5da1d 100644
--- a/modules/home-manager/gui/waybar.css
+++ b/modules/home-manager/gui/waybar.css
@@ -49,8 +49,7 @@ window#waybar {
#network,
#backlight,
#battery,
-#tray,
-#custom-notification {
+#tray {
margin-right: 15px;
}
#clock {
diff --git a/modules/home-manager/gui/waybar.nix b/modules/home-manager/gui/waybar.nix
index 3890a00..001e7ce 100644
--- a/modules/home-manager/gui/waybar.nix
+++ b/modules/home-manager/gui/waybar.nix
@@ -57,8 +57,6 @@ in
"battery"
"custom/separator"
"tray"
- "custom/separator"
- "custom/notification"
];
"niri/workspaces" = {
all-outputs = true;
@@ -160,30 +158,16 @@ in
icon-size = 18;
spacing = 14;
};
-
- "custom/notification" = {
- escape = true;
- exec = "swaync-client -swb";
- exec-if = "which swaync-client";
- format = "{icon}";
- format-icons = {
- dnd-inhibited-none = "";
- dnd-inhibited-notification = "";
- dnd-none = "";
- dnd-notification = "";
- inhibited-none = "";
- inhibited-notification = "";
- none = "";
- notification = "";
- };
- on-click = "swaync-client -t -sw";
- on-click-right = "swaync-client -d -sw";
- return-type = "json";
- tooltip = false;
- };
};
};
systemd.enable = true;
};
+
+ systemd.user.targets.tray = {
+ Unit = {
+ Description = "Home Manager System Tray";
+ Requires = [ "graphical-session-pre.target" ];
+ };
+ };
};
}
diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix
index 2851a12..bfc36ce 100644
--- a/modules/nixos/default.nix
+++ b/modules/nixos/default.nix
@@ -8,6 +8,7 @@
./prometheus
./hedgedoc.nix
./sing-box.nix
+ ./stylix.nix
./kanidm-client.nix
./ssh-tpm-agent.nix # FIXME: Waiting for upstream merge
./forgejo-actions-runner.nix
diff --git a/modules/nixos/stylix.nix b/modules/nixos/stylix.nix
new file mode 100644
index 0000000..c5e546b
--- /dev/null
+++ b/modules/nixos/stylix.nix
@@ -0,0 +1,41 @@
+{
+ inputs,
+ config,
+ pkgs,
+ lib,
+ ...
+}:
+let
+ inherit (lib) mkEnableOption mkIf;
+ cfg = config.custom.stylix;
+in
+{
+ imports = [ inputs.stylix.nixosModules.stylix ];
+
+ options = {
+ custom.stylix = {
+ enable = mkEnableOption "style management with stylix";
+ };
+ };
+
+ config = mkIf cfg.enable {
+ stylix.enable = true;
+ stylix.image = pkgs.fetchurl {
+ url = "https://github.com/NixOS/nixos-artwork/blob/master/wallpapers/nixos-wallpaper-catppuccin-mocha.png?raw=true";
+ hash = "sha256-fmKFYw2gYAYFjOv4lr8IkXPtZfE1+88yKQ4vjEcax1s=";
+ };
+
+ stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
+ stylix.polarity = "dark";
+ stylix.autoEnable = false;
+ stylix.homeManagerIntegration.autoImport = true;
+ stylix.homeManagerIntegration.followSystem = true;
+
+ stylix.targets = {
+ console.enable = true;
+ # gnome.enable = if config.services.xserver.desktopManager.gnome.enable then true else false;
+ gnome.enable = false;
+ gtk.enable = true;
+ };
+ };
+}