diff --git a/flake.lock b/flake.lock
index be689de..b7e6d97 100644
--- a/flake.lock
+++ b/flake.lock
@@ -685,11 +685,11 @@
},
"nixpkgs_2": {
"locked": {
- "lastModified": 1731119255,
- "narHash": "sha256-rDHKmBBUu7XSK+68yXEI9TJVc2TaQH7SVieP9pH3h7k=",
+ "lastModified": 1730961289,
+ "narHash": "sha256-WrHPXxaPWDqu5r/546jf1pdfvEEuf0CIPuo7HjRLDdU=",
"owner": "xinyangli",
"repo": "nixpkgs",
- "rev": "ca12ccda69b37abe3ea78dab388b0bfe638eb743",
+ "rev": "82596c07592c14102071f72488ace046aa8e93a9",
"type": "github"
},
"original": {
diff --git a/home/xin/calcite.nix b/home/xin/calcite.nix
index 654aedc..b90e361 100644
--- a/home/xin/calcite.nix
+++ b/home/xin/calcite.nix
@@ -1,7 +1,4 @@
{ pkgs, ... }:
-let
- homeDirectory = "/home/xin";
-in
{
imports = [
./common
@@ -9,11 +6,9 @@ in
programs.nix-index-database.comma.enable = true;
- home = {
- inherit homeDirectory;
- username = "xin";
- stateVersion = "23.05";
- };
+ home.username = "xin";
+ home.homeDirectory = "/home/xin";
+ home.stateVersion = "23.05";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
@@ -84,109 +79,99 @@ in
zellij = {
enable = true;
};
- gui = {
- niri.enable = true;
- waybar.enable = true;
- fuzzel.enable = true;
- };
};
- xdg.systemDirs.data = [
- "/usr/share"
- "/var/lib/flatpak/exports/share"
- "${homeDirectory}/.local/share/flatpak/exports/share"
- ];
-
- programs.man.generateCaches = false;
+ programs.gnome-shell.enable = true;
programs.atuin = {
enable = true;
flags = [ "--disable-up-arrow" ];
};
- programs.firefox = {
- enable = true;
- policies.DefaultDownloadDirectory = "/media/data/Downloads";
- profiles.default = {
- isDefault = true;
- userChrome = ''
- #titlebar {
- display: none;
- }
+ programs.firefox.enable = true;
- #sidebar-header {
- display: none;
- }
-
- [titlepreface*="."] #sidebar-header {
- visibility: collapse !important;
- }
- [titlepreface*="."] #titlebar {
- visibility: collapse;
- }
-
- #sidebar-box{
- --uc-sidebar-width: 33px;
- --uc-sidebar-hover-width: 300px;
- --uc-autohide-sidebar-delay: 90ms;
- position: relative;
- min-width: var(--uc-sidebar-width) !important;
- width: var(--uc-sidebar-width) !important;
- max-width: var(--uc-sidebar-width) !important;
- z-index:1;
- }
-
- #sidebar-box[positionend]{ direction: rtl }
- #sidebar-box[positionend] > *{ direction: ltr }
-
- #sidebar-box[positionend]:-moz-locale-dir(rtl){ direction: ltr }
- #sidebar-box[positionend]:-moz-locale-dir(rtl) > *{ direction: rtl }
-
- #main-window[sizemode="fullscreen"] #sidebar-box{ --uc-sidebar-width: 1px; }
-
- #sidebar-splitter{ display: none }
-
- #sidebar-header{
- overflow: hidden;
- color: var(--chrome-color, inherit) !important;
- padding-inline: 0 !important;
- }
-
- #sidebar-header::before,
- #sidebar-header::after{
- content: "";
- display: -moz-box;
- padding-left: 8px;
- }
-
- #sidebar-switcher-target{
- -moz-box-pack: start !important;
- }
-
- #sidebar-header,
- #sidebar{
- transition: min-width 115ms linear var(--uc-autohide-sidebar-delay) !important;
- min-width: var(--uc-sidebar-width) !important;
- will-change: min-width;
- }
- #sidebar-box:hover > #sidebar-header,
- #sidebar-box:hover > #sidebar{
- min-width: var(--uc-sidebar-hover-width) !important;
- transition-delay: 0ms !important;
- }
-
- .sidebar-panel{
- background-color: transparent !important;
- color: var(--newtab-text-primary-color) !important;
- }
-
- .sidebar-panel #search-box{
- -moz-appearance: none !important;
- background-color: rgba(249,249,250,0.1) !important;
- color: inherit !important;
- }
- '';
- };
+ programs.firefox.policies = {
+ DefaultDownloadDirectory = "/media/data/Downloads";
};
+ programs.firefox.profiles.default = {
+ isDefault = true;
+ userChrome = ''
+ #titlebar {
+ display: none;
+ }
+
+ #sidebar-header {
+ display: none;
+ }
+
+ [titlepreface*="."] #sidebar-header {
+ visibility: collapse !important;
+ }
+ [titlepreface*="."] #titlebar {
+ visibility: collapse;
+ }
+
+ #sidebar-box{
+ --uc-sidebar-width: 33px;
+ --uc-sidebar-hover-width: 300px;
+ --uc-autohide-sidebar-delay: 90ms;
+ position: relative;
+ min-width: var(--uc-sidebar-width) !important;
+ width: var(--uc-sidebar-width) !important;
+ max-width: var(--uc-sidebar-width) !important;
+ z-index:1;
+ }
+
+ #sidebar-box[positionend]{ direction: rtl }
+ #sidebar-box[positionend] > *{ direction: ltr }
+
+ #sidebar-box[positionend]:-moz-locale-dir(rtl){ direction: ltr }
+ #sidebar-box[positionend]:-moz-locale-dir(rtl) > *{ direction: rtl }
+
+ #main-window[sizemode="fullscreen"] #sidebar-box{ --uc-sidebar-width: 1px; }
+
+ #sidebar-splitter{ display: none }
+
+ #sidebar-header{
+ overflow: hidden;
+ color: var(--chrome-color, inherit) !important;
+ padding-inline: 0 !important;
+ }
+
+ #sidebar-header::before,
+ #sidebar-header::after{
+ content: "";
+ display: -moz-box;
+ padding-left: 8px;
+ }
+
+ #sidebar-switcher-target{
+ -moz-box-pack: start !important;
+ }
+
+ #sidebar-header,
+ #sidebar{
+ transition: min-width 115ms linear var(--uc-autohide-sidebar-delay) !important;
+ min-width: var(--uc-sidebar-width) !important;
+ will-change: min-width;
+ }
+ #sidebar-box:hover > #sidebar-header,
+ #sidebar-box:hover > #sidebar{
+ min-width: var(--uc-sidebar-hover-width) !important;
+ transition-delay: 0ms !important;
+ }
+
+ .sidebar-panel{
+ background-color: transparent !important;
+ color: var(--newtab-text-primary-color) !important;
+ }
+
+ .sidebar-panel #search-box{
+ -moz-appearance: none !important;
+ background-color: rgba(249,249,250,0.1) !important;
+ color: inherit !important;
+ }
+ '';
+ };
}
diff --git a/machines/calcite/configuration.nix b/machines/calcite/configuration.nix
index 7235179..7fa91d2 100644
--- a/machines/calcite/configuration.nix
+++ b/machines/calcite/configuration.nix
@@ -51,8 +51,6 @@
networking.hostName = "calcite";
- services.blueman.enable = true;
-
programs.steam = {
enable = true;
gamescopeSession = {
@@ -98,15 +96,18 @@
LC_TIME = "en_US.utf8";
};
- services.displayManager = {
- enable = true;
- defaultSession = "niri";
- };
-
- programs.niri.enable = true;
+ # Enable the X11 windowing system.
+ services.xserver.enable = true;
+ # Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
+ services.xserver.desktopManager.gnome.enable = true;
+ # Configure keymap in X11
+ services.xserver = {
+ xkb.layout = "us";
+ xkb.variant = "";
+ };
# Keyboard mapping on internal keyboard
services.keyd = {
enable = true;
@@ -162,9 +163,17 @@
};
};
+ # Enable automatic login for the user.
+ services.displayManager.autoLogin.enable = true;
+ services.displayManager.autoLogin.user = "xin";
+
# Smart services
services.smartd.enable = true;
+ # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
+ systemd.services."getty@tty1".enable = false;
+ systemd.services."autovt@tty1".enable = false;
+
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
nixpkgs.config.permittedInsecurePackages = [
@@ -218,6 +227,14 @@
eudic
+ # Gnome tweaks
+ gnomeExtensions.paperwm
+ gnomeExtensions.search-light
+ gnomeExtensions.appindicator
+ gnomeExtensions.pano
+ gnome-tweaks
+ gnome-themes-extra
+ gnome-remote-desktop
bibata-cursors
gthumb
oculante
@@ -230,6 +247,8 @@
element-desktop
tdesktop
qq
+ wechat-uos
+ feishu
# Password manager
bitwarden
@@ -285,22 +304,15 @@
custom.restic.repositoryFile = config.sops.secrets.restic_repo_calcite.path;
custom.restic.passwordFile = config.sops.secrets.restic_repo_calcite_password.path;
- custom.forgejo-actions-runner = {
- enable = false;
- tokenFile = config.sops.secrets."gitea/envfile".path;
- settings = {
- runner.capacity = 2;
- runner.fetch_timeout = "120s";
- runner.fetch_interval = "30s";
- };
- };
+ custom.forgejo-actions-runner.enable = false;
+ custom.forgejo-actions-runner.tokenFile = config.sops.secrets."gitea/envfile".path;
custom.prometheus = {
enable = true;
exporters.blackbox.enable = true;
};
- custom.stylix.enable = false;
+ custom.stylix.enable = true;
services.ollama = {
enable = true;
@@ -310,9 +322,6 @@
# MTP support
services.gvfs.enable = true;
- services.flatpak.enable = true;
- xdg.portal.enable = true;
-
# Fonts
fonts = {
packages = with pkgs; [
@@ -321,8 +330,6 @@
"FiraCode"
"FiraMono"
"JetBrainsMono"
- "RobotoMono"
- "Ubuntu"
];
})
noto-fonts
diff --git a/machines/calcite/hardware-configuration.nix b/machines/calcite/hardware-configuration.nix
index 393713f..c80871a 100644
--- a/machines/calcite/hardware-configuration.nix
+++ b/machines/calcite/hardware-configuration.nix
@@ -79,6 +79,4 @@
dynamicBoost.enable = lib.mkForce false;
open = true;
};
-
- hardware.bluetooth.enable = true;
}
diff --git a/machines/calcite/secrets.yaml b/machines/calcite/secrets.yaml
index ae33888..33e4e52 100644
--- a/machines/calcite/secrets.yaml
+++ b/machines/calcite/secrets.yaml
@@ -2,7 +2,7 @@ restic_repo_calcite_password: ENC[AES256_GCM,data:9ALTQULAMyLY4FIxuVztf9r3,iv:fO
restic_repo_calcite: ENC[AES256_GCM,data:ELvSvoBfulbsoMvRMt2bVo9KiNQAuHomblZcAwJ+g0tHELkq65kaaGwMsNy1AttBfiD7RrQsKifX/YTUGmuz1mDg0WqkV/Mv,iv:HKz96YgVahxh+t3AEqe09mTE01uT+VrUYt04H6zyS9g=,tag:llFeeN7ryTZI9gLlYIRhCg==,type:str]
sing_box_url: ENC[AES256_GCM,data:2z2bDKdn51o1eaqhgE0pTg4FWcO8wcLNlnBZ69Q3Jm5GCxkXxsxN7DgqQvRVeakOHvaenQotF+nc6tlhKPsyzdQeG0yl3YYhGb9o3DkmpUjC6lalMSoiw1rSMVyBg4KYCWxmhR9iRurun62+5INGZwwHVqAjgWJhy/9+pdIFtgKyd/t0JhSU,iv:gIGbvRd88vZu3cVW7e4emZmmNO8QcubLrxS1sCwi4Co=,tag:AzLLtcA9jAbeuo6eWU6ilw==,type:str]
gitea:
- envfile: ENC[AES256_GCM,data:CK+JNELuzjKgWnImuV4Euif3f3nNOACOrvc4NiIXs+q/F7QWrtpb3TK8/FrLNQk=,iv:QSDrlKJCBld2gDx/y1sT8anh37GhqSS2QZd2JJi5Yis=,tag:x5T6h59LBXhEyVwSr2dnuQ==,type:str]
+ envfile: ENC[AES256_GCM,data:bO1aMYm0kPTBbyPD5cweVRzNjiDK2WlWDsxz52L3faFg5HSVmBoi5DZC17XBXYw=,iv:lo9XEcwY4FPD/rRbnuiUviioMIiiphS26UgPro56DIU=,tag:0eKfsS0pYw+FPW+Y5dgisg==,type:str]
sops:
kms: []
gcp_kms: []
@@ -27,8 +27,8 @@ sops:
WGlLdXVoZlp3bEFXZjlMdG1VOUZDNUkKQ2NNTE3OsNUr2pOI7qeNFSCVkUIVRS+g
FG5FbJJcFihXqr+Qo0nZkq+xq07vIia7mKoqyoIfkKwweiVzDKyrkQ==
-----END AGE ENCRYPTED FILE-----
- lastmodified: "2024-11-09T06:41:02Z"
- mac: ENC[AES256_GCM,data:Hf8QYvRWxfs/JDOIAVnX5M0kv9Ktncfzq+Zf7i32TTsa94ShrgbUYVxQbRviOFDbjLfzswGKikLQ2EHLlH1KOFs7+mKKz5PKVAWJZnkAPa2oFXs41BcXLIg8sf4dhFxjzzhakeUX9Q0z4evJ1vMX06/VnnpHVSMhsnenSfBhWIA=,iv:uXKf2oYSb+0IWp6Ch0XuoFUIaUBiAW7Z8R9Z7LSdLvY=,tag:0VAcFakwCrHGZW5I8jmydA==,type:str]
+ lastmodified: "2024-09-12T16:48:39Z"
+ mac: ENC[AES256_GCM,data:sYY8N0HZ05sUV7m/w5L1pFWJb2V8wZNukyUXHH0V9LMO1JlJMwCUH2XuseLGz5kz0yggAF+fty/x16PBvI5ARcpaZ23pLmNFYHtpx2tWhWcyYg/yMAqjUf19o17IZ50GpLVkmRHQbowwZF9dcHr8mEicrftZbeORzg2eKVkx8+w=,iv:0fyqOrs2XQ363uX5Dr8zuoUzkHdtsQ/v3SZidFBeSr4=,tag:1Kw1jrruxfn9lxgtL0XEMA==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
- version: 3.9.1
+ version: 3.9.0
diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix
index 3119307..c7408b7 100644
--- a/modules/home-manager/default.nix
+++ b/modules/home-manager/default.nix
@@ -9,6 +9,5 @@
./vim.nix
./vscode.nix
./zellij.nix
- ./gui
];
}
diff --git a/modules/home-manager/gui/default.nix b/modules/home-manager/gui/default.nix
deleted file mode 100644
index dae49a8..0000000
--- a/modules/home-manager/gui/default.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- imports = [
- ./niri.nix
- ./fuzzel.nix
- ./waybar.nix
- ];
-}
diff --git a/modules/home-manager/gui/fuzzel.nix b/modules/home-manager/gui/fuzzel.nix
deleted file mode 100644
index 8b27240..0000000
--- a/modules/home-manager/gui/fuzzel.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ config, lib, ... }:
-let
- inherit (lib) mkIf mkEnableOption;
- cfg = config.custom-hm.gui.fuzzel;
-in
-{
- options.custom-hm.gui.fuzzel = {
- enable = mkEnableOption "fuzzel";
- };
-
- config = mkIf cfg.enable {
- programs.fuzzel.enable = true;
- };
-}
diff --git a/modules/home-manager/gui/niri.nix b/modules/home-manager/gui/niri.nix
deleted file mode 100644
index a80e692..0000000
--- a/modules/home-manager/gui/niri.nix
+++ /dev/null
@@ -1,88 +0,0 @@
-{
- config,
- pkgs,
- lib,
- ...
-}:
-let
- inherit (lib) mkIf mkEnableOption;
- cfg = config.custom-hm.gui.niri;
- 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
-{
- options.custom-hm.gui.niri = {
- enable = mkEnableOption "niri";
- };
-
- config = mkIf cfg.enable {
- home.packages = with pkgs; [
- xwayland-satellite
- cosmic-files
- ];
- 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 = {
- WantedBy = [ "graphical-session.target" ];
- };
- Unit = {
- PartOf = [ "graphical-session.target" ];
- After = [ "graphical-session.target" ];
- };
- Service = {
- ExecStart = "${lib.getExe pkgs.swaybg} -i ${wallpaper} -m fill";
- Restart = "on-failure";
- };
- };
-
- programs.swaylock = {
- enable = true;
- settings = {
- show-failed-attempts = true;
- daemonize = true;
- scaling = "fill";
- };
- };
-
- systemd.user.services.swayidle.Unit.After = [ "graphical-session.target" ];
-
- services = {
- swayidle = {
- enable = true;
- timeouts = [
- {
- timeout = 900;
- command = "/run/current-system/systemd/bin/systemctl suspend";
- }
- ];
- events = [
- {
- event = "lock";
- command = "${pkgs.swaylock}/bin/swaylock";
- }
- {
- event = "before-sleep";
- command = "/run/current-system/systemd/bin/loginctl lock-session";
- }
- ];
- };
- };
- };
-}
diff --git a/modules/home-manager/gui/waybar.css b/modules/home-manager/gui/waybar.css
deleted file mode 100644
index 6a5da1d..0000000
--- a/modules/home-manager/gui/waybar.css
+++ /dev/null
@@ -1,57 +0,0 @@
-* {
- font-family: Ubuntu Nerd Font, Noto Sans CJK SC;
- font-size: 14px;
- font-weight: bold;
- min-height: 14px;
-}
-
-window#waybar {
- color: @text;
- opacity: 0.95;
- background-color: @crust;
- padding: 2px;
-}
-
-#custom-nixos {
- background-color: #24273a;
- padding-left: 15px;
- padding-right: 18px;
-}
-
-#custom-separator {
- margin: 0 2px;
-}
-
-#workspaces {
- border-radius: 0;
-}
-#workspaces button {
- padding: 0 10px;
- border-radius: 0;
-}
-#workspaces button.focused,
-#workspaces button.active {
- border-bottom: 4px solid #8aadf4;
-}
-#workspaces button.empty {
- font-size: 0;
- min-width: 0;
- min-height: 0;
- margin: 0;
- padding: 0;
- border: 0;
- opacity: 0;
- box-shadow: none;
-}
-#cpu,
-#memory,
-#pulseaudio,
-#network,
-#backlight,
-#battery,
-#tray {
- margin-right: 15px;
-}
-#clock {
- font-size: 16px;
-}
diff --git a/modules/home-manager/gui/waybar.nix b/modules/home-manager/gui/waybar.nix
deleted file mode 100644
index 001e7ce..0000000
--- a/modules/home-manager/gui/waybar.nix
+++ /dev/null
@@ -1,173 +0,0 @@
-{
- config,
- pkgs,
- lib,
- ...
-}:
-let
- inherit (lib) mkIf mkEnableOption readFile;
- cfg = config.custom-hm.gui.waybar;
-in
-{
- options.custom-hm.gui.waybar = {
- enable = mkEnableOption "waybar";
- };
-
- config = mkIf cfg.enable {
- programs.waybar = {
- enable = true;
- style = readFile ./waybar.css;
- settings = {
- main = {
- margin = "2px 3px 2 3px";
- height = 30;
- layer = "top";
- "custom/nixos" = {
- format = "";
- interval = "once";
- tooltip = false;
- };
- "custom/separator" = {
- format = " ";
- interval = "once";
- tooltip = false;
- };
- modules-left = [
- "custom/nixos"
- "niri/workspaces"
- "custom/separator"
- "niri/window"
- ];
- modules-center = [
- "clock"
- ];
- modules-right = [
- "network#speed"
- "custom/separator"
- "network#if"
- "custom/separator"
- "pulseaudio"
- "custom/separator"
- "memory"
- "custom/separator"
- "cpu"
- "custom/separator"
- "backlight"
- "custom/separator"
- "battery"
- "custom/separator"
- "tray"
- ];
- "niri/workspaces" = {
- all-outputs = true;
- format = "{icon}";
- format-icons = {
- "terminal" = "";
- "browser" = "";
- "chat" = "";
- "mail" = "";
- };
- };
- "niri/window" = {
- max-length = 50;
- };
- pulseaudio = {
- format = "{icon} {volume}% {format_source}";
- format-bluetooth = "{icon} {volume}% {format_source}";
- format-bluetooth-muted = " {icon} {format_source}";
- format-icons = {
- car = "";
- default = [
- ""
- ""
- ""
- ];
- hands-free = "";
- headphone = "";
- headset = "";
- phone = "";
- portable = "";
- };
- format-muted = " {format_source}";
- format-source = " {volume}%";
- format-source-muted = "";
- on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
- };
- backlight = {
- format = " {percent}%";
- on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl set 1%-";
- on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl set +1%";
- };
- battery = {
- interval = 10;
- format = "{icon} {capacity}%";
- format-charging = "{icon} {capacity}% ";
- format-plugged = "{icon} {capacity}% ";
- format-icons = [
- ""
- ""
- ""
- ""
- ""
- ];
- };
- clock = {
- format = "{:%a %b %d %H:%M}";
- tooltip-format = "{:%Y %B}\n{calendar}";
- };
- memory = {
- format = " {percentage}%";
- };
-
- "network#if" = {
- format = "{ifname}";
- format-disconnected = "";
- format-ethernet = "";
- format-linked = "{ifname} (No IP) ";
- format-wifi = "{icon}";
- format-icons = [
- ""
- ""
- ""
- ""
- ""
- ];
- interval = 10;
- };
-
- "network#speed" = {
- format = "{ifname}";
- format-disconnected = "";
- format-ethernet = " {bandwidthDownBytes} {bandwidthUpBytes}";
- format-linked = "";
- format-wifi = " {bandwidthDownBytes} {bandwidthUpBytes}";
- interval = 5;
- max-length = 30;
- tooltip-format = "{ipaddr}";
- tooltip-format-disconnected = " Disconnected";
- tooltip-format-ethernet = "{ifname} ";
- tooltip-format-wifi = "{essid} {icon} {signalStrength}%";
- };
-
- cpu = {
- format = " {usage}%";
- interval = 5;
- };
-
- tray = {
- icon-size = 18;
- spacing = 14;
- };
- };
- };
- systemd.enable = true;
- };
-
- systemd.user.targets.tray = {
- Unit = {
- Description = "Home Manager System Tray";
- Requires = [ "graphical-session-pre.target" ];
- };
- };
- };
-}