From 97719f3d776c59eab21acacfbf5a650f70f6b704 Mon Sep 17 00:00:00 2001 From: liv Date: Sat, 10 Aug 2024 21:31:53 +0200 Subject: [PATCH] more desktop configuration --- flake.lock | 217 +++++++++++++++++++++++++++++++- flake.nix | 4 + home/common/desktop/default.nix | 26 +++- home/common/desktop/font.nix | 8 ++ home/common/desktop/kitty.nix | 5 - home/global.nix | 16 +++ 6 files changed, 269 insertions(+), 7 deletions(-) create mode 100644 home/common/desktop/font.nix diff --git a/flake.lock b/flake.lock index bb91030..85a0aaf 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,168 @@ { "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" + } + }, + "flake-compat": { + "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" + } + }, + "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" + } + }, + "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": [ @@ -21,6 +184,27 @@ "type": "github" } }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1715930644, + "narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "nix-index-database": { "inputs": { "nixpkgs": [ @@ -78,7 +262,38 @@ "home-manager": "home-manager", "nix-index-database": "nix-index-database", "nixpkgs": "nixpkgs", - "nixpkgs-stable": "nixpkgs-stable" + "nixpkgs-stable": "nixpkgs-stable", + "stylix": "stylix" + } + }, + "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", + "gnome-shell": "gnome-shell", + "home-manager": "home-manager_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722946882, + "narHash": "sha256-mxtnMye8gs82tdQbVC+g6v3aPOZlH150f9WyntHIkTg=", + "owner": "danth", + "repo": "stylix", + "rev": "5853f1a8bd072f2ebabfc3de3973084353cf6f1e", + "type": "github" + }, + "original": { + "owner": "danth", + "repo": "stylix", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 0181c6e..6032773 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,10 @@ # nix-index nix-index-database.url = "github:nix-community/nix-index-database"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; + + # stylix + stylix.url = "github:danth/stylix"; + stylix.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = diff --git a/home/common/desktop/default.nix b/home/common/desktop/default.nix index 5df31c6..1e3516b 100644 --- a/home/common/desktop/default.nix +++ b/home/common/desktop/default.nix @@ -1,8 +1,32 @@ { pkgs, ... }: { imports = [ + ./font.nix ./firefox.nix ./kitty.nix ]; - fonts.fontconfig.enable = true; + home.packages = with pkgs; [ + wf-recorder + wl-clipboard + ]; + home.sessionVariables = { + MOZ_ENABLE_WAYLAND = 1; + QT_QPA_PLATFORM = "wayland"; + LIBSEAT_BACKEND = "logind"; + }; + + programs.imv.enable = true; + + xdg.mimeApps.enable = true; + xdg.portal = { + enable = true; + extraPortals = [pkgs.xdg-desktop-portal-wlr]; + config = { + common = { + default = [ + "wlr" + ]; + }; + }; + }; } diff --git a/home/common/desktop/font.nix b/home/common/desktop/font.nix new file mode 100644 index 0000000..966ef81 --- /dev/null +++ b/home/common/desktop/font.nix @@ -0,0 +1,8 @@ +{ imports, config, pkgs, ... }: { + home.packages = with pkgs; [ + noto-fonts + noto-fonts-emoji + ]; + + fonts.fontconfig.enable = true; +} diff --git a/home/common/desktop/kitty.nix b/home/common/desktop/kitty.nix index b907133..e0425f4 100644 --- a/home/common/desktop/kitty.nix +++ b/home/common/desktop/kitty.nix @@ -1,11 +1,6 @@ { config, inputs, pkgs, ... }: { programs.kitty = { enable = true; - font = { - name = "JetBrains Mono Nerd Font"; - package = pkgs.nerdfonts.override { fonts = ["JetBrainsMono"]; }; - size = 11; - }; settings = { editor = config.home.sessionVariables.EDITOR; window_padding_width = 10; diff --git a/home/global.nix b/home/global.nix index 1459173..b979e59 100644 --- a/home/global.nix +++ b/home/global.nix @@ -1,6 +1,7 @@ { inputs, lib, pkgs, config, outputs, ... }: { imports = [ inputs.nix-index-database.hmModules.nix-index + inputs.stylix.homeManagerModules.stylix ./common/cli ./common/universal ] ++ (builtins.attrValues outputs.homeManagerModules); @@ -42,4 +43,19 @@ FLAKE = "$HOME/nix-config"; }; }; + + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-frappe.yaml"; + image = pkgs.fetchurl { + url = "https://www.pixelstalk.net/wp-content/uploads/2016/05/Epic-Anime-Awesome-Wallpapers.jpg"; + sha256 = "enQo3wqhgf0FEPHj2coOCvo7DuZv+x5rL/WIo4qPI50="; + }; + fonts = { + monospace = { + name = "JetBrains Mono Nerd Font"; + package = pkgs.nerdfonts.override { fonts = ["JetBrainsMono"]; }; + }; + }; + }; }