diff --git a/flake.lock b/flake.lock index f8fba98..a743215 100644 --- a/flake.lock +++ b/flake.lock @@ -104,15 +104,14 @@ "flake-schemas": "flake-schemas", "home-manager": "home-manager", "jovian": "jovian", - "nixpkgs": "nixpkgs", - "nixpkgs-small": "nixpkgs-small" + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1734987419, - "narHash": "sha256-2K4V615Y29QhMUShX9k52l7gXF2erkq9yH9qGRZGKQ0=", + "lastModified": 1735566338, + "narHash": "sha256-9sYGJZCGeb11WBVsE2u0gwuTk8LpbOgnrJvyDbHpOoY=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "d61084b851dbf3072f8b40c3870b0f7938ca3f22", + "rev": "446ad45313df3dbc93ad9e9d8dd6d094b16f6fb4", "type": "github" }, "original": { @@ -436,11 +435,11 @@ ] }, "locked": { - "lastModified": 1735053786, - "narHash": "sha256-Gm+0DcbUS338vvkwyYWms5jsWlx8z8MeQBzcnIDuIkw=", + "lastModified": 1735381016, + "narHash": "sha256-CyCZFhMUkuYbSD6bxB/r43EdmDE7hYeZZPTCv0GudO4=", "owner": "nix-community", "repo": "home-manager", - "rev": "35b98d20ca8f4ca1f6a2c30b8a2c8bb305a36d84", + "rev": "10e99c43cdf4a0713b4e81d90691d22c6a58bdf2", "type": "github" }, "original": { @@ -544,11 +543,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1735209119, - "narHash": "sha256-4KfccQtaeiu1A4Ck9XFKc+vzLWCs8HneLwE2YQT5ybc=", + "lastModified": 1735585949, + "narHash": "sha256-vCGG4tGMvzCzz+ZIsiNtpoFW9+f+itYLTAVW41qk/Hk=", "ref": "refs/heads/main", - "rev": "e75e2cdac79417ffdbbbe903f72668953483a4e7", - "revCount": 5589, + "rev": "1989b0049f7fb714a2417dfb14d6b4f3d2a079d3", + "revCount": 5607, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -576,11 +575,11 @@ ] }, "locked": { - "lastModified": 1735209374, - "narHash": "sha256-V/AE7QfPzfIPW5jC+DaBv5H+Vds0eA02Jkx/+VFhRT4=", + "lastModified": 1735295819, + "narHash": "sha256-iHDDF1kj+wX7fHGTgKaM6rli6+O8mVFNmpypo+SgnNs=", "owner": "hyprwm", "repo": "hyprland-plugins", - "rev": "616e7ef0aca905b9b4012d2bedbb9225d51040bf", + "rev": "a41bcdccac7d3fe220b3a8519633f0a812da3439", "type": "github" }, "original": { @@ -771,11 +770,11 @@ ] }, "locked": { - "lastModified": 1734796073, - "narHash": "sha256-TnuKsa8OHrSJEmHm3TLGOWbPNA1gRjmZLsRzKrCqOsg=", + "lastModified": 1735316583, + "narHash": "sha256-AiiUwHWHfEdpFzXy7l1x3zInCUa1xcRMrbZ1XRSkzwU=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "c3331116ebd0b71df5ae8c6efe9a7f94148b03bf", + "rev": "8f15d45b120b33712f6db477fe5ffb18034d0ea8", "type": "github" }, "original": { @@ -918,11 +917,11 @@ ] }, "locked": { - "lastModified": 1734725857, - "narHash": "sha256-bivlV9l/UjMtTfz/CZaoNJ5RfH2Lre4P9Ds64conoUQ=", + "lastModified": 1735330405, + "narHash": "sha256-MhXgu1oymyjhhZGY9yewNonJknNAjilzMGPY1FfMR7s=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "dbae2fd6adaf34c947d310bec08deac7c4ed265b", + "rev": "a86d9cf841eff8b33a05d2bf25788abd8e018dbd", "type": "github" }, "original": { @@ -1056,11 +1055,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1734649271, - "narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", + "lastModified": 1735471104, + "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", + "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", "type": "github" }, "original": { @@ -1070,22 +1069,6 @@ "type": "github" } }, - "nixpkgs-small": { - "locked": { - "lastModified": 1734838250, - "narHash": "sha256-Xi8ST/QiyuYXc3ujnMYOBuRUaMh6p16XWH6BKARa7xQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "da8a31d09dd004be34b5c54eda83f9a27b357726", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable-small", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-stable": { "locked": { "lastModified": 1730741070, @@ -1120,11 +1103,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1734649271, - "narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", + "lastModified": 1735291276, + "narHash": "sha256-NYVcA06+blsLG6wpAbSPTCyLvxD/92Hy4vlY9WxFI1M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", + "rev": "634fd46801442d760e09493a794c4f15db2d0cbb", "type": "github" }, "original": { @@ -1200,26 +1183,26 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1734649271, - "narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", + "lastModified": 1735531152, + "narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", + "rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-unstable", + "ref": "nixos-24.11", "type": "indirect" } }, "nixpkgs_8": { "locked": { - "lastModified": 1734649271, - "narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", + "lastModified": 1735471104, + "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", + "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", "type": "github" }, "original": { @@ -1252,11 +1235,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1735242326, - "narHash": "sha256-od602Ijwr+Ix+MQ97rONtOV+GTaH7w7ZNU7GIo8Ti3M=", + "lastModified": 1735648437, + "narHash": "sha256-cVc5Bn/oznCvRFDpCZEpQVo3FmpgQKGZEZ5RW4xvRu8=", "owner": "nix-community", "repo": "NUR", - "rev": "e84e6736a68e53253f7ca51cba54ab6dbea76bf6", + "rev": "1bb7310d7d1eeaa33d1d009ac493bc2b38acef40", "type": "github" }, "original": { @@ -1307,6 +1290,7 @@ "spicetify-nix": "spicetify-nix", "split-monitor-workspaces": "split-monitor-workspaces", "stylix": "stylix", + "unstable": "unstable", "zen-browser": "zen-browser" } }, @@ -1361,11 +1345,11 @@ ] }, "locked": { - "lastModified": 1735180071, - "narHash": "sha256-ceUDFBsLf5Cz3GlhQAdaJsEfi5s1MDjDsO9VvPFoKAE=", + "lastModified": 1735612067, + "narHash": "sha256-rsjojgfPUf9tWuMXuuo2KAIoUZ49XGZQJSjFGOO8Cq4=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "550e1f10be4a504747a7894c35e887e61235763b", + "rev": "d199142e84bfaae476ffb4e09a70879d7918784d", "type": "github" }, "original": { @@ -1382,11 +1366,11 @@ ] }, "locked": { - "lastModified": 1735186564, - "narHash": "sha256-PQIAL/dODi9HroSaW/4nqWQe2CSTgxRYS+XiYPo1FhA=", + "lastModified": 1735618543, + "narHash": "sha256-Aqhp0PcsoEn4FRWZYJZHbHeB+FOJDQcbsaEsXv0iA9k=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "112da8f6b8a3365cf89d5c5b6aaa02ba249373ff", + "rev": "2da20133b52ac69a1f348c08dc801c8638261548", "type": "github" }, "original": { @@ -1435,11 +1419,11 @@ "tinted-tmux": "tinted-tmux" }, "locked": { - "lastModified": 1735151068, - "narHash": "sha256-sJ1/y4aXAZ22trJjY+nH/bJ+pydaDKf3wZtafM+Yjcs=", + "lastModified": 1735524788, + "narHash": "sha256-R4i8VCdSGLWHt6cL5p2Cmlh9MRodZsYO8moUjvxYb54=", "owner": "danth", "repo": "stylix", - "rev": "079fecebad5f616561726359c89cedd811c8a722", + "rev": "a4ed4168fb83289374f24cb8a039c6983637a076", "type": "github" }, "original": { @@ -1639,6 +1623,21 @@ "type": "github" } }, + "unstable": { + "locked": { + "lastModified": 1735471104, + "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, "xdph": { "inputs": { "hyprland-protocols": [ diff --git a/flake.nix b/flake.nix index a3d15ce..3ba22a9 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,8 @@ description = "Mike's Flake"; inputs = { - nixpkgs.url = "nixpkgs/nixos-unstable"; + nixpkgs.url = "nixpkgs/nixos-24.11"; + unstable.url = "nixpkgs/nixos-unstable"; chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; nur.url = "github:nix-community/NUR"; nix-alien.url = "github:thiagokokada/nix-alien"; @@ -56,37 +57,61 @@ }; }; - outputs = - { nixpkgs, ... }@inputs: - { + outputs = { + self, + nixpkgs, + unstable, + home-manager, + ... + } @ inputs: let + inherit (self) outputs; - nixosConfigurations = { - zion = nixpkgs.lib.nixosSystem { - modules = [ ./hosts ]; - specialArgs = { - inherit inputs; - username = "mike"; - hostname = "zion"; - }; + systems = [ + "x86_64-linux" + "aarch64-linux" + ]; + + forAllSystems = nixpkgs.lib.genAttrs systems; + in { + # Your custom packages + # Accessible through 'nix build', 'nix shell', etc + # packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); + # Formatter for your nix files, available through 'nix fmt' + # Other options beside 'alejandra' include 'nixpkgs-fmt' + formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); + + # Your custom packages and modifications, exported as overlays + overlays = import ./overlays {inherit inputs;}; + + # NixOS configuration entrypoint + # Available through 'nixos-rebuild --flake .#hostname' + nixosConfigurations = { + zion = nixpkgs.lib.nixosSystem { + modules = [./hosts]; + specialArgs = { + inherit inputs outputs; + username = "mike"; + hostname = "zion"; }; + }; - thor = nixpkgs.lib.nixosSystem { - modules = [ ./hosts ]; - specialArgs = { - inherit inputs; - username = "mike"; - hostname = "thor"; - }; + thor = nixpkgs.lib.nixosSystem { + modules = [./hosts]; + specialArgs = { + inherit inputs outputs; + username = "mike"; + hostname = "thor"; }; + }; - server = nixpkgs.lib.nixosSystem { - modules = [ ./hosts ]; - specialArgs = { - inherit inputs; - username = "mike"; - hostname = "server"; - }; + server = nixpkgs.lib.nixosSystem { + modules = [./hosts]; + specialArgs = { + inherit inputs outputs; + username = "mike"; + hostname = "server"; }; }; }; + }; } diff --git a/home/configs/aliases.nix b/home-manager/configs/aliases.nix similarity index 100% rename from home/configs/aliases.nix rename to home-manager/configs/aliases.nix diff --git a/home/configs/keys.nix b/home-manager/configs/keys.nix similarity index 71% rename from home/configs/keys.nix rename to home-manager/configs/keys.nix index 4e646c5..3cee919 100644 --- a/home/configs/keys.nix +++ b/home-manager/configs/keys.nix @@ -1,5 +1,5 @@ -{ lib }: { - options.local.keys = lib.mkOption { }; +{lib}: { + options.local.keys = lib.mkOption {}; config.local.keys = { senpai = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINBehbdWBTyhs8Tqnc7w172XhWcPAcAM6BC9Gny3i8An"; diff --git a/home/configs/p10k.zsh b/home-manager/configs/p10k.zsh similarity index 100% rename from home/configs/p10k.zsh rename to home-manager/configs/p10k.zsh diff --git a/home/configs/rose-pine.rasi b/home-manager/configs/rose-pine.rasi similarity index 100% rename from home/configs/rose-pine.rasi rename to home-manager/configs/rose-pine.rasi diff --git a/home/configs/rosepine-kvantum/rosepine-kvantum.kvconfig b/home-manager/configs/rosepine-kvantum/rosepine-kvantum.kvconfig similarity index 100% rename from home/configs/rosepine-kvantum/rosepine-kvantum.kvconfig rename to home-manager/configs/rosepine-kvantum/rosepine-kvantum.kvconfig diff --git a/home/configs/rosepine-kvantum/rosepine-kvantum.svg b/home-manager/configs/rosepine-kvantum/rosepine-kvantum.svg similarity index 100% rename from home/configs/rosepine-kvantum/rosepine-kvantum.svg rename to home-manager/configs/rosepine-kvantum/rosepine-kvantum.svg diff --git a/home/dwm/.xinitrc b/home-manager/dwm/.xinitrc similarity index 100% rename from home/dwm/.xinitrc rename to home-manager/dwm/.xinitrc diff --git a/home/dwm/.zprofile b/home-manager/dwm/.zprofile similarity index 100% rename from home/dwm/.zprofile rename to home-manager/dwm/.zprofile diff --git a/home/dwm/bar.sh b/home-manager/dwm/bar.sh similarity index 100% rename from home/dwm/bar.sh rename to home-manager/dwm/bar.sh diff --git a/home/dwm/betterlockscreen.nix b/home-manager/dwm/betterlockscreen.nix similarity index 100% rename from home/dwm/betterlockscreen.nix rename to home-manager/dwm/betterlockscreen.nix diff --git a/home/dwm/black_to_transparent.frag b/home-manager/dwm/black_to_transparent.frag similarity index 100% rename from home/dwm/black_to_transparent.frag rename to home-manager/dwm/black_to_transparent.frag diff --git a/home/dwm/default.nix b/home-manager/dwm/default.nix similarity index 100% rename from home/dwm/default.nix rename to home-manager/dwm/default.nix diff --git a/home/dwm/easyeffects.nix b/home-manager/dwm/easyeffects.nix similarity index 100% rename from home/dwm/easyeffects.nix rename to home-manager/dwm/easyeffects.nix diff --git a/home/dwm/flameshot.nix b/home-manager/dwm/flameshot.nix similarity index 100% rename from home/dwm/flameshot.nix rename to home-manager/dwm/flameshot.nix diff --git a/home/dwm/picom-animations.conf b/home-manager/dwm/picom-animations.conf similarity index 100% rename from home/dwm/picom-animations.conf rename to home-manager/dwm/picom-animations.conf diff --git a/home/dwm/picom.conf b/home-manager/dwm/picom.conf similarity index 100% rename from home/dwm/picom.conf rename to home-manager/dwm/picom.conf diff --git a/home/dwm/picom.nix b/home-manager/dwm/picom.nix similarity index 99% rename from home/dwm/picom.nix rename to home-manager/dwm/picom.nix index cd13235..489aad2 100644 --- a/home/dwm/picom.nix +++ b/home-manager/dwm/picom.nix @@ -4,7 +4,6 @@ pkgs, ... }: { - # home.file = { # ".config/picom/picom.conf" = { # text = builtins.readFile ./picom.conf; diff --git a/home/dwm/theming.nix b/home-manager/dwm/theming.nix similarity index 100% rename from home/dwm/theming.nix rename to home-manager/dwm/theming.nix diff --git a/home-manager/home.nix b/home-manager/home.nix new file mode 100644 index 0000000..ea73aff --- /dev/null +++ b/home-manager/home.nix @@ -0,0 +1,74 @@ +{hostname, ...}: { + imports = + if hostname == "zion" + then [ + ./programs/btop.nix + ./programs/fastfetch.nix + # ./programs/foot.nix + ./programs/git.nix + ./programs/gpg.nix + ./programs/helix.nix + ./programs/kitty.nix + ./programs/neovide.nix + ./programs/neovim.nix + ./programs/packages.nix + ./programs/shell.nix + ./programs/tmux.nix + ./programs/vscodium.nix + + ./dwm + # ./programs/yazi.nix + # ./programs/zathura.nix + + # ./configs/keys.nix + + ./system/dunst.nix + ./system/hypr.nix + ./system/hyprland.nix + ./system/rofi.nix + ./system/stylix.nix + ./system/theme.nix + ./system/waybar.nix + ./system/wlsunset.nix + ./system/wofi.nix + ] + else if hostname == "thor" + then [ + ./programs/btop.nix + ./programs/fastfetch.nix + # ./programs/foot.nix + ./programs/git.nix + ./programs/gpg.nix + ./programs/helix.nix + ./programs/kitty.nix + ./programs/neovide.nix + ./programs/neovim.nix + ./programs/packages.nix + ./programs/shell.nix + ./programs/tmux.nix + ./programs/vscodium.nix + # ./programs/yazi.nix + # ./programs/zathura.nix + + # ./configs/keys.nix + + ./system/dunst.nix + ./system/hyprland.nix + ./system/rofi.nix + ./system/stylix.nix + ./system/theme.nix + ./system/waybar.nix + ./system/wlsunset.nix + ./system/wofi.nix + ] + else if hostname == "server" + then [ + ./programs/git.nix + ./programs/btop.nix + ./programs/yazi.nix + ./programs/shell.nix + ./programs/helix.nix + ./programs/fastfetch.nix + ] + else []; +} diff --git a/home/programs/btop.nix b/home-manager/programs/btop.nix similarity index 100% rename from home/programs/btop.nix rename to home-manager/programs/btop.nix diff --git a/home/programs/fastfetch.nix b/home-manager/programs/fastfetch.nix similarity index 99% rename from home/programs/fastfetch.nix rename to home-manager/programs/fastfetch.nix index 09be369..22c356b 100644 --- a/home/programs/fastfetch.nix +++ b/home-manager/programs/fastfetch.nix @@ -2,7 +2,6 @@ programs.fastfetch = { enable = true; settings = { - "$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json"; logo = { @@ -119,4 +118,3 @@ }; }; } - diff --git a/home/programs/foot.nix b/home-manager/programs/foot.nix similarity index 100% rename from home/programs/foot.nix rename to home-manager/programs/foot.nix diff --git a/home/programs/freetube.nix b/home-manager/programs/freetube.nix similarity index 100% rename from home/programs/freetube.nix rename to home-manager/programs/freetube.nix diff --git a/home/programs/git.nix b/home-manager/programs/git.nix similarity index 99% rename from home/programs/git.nix rename to home-manager/programs/git.nix index f993428..dad9283 100644 --- a/home/programs/git.nix +++ b/home-manager/programs/git.nix @@ -23,5 +23,4 @@ push.gpgsign = "if-asked"; }; }; - } diff --git a/home/programs/gpg.nix b/home-manager/programs/gpg.nix similarity index 99% rename from home/programs/gpg.nix rename to home-manager/programs/gpg.nix index 5e951f3..3e5e652 100644 --- a/home/programs/gpg.nix +++ b/home-manager/programs/gpg.nix @@ -14,4 +14,3 @@ # ''; # }; } - diff --git a/home/programs/helix.nix b/home-manager/programs/helix.nix similarity index 79% rename from home/programs/helix.nix rename to home-manager/programs/helix.nix index ac43c9d..237e5b3 100644 --- a/home/programs/helix.nix +++ b/home-manager/programs/helix.nix @@ -1,19 +1,17 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { programs.helix = { enable = true; # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - # languages Configuration + # languages Configuration # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ languages = { language = [ - { name = "nix"; auto-format = true; - language-servers = [ "nixd" "nil" ]; + language-servers = ["nixd" "nil"]; formatter = { command = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt"; # command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt"; @@ -24,62 +22,61 @@ { name = "bash"; auto-format = true; - language-servers = [ "bash-language-server" ]; + language-servers = ["bash-language-server"]; formatter = { command = "${pkgs.shfmt}/bin/shfmt"; - args = [ "-i" "2" "-ci" ]; + args = ["-i" "2" "-ci"]; }; } { name = "python"; auto-format = true; - language-servers = [ "pyright" ]; + language-servers = ["pyright"]; formatter = { command = "${pkgs.black}/bin/black"; - args = [ "--quiet" "-" ]; + args = ["--quiet" "-"]; }; } { name = "rust"; auto-format = false; - file-types = [ "rs" ]; - language-servers = [ "rust-analyzer" ]; - formatter = { command = "${pkgs.rustfmt}/bin/rustfmt"; }; + file-types = ["rs"]; + language-servers = ["rust-analyzer"]; + formatter = {command = "${pkgs.rustfmt}/bin/rustfmt";}; } { name = "zig"; auto-format = true; - language-servers = [ "zsl" ]; - formatter = { command = "${pkgs.zig}/bin/zig"; }; + language-servers = ["zsl"]; + formatter = {command = "${pkgs.zig}/bin/zig";}; } { name = "html"; auto-format = true; - language-servers = [ "vscode-langservers-extracted" ]; + language-servers = ["vscode-langservers-extracted"]; } { name = "javascript"; auto-format = true; - language-servers = [ "typescript-language-server" ]; + language-servers = ["typescript-language-server"]; } ]; # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - # Language Server Protocol Configuration + # Language Server Protocol Configuration # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ language-servers = { - - nil = { command = "${pkgs.nixd}/bin/nixd"; }; + nil = {command = "${pkgs.nixd}/bin/nixd";}; rust-analyzer = { config = { - check = { command = "${pkgs.clippy}/bin/cargo-clippy"; }; + check = {command = "${pkgs.clippy}/bin/cargo-clippy";}; # cargo.features = "all"; checkOnSave.command = "${pkgs.clippy}/bin/cargo-clippy"; completion.autoimport.enable = true; @@ -88,7 +85,7 @@ typescript-language-server = { command = "${pkgs.nodePackages_latest.typescript-language-server}/bin/typescript-language-server"; - args = [ "--stdio" ]; + args = ["--stdio"]; }; }; }; diff --git a/home/programs/kitty.nix b/home-manager/programs/kitty.nix similarity index 95% rename from home/programs/kitty.nix rename to home-manager/programs/kitty.nix index bb76200..66ad718 100644 --- a/home/programs/kitty.nix +++ b/home-manager/programs/kitty.nix @@ -1,4 +1,4 @@ -{ lib, ... }: { +{lib, ...}: { programs.kitty = { enable = true; font = { diff --git a/home/programs/librewolf.nix b/home-manager/programs/librewolf.nix similarity index 100% rename from home/programs/librewolf.nix rename to home-manager/programs/librewolf.nix diff --git a/home/programs/neovide.nix b/home-manager/programs/neovide.nix similarity index 100% rename from home/programs/neovide.nix rename to home-manager/programs/neovide.nix diff --git a/home/programs/neovim.nix b/home-manager/programs/neovim.nix similarity index 90% rename from home/programs/neovim.nix rename to home-manager/programs/neovim.nix index 5bb63b8..0b320ea 100644 --- a/home/programs/neovim.nix +++ b/home-manager/programs/neovim.nix @@ -1,6 +1,7 @@ -{ inputs -, pkgs -, ... +{ + inputs, + pkgs, + ... }: { # programs.neovim = { # enable = true; diff --git a/home/programs/packages.nix b/home-manager/programs/packages.nix similarity index 97% rename from home/programs/packages.nix rename to home-manager/programs/packages.nix index 9ed55e5..0199901 100644 --- a/home/programs/packages.nix +++ b/home-manager/programs/packages.nix @@ -1,5 +1,8 @@ -{ inputs, pkgs, ... }: { + inputs, + pkgs, + ... +}: { programs.direnv.enable = true; programs.direnv.nix-direnv.enable = true; diff --git a/home/programs/qutebrowser.nix b/home-manager/programs/qutebrowser.nix similarity index 99% rename from home/programs/qutebrowser.nix rename to home-manager/programs/qutebrowser.nix index 866bae1..251116c 100644 --- a/home/programs/qutebrowser.nix +++ b/home-manager/programs/qutebrowser.nix @@ -40,7 +40,6 @@ }; settings = { - content = { autoplay = false; javascript.clipboard = "access"; diff --git a/home/programs/shell.nix b/home-manager/programs/shell.nix similarity index 98% rename from home/programs/shell.nix rename to home-manager/programs/shell.nix index 6cc8888..e4a4bb6 100644 --- a/home/programs/shell.nix +++ b/home-manager/programs/shell.nix @@ -1,10 +1,6 @@ -{ pkgs -, ... -}: -let +{pkgs, ...}: let cli = import ../configs/aliases.nix; -in -{ +in { programs = { zoxide.enable = true; diff --git a/home/programs/spicetify.nix b/home-manager/programs/spicetify.nix similarity index 100% rename from home/programs/spicetify.nix rename to home-manager/programs/spicetify.nix diff --git a/home/programs/tmux.nix b/home-manager/programs/tmux.nix similarity index 98% rename from home/programs/tmux.nix rename to home-manager/programs/tmux.nix index 09b35cd..646c0e5 100644 --- a/home/programs/tmux.nix +++ b/home-manager/programs/tmux.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { programs.tmux = { enable = true; mouse = true; diff --git a/home/programs/vscodium.nix b/home-manager/programs/vscodium.nix similarity index 87% rename from home/programs/vscodium.nix rename to home-manager/programs/vscodium.nix index 866dc42..d549b54 100644 --- a/home/programs/vscodium.nix +++ b/home-manager/programs/vscodium.nix @@ -1,16 +1,16 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { programs.vscode = { enable = true; package = pkgs.vscode.fhsWithPackages ( - ps: with ps; [ - rustup - zlib - openssl.dev - pkg-config - # nixfmt-rfc-style - python3 - ] + ps: + with ps; [ + rustup + zlib + openssl.dev + pkg-config + # nixfmt-rfc-style + python3 + ] ); extensions = with pkgs.vscode-extensions; [ @@ -27,7 +27,6 @@ ]; userSettings = { - "editor.fontSize" = 16; "editor.fontFamily" = "FiraCode Nerd Font"; "explorer.confirmDelete" = false; @@ -45,7 +44,7 @@ "nix.serverSettings" = { "nixd" = { "formatting" = { - "command" = [ "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt" ]; + "command" = ["${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt"]; }; "nixpkgs" = { "expr" = "import { }"; @@ -70,7 +69,6 @@ "workbench.colorTheme" = "Rosé Pine"; "workbench.preferredDarkColorTheme" = "Rosé Pine"; "workbench.preferredHighContrastColorTheme" = "Rosé Pine"; - }; }; } diff --git a/home/programs/yazi.nix b/home-manager/programs/yazi.nix similarity index 100% rename from home/programs/yazi.nix rename to home-manager/programs/yazi.nix diff --git a/home/programs/zathura.nix b/home-manager/programs/zathura.nix similarity index 100% rename from home/programs/zathura.nix rename to home-manager/programs/zathura.nix diff --git a/home/system/dunst.nix b/home-manager/system/dunst.nix similarity index 54% rename from home/system/dunst.nix rename to home-manager/system/dunst.nix index 4b6361c..7b03037 100644 --- a/home/system/dunst.nix +++ b/home-manager/system/dunst.nix @@ -1,6 +1,5 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ libnotify ]; +{pkgs, ...}: { + home.packages = with pkgs; [libnotify]; services.dunst = { enable = true; diff --git a/home/system/hypr.nix b/home-manager/system/hypr.nix similarity index 50% rename from home/system/hypr.nix rename to home-manager/system/hypr.nix index 6f90ec5..243039b 100644 --- a/home/system/hypr.nix +++ b/home-manager/system/hypr.nix @@ -1,5 +1,10 @@ -{ lib, pkgs, inputs, hostname, ... }: { + lib, + pkgs, + inputs, + hostname, + ... +}: { home.packages = with pkgs; [ hypr ]; diff --git a/home/system/hyprland.nix b/home-manager/system/hyprland.nix similarity index 89% rename from home/system/hyprland.nix rename to home-manager/system/hyprland.nix index d35c955..811bfb9 100644 --- a/home/system/hyprland.nix +++ b/home-manager/system/hyprland.nix @@ -1,10 +1,10 @@ -{ lib -, pkgs -, inputs -, hostname -, ... -}: { + lib, + pkgs, + inputs, + hostname, + ... +}: { # ------------------------------------------------ # Needed Packages # ------------------------------------------------ @@ -542,7 +542,7 @@ # Super Rat Binds bind = , mouse:277, exec, amixer set Master playback 2%+ bind = , mouse:278, exec, amixer set Master playback 2%- - # bind = , mouse:279, exec, + # bind = , mouse:279, exec, bind = , mouse:280, exec, amixer set Capture toggle # Move focus with mainMod + vim keys @@ -644,7 +644,6 @@ windowrulev2 = maxsize 1 1,class:^(xwaylandvideobridge)$ windowrulev2 = noblur,class:^(xwaylandvideobridge)$ ''; - }; ################################# @@ -655,8 +654,8 @@ settings = { ipc = "off"; splash = false; - preload = [ "~/.files/home/wallpapers/blockwavemoon.png" ]; - wallpaper = [ ",~/.files/home/wallpapers/blockwavemoon.png" ]; + preload = ["~/.files/home/wallpapers/blockwavemoon.png"]; + wallpaper = [",~/.files/home/wallpapers/blockwavemoon.png"]; }; }; @@ -673,79 +672,78 @@ }; listener = - if hostname == "zion" then - [ - # { - # timeout = 60; - # on-timeout = "brightnessctl -sd asus::kbd_backlight set 0"; - # on-resume = "brightnessctl -rd asus::kbd_backlight"; - # } + if hostname == "zion" + then [ + # { + # timeout = 60; + # on-timeout = "brightnessctl -sd asus::kbd_backlight set 0"; + # on-resume = "brightnessctl -rd asus::kbd_backlight"; + # } - # { - # timeout = 80; - # on-timeout = "brightnessctl -s set 0"; - # on-resume = "brightnessctl -r"; - # } + # { + # timeout = 80; + # on-timeout = "brightnessctl -s set 0"; + # on-resume = "brightnessctl -r"; + # } - # { - # timeout = 100; - # on-timeout = "hyprctl dispatch dpms off "; - # on-resume = "hyprctl dispatch dpms on"; - # } + # { + # timeout = 100; + # on-timeout = "hyprctl dispatch dpms off "; + # on-resume = "hyprctl dispatch dpms on"; + # } - # { - # timeout = 150; - # on-timeout = "systemctl suspend"; - # } - { - timeout = 300; # 5min - on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor. - on-resume = "brightnessctl -r"; # monitor backlight restore. - } + # { + # timeout = 150; + # on-timeout = "systemctl suspend"; + # } + { + timeout = 300; # 5min + on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor. + on-resume = "brightnessctl -r"; # monitor backlight restore. + } - { - timeout = 600; # 10min - on-timeout = "loginctl lock-session"; # lock screen when timeout has passed - } + { + timeout = 600; # 10min + on-timeout = "loginctl lock-session"; # lock screen when timeout has passed + } - # { - # timeout = 1800; # 30min - # on-timeout = "systemctl hibernate"; - # on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed - # on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired. - # } - ] - else if hostname == "thor" then - [ - { - timeout = 450; - on-timeout = "brightnessctl -s set 0"; - on-resume = "brightnessctl -r"; - } + # { + # timeout = 1800; # 30min + # on-timeout = "systemctl hibernate"; + # on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed + # on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired. + # } + ] + else if hostname == "thor" + then [ + { + timeout = 450; + on-timeout = "brightnessctl -s set 0"; + on-resume = "brightnessctl -r"; + } - { - timeout = 600; - on-timeout = "loginctl lock-session"; # lock screen when timeout has passed - } + { + timeout = 600; + on-timeout = "loginctl lock-session"; # lock screen when timeout has passed + } - { - timeout = 750; - on-timeout = "hyprctl dispatch dpms off "; - on-resume = "hyprctl dispatch dpms on"; - } + { + timeout = 750; + on-timeout = "hyprctl dispatch dpms off "; + on-resume = "hyprctl dispatch dpms on"; + } - { - timeout = 900; - on-timeout = "systemctl suspend"; - } + { + timeout = 900; + on-timeout = "systemctl suspend"; + } - { - timeout = 1500; - on-timeout = "systemctl hibernate"; - } - ] - else - [ ]; + { + timeout = 1500; + on-timeout = "systemctl hibernate"; + } + ] + else []; }; }; @@ -756,7 +754,6 @@ enable = true; settings = lib.mkForce { - general = { grace = 5; no_fade_in = true; diff --git a/home/system/rofi.nix b/home-manager/system/rofi.nix similarity index 84% rename from home/system/rofi.nix rename to home-manager/system/rofi.nix index 8a3eaaf..18566ee 100644 --- a/home/system/rofi.nix +++ b/home-manager/system/rofi.nix @@ -1,4 +1,8 @@ -{ lib, pkgs, ... }: { +{ + lib, + pkgs, + ... +}: { programs.rofi = { enable = true; package = pkgs.rofi-wayland; diff --git a/home/system/stylix.nix b/home-manager/system/stylix.nix similarity index 74% rename from home/system/stylix.nix rename to home-manager/system/stylix.nix index 81734f4..2a528ad 100644 --- a/home/system/stylix.nix +++ b/home-manager/system/stylix.nix @@ -1,6 +1,9 @@ -{ inputs, pkgs, ... }: { - imports = [ inputs.stylix.homeManagerModules.stylix ]; + inputs, + pkgs, + ... +}: { + imports = [inputs.stylix.homeManagerModules.stylix]; #qt = { # enable = false; @@ -62,17 +65,20 @@ }; monospace = { - package = pkgs.nerd-fonts.droid-sans-mono; + # package = pkgs.nerd-fonts.droid-sans-mono; + package = pkgs.nerdfonts.override { fonts = [ "DroidSansMono" ]; }; name = "DroidSansMono"; }; sansSerif = { - package = pkgs.nerd-fonts.droid-sans-mono; + # package = pkgs.nerd-fonts.droid-sans-mono; + package = pkgs.nerdfonts.override { fonts = [ "DroidSansMono" ]; }; name = "DroidSansMono"; }; serif = { - package = pkgs.nerd-fonts.droid-sans-mono; + # package = pkgs.nerd-fonts.droid-sans-mono; + package = pkgs.nerdfonts.override { fonts = [ "DroidSansMono" ]; }; name = "DroidSansMono"; }; }; diff --git a/home/system/theme.nix b/home-manager/system/theme.nix similarity index 98% rename from home/system/theme.nix rename to home-manager/system/theme.nix index 1436594..700dcee 100644 --- a/home/system/theme.nix +++ b/home-manager/system/theme.nix @@ -3,11 +3,8 @@ pkgs, inputs, ... -}: -let - -in -{ +}: let +in { qt = { enable = true; platformTheme.name = "qtct"; diff --git a/home/system/tofi.nix b/home-manager/system/tofi.nix similarity index 97% rename from home/system/tofi.nix rename to home-manager/system/tofi.nix index 69545be..5c1cf76 100644 --- a/home/system/tofi.nix +++ b/home-manager/system/tofi.nix @@ -2,7 +2,7 @@ programs.tofi = { enable = true; settings = { - # font + # font font-size = 12; # Window Style @@ -30,7 +30,6 @@ prompt-color = "#f38ba8"; selection-color = "#f9e2af"; background-color = "#1a1b26"; - }; }; } diff --git a/home-manager/system/waybar.nix b/home-manager/system/waybar.nix new file mode 100644 index 0000000..5103bdd --- /dev/null +++ b/home-manager/system/waybar.nix @@ -0,0 +1,575 @@ +{pkgs, ...}: { + programs.waybar = { + enable = true; + package = pkgs.waybar.overrideAttrs (oa: {mesonFlags = (oa.mesonFlags or []) ++ ["-Dexperimental=true"];}); + + settings.mainBar = { + layer = "top"; # Waybar at top layer + height = 32; # Waybar height (to be removed for auto height) + spacing = 0; # Gaps between modules (4px) + position = "top"; + margin = "10 20 0"; + # Choose the order of the modules + modules-left = [ + "hyprland/workspaces" + "custom/media" + ]; + modules-center = ["hyprland/window"]; + modules-right = [ + "mpris" + # "idle_inhibitor", + "pulseaudio" + # "network", + "cpu" + "memory" + # "temperature", + "backlight" + # "keyboard-state", + "battery" + "clock" + "tray" + ]; + # Modules configuration + # sway/workspaces = { + # "disable-scroll = true, + # "all-outputs = true, + # "warp-on-scroll = false, + # "format = "{name}: {icon}", + # "format-icons = { + # "1 = "", + # "2 = "", + # "3 = "", + # "4 = "", + # "5 = "", + # "urgent = "", + # "focused = "", + # "default = "" + # } + # }, + "hyprland/workspaces" = { + active-only = false; + format = "{icon}"; + format-icons = { + "1" = "一"; + "2" = "二"; + "3" = "三"; + "4" = "四"; + "5" = "五"; + "6" = "六"; + "7" = "七"; + "8" = "八"; + "9" = "九"; + "10" = "十"; + "11" = "一"; + "12" = "二"; + "13" = "三"; + "14" = "四"; + "15" = "五"; + "16" = "六"; + "17" = "七"; + "18" = "八"; + "19" = "九"; + "20" = "十"; + "21" = "一"; + "22" = "二"; + "23" = "三"; + "24" = "四"; + "25" = "五"; + "26" = "六"; + "27" = "七"; + "28" = "八"; + "29" = "九"; + "30" = "十"; + }; + on-scroll-up = "hyprctl dispatch workspace e+1"; + on-scroll-down = "hyprctl dispatch workspace e-1"; + persistent-workspaces = { + HDMI-A-1 = [1 2 3 4 5 6 7 8 9 10]; + DP-1 = [11 12 13 14 15 16 17 18 19 20]; + DP-2 = [21 22 23 24 25 26 27 28 29 30]; + }; + }; + keyboard-state = { + numlock = false; + capslock = true; + format = "{name} {icon}"; + format-icons = { + locked = ""; + unlocked = ""; + }; + }; + "sway/mode" = { + format = "{}"; + }; + "sway/scratchpad" = { + format = "{icon} {count}"; + show-empty = false; + format-icons = ["" ""]; + tooltip = true; + tooltip-format = "{app}: {title}"; + }; + mpris = { + interval = 1; + format = "{player_icon} {status_icon}"; + format-paused = "{player_icon} {status_icon}"; + tooltip-format = "{player_icon} {dynamic}"; + tooltip-format-paused = "{player_icon} {dynamic}"; + player-icons = { + default = "󰎄"; + mpv = "󰝚"; + vlc = "󰕼"; + spotify = ""; + }; + status-icons = { + playing = ""; + paused = ""; + stopped = ""; + }; + # "ignored-players = ["firefox"] + }; + mpd = { + format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% "; + format-disconnected = "Disconnected "; + format-stopped = "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped "; + unknown-tag = "N/A"; + interval = 2; + consume-icons = { + on = " "; + }; + random-icons = { + off = " "; + on = " "; + }; + repeat-icons = { + on = " "; + }; + single-icons = { + on = "1 "; + }; + state-icons = { + paused = ""; + playing = ""; + }; + tooltip-format = "MPD (connected)"; + tooltip-format-disconnected = "MPD (disconnected)"; + }; + idle_inhibitor = { + format = "{icon}"; + format-icons = { + activated = "󰅶"; + deactivated = "󰾪"; + }; + }; + tray = { + # "icon-size = 21, + spacing = 10; + show-passive-items = true; + }; + clock = { + format = "{:%b %d %I:%M %p}"; + tooltip-format = "{:%d %B %Y}\n{calendar}"; + format-alt = "{:%Y-%m-%d %I:%M %p}"; + }; + cpu = { + format = "{usage}% "; + tooltip = false; + }; + memory = { + format = "{}% "; + }; + temperature = { + # "thermal-zone = 2, + # "hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input", + critical-threshold = 80; + # "format-critical = "{temperatureC}°C {icon}", + format = "{temperatureC}°C {icon}"; + format-icons = ["" "" " "]; + }; + backlight = { + # "device = "acpi_video1", + format = "{percent}% {icon}"; + format-icons = ["" "" "" "" "" "" "" "" ""]; + }; + battery = { + # bat = "BAT0"; + states = { + good = 95; + warning = 30; + critical = 15; + }; + format = "{capacity}% {icon}"; + format-charging = "{capacity}% "; + format-plugged = "{capacity}% "; + format-alt = "{time} {icon}"; + # "format-good = "", # An empty format will hide the module + # "format-full = "", + format-icons = ["" "" "" "" ""]; + interval = 10; + weighted-average = true; + }; + network = { + # "interface = "wlp2*", # (Optional) To force the use of this interface + format-wifi = "{essid} ({signalStrength}%) "; + format-ethernet = "{ipaddr}/{cidr} 󰈀"; + tooltip-format = "{ifname} via {gwaddr} "; + format-linked = "{ifname} (No IP) "; + format-disconnected = "Disconnected ⚠"; + format-alt = "{ifname}: {ipaddr}/{cidr}"; + on-click-right = "kitty nmtui"; + }; + pulseaudio = { + # "scroll-step = 1, # %, can be a float + format = "{volume}% {icon} {format_source}"; + format-bluetooth = "{volume}% {icon} {format_source}"; + format-bluetooth-muted = "󰝟 {icon} {format_source}"; + format-muted = "󰝟 {format_source}"; + format-source = " {volume}% "; + format-source-muted = " "; + format-icons = { + headphone = "󰋋"; + hands-free = "󰟅"; + headset = "󰋎"; + phone = ""; + portable = ""; + car = ""; + default = ["" "" ""]; + }; + on-click = "pavucontrol"; + }; + "custom/media" = { + format = "{icon} {}"; + return-type = "json"; + max-length = 40; + format-icons = { + spotify = ""; + default = "🎜"; + }; + escape = true; + exec = "$HOME/.config/waybar/mediaplayer.py 2> /dev/null"; # Script in resources folder + # exec = "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" # Filter player based on name + }; + "custom/archicon" = { + format = "󰣇"; + # "on-click":"nwg-menu -d -fm nemo -cmd-lock gtklock -va top", + on-click = "jgmenu_run"; + tooltip = false; + }; + }; + + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # CSS Styling + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + style = '' + /* + * Variant: Rosé Pine + * Maintainer: DankChoir + */ + + @define-color base #191724; + @define-color surface #1f1d2e; + @define-color overlay #26233a; + + @define-color muted #6e6a86; + @define-color subtle #908caa; + @define-color text #e0def4; + + @define-color love #eb6f92; + @define-color gold #f6c177; + @define-color rose #ebbcba; + @define-color pine #31748f; + @define-color foam #9ccfd8; + @define-color iris #c4a7e7; + + @define-color highlightLow #21202e; + @define-color highlightMed #403d52; + @define-color highlightHigh #524f67; + + * { + font-family: "JetBrainsMono Nerd Font", FontAwesome, Roboto, Helvetica, + Arial, sans-serif; + font-size: 16px; + } + + window#waybar { + background-color: @surface; + color: @text; + transition-property: background-color; + transition-duration: 0.5s; + border-radius: 10px; + } + + window#waybar.hidden { + opacity: 0.2; + } + + /* + window#waybar.empty { + background-color: transparent; + } + window#waybar.solo { + background-color: #FFFFFF; + } + */ + + /*window#waybar.termite { + background-color: #3F3F3F; + } + window#waybar.chromium { + background-color: #000000; + border: none; + }*/ + + #workspaces button { + box-shadow: inset 0 -3px transparent; + padding: 0 8px; + background-color: @base; + color: @text; + border: none; + border-radius: 0; + font-weight: 800; + } + + #workspaces button:first-child { + border-radius: 10px 0 0 10px; + } + + #workspaces button:last-child { + border-radius: 0 10px 10px 0; + } + + /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ + #workspaces button:hover { + background: rgba(0, 0, 0, 0.2); + background-color: @overlay; + /* box-shadow: inset 0 -100px 0 -97px @bright-yellow; */ + } + + #workspaces button.empty { + color: @muted; + box-shadow: inherit; + text-shadow: inherit; + } + + #workspaces button.active { + color: @gold; + box-shadow: inset 0 -100px 0 -97px @bright-yellow; + text-shadow: inherit; + } + + #workspaces button.focused { + background-color: @overlay; + color: @text; + /* box-shadow: inset 0 -100px 0 -97px @bright-yellow; */ + } + + #workspaces button.urgent { + background-color: @love; + color: @base; + } + + #mode { + background-color: @overlay; + border-bottom: 3px solid @gold; + } + + #cava, + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #network, + #pulseaudio, + #pulseaudio.muted, + #pulseaudio.bluetooth, + #wireplumber, + #custom-media, + #tray, + #mpris, + #keyboard-state, + #mode, + #battery, + #idle_inhibitor, + #scratchpad, + #mpd { + padding: 0 10px; + color: @text; + } + + #window, + #workspaces { + margin: 0 4px; + padding-top: 0px; + } + + .modules-right { + background-color: @overlay; + border-radius: 10px; + } + + /* If workspaces is the leftmost module, omit left margin */ + .modules-left > widget:first-child > #workspaces { + margin-left: 0; + } + + /* If workspaces is the rightmost module, omit right margin */ + .modules-right > widget:last-child > #workspaces { + margin-right: 0; + } + + #mpris { + color: @gold; + } + + #clock { + color: @gold; + } + + #battery { + color: @foam; + } + + #battery.charging, + #battery.plugged { + color: #d3869b; + } + + @keyframes blink { + to { + background-color: #fbf1c7; + color: #df3f71; + } + } + + #battery.critical:not(.charging) { + background-color: #282828; + color: #d3869b; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; + } + + label:focus { + background-color: #000000; + } + + #backlight { + color: #458588; + } + + #temperature { + color: #fabd2f; + } + + #temperature.critical { + background-color: #fbf1c7; + color: #b57614; + } + + #cpu { + color: @foam; + } + + #memory { + color: @iris; + } + + #network { + color: @foam; + } + + #network.disconnected { + background-color: @love; + color: @base; + } + + /*#disk { + background-color: #964B00; + }*/ + + #pulseaudio, + #pulseaudio.muted, + #pulseaudio.bluetooth { + color: @pine; + } + + #tray { + } + + #tray > .needs-attention { + background-color: @love; + color: @base; + } + + #idle_inhibitor { + background-color: #282828; + color: #ebdbb2; + } + + #idle_inhibitor.activated { + background-color: #fbf1c7; + color: #3c3836; + } + + #custom-media { + background-color: #66cc99; + color: #2a5c45; + min-width: 100px; + } + + #custom-media.custom-spotify { + background-color: #66cc99; + } + + #custom-media.custom-vlc { + background-color: #ffa000; + } + + #mpd { + background-color: #66cc99; + color: #2a5c45; + } + + #mpd.disconnected { + background-color: #f53c3c; + } + + #mpd.stopped { + background-color: #90b1b1; + } + + #mpd.paused { + background-color: #51a37a; + } + + #language { + background: #00b093; + color: #740864; + padding: 0 5px; + margin: 0 5px; + min-width: 16px; + } + + #keyboard-state { + background: #97e1ad; + color: #000000; + padding: 0 0px; + margin: 0 5px; + min-width: 16px; + } + + #keyboard-state > label { + padding: 0 5px; + } + + #keyboard-state > label.locked { + background: rgba(0, 0, 0, 0.2); + } + + ''; + }; +} diff --git a/home/system/wlsunset.nix b/home-manager/system/wlsunset.nix similarity index 100% rename from home/system/wlsunset.nix rename to home-manager/system/wlsunset.nix diff --git a/home/system/wofi.nix b/home-manager/system/wofi.nix similarity index 100% rename from home/system/wofi.nix rename to home-manager/system/wofi.nix diff --git a/home/wallpapers/blockwavemoon.png b/home-manager/wallpapers/blockwavemoon.png similarity index 100% rename from home/wallpapers/blockwavemoon.png rename to home-manager/wallpapers/blockwavemoon.png diff --git a/home/wallpapers/rose_pine_contourline.png b/home-manager/wallpapers/rose_pine_contourline.png similarity index 100% rename from home/wallpapers/rose_pine_contourline.png rename to home-manager/wallpapers/rose_pine_contourline.png diff --git a/home/home.nix b/home/home.nix deleted file mode 100644 index 4d3e340..0000000 --- a/home/home.nix +++ /dev/null @@ -1,76 +0,0 @@ -{ hostname, ... }: -{ - imports = - if hostname == "zion" then - [ - ./programs/btop.nix - ./programs/fastfetch.nix - # ./programs/foot.nix - ./programs/git.nix - ./programs/gpg.nix - ./programs/helix.nix - ./programs/kitty.nix - ./programs/neovide.nix - ./programs/neovim.nix - ./programs/packages.nix - ./programs/shell.nix - ./programs/tmux.nix - ./programs/vscodium.nix - - ./dwm - # ./programs/yazi.nix - # ./programs/zathura.nix - - # ./configs/keys.nix - - ./system/dunst.nix - ./system/hypr.nix - ./system/hyprland.nix - ./system/rofi.nix - ./system/stylix.nix - ./system/theme.nix - ./system/waybar.nix - ./system/wlsunset.nix - ./system/wofi.nix - ] - else if hostname == "thor" then - [ - ./programs/btop.nix - ./programs/fastfetch.nix - # ./programs/foot.nix - ./programs/git.nix - ./programs/gpg.nix - ./programs/helix.nix - ./programs/kitty.nix - ./programs/neovide.nix - ./programs/neovim.nix - ./programs/packages.nix - ./programs/shell.nix - ./programs/tmux.nix - ./programs/vscodium.nix - # ./programs/yazi.nix - # ./programs/zathura.nix - - # ./configs/keys.nix - - ./system/dunst.nix - ./system/hyprland.nix - ./system/rofi.nix - ./system/stylix.nix - ./system/theme.nix - ./system/waybar.nix - ./system/wlsunset.nix - ./system/wofi.nix - ] - else if hostname == "server" then - [ - ./programs/git.nix - ./programs/btop.nix - ./programs/yazi.nix - ./programs/shell.nix - ./programs/helix.nix - ./programs/fastfetch.nix - ] - else - [ ]; -} diff --git a/home/system/waybar.nix b/home/system/waybar.nix deleted file mode 100644 index 55e508c..0000000 --- a/home/system/waybar.nix +++ /dev/null @@ -1,576 +0,0 @@ -{ pkgs, ... }: -{ - programs.waybar = { - enable = true; - package = pkgs.waybar.overrideAttrs (oa: { mesonFlags = (oa.mesonFlags or [ ]) ++ [ "-Dexperimental=true" ]; }); - - settings.mainBar = { - layer = "top"; # Waybar at top layer - height = 32; # Waybar height (to be removed for auto height) - spacing = 0; # Gaps between modules (4px) - position = "top"; - margin = "10 20 0"; - # Choose the order of the modules - modules-left = [ - "hyprland/workspaces" - "custom/media" - ]; - modules-center = ["hyprland/window"]; - modules-right = [ - "mpris" - # "idle_inhibitor", - "pulseaudio" - # "network", - "cpu" - "memory" - # "temperature", - "backlight" - # "keyboard-state", - "battery" - "clock" - "tray" - ]; - # Modules configuration - # sway/workspaces = { - # "disable-scroll = true, - # "all-outputs = true, - # "warp-on-scroll = false, - # "format = "{name}: {icon}", - # "format-icons = { - # "1 = "", - # "2 = "", - # "3 = "", - # "4 = "", - # "5 = "", - # "urgent = "", - # "focused = "", - # "default = "" - # } - # }, - "hyprland/workspaces" = { - active-only = false; - format = "{icon}"; - format-icons = { - "1" = "一"; - "2" = "二"; - "3" = "三"; - "4" = "四"; - "5" = "五"; - "6" = "六"; - "7" = "七"; - "8" = "八"; - "9" = "九"; - "10" = "十"; - "11" = "一"; - "12" = "二"; - "13" = "三"; - "14" = "四"; - "15" = "五"; - "16" = "六"; - "17" = "七"; - "18" = "八"; - "19" = "九"; - "20" = "十"; - "21" = "一"; - "22" = "二"; - "23" = "三"; - "24" = "四"; - "25" = "五"; - "26" = "六"; - "27" = "七"; - "28" = "八"; - "29" = "九"; - "30" = "十"; - }; - on-scroll-up = "hyprctl dispatch workspace e+1"; - on-scroll-down = "hyprctl dispatch workspace e-1"; - persistent-workspaces = { - HDMI-A-1 = [1 2 3 4 5 6 7 8 9 10]; - DP-1 = [11 12 13 14 15 16 17 18 19 20]; - DP-2 = [21 22 23 24 25 26 27 28 29 30]; - }; - }; - keyboard-state = { - numlock = false; - capslock = true; - format = "{name} {icon}"; - format-icons = { - locked = ""; - unlocked = ""; - }; - }; - "sway/mode" = { - format = "{}"; - }; - "sway/scratchpad" = { - format = "{icon} {count}"; - show-empty = false; - format-icons = ["" ""]; - tooltip = true; - tooltip-format = "{app}: {title}"; - }; - mpris = { - interval = 1; - format = "{player_icon} {status_icon}"; - format-paused = "{player_icon} {status_icon}"; - tooltip-format = "{player_icon} {dynamic}"; - tooltip-format-paused = "{player_icon} {dynamic}"; - player-icons = { - default = "󰎄"; - mpv = "󰝚"; - vlc = "󰕼"; - spotify = ""; - }; - status-icons = { - playing = ""; - paused = ""; - stopped = ""; - }; - # "ignored-players = ["firefox"] - }; - mpd = { - format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% "; - format-disconnected = "Disconnected "; - format-stopped = "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped "; - unknown-tag = "N/A"; - interval = 2; - consume-icons = { - on = " "; - }; - random-icons = { - off = " "; - on = " "; - }; - repeat-icons = { - on = " "; - }; - single-icons = { - on = "1 "; - }; - state-icons = { - paused = ""; - playing = ""; - }; - tooltip-format = "MPD (connected)"; - tooltip-format-disconnected = "MPD (disconnected)"; - }; - idle_inhibitor = { - format = "{icon}"; - format-icons = { - activated = "󰅶"; - deactivated = "󰾪"; - }; - }; - tray = { - # "icon-size = 21, - spacing = 10; - show-passive-items = true; - }; - clock = { - format = "{:%b %d %I:%M %p}"; - tooltip-format = "{:%d %B %Y}\n{calendar}"; - format-alt = "{:%Y-%m-%d %I:%M %p}"; - }; - cpu = { - format = "{usage}% "; - tooltip = false; - }; - memory = { - format = "{}% "; - }; - temperature = { - # "thermal-zone = 2, - # "hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input", - critical-threshold = 80; - # "format-critical = "{temperatureC}°C {icon}", - format = "{temperatureC}°C {icon}"; - format-icons = ["" "" " "]; - }; - backlight = { - # "device = "acpi_video1", - format = "{percent}% {icon}"; - format-icons = ["" "" "" "" "" "" "" "" ""]; - }; - battery = { - # bat = "BAT0"; - states = { - good = 95; - warning = 30; - critical = 15; - }; - format = "{capacity}% {icon}"; - format-charging = "{capacity}% "; - format-plugged = "{capacity}% "; - format-alt = "{time} {icon}"; - # "format-good = "", # An empty format will hide the module - # "format-full = "", - format-icons = ["" "" "" "" ""]; - interval = 10; - weighted-average = true; - }; - network = { - # "interface = "wlp2*", # (Optional) To force the use of this interface - format-wifi = "{essid} ({signalStrength}%) "; - format-ethernet = "{ipaddr}/{cidr} 󰈀"; - tooltip-format = "{ifname} via {gwaddr} "; - format-linked = "{ifname} (No IP) "; - format-disconnected = "Disconnected ⚠"; - format-alt = "{ifname}: {ipaddr}/{cidr}"; - on-click-right = "kitty nmtui"; - }; - pulseaudio = { - # "scroll-step = 1, # %, can be a float - format = "{volume}% {icon} {format_source}"; - format-bluetooth = "{volume}% {icon} {format_source}"; - format-bluetooth-muted = "󰝟 {icon} {format_source}"; - format-muted = "󰝟 {format_source}"; - format-source = " {volume}% "; - format-source-muted = " "; - format-icons = { - headphone = "󰋋"; - hands-free = "󰟅"; - headset = "󰋎"; - phone = ""; - portable = ""; - car = ""; - default = ["" "" ""]; - }; - on-click = "pavucontrol"; - }; - "custom/media" = { - format = "{icon} {}"; - return-type = "json"; - max-length = 40; - format-icons = { - spotify = ""; - default = "🎜"; - }; - escape = true; - exec = "$HOME/.config/waybar/mediaplayer.py 2> /dev/null"; # Script in resources folder - # exec = "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" # Filter player based on name - }; - "custom/archicon" = { - format = "󰣇"; - # "on-click":"nwg-menu -d -fm nemo -cmd-lock gtklock -va top", - on-click = "jgmenu_run"; - tooltip = false; - }; - }; - - # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - # CSS Styling - # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - style = '' - /* - * Variant: Rosé Pine - * Maintainer: DankChoir - */ - - @define-color base #191724; - @define-color surface #1f1d2e; - @define-color overlay #26233a; - - @define-color muted #6e6a86; - @define-color subtle #908caa; - @define-color text #e0def4; - - @define-color love #eb6f92; - @define-color gold #f6c177; - @define-color rose #ebbcba; - @define-color pine #31748f; - @define-color foam #9ccfd8; - @define-color iris #c4a7e7; - - @define-color highlightLow #21202e; - @define-color highlightMed #403d52; - @define-color highlightHigh #524f67; - - * { - font-family: "JetBrainsMono Nerd Font", FontAwesome, Roboto, Helvetica, - Arial, sans-serif; - font-size: 16px; - } - - window#waybar { - background-color: @surface; - color: @text; - transition-property: background-color; - transition-duration: 0.5s; - border-radius: 10px; - } - - window#waybar.hidden { - opacity: 0.2; - } - - /* - window#waybar.empty { - background-color: transparent; - } - window#waybar.solo { - background-color: #FFFFFF; - } - */ - - /*window#waybar.termite { - background-color: #3F3F3F; - } - window#waybar.chromium { - background-color: #000000; - border: none; - }*/ - - #workspaces button { - box-shadow: inset 0 -3px transparent; - padding: 0 8px; - background-color: @base; - color: @text; - border: none; - border-radius: 0; - font-weight: 800; - } - - #workspaces button:first-child { - border-radius: 10px 0 0 10px; - } - - #workspaces button:last-child { - border-radius: 0 10px 10px 0; - } - - /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ - #workspaces button:hover { - background: rgba(0, 0, 0, 0.2); - background-color: @overlay; - /* box-shadow: inset 0 -100px 0 -97px @bright-yellow; */ - } - - #workspaces button.empty { - color: @muted; - box-shadow: inherit; - text-shadow: inherit; - } - - #workspaces button.active { - color: @gold; - box-shadow: inset 0 -100px 0 -97px @bright-yellow; - text-shadow: inherit; - } - - #workspaces button.focused { - background-color: @overlay; - color: @text; - /* box-shadow: inset 0 -100px 0 -97px @bright-yellow; */ - } - - #workspaces button.urgent { - background-color: @love; - color: @base; - } - - #mode { - background-color: @overlay; - border-bottom: 3px solid @gold; - } - - #cava, - #clock, - #battery, - #cpu, - #memory, - #disk, - #temperature, - #backlight, - #network, - #pulseaudio, - #pulseaudio.muted, - #pulseaudio.bluetooth, - #wireplumber, - #custom-media, - #tray, - #mpris, - #keyboard-state, - #mode, - #battery, - #idle_inhibitor, - #scratchpad, - #mpd { - padding: 0 10px; - color: @text; - } - - #window, - #workspaces { - margin: 0 4px; - padding-top: 0px; - } - - .modules-right { - background-color: @overlay; - border-radius: 10px; - } - - /* If workspaces is the leftmost module, omit left margin */ - .modules-left > widget:first-child > #workspaces { - margin-left: 0; - } - - /* If workspaces is the rightmost module, omit right margin */ - .modules-right > widget:last-child > #workspaces { - margin-right: 0; - } - - #mpris { - color: @gold; - } - - #clock { - color: @gold; - } - - #battery { - color: @foam; - } - - #battery.charging, - #battery.plugged { - color: #d3869b; - } - - @keyframes blink { - to { - background-color: #fbf1c7; - color: #df3f71; - } - } - - #battery.critical:not(.charging) { - background-color: #282828; - color: #d3869b; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; - } - - label:focus { - background-color: #000000; - } - - #backlight { - color: #458588; - } - - #temperature { - color: #fabd2f; - } - - #temperature.critical { - background-color: #fbf1c7; - color: #b57614; - } - - #cpu { - color: @foam; - } - - #memory { - color: @iris; - } - - #network { - color: @foam; - } - - #network.disconnected { - background-color: @love; - color: @base; - } - - /*#disk { - background-color: #964B00; - }*/ - - #pulseaudio, - #pulseaudio.muted, - #pulseaudio.bluetooth { - color: @pine; - } - - #tray { - } - - #tray > .needs-attention { - background-color: @love; - color: @base; - } - - #idle_inhibitor { - background-color: #282828; - color: #ebdbb2; - } - - #idle_inhibitor.activated { - background-color: #fbf1c7; - color: #3c3836; - } - - #custom-media { - background-color: #66cc99; - color: #2a5c45; - min-width: 100px; - } - - #custom-media.custom-spotify { - background-color: #66cc99; - } - - #custom-media.custom-vlc { - background-color: #ffa000; - } - - #mpd { - background-color: #66cc99; - color: #2a5c45; - } - - #mpd.disconnected { - background-color: #f53c3c; - } - - #mpd.stopped { - background-color: #90b1b1; - } - - #mpd.paused { - background-color: #51a37a; - } - - #language { - background: #00b093; - color: #740864; - padding: 0 5px; - margin: 0 5px; - min-width: 16px; - } - - #keyboard-state { - background: #97e1ad; - color: #000000; - padding: 0 0px; - margin: 0 5px; - min-width: 16px; - } - - #keyboard-state > label { - padding: 0 5px; - } - - #keyboard-state > label.locked { - background: rgba(0, 0, 0, 0.2); - } - - ''; - }; -} diff --git a/hosts/default.nix b/hosts/default.nix index cb11a98..6ccb48d 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,84 +1,82 @@ -{ hostname, ... }: -{ +{hostname, ...}: { imports = - if hostname == "zion" then - [ - ./zion.nix + if hostname == "zion" + then [ + ./zion.nix - ./modules/adb.nix - ./modules/ananicy.nix - # ./modules/bluetooth.nix - ./modules/boot.nix - ./modules/configuration.nix - ./modules/development.nix - ./modules/fstrim.nix - ./modules/gaming.nix - # ./modules/greetd.nix - ./modules/gsettings.nix - # ./modules/kde.nix - # ./modules/lanzaboot.nix - ./modules/network.nix - ./modules/nh.nix - ./modules/nvidia.nix - ./modules/ollama.nix - ./modules/packages.nix - ./modules/pipewire.nix - ./modules/printing.nix - ./modules/remote-builder.nix - ./modules/security.nix - ./modules/ssh.nix - ./modules/steam.nix - ./modules/users.nix - ./modules/vm.nix - ./modules/xserver.nix - ] - else if hostname == "thor" then - [ - ./thor.nix + ./modules/adb.nix + ./modules/ananicy.nix + # ./modules/bluetooth.nix + ./modules/boot.nix + ./modules/configuration.nix + ./modules/development.nix + ./modules/fstrim.nix + ./modules/gaming.nix + # ./modules/greetd.nix + ./modules/gsettings.nix + # ./modules/kde.nix + # ./modules/lanzaboot.nix + ./modules/network.nix + ./modules/nh.nix + ./modules/nvidia.nix + ./modules/ollama.nix + ./modules/packages.nix + ./modules/pipewire.nix + ./modules/printing.nix + ./modules/remote-builder.nix + ./modules/security.nix + ./modules/ssh.nix + ./modules/steam.nix + ./modules/users.nix + ./modules/vm.nix + ./modules/xserver.nix + ] + else if hostname == "thor" + then [ + ./thor.nix - ./modules/adb.nix - ./modules/ananicy.nix - ./modules/bluetooth.nix - ./modules/boot.nix - ./modules/configuration.nix - ./modules/development.nix - ./modules/distributed-builds.nix - ./modules/fstrim.nix - ./modules/gaming.nix - ./modules/greetd.nix - ./modules/gsettings.nix - # ./modules/kde.nix - # ./modules/lanzaboot.nix - ./modules/network.nix - ./modules/nh.nix - # ./modules/nvidia.nix - ./modules/ollama.nix - ./modules/packages.nix - ./modules/pipewire.nix - ./modules/printing.nix - ./modules/security.nix - ./modules/ssh.nix - ./modules/tlp.nix - ./modules/users.nix - ./modules/vm.nix - ] - else if hostname == "server" then - [ - ./server.nix + ./modules/adb.nix + ./modules/ananicy.nix + ./modules/bluetooth.nix + ./modules/boot.nix + ./modules/configuration.nix + ./modules/development.nix + ./modules/distributed-builds.nix + ./modules/fstrim.nix + ./modules/gaming.nix + ./modules/greetd.nix + ./modules/gsettings.nix + # ./modules/kde.nix + # ./modules/lanzaboot.nix + ./modules/network.nix + ./modules/nh.nix + # ./modules/nvidia.nix + ./modules/ollama.nix + ./modules/packages.nix + ./modules/pipewire.nix + ./modules/printing.nix + ./modules/security.nix + ./modules/ssh.nix + ./modules/tlp.nix + ./modules/users.nix + ./modules/vm.nix + ] + else if hostname == "server" + then [ + ./server.nix - ./modules/nh.nix - ./modules/tlp.nix - ./modules/ssh.nix - ./modules/boot.nix - ./modules/users.nix - ./modules/nvidia.nix - ./modules/ollama.nix - ./modules/fstrim.nix - ./modules/system.nix - ./modules/network.nix - ./modules/configuration.nix - #./modules/lanzaboot.nix - ] - else - [ ]; + ./modules/nh.nix + ./modules/tlp.nix + ./modules/ssh.nix + ./modules/boot.nix + ./modules/users.nix + ./modules/nvidia.nix + ./modules/ollama.nix + ./modules/fstrim.nix + ./modules/system.nix + ./modules/network.nix + ./modules/configuration.nix + #./modules/lanzaboot.nix + ] + else []; } diff --git a/hosts/modules/adb.nix b/hosts/modules/adb.nix index 5f9468f..5d47d99 100644 --- a/hosts/modules/adb.nix +++ b/hosts/modules/adb.nix @@ -1,9 +1,8 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { programs.adb.enable = true; environment.systemPackages = [ pkgs.android-tools pkgs.universal-android-debloater ]; - users.users.mike.extraGroups = [ "adbusers" ]; + users.users.mike.extraGroups = ["adbusers"]; } diff --git a/hosts/modules/ananicy.nix b/hosts/modules/ananicy.nix index 650fe29..bdfaac2 100644 --- a/hosts/modules/ananicy.nix +++ b/hosts/modules/ananicy.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { services.ananicy = { enable = true; package = pkgs.ananicy-cpp; diff --git a/hosts/modules/boot.nix b/hosts/modules/boot.nix index 0762caf..773f381 100644 --- a/hosts/modules/boot.nix +++ b/hosts/modules/boot.nix @@ -1,6 +1,13 @@ -{ pkgs, hostname, inputs, ... }: { - imports = if hostname == "zion" then [ inputs.chaotic.nixosModules.default ] else [ ]; + pkgs, + hostname, + inputs, + ... +}: { + imports = + if hostname == "zion" + then [inputs.chaotic.nixosModules.default] + else []; boot = { tmp.cleanOnBoot = true; @@ -16,9 +23,12 @@ }; kernelPackages = - if hostname == "zion" then pkgs.linuxPackages_cachyos #linuxPackages_zen #linuxPackages #linuxPackages_latest #linuxPackages_xanmod_latest - else if hostname == "thor" then pkgs.linuxPackages - else if hostname == "server" then pkgs.linuxPackages + if hostname == "zion" + then pkgs.linuxPackages_zen #linuxPackages_zen #linuxPackages #linuxPackages_latest #linuxPackages_xanmod_latest + else if hostname == "thor" + then pkgs.linuxPackages + else if hostname == "server" + then pkgs.linuxPackages else pkgs.linuxPackages_zen; }; } diff --git a/hosts/modules/configuration.nix b/hosts/modules/configuration.nix index def1f3d..c147768 100644 --- a/hosts/modules/configuration.nix +++ b/hosts/modules/configuration.nix @@ -1,5 +1,9 @@ -{ hostname, inputs, pkgs, ... }: { + hostname, + inputs, + pkgs, + ... +}: { time.timeZone = "Europe/Warsaw"; i18n.defaultLocale = "en_US.UTF-8"; @@ -37,9 +41,9 @@ }; environment = { - sessionVariables.NIXOS_OZONE_WL = "1"; + # sessionVariables.NIXOS_OZONE_WL = "1"; - shells = with pkgs; [ bash zsh ]; + shells = with pkgs; [bash zsh]; }; system = { @@ -48,6 +52,9 @@ enable = false; enableNg = true; }; + autoUpgrade = { + enable = true; + }; }; nixpkgs = { @@ -69,16 +76,16 @@ nix = { daemonCPUSchedPolicy = "batch"; channel.enable = false; - nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; + nixPath = ["nixpkgs=${inputs.nixpkgs}"]; optimise = { automatic = true; - dates = [ "daily" ]; + dates = ["daily"]; }; settings = { auto-optimise-store = true; - experimental-features = [ "nix-command" "flakes" ]; + experimental-features = ["nix-command" "flakes"]; substituters = [ "https://cache.nixos.org" diff --git a/hosts/modules/development.nix b/hosts/modules/development.nix index 6ce294f..a2f72c7 100644 --- a/hosts/modules/development.nix +++ b/hosts/modules/development.nix @@ -1,5 +1,9 @@ -{ inputs, pkgs, rust-overlay, ... }: { + inputs, + pkgs, + rust-overlay, + ... +}: { environment.systemPackages = with pkgs; [ # general docker diff --git a/hosts/modules/distributed-builds.nix b/hosts/modules/distributed-builds.nix index b040abc..0dd06f4 100644 --- a/hosts/modules/distributed-builds.nix +++ b/hosts/modules/distributed-builds.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { nix.distributedBuilds = true; nix.settings.builders-use-substitutes = true; @@ -9,7 +8,7 @@ sshUser = "remotebuild"; sshKey = "/root/.ssh/remotebuild"; system = "x86_64-linux"; - supportedFeatures = [ "nixos-test" "big-parallel" "kvm" ]; + supportedFeatures = ["nixos-test" "big-parallel" "kvm"]; } ]; } diff --git a/hosts/modules/gaming.nix b/hosts/modules/gaming.nix index 9d9f6a6..ad6f0e2 100755 --- a/hosts/modules/gaming.nix +++ b/hosts/modules/gaming.nix @@ -1,19 +1,22 @@ -{ pkgs, username, ... }: { - users.users.${username}.packages = with pkgs; [ heroic ]; + pkgs, + username, + ... +}: { + users.users.${username}.packages = with pkgs; [heroic]; hardware.steam-hardware.enable = true; programs = { steam = { enable = true; gamescopeSession.enable = true; - extraCompatPackages = with pkgs; [ proton-ge-bin ]; + extraCompatPackages = with pkgs; [proton-ge-bin]; }; gamemode = { enable = true; enableRenice = true; - settings = { }; + settings = {}; }; gamescope = { diff --git a/hosts/modules/greetd.nix b/hosts/modules/greetd.nix index bfba4fb..473fddb 100644 --- a/hosts/modules/greetd.nix +++ b/hosts/modules/greetd.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { services.greetd = { enable = true; settings = { diff --git a/hosts/modules/lanzaboot.nix b/hosts/modules/lanzaboot.nix index 9220fe1..2e3876e 100644 --- a/hosts/modules/lanzaboot.nix +++ b/hosts/modules/lanzaboot.nix @@ -1,8 +1,12 @@ -{ lib, pkgs, inputs, ... }: { - imports = [ inputs.lanzaboote.nixosModules.lanzaboote ]; + lib, + pkgs, + inputs, + ... +}: { + imports = [inputs.lanzaboote.nixosModules.lanzaboote]; - environment.systemPackages = [ pkgs.sbctl ]; + environment.systemPackages = [pkgs.sbctl]; boot = { loader.systemd-boot.enable = lib.mkForce false; diff --git a/hosts/modules/network.nix b/hosts/modules/network.nix index 15bc5dd..49f0ef7 100644 --- a/hosts/modules/network.nix +++ b/hosts/modules/network.nix @@ -1,5 +1,4 @@ -{ hostname, ... }: -{ +{hostname, ...}: { boot.initrd.systemd.network.wait-online.enable = false; systemd.services.NetworkManager-wait-online.enable = false; @@ -9,7 +8,7 @@ stevenblack = { enable = true; - block = [ "fakenews" "gambling" "porn" ]; + block = ["fakenews" "gambling" "porn"]; }; wireless = { diff --git a/hosts/modules/nh.nix b/hosts/modules/nh.nix index 9c53284..b86b857 100644 --- a/hosts/modules/nh.nix +++ b/hosts/modules/nh.nix @@ -1,5 +1,4 @@ -{ username, ... }: -{ +{username, ...}: { programs.nh = { enable = true; flake = "/home/${username}/.files"; diff --git a/hosts/modules/nvidia.nix b/hosts/modules/nvidia.nix index 0f64796..c093f12 100755 --- a/hosts/modules/nvidia.nix +++ b/hosts/modules/nvidia.nix @@ -1,11 +1,14 @@ -{ config, pkgs, ... }: { + config, + pkgs, + ... +}: { nixpkgs.config.nvidia.acceptLicense = true; - services.xserver.videoDrivers = [ "nvidia" ]; + services.xserver.videoDrivers = ["nvidia"]; boot = { - kernelModules = [ "nvidia-uvm" ]; - kernelParams = [ "nvidia-drm.fbdev=1" ]; + kernelModules = ["nvidia-uvm"]; + kernelParams = ["nvidia-drm.fbdev=1"]; }; hardware = { @@ -14,7 +17,7 @@ enable32Bit = true; extraPackages = with pkgs; [ egl-wayland - vaapiVdpau + vaapiVdpau libvdpau-va-gl nvidia-vaapi-driver ]; @@ -25,9 +28,9 @@ open = false; nvidiaSettings = true; - + modesetting.enable = true; - + powerManagement = { enable = false; finegrained = false; diff --git a/hosts/modules/packages.nix b/hosts/modules/packages.nix index 9a166c0..5319f25 100644 --- a/hosts/modules/packages.nix +++ b/hosts/modules/packages.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { environment.systemPackages = with pkgs; [ vim ntfs3g @@ -33,74 +32,85 @@ programs.zsh.enable = true; + # fonts.packages = with pkgs; [ + # nerd-fonts.zed-mono + # # nerd-fonts.victor-mono + # # nerd-fonts.ubuntu-sans + # # nerd-fonts.ubuntu-mono + # nerd-fonts.ubuntu + # # nerd-fonts.tinos + # # nerd-fonts.terminess-ttf + # nerd-fonts.symbols-only + # # nerd-fonts.space-mono + # # nerd-fonts.shure-tech-mono + # nerd-fonts.sauce-code-pro + # nerd-fonts.roboto-mono + # # nerd-fonts.recursive-mono + # # nerd-fonts.proggy-clean-tt + # # nerd-fonts.profont + # # nerd-fonts.overpass + # nerd-fonts.open-dyslexic + # nerd-fonts.noto + # # nerd-fonts.mplus + # # nerd-fonts.mononoki + # # nerd-fonts.monoid + # # nerd-fonts.monofur + # # nerd-fonts.monaspace + # # nerd-fonts.meslo-lg + # # nerd-fonts.martian-mono + # # nerd-fonts.lilex + # nerd-fonts.liberation + # # nerd-fonts.lekton + # nerd-fonts.jetbrains-mono + # # nerd-fonts.iosevka-term-slab + # # nerd-fonts.iosevka-term + # nerd-fonts.iosevka + # # nerd-fonts.intone-mono + # # nerd-fonts.inconsolata-lgc + # # nerd-fonts.inconsolata-go + # nerd-fonts.inconsolata + # # nerd-fonts.im-writing + # # nerd-fonts.hurmit + # # nerd-fonts.heavy-data + # # nerd-fonts.hasklug + # nerd-fonts.hack + # nerd-fonts.gohufont + # # nerd-fonts.go-mono + # # nerd-fonts.geist-mono + # nerd-fonts.fira-mono + # nerd-fonts.fira-code + # # nerd-fonts.fantasque-sans-mono + # # nerd-fonts.envy-code-r + # nerd-fonts.droid-sans-mono + # # nerd-fonts.departure-mono + # nerd-fonts.dejavu-sans-mono + # # nerd-fonts.daddy-time-mono + # # nerd-fonts.d2coding + # # nerd-fonts.cousine + # # nerd-fonts.commit-mono + # nerd-fonts.comic-shanns-mono + # nerd-fonts.code-new-roman + # nerd-fonts.caskaydia-cove + # # nerd-fonts.blex-mono + # # nerd-fonts.bitstream-vera-sans-mono + # # nerd-fonts.bigblue-terminal + # # nerd-fonts.aurulent-sans-mono + # # nerd-fonts.arimo + # # nerd-fonts.anonymice + # # nerd-fonts.agave + # nerd-fonts._3270 + # nerd-fonts._0xproto + # noto-fonts + # noto-fonts-cjk-sans + # noto-fonts-emoji + # font-awesome + # source-han-sans + # source-han-sans-japanese + # source-han-serif-japanese + # ]; + fonts.packages = with pkgs; [ - nerd-fonts.zed-mono - # nerd-fonts.victor-mono - # nerd-fonts.ubuntu-sans - # nerd-fonts.ubuntu-mono - nerd-fonts.ubuntu - # nerd-fonts.tinos - # nerd-fonts.terminess-ttf - nerd-fonts.symbols-only - # nerd-fonts.space-mono - # nerd-fonts.shure-tech-mono - nerd-fonts.sauce-code-pro - nerd-fonts.roboto-mono - # nerd-fonts.recursive-mono - # nerd-fonts.proggy-clean-tt - # nerd-fonts.profont - # nerd-fonts.overpass - nerd-fonts.open-dyslexic - nerd-fonts.noto - # nerd-fonts.mplus - # nerd-fonts.mononoki - # nerd-fonts.monoid - # nerd-fonts.monofur - # nerd-fonts.monaspace - # nerd-fonts.meslo-lg - # nerd-fonts.martian-mono - # nerd-fonts.lilex - nerd-fonts.liberation - # nerd-fonts.lekton - nerd-fonts.jetbrains-mono - # nerd-fonts.iosevka-term-slab - # nerd-fonts.iosevka-term - nerd-fonts.iosevka - # nerd-fonts.intone-mono - # nerd-fonts.inconsolata-lgc - # nerd-fonts.inconsolata-go - nerd-fonts.inconsolata - # nerd-fonts.im-writing - # nerd-fonts.hurmit - # nerd-fonts.heavy-data - # nerd-fonts.hasklug - nerd-fonts.hack - nerd-fonts.gohufont - # nerd-fonts.go-mono - # nerd-fonts.geist-mono - nerd-fonts.fira-mono - nerd-fonts.fira-code - # nerd-fonts.fantasque-sans-mono - # nerd-fonts.envy-code-r - nerd-fonts.droid-sans-mono - # nerd-fonts.departure-mono - nerd-fonts.dejavu-sans-mono - # nerd-fonts.daddy-time-mono - # nerd-fonts.d2coding - # nerd-fonts.cousine - # nerd-fonts.commit-mono - nerd-fonts.comic-shanns-mono - nerd-fonts.code-new-roman - nerd-fonts.caskaydia-cove - # nerd-fonts.blex-mono - # nerd-fonts.bitstream-vera-sans-mono - # nerd-fonts.bigblue-terminal - # nerd-fonts.aurulent-sans-mono - # nerd-fonts.arimo - # nerd-fonts.anonymice - # nerd-fonts.agave - nerd-fonts._3270 - nerd-fonts._0xproto + nerdfonts noto-fonts noto-fonts-cjk-sans noto-fonts-emoji @@ -123,5 +133,4 @@ # max-cache-ttl-ssl = 60480000; }; }; - } diff --git a/hosts/modules/printing.nix b/hosts/modules/printing.nix index f6dae38..4ebe89f 100644 --- a/hosts/modules/printing.nix +++ b/hosts/modules/printing.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { services.printing = { enable = true; drivers = with pkgs; [ diff --git a/hosts/modules/qtile.nix b/hosts/modules/qtile.nix index 5745360..6e3f851 100755 --- a/hosts/modules/qtile.nix +++ b/hosts/modules/qtile.nix @@ -1,13 +1,12 @@ # Enable Qtile -{ pkgs, ... }: -{ +{pkgs, ...}: { # -------------------------------------- # Enable QTILE # -------------------------------------- services.xserver.windowManager.qtile = { enable = true; configFile = /home/nel/dotfiles/qtile/config.py; - extraPackages = python3Packages: with python3Packages; [ qtile-extras ]; + extraPackages = python3Packages: with python3Packages; [qtile-extras]; }; # -------------------------------------- diff --git a/hosts/modules/remote-builder.nix b/hosts/modules/remote-builder.nix index ce4d043..a1df0ce 100644 --- a/hosts/modules/remote-builder.nix +++ b/hosts/modules/remote-builder.nix @@ -4,7 +4,7 @@ createHome = false; group = "remotebuild"; - openssh.authorizedKeys.keyFiles = [ ../keys/remotebuild.pub ]; + openssh.authorizedKeys.keyFiles = [../keys/remotebuild.pub]; }; users.groups.remotebuild = {}; @@ -12,7 +12,7 @@ nix = { nrBuildUsers = 64; settings = { - trusted-users = [ "remotebuild" ]; + trusted-users = ["remotebuild"]; min-free = 10 * 1024 * 1024; max-free = 200 * 1024 * 1024; @@ -26,6 +26,5 @@ MemoryAccounting = true; MemoryMax = "90%"; OOMScoreAdjust = 500; - }; + }; } - diff --git a/hosts/modules/ssh.nix b/hosts/modules/ssh.nix index 38f36b1..29fe92b 100644 --- a/hosts/modules/ssh.nix +++ b/hosts/modules/ssh.nix @@ -1,9 +1,9 @@ { - networking.firewall.allowedTCPPorts = [ 22 ]; + networking.firewall.allowedTCPPorts = [22]; services.openssh = { enable = true; - ports = [ 22 ]; + ports = [22]; settings = { PermitRootLogin = "no"; diff --git a/hosts/modules/steam.nix b/hosts/modules/steam.nix index ec23672..511d90f 100644 --- a/hosts/modules/steam.nix +++ b/hosts/modules/steam.nix @@ -1,4 +1,8 @@ -{ inputs, pkgs, ... }: { +{ + inputs, + pkgs, + ... +}: { programs.steam = { enable = true; extraCompatPackages = with pkgs; [ diff --git a/hosts/modules/thunar.nix b/hosts/modules/thunar.nix index 01d73e8..c90b8b8 100644 --- a/hosts/modules/thunar.nix +++ b/hosts/modules/thunar.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { programs.thunar = { enable = true; plugins = with pkgs.xfce; [ diff --git a/hosts/modules/tlp.nix b/hosts/modules/tlp.nix index 5721d3b..846f0a6 100644 --- a/hosts/modules/tlp.nix +++ b/hosts/modules/tlp.nix @@ -1,15 +1,17 @@ -{ config, hostname, ... }: { + config, + hostname, + ... +}: { boot = { - kernelModules = [ "acpi_call" ]; - extraModulePackages = with config.boot.kernelPackages; [ acpi_call ]; + kernelModules = ["acpi_call"]; + extraModulePackages = with config.boot.kernelPackages; [acpi_call]; }; services.tlp = { enable = true; settings = { - TLP_DEFAULT_MODE = if hostname == "laptop" then "BAT" diff --git a/hosts/modules/users.nix b/hosts/modules/users.nix index 2468d65..6c54f22 100644 --- a/hosts/modules/users.nix +++ b/hosts/modules/users.nix @@ -1,6 +1,11 @@ -{ inputs, username, hostname, pkgs, ... }: { - imports = [ inputs.home-manager.nixosModules.home-manager ]; + inputs, + username, + hostname, + pkgs, + ... +}: { + imports = [inputs.home-manager.nixosModules.home-manager]; users.defaultUserShell = pkgs.zsh; @@ -20,10 +25,10 @@ home-manager = { useGlobalPkgs = true; useUserPackages = true; - extraSpecialArgs = { inherit inputs username hostname; }; + extraSpecialArgs = {inherit inputs username hostname;}; users.${username} = { - imports = [ ../../home/home.nix ]; + imports = [../../home-manager/home.nix]; programs.home-manager.enable = true; home = { stateVersion = "24.05"; diff --git a/hosts/modules/vm.nix b/hosts/modules/vm.nix index 8999437..26db097 100644 --- a/hosts/modules/vm.nix +++ b/hosts/modules/vm.nix @@ -1,7 +1,10 @@ -{ pkgs, username, ... }: { - users.users.${username}.extraGroups = [ "libvirtd" ]; - boot.kernel.sysctl = { "vm.max_map_count" = 2147483642; }; + pkgs, + username, + ... +}: { + users.users.${username}.extraGroups = ["libvirtd"]; + boot.kernel.sysctl = {"vm.max_map_count" = 2147483642;}; # Install necessary packages environment.systemPackages = with pkgs; [ @@ -29,7 +32,7 @@ qemu = { swtpm.enable = true; ovmf.enable = true; - ovmf.packages = [ pkgs.OVMFFull.fd ]; + ovmf.packages = [pkgs.OVMFFull.fd]; }; }; }; diff --git a/hosts/modules/xserver.nix b/hosts/modules/xserver.nix index f9a457a..afd1077 100644 --- a/hosts/modules/xserver.nix +++ b/hosts/modules/xserver.nix @@ -40,7 +40,6 @@ dconf ]; - # X Server settings services.xserver = { enable = true; diff --git a/hosts/thor.nix b/hosts/thor.nix index 32fddb2..1b9283e 100644 --- a/hosts/thor.nix +++ b/hosts/thor.nix @@ -1,30 +1,34 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; - fileSystems."/" = - { device = "/dev/disk/by-uuid/efcf6f2f-7d44-441e-84a9-0a9725be0b72"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/efcf6f2f-7d44-441e-84a9-0a9725be0b72"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/0656-C8A6"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/0656-C8A6"; + fsType = "vfat"; + options = ["fmask=0077" "dmask=0077"]; + }; - swapDevices = [ ]; + swapDevices = []; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/hosts/zion.nix b/hosts/zion.nix index 4e2b2e9..aa113e7 100644 --- a/hosts/zion.nix +++ b/hosts/zion.nix @@ -1,32 +1,36 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-amd"]; + boot.extraModulePackages = []; - fileSystems."/" = - { device = "/dev/disk/by-uuid/9b9ed0c3-1236-499b-b9c3-51e6c4d02483"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/9b9ed0c3-1236-499b-b9c3-51e6c4d02483"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/17B9-AFFF"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/17B9-AFFF"; + fsType = "vfat"; + options = ["fmask=0077" "dmask=0077"]; + }; - swapDevices = - [ { device = "/dev/disk/by-uuid/d6820248-2865-4b52-9893-174309c9e684"; } - ]; + swapDevices = [ + {device = "/dev/disk/by-uuid/d6820248-2865-4b52-9893-174309c9e684";} + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/overlays/default.nix b/overlays/default.nix new file mode 100644 index 0000000..f327936 --- /dev/null +++ b/overlays/default.nix @@ -0,0 +1,41 @@ +# This file defines overlays +{inputs, ...}: { + # This one brings our custom packages from the 'pkgs' directory + additions = final: _prev: + import ../pkgs {pkgs = final;}; + + # This one contains whatever you want to overlay + # You can change versions, add patches, set compilation flags, anything really. + # https://nixos.wiki/wiki/Overlays + modifications = final: prev: { + # example = prev.example.overrideAttrs (oldAttrs: rec { + # ... + # }); + }; + + # For every flake input, aliases 'pkgs.inputs.${flake}' to + # 'inputs.${flake}.packages.${pkgs.system}' or + # 'inputs.${flake}.legacyPackages.${pkgs.system}' + flake-inputs = final: _: { + inputs = + builtins.mapAttrs ( + _: flake: let + legacyPackages = (flake.legacyPackages or {}).${final.system} or {}; + packages = (flake.packages or {}).${final.system} or {}; + in + if legacyPackages != {} + then legacyPackages + else packages + ) + inputs; + }; + + # When applied, the unstable nixpkgs set (declared in the flake inputs) will + # be accessible through 'pkgs.unstable' + unstable-packages = final: _prev: { + unstable = import inputs.nixpkgs-unstable { + system = final.system; + config.allowUnfree = true; + }; + }; +}