From 4281227c388e50779ea23306a4955747c707b207 Mon Sep 17 00:00:00 2001 From: Ilan Joselevich Date: Wed, 19 Jul 2023 01:22:37 +0300 Subject: [PATCH] treewide: BIGGEST REFACTOR YET --- README.md | 13 +- devel/default.nix => dev/flake-module.nix | 0 flake.lock | 216 +++---------- flake.nix | 11 +- home/default.nix | 5 - home/kranzes/bspwm.nix | 5 +- home/kranzes/default.nix | 4 +- home/kranzes/editors.nix | 12 +- home/kranzes/fonts.nix | 14 + home/kranzes/keyboard.nix | 2 - home/kranzes/launcher.nix | 251 ++++++++------- home/kranzes/notifications.nix | 11 +- home/kranzes/packages.nix | 2 + home/kranzes/polybar.nix | 345 ++++++++++----------- home/kranzes/programs.nix | 105 +++---- home/kranzes/screen-lock.nix | 4 +- home/kranzes/services.nix | 4 +- home/kranzes/shell.nix | 2 - home/kranzes/ssh.nix | 1 - home/kranzes/terminal.nix | 106 ++++--- hosts/default.nix | 29 -- hosts/flake-module.nix | 59 ++++ hosts/gorilla/default.nix | 86 +---- hosts/gorilla/xorg.nix | 34 -- hosts/gorilla/xserver.nix | 17 + hosts/pan/default.nix | 101 +----- hosts/pan/hardware-configuration.nix | 96 ++++-- hosts/pan/xorg.nix | 29 -- hosts/pan/xserver.nix | 10 + hosts/pongo/default.nix | 125 +------- hosts/pongo/hardware-configuration.nix | 2 + hosts/pongo/home/music.nix | 4 - hosts/pongo/hosted/default.nix | 1 + hosts/pongo/hosted/hercules-ci.nix | 2 + hosts/pongo/hosted/libvirt.nix | 16 + hosts/pongo/hosted/nginx.nix | 7 + hosts/pongo/xorg.nix | 23 -- hosts/pongo/xserver.nix | 15 + lib/default.nix | 7 - lib/mkSystem.nix | 31 -- packages/{default.nix => flake-module.nix} | 6 +- profiles/android.nix | 3 + profiles/audio.nix | 12 + profiles/default.nix | 9 - profiles/docs.nix | 8 + profiles/flake-module.nix | 18 ++ profiles/laptop.nix | 8 + profiles/misc.nix | 22 ++ profiles/nix-nixpkgs.nix | 9 +- profiles/opengl.nix | 7 + profiles/security.nix | 8 + profiles/tailscale.nix | 12 +- profiles/users.nix | 28 ++ profiles/xorg.nix | 9 - profiles/xserver.nix | 24 ++ 55 files changed, 838 insertions(+), 1152 deletions(-) rename devel/default.nix => dev/flake-module.nix (100%) delete mode 100644 home/default.nix create mode 100644 home/kranzes/fonts.nix delete mode 100644 hosts/default.nix create mode 100644 hosts/flake-module.nix delete mode 100644 hosts/gorilla/xorg.nix create mode 100644 hosts/gorilla/xserver.nix delete mode 100644 hosts/pan/xorg.nix create mode 100644 hosts/pan/xserver.nix create mode 100644 hosts/pongo/hosted/libvirt.nix delete mode 100644 hosts/pongo/xorg.nix create mode 100644 hosts/pongo/xserver.nix delete mode 100644 lib/default.nix delete mode 100644 lib/mkSystem.nix rename packages/{default.nix => flake-module.nix} (60%) create mode 100644 profiles/android.nix create mode 100644 profiles/audio.nix delete mode 100644 profiles/default.nix create mode 100644 profiles/docs.nix create mode 100644 profiles/flake-module.nix create mode 100644 profiles/laptop.nix create mode 100644 profiles/misc.nix create mode 100644 profiles/opengl.nix create mode 100644 profiles/security.nix create mode 100644 profiles/users.nix delete mode 100644 profiles/xorg.nix create mode 100644 profiles/xserver.nix diff --git a/README.md b/README.md index 81993e4..a6e0dd4 100644 --- a/README.md +++ b/README.md @@ -4,18 +4,17 @@ A nix flake that holds all of the system configurations of my personal machines. ## Configurations & Modules -Name | Description +Name | Description ----------------------- | ----------- -[Hosts](./hosts) | Host specific configurations (system-wide & Home-Manager) -[Profiles](./profiles) | Shared system-wide configurations between hosts -[Home](./home) | Shared Home-Manager configurations between hosts +[Hosts](./hosts) | Host specific configurations (system-wide & Home-Manager) +[Profiles](./profiles) | System-wide "profiles" (modular configurations) used by some hosts +[Home](./home) | Home-Manager configurations for users that may be imported by some hosts [Packages](./packages) | Modified nixpkgs packages and custom packages -[Lib](./lib) | libraries, tools and functions used in across this repo -[Devel](./devel) | Devshell, deployment tool, etc +[dev](./dev) | Devshell, deployment tool, etc ## Hosts -Name | Description +Name | Description ------------------------------------------- | ----------- [Pongo](./hosts/pongo) | My desktop running a Ryzen 7 2700X, 16GB of RAM and a GTX 950 [Pan](./hosts/pan) | My ThinkPad T430 diff --git a/devel/default.nix b/dev/flake-module.nix similarity index 100% rename from devel/default.nix rename to dev/flake-module.nix diff --git a/flake.lock b/flake.lock index fc2d7eb..8d18ccf 100644 --- a/flake.lock +++ b/flake.lock @@ -9,11 +9,11 @@ ] }, "locked": { - "lastModified": 1684153753, - "narHash": "sha256-PVbWt3qrjYAK+T5KplFcO+h7aZWfEj1UtyoKlvcDxh0=", + "lastModified": 1689334118, + "narHash": "sha256-djk5AZv1yU84xlKFaVHqFWvH73U7kIRstXwUAnDJPsk=", "owner": "ryantm", "repo": "agenix", - "rev": "db5637d10f797bb251b94ef9040b237f4702cde3", + "rev": "0d8c5325fc81daf00532e3e26c6752f7bcde1143", "type": "github" }, "original": { @@ -22,22 +22,6 @@ "type": "github" } }, - "base16-schemes": { - "flake": false, - "locked": { - "lastModified": 1680729003, - "narHash": "sha256-M9LHTL24/W4oqgbYRkz0B2qpNrkefTs98pfj3MxIXnU=", - "owner": "tinted-theming", - "repo": "base16-schemes", - "rev": "dc048afa066287a719ddbab62b3e19e4b5110cf0", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-schemes", - "type": "github" - } - }, "darwin": { "inputs": { "nixpkgs": [ @@ -67,11 +51,11 @@ ] }, "locked": { - "lastModified": 1688544596, - "narHash": "sha256-/rbDM71Qpj4gMp54r9mQ2AdD10jEMtnrQ3b2Xf+HYTU=", + "lastModified": 1689324677, + "narHash": "sha256-83DCDJwBkulQFQESe37+tG0qUb8JkQLJHJ3Qn7iGx7Q=", "owner": "nix-community", "repo": "disko", - "rev": "fc3c3817c9f1fcd405463c6a7f0f98baab97c692", + "rev": "7eb09408393faa5b8f3b3524c39cb93d938e8d04", "type": "github" }, "original": { @@ -89,11 +73,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1689000038, - "narHash": "sha256-XnbhimNQd7oxLnG3bnBeCep0/VnIZSLPM9MM85THqL4=", + "lastModified": 1689652949, + "narHash": "sha256-EMTvTrwwRdXlQX2xLWuAZ6I4EaECotXmuQBqP2djPsM=", "owner": "rycee", "repo": "nur-expressions", - "rev": "a5853379eb3696bfc52916c48ed1e2e08c977829", + "rev": "2c8f3050de5868b00d746d4fd213c416ed8bde1f", "type": "gitlab" }, "original": { @@ -202,11 +186,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1685662779, - "narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=", + "lastModified": 1688466019, + "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3", + "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", "type": "github" }, "original": { @@ -224,11 +208,11 @@ ] }, "locked": { - "lastModified": 1685662779, - "narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=", + "lastModified": 1688466019, + "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3", + "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", "type": "github" }, "original": { @@ -288,24 +272,6 @@ "type": "github" } }, - "flake-utils_4": { - "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -351,11 +317,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1686721748, - "narHash": "sha256-ilD6ANYID+b0/+GTFbuZXfmu92bqVqY5ITKXSxqIp5A=", + "lastModified": 1688568579, + "narHash": "sha256-ON0M56wtY/TIIGPkXDlJboAmuYwc73Hi8X9iJGtxOhM=", "owner": "hercules-ci", "repo": "hercules-ci-agent", - "rev": "7192b83935ab292a8e894db590dfd44f976e183b", + "rev": "367dd8cd649b57009a6502e878005a1e54ad78c5", "type": "github" }, "original": { @@ -373,11 +339,11 @@ ] }, "locked": { - "lastModified": 1688571979, - "narHash": "sha256-asN8qFAjxZvq9HyXo0+FzVKTX+SDH2pAr71sQ06I0GE=", + "lastModified": 1689397210, + "narHash": "sha256-fVxZnqxMbsDkB4GzGAs/B41K0wt/e+B/fLxmTFF/S20=", "owner": "hercules-ci", "repo": "hercules-ci-effects", - "rev": "c6191e59824febda94b431146bf65628fc534e3b", + "rev": "0a63bfa3f00a3775ea3a6722b247880f1ffe91ce", "type": "github" }, "original": { @@ -414,11 +380,11 @@ ] }, "locked": { - "lastModified": 1688999869, - "narHash": "sha256-gLD2UI6+Nb9JV5Wh4FnLHAZwLMiY11RHYBKmBZCxLXc=", + "lastModified": 1689495092, + "narHash": "sha256-yZu2j5FpLZEPhJQQutMCPTxa1VMigLPabLYvLTq6ASM=", "owner": "nix-community", "repo": "home-manager", - "rev": "a6d1d954b81caf4c9291b8ac35452fef842f289b", + "rev": "2f84579a70b8c74e5ebb37299a0c3ba279f09382", "type": "github" }, "original": { @@ -459,11 +425,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1688830164, - "narHash": "sha256-ZY9iudFa4m2h+e5gbaDV9S3ctAtMd9xHHfZZHjfR3tQ=", + "lastModified": 1689722072, + "narHash": "sha256-Rjk2nAYMEB7+jy+4an3oTSQ7gn8K5U8ZGWLMaaCdHtI=", "owner": "neovim", "repo": "neovim", - "rev": "fbeef0d4ef1aadc4e50b9f33946cf4dca8ca6b62", + "rev": "ab5cdbd167353a0c6a0ef0b864d78af13029339c", "type": "github" }, "original": { @@ -482,11 +448,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1688947382, - "narHash": "sha256-B3Tp8wVe1Trq8ECWuQy2hcU2iDDuT9DQ/D58l0UJw0o=", + "lastModified": 1689725104, + "narHash": "sha256-NQ9GCkrlk7NVnKA0JCprpjVwmE1J5/Xv5nj0WasXsP0=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "2e8052b9f56fd2623a55d09e0a7fe06d5f73bbb0", + "rev": "f42a9b1db59af2dff882803c38c51be7d5680da2", "type": "github" }, "original": { @@ -495,47 +461,6 @@ "type": "github" } }, - "nil": { - "inputs": { - "flake-utils": "flake-utils_4", - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1688959909, - "narHash": "sha256-vDZuhJ9/iTJnjwUDAWaRThWV1mH9NAY9IGJwztPkbYA=", - "owner": "oxalica", - "repo": "nil", - "rev": "5751bfe63a5cc8988a9cdebd14999b9e11bba401", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "nil", - "type": "github" - } - }, - "nix-colors": { - "inputs": { - "base16-schemes": "base16-schemes", - "nixpkgs-lib": "nixpkgs-lib_2" - }, - "locked": { - "lastModified": 1682108218, - "narHash": "sha256-tMr7BbxualFQlN+XopS8rMMgf2XR9ZfRuwIZtjsWmfI=", - "owner": "misterio77", - "repo": "nix-colors", - "rev": "b92df8f5eb1fa20d8e09810c03c9dc0d94ef2820", - "type": "github" - }, - "original": { - "owner": "misterio77", - "repo": "nix-colors", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1685071405, @@ -555,11 +480,11 @@ "nixpkgs-lib": { "locked": { "dir": "lib", - "lastModified": 1685564631, - "narHash": "sha256-8ywr3AkblY4++3lIVxmrWZFzac7+f32ZEhH/A8pNscI=", + "lastModified": 1688049487, + "narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4f53efe34b3a8877ac923b9350c874e3dcd5dc0a", + "rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9", "type": "github" }, "original": { @@ -570,21 +495,6 @@ "type": "github" } }, - "nixpkgs-lib_2": { - "locked": { - "lastModified": 1680397293, - "narHash": "sha256-wBpJ73+tJ8fZSWb4tzNbAVahC4HSo2QG3nICDy4ExBQ=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "b18d328214ca3c627d3cc3f51fd9d1397fdbcd7a", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, "nixpkgs-stable": { "locked": { "lastModified": 1678872516, @@ -603,11 +513,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1686501370, - "narHash": "sha256-G0WuM9fqTPRc2URKP9Lgi5nhZMqsfHGrdEbrLvAPJcg=", + "lastModified": 1688322751, + "narHash": "sha256-eW62dC5f33oKZL7VWlomttbUnOTHrAbte9yNUNW8rbk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "75a5ebf473cd60148ba9aec0d219f72e5cf52519", + "rev": "0fbe93c5a7cac99f90b60bdf5f149383daaa615f", "type": "github" }, "original": { @@ -619,11 +529,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1688894907, - "narHash": "sha256-U7hEDDhzAhLp6T+DEUbfwAsL+BtqFFGn+S1pa/0XrZY=", + "lastModified": 1689631193, + "narHash": "sha256-AGSkBZaiTODQc8eT1rZDrQIjtb8JtFwJ0wVPzArlrnM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4ddf98349c793377c76806ebfbdfb2b96dd4ef5d", + "rev": "57695599bdc4f7bfe5d28cfa23f14b3d8bdf8a5f", "type": "github" }, "original": { @@ -635,11 +545,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1688980284, - "narHash": "sha256-dFC7GAU+hU3Ty9ddyIzHRsiSv2GpJwCjtx2y7jYbNks=", + "lastModified": 1689644752, + "narHash": "sha256-fG86JDsbqqvGwCU793hXb9zcIRB1ASS8/23aBC1lVdo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c96b386640b0c11bbb6d878d86ec39629ab92997", + "rev": "fe97ac0523e32038b9ff1d9b521ea309fc789739", "type": "github" }, "original": { @@ -689,36 +599,9 @@ "home-manager": "home-manager_2", "lanzaboote": "lanzaboote", "neovim-nightly": "neovim-nightly", - "nil": "nil", - "nix-colors": "nix-colors", "nixpkgs": "nixpkgs_4" } }, - "rust-overlay": { - "inputs": { - "flake-utils": [ - "nil", - "flake-utils" - ], - "nixpkgs": [ - "nil", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1688783586, - "narHash": "sha256-HHaM2hk2azslv1kH8zmQxXo2e7i5cKgzNIuK4yftzB0=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "7a29283cc242c2486fc67f60b431ef708046d176", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, @@ -748,21 +631,6 @@ "repo": "default", "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" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 7dc9e86..64af4f8 100644 --- a/flake.nix +++ b/flake.nix @@ -1,14 +1,10 @@ { - description = "My nix flake configuration"; - inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small"; flake-parts = { url = "github:hercules-ci/flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs"; }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; neovim-nightly.url = "github:nix-community/neovim-nightly-overlay"; - nix-colors.url = "github:misterio77/nix-colors"; agenix = { url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; }; - nil = { url = "github:oxalica/nil"; inputs.nixpkgs.follows = "nixpkgs"; }; disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; }; lanzaboote.url = "github:nix-community/lanzaboote"; firefox-addons = { url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; inputs.nixpkgs.follows = "nixpkgs"; }; @@ -19,10 +15,9 @@ systems = [ "x86_64-linux" ]; imports = [ - ./packages - ./lib - ./hosts - ./devel + ./hosts/flake-module.nix + ./profiles/flake-module.nix + ./packages/flake-module.nix ]; }; } diff --git a/home/default.nix b/home/default.nix deleted file mode 100644 index 10d740c..0000000 --- a/home/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - home-manager = { - users.kranzes = import ./kranzes; - }; -} diff --git a/home/kranzes/bspwm.nix b/home/kranzes/bspwm.nix index 3e9541a..3632c72 100644 --- a/home/kranzes/bspwm.nix +++ b/home/kranzes/bspwm.nix @@ -1,4 +1,5 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: + { home.pointerCursor = { package = pkgs.gnome.adwaita-icon-theme; @@ -15,7 +16,7 @@ settings = { remove_disabled_monitors = true; remove_unplugged_monitors = true; - focused_border_color = "#${config.colorscheme.colors.base0C}"; + focused_border_color = "#88C0D0"; border_width = 2; window_gap = 15; }; diff --git a/home/kranzes/default.nix b/home/kranzes/default.nix index 9e8b580..10916ab 100644 --- a/home/kranzes/default.nix +++ b/home/kranzes/default.nix @@ -1,11 +1,9 @@ -{ inputs, ... }: - { home.stateVersion = "22.05"; - colorscheme = inputs.nix-colors.colorSchemes.nord; imports = [ ./packages.nix ./programs.nix + ./fonts.nix ./services.nix ./editors.nix ./terminal.nix diff --git a/home/kranzes/editors.nix b/home/kranzes/editors.nix index b2b35d7..6f42dab 100644 --- a/home/kranzes/editors.nix +++ b/home/kranzes/editors.nix @@ -1,4 +1,4 @@ -{ pkgs, inputs, ... }: +{ pkgs, lib, inputs, ... }: { programs.neovim = { @@ -38,7 +38,7 @@ ripgrep # telescope manix # telescope git # gitsigns - inputs.nil.packages.${pkgs.system}.nil # lspconfig + nil # lspconfig nodePackages.bash-language-server # lspconfig ]; extraConfig = '' @@ -130,6 +130,12 @@ require('lspconfig')[lsp].setup { capabilities = capabilities, on_attach = on_attach, + settings = { + ['nil'] = { + autoArchive = true, + autoEvalInputs = true, + } + } } end @@ -192,7 +198,7 @@ -- formatting require("formatter").setup { filetype = { - nix = { function() return { exe = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt" } end, }, + nix = { function() return { exe = "${lib.getExe pkgs.nixpkgs-fmt}" } end, }, }, } vim.cmd 'autocmd BufWritePost * FormatWrite' diff --git a/home/kranzes/fonts.nix b/home/kranzes/fonts.nix new file mode 100644 index 0000000..618a6c1 --- /dev/null +++ b/home/kranzes/fonts.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: + +{ + fonts.fontconfig.enable = true; + + home.packages = with pkgs; [ + jetbrains-mono + roboto + font-awesome + corefonts + vistafonts + culmus + ]; +} diff --git a/home/kranzes/keyboard.nix b/home/kranzes/keyboard.nix index 79955c3..a5fcc9b 100644 --- a/home/kranzes/keyboard.nix +++ b/home/kranzes/keyboard.nix @@ -1,5 +1,3 @@ -{ pkgs, ... }: - { home.keyboard = { layout = "us,il"; diff --git a/home/kranzes/launcher.nix b/home/kranzes/launcher.nix index e9c1e02..0fec6d8 100644 --- a/home/kranzes/launcher.nix +++ b/home/kranzes/launcher.nix @@ -1,7 +1,7 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: { - home.packages = with pkgs; [ rofi ]; + home.packages = [ pkgs.rofi ]; home.file.".config/rofi/config.rasi".text = '' configuration { @@ -16,149 +16,148 @@ @theme "~/.config/rofi/theme.rasi" ''; - home.file.".config/rofi/theme.rasi".text = let inherit (config.colorscheme) colors; in - '' - * { - background: #${colors.base01}; - foreground: #${colors.base06}; - selected-normal-foreground: @foreground; - normal-foreground: @foreground; - alternate-normal-background: @background; - selected-urgent-foreground: @foreground; - urgent-foreground: @foreground; - alternate-urgent-background: @background; - active-foreground: @foreground; - selected-active-foreground: @foreground; - alternate-active-background: @background; - bordercolor: #${colors.base0C}; - alternate-normal-foreground: @foreground; - normal-background: @background; - selected-normal-background: #${colors.base03}; - border-color: @bordercolor; - spacing: 2; - separatorcolor: @background; - urgent-background: @background; - selected-urgent-background: #${colors.base02}; - alternate-urgent-foreground: @urgent-foreground; - background-color: @background; - alternate-active-foreground: @active-foreground; - active-background: @background; - selected-active-background: #${colors.base02}; - } - - //---------------------- - // Style - //---------------------- - - #window { - background-color: @background; - } + home.file.".config/rofi/theme.rasi".text = '' + * { + background: #3B4252; + foreground: #ECEFF4; + selected-normal-foreground: @foreground; + normal-foreground: @foreground; + alternate-normal-background: @background; + selected-urgent-foreground: @foreground; + urgent-foreground: @foreground; + alternate-urgent-background: @background; + active-foreground: @foreground; + selected-active-foreground: @foreground; + alternate-active-background: @background; + bordercolor: #88C0D0; + alternate-normal-foreground: @foreground; + normal-background: @background; + selected-normal-background: #4C566A; + border-color: @bordercolor; + spacing: 2; + separatorcolor: @background; + urgent-background: @background; + selected-urgent-background: #434C5E; + alternate-urgent-foreground: @urgent-foreground; + background-color: @background; + alternate-active-foreground: @active-foreground; + active-background: @background; + selected-active-background: #434C5E; + } + + //---------------------- + // Style + //---------------------- + + #window { + background-color: @background; + } - #mainbox { - border: 3; - padding: 10 ; - } + #mainbox { + border: 3; + padding: 10 ; + } - #message { - border: 2px 2px 2px ; - border-color: @separatorcolor; - padding: 10 ; - } + #message { + border: 2px 2px 2px ; + border-color: @separatorcolor; + padding: 10 ; + } - #textbox { - text-color: @foreground; - } + #textbox { + text-color: @foreground; + } - #listview { - fixed-height: 0; - padding: 5 0 0; - spacing: 5px ; - } + #listview { + fixed-height: 0; + padding: 5 0 0; + spacing: 5px ; + } - #element { - border: 0; - padding: 5 0 2 ; - } + #element { + border: 0; + padding: 5 0 2 ; + } - #element.normal.normal { - background-color: @normal-background; - text-color: @normal-foreground; - } + #element.normal.normal { + background-color: @normal-background; + text-color: @normal-foreground; + } - #element.normal.urgent { - background-color: @urgent-background; - text-color: @urgent-foreground; - } + #element.normal.urgent { + background-color: @urgent-background; + text-color: @urgent-foreground; + } - #element.normal.active { - background-color: @active-background; - text-color: @active-foreground; - } + #element.normal.active { + background-color: @active-background; + text-color: @active-foreground; + } - #element.selected.normal { - background-color: @selected-normal-background; - text-color: @selected-normal-foreground; - } + #element.selected.normal { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; + } - #element.selected.urgent { - background-color: @selected-urgent-background; - text-color: @selected-urgent-foreground; - } + #element.selected.urgent { + background-color: @selected-urgent-background; + text-color: @selected-urgent-foreground; + } - #element.selected.active { - background-color: @selected-active-background; - text-color: @selected-active-foreground; - } + #element.selected.active { + background-color: @selected-active-background; + text-color: @selected-active-foreground; + } - #element.alternate.normal { - background-color: @alternate-normal-background; - text-color: @alternate-normal-foreground; - } + #element.alternate.normal { + background-color: @alternate-normal-background; + text-color: @alternate-normal-foreground; + } - #element.alternate.urgent { - background-color: @alternate-urgent-background; - text-color: @alternate-urgent-foreground; - } + #element.alternate.urgent { + background-color: @alternate-urgent-background; + text-color: @alternate-urgent-foreground; + } - #element.alternate.active { - background-color: @alternate-active-background; - text-color: @alternate-active-foreground; - } + #element.alternate.active { + background-color: @alternate-active-background; + text-color: @alternate-active-foreground; + } - #element-text, element-icon { - background-color: inherit; - text-color: inherit; - } + #element-text, element-icon { + background-color: inherit; + text-color: inherit; + } - #button.selected { - background-color: @selected-normal-background; - text-color: @selected-normal-foreground; - } + #button.selected { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; + } - #inputbar { - spacing: 5; - text-color: @normal-foreground; - padding: 5px ; - border: 0 0 1; - border-color: @separatorcolor; - } + #inputbar { + spacing: 5; + text-color: @normal-foreground; + padding: 5px ; + border: 0 0 1; + border-color: @separatorcolor; + } - #case-indicator { - spacing: 0; - text-color: @normal-foreground; - } + #case-indicator { + spacing: 0; + text-color: @normal-foreground; + } - #entry { - spacing: 0; - text-color: @normal-foreground; - } + #entry { + spacing: 0; + text-color: @normal-foreground; + } - #prompt { - spacing: 0; - text-color: @normal-foreground; - } + #prompt { + spacing: 0; + text-color: @normal-foreground; + } - listview { lines: 8; } - window { width: 25%; } - ''; + listview { lines: 8; } + window { width: 25%; } + ''; } diff --git a/home/kranzes/notifications.nix b/home/kranzes/notifications.nix index 1a34aef..128dfe7 100644 --- a/home/kranzes/notifications.nix +++ b/home/kranzes/notifications.nix @@ -1,4 +1,5 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: + { services.dunst = { enable = true; @@ -14,7 +15,7 @@ padding = 10; horizontal_padding = 10; frame_width = 4; - frame_color = "#${config.colorscheme.colors.base03}"; + frame_color = "#4C566A"; separator_color = "frame"; sort = false; idle_threshold = 180; @@ -34,12 +35,12 @@ class = "Dunst"; }; urgency_normal = { - background = "#${config.colorscheme.colors.base01}"; - foreground = "#${config.colorscheme.colors.base06}"; + background = "#3B4252"; + foreground = "#ECEFF4"; timeout = 10; }; }; }; - home.packages = with pkgs; [ libnotify ]; + home.packages = [ pkgs.libnotify ]; } diff --git a/home/kranzes/packages.nix b/home/kranzes/packages.nix index 923bee4..a0e6680 100644 --- a/home/kranzes/packages.nix +++ b/home/kranzes/packages.nix @@ -34,6 +34,8 @@ nix-update acpi ripgrep + fd + sd ]; } diff --git a/home/kranzes/polybar.nix b/home/kranzes/polybar.nix index 3cbc50a..6c6aff7 100644 --- a/home/kranzes/polybar.nix +++ b/home/kranzes/polybar.nix @@ -1,4 +1,5 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: + { services.polybar = { enable = true; @@ -8,179 +9,177 @@ polybar leftbar & polybar rightbar & ''; - config = let inherit (config.colorscheme) colors; in - { - "settings" = { - "throttle-ms" = "50"; - "throttle-limit" = "5"; - }; - "colors" = { - "black" = "#${colors.base01}"; - "red" = "#${colors.base08}"; - "green" = "#${colors.base0B}"; - "yellow" = "#${colors.base0A}"; - "blue" = "#${colors.base0F}"; - "magenta" = "#${colors.base0E}"; - "cyan" = "#${colors.base0C}"; - "white" = "#${colors.base05}"; - "black1" = "#${colors.base03}"; - "red1" = "#${colors.base09}"; - "green1" = "#${colors.base0B}"; - "yellow1" = "#${colors.base0A}"; - "blue1" = "#${colors.base0D}"; - "magenta1" = "#${colors.base0E}"; - "cyan1" = "#${colors.base07}"; - "white1" = "#${colors.base06}"; - "background" = "#${colors.base00}"; - "foreground" = "#${colors.base04}"; - "ctransp" = "#00FFFF"; - }; - - "global/wm" = { - "margin-top" = "-3"; - "margin-bottom" = "-3"; - }; - "section/base" = { - "top" = "true"; - "padding-left" = "0"; - "spacing" = "0"; - "padding-right" = "0"; - "module-margin-left" = "0"; - "module-margin-right" = "0"; - "module-padding-left" = "0"; - "module-padding-right" = "0"; - "border-top-size" = "3"; - "border-left-size" = "3"; - "border-right-size" = "3"; - "border-bottom-size" = "3 "; - "foreground" = "\${colors.foreground}"; - "background" = "\${colors.background}"; - "border-top-color" = "\${colors.black1}"; - "border-bottom-color" = "\${colors.black1}"; - "border-left-color" = "\${colors.black1}"; - "border-right-color" = "\${colors.black1}"; - "font-0" = "JetBrains Mono:size=9;2"; - "font-1" = "JetBrains Mono:size=9;2"; - "font-2" = "Font Awesome 6 Free Solid:size=9;2"; - "wm-restack" = "bspwm"; - }; - "bar/leftbar" = { - "inherit" = "section/base"; - # Position - "offset-x" = "10"; - "offset-y" = "7"; - # Size - "width" = "223"; - "height" = "20"; - # Modules - "modules-left" = "bspwm"; - }; - "module/bspwm" = { - "type" = "internal/bspwm"; - "format" = ""; - "label-active" = "%index%"; - "label-active-padding" = "1"; - "label-active-font" = "1"; - "label-active-foreground" = "\${colors.black}"; - "label-active-background" = "\${colors.blue1}"; - "label-occupied" = "%index%"; - "label-occupied-padding" = "1"; - "label-occupied-font" = "1"; - "label-urgent" = "%index%"; - "label-urgent-padding" = "1"; - "label-urgent-background" = "\${colors.red}"; - "label-urgent-foreground" = "\${colors.red1}"; - "label-urgent-font" = "1"; - "label-empty" = "%index%"; - "label-empty-padding" = "1"; - "label-empty-font" = "1"; - "label-empty-foreground" = "\${colors.black1}"; - "label-empty-background" = "\${colors.black}"; - #Icon for non indexed WS - "ws-icon-default" = "○"; - }; - "bar/centerbar" = { - "inherit" = "section/base"; - # Position - "offset-x" = "50%:-175"; - "offset-y" = "7"; - # Size; - "width" = "350"; - "height" = "20"; - # Modules - "modules-center" = "mpd"; - }; - "bar/rightbar" = { - "inherit" = "section/base"; - # Position, - "offset-x" = "100%:-293"; - "offset-y" = "7"; - # Size - "width" = "283"; - "height" = "20"; - # Modules - "modules-right" = "xkeyboard cpu memory pulseaudio date"; - }; - "module/date" = { - "type" = "internal/date"; - "interval" = "1"; - "format" = "