From 9d74ac9d82817379c37ed27e6dc3b112e5a04b8b Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Sun, 18 Aug 2024 23:52:21 +0200 Subject: [PATCH] Update --- docs/TODO.md | 3 +- flake.lock | 81 ++++-------- flake.nix | 5 +- home/programs/spicetify/default.nix | 2 +- hosts/laptop/configuration.nix | 16 ++- hosts/laptop/home.nix | 2 +- hosts/modules/variables-configtest.nix | 167 ------------------------- hosts/themes/pink.nix | 52 -------- 8 files changed, 39 insertions(+), 289 deletions(-) delete mode 100644 hosts/modules/variables-configtest.nix delete mode 100644 hosts/themes/pink.nix diff --git a/docs/TODO.md b/docs/TODO.md index 71459fa..7f45621 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -4,10 +4,9 @@ feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md)) - [ ] Jackflix V2 - Backup Radarr, Prowlarr, Sonarr config + - Bitcoin price - [ ] Nixy - - [~] Installation script ([install.sh](./scripts/install.sh) to test on a fresh install) - - [~] Variables-template with defaults - [ ] Themes - [ ] macOS theme - [ ] Tofi (Wofi, but terminal based) diff --git a/flake.lock b/flake.lock index 5c34ed9..110aa62 100644 --- a/flake.lock +++ b/flake.lock @@ -92,6 +92,22 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -149,24 +165,6 @@ "type": "github" } }, - "flake-utils_3": { - "inputs": { - "systems": "systems_4" - }, - "locked": { - "lastModified": 1685518550, - "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "git-hooks": { "inputs": { "flake-compat": [ @@ -523,22 +521,6 @@ "type": "github" } }, - "nixpkgs_4": { - "locked": { - "lastModified": 1686020360, - "narHash": "sha256-Wee7lIlZ6DIZHHLiNxU5KdYZQl0iprENXa/czzI6Cj4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "4729ffac6fd12e26e5a8de002781ffc49b0e94b7", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixvim": { "inputs": { "devshell": "devshell", @@ -700,19 +682,21 @@ }, "spicetify-nix": { "inputs": { - "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_4" + "flake-compat": "flake-compat_2", + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1704167711, - "narHash": "sha256-kFDq+kf/Di/P8bq5sUP8pVwRkrSVrABksBjMPmLic3s=", - "owner": "the-argus", + "lastModified": 1723954588, + "narHash": "sha256-ZTy0Cfv0WLmsZJnFw3OPefzpFogIZU196twuv2B4iLU=", + "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "1325416f951d6a82cfddb1289864ad782e2b87c4", + "rev": "e8c7709abf6fa96b42b8a175583703d6bad07f21", "type": "github" }, "original": { - "owner": "the-argus", + "owner": "Gerg-L", "repo": "spicetify-nix", "type": "github" } @@ -762,21 +746,6 @@ "type": "github" } }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "treefmt-nix": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index e785ee2..9da77de 100644 --- a/flake.nix +++ b/flake.nix @@ -16,7 +16,10 @@ inputs.nixpkgs.follows = "nixpkgs"; }; apple-fonts.url = "github:Lyndeno/apple-fonts.nix"; - spicetify-nix.url = "github:the-argus/spicetify-nix"; + spicetify-nix = { + url = "github:Gerg-L/spicetify-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/home/programs/spicetify/default.nix b/home/programs/spicetify/default.nix index 26ccf14..48c1124 100644 --- a/home/programs/spicetify/default.nix +++ b/home/programs/spicetify/default.nix @@ -1,5 +1,5 @@ { pkgs, config, lib, inputs, ... }: -let spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default; +let spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; in { imports = [ inputs.spicetify-nix.homeManagerModules.default ]; diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index ff53600..a00ee3f 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -3,7 +3,7 @@ ./hardware-configuration.nix ../modules/fonts.nix ../modules/nvidia.nix - # ../modules/prime.nix + # ../modules/prime.nix ../modules/tuigreet.nix ../modules/usb.nix ./variables.nix @@ -116,27 +116,25 @@ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ]; }; - gc = if config.var.autoGarbageCollector then { - automatic = true; + gc = { + automatic = config.var.autoGarbageCollector; persistent = true; dates = "weekly"; options = "--delete-older-than 7d"; - } else - { }; + }; }; nixpkgs.config.allowUnfree = true; environment.systemPackages = with pkgs; [ networkmanagerapplet ]; nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" ]; - system.autoUpgrade = if config.var.autoUpgrade then { - enable = true; + system.autoUpgrade = { + enable = config.var.autoUpgrade; dates = "04:00"; flake = "${config.var.configDirectory}"; flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ]; allowReboot = false; - } else - { }; + }; xdg.portal = { enable = true; diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 1425be5..f1312e3 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -10,7 +10,7 @@ ../../home/programs/nextcloud ../../home/programs/nvim ../../home/programs/qutebrowser - # ../../home/programs/spicetify # TODO: Fix + ../../home/programs/spicetify ../../home/programs/zathura ../../home/programs/shell ../../home/programs/fetch diff --git a/hosts/modules/variables-configtest.nix b/hosts/modules/variables-configtest.nix deleted file mode 100644 index b07084e..0000000 --- a/hosts/modules/variables-configtest.nix +++ /dev/null @@ -1,167 +0,0 @@ -{ lib, ... }: { - options = { - var = { - hostname = lib.mkOption { - type = lib.types.string; - default = "nixy"; - description = "Hostname"; - }; - username = lib.mkOption { - type = lib.types.string; - default = "user"; - description = "Username"; - }; - homeDirectory = lib.mkOption { - type = lib.types.string; - default = "/home/user"; - description = "Home directory (/home/user)"; - }; - configDirectory = lib.mkOption { - type = lib.types.string; - default = "/home/user/.config/nixos"; - description = "NixOS config directory (/home/user/.config/nixos)"; - }; - keyboardLayout = lib.mkOption { - type = lib.types.string; - default = "en"; - description = "Keyboard layout (en/fr/...)"; - }; - timeZone = lib.mkOption { - type = lib.types.string; - default = "America/New_York"; - description = "Time Zone"; - }; - defaultLocale = lib.mkOption { - type = lib.types.string; - default = "en_US.UTF-8"; - description = "Default Locale"; - }; - extraLocale = lib.mkOption { - type = lib.types.string; - default = "fr_FR.UTF-8"; - description = "Extra Locale"; - }; - stateVersion = lib.mkOption { - type = lib.types.string; - default = "24.05"; - description = "State Version: Shouldn't be changed once set."; - }; - autoUpgrade = lib.mkOption { - type = lib.types.bool; - default = false; - description = "Enable auto upgrades"; - }; - autoGarbageCollector = lib.mkOption { - type = lib.types.bool; - default = false; - description = "Enable garbage collector"; - }; - sops = lib.mkOption { - type = lib.types.bool; - default = false; - description = - "Enable sops (You should set up sops for your own config)"; - }; - obsidian = lib.mkOption { - type = lib.types.bool; - default = false; - description = - "Enable obsidian.nvim (You should set up obsidian.nvim for your own config)"; - }; - tailscale = lib.mkOption { - type = lib.types.bool; - default = false; - description = "Enable tailscale"; - }; - git = { - username = lib.mkOption { - type = lib.types.string; - default = "user"; - description = "Git Username"; - }; - email = lib.mkOption { - type = lib.types.string; - default = "youremail@gmail.com"; - description = "Git Email"; - }; - }; - theme = { - wallpaper = lib.mkOption { - type = lib.types.string; - default = "magma.png"; - description = "Wallpaper (Should be in /home/$USER/wallpapers)"; - }; - font = lib.mkOption { - type = lib.types.string; - default = "SFProDisplay Nerd Font"; - description = "Font"; - }; - font-mono = lib.mkOption { - type = lib.types.string; - default = "FiraCode Nerd Font Mono"; - description = "Monospace Font"; - }; - font-size = lib.mkOption { - type = lib.types.int; - default = 14; - description = "Font Size"; - }; - rounding = lib.mkOption { - type = lib.types.int; - default = 8; - description = "Border radius"; - }; - gaps-in = lib.mkOption { - type = lib.types.int; - default = 8; - description = "Gaps In"; - }; - gaps-out = lib.mkOption { - type = lib.types.int; - default = 16; - description = "Gaps Out"; - }; - border-size = lib.mkOption { - type = lib.types.int; - default = 2; - description = "Border Size"; - }; - animation-speed = lib.mkOption { - type = lib.types.string; - default = "medium"; - description = "Animation Speed (slow/medium/fast)"; - }; - fetch = lib.mkOption { - type = lib.types.string; - default = "neofetch"; - description = "Fetch (neofetch/nerdfetch/pfetch/none)"; - }; - waybar = { - transparent = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Transparent Bar"; - }; - float = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Floating Bar"; - }; - position = lib.mkOption { - type = lib.types.string; - default = "top"; - description = "Bar's Position"; - }; - font-size = lib.mkOption { - type = lib.types.int; - default = 16; - description = "Waybar text font size"; - }; - }; - colors = { - # TODO - }; - }; - }; - }; -} \ No newline at end of file diff --git a/hosts/themes/pink.nix b/hosts/themes/pink.nix deleted file mode 100644 index 50183c5..0000000 --- a/hosts/themes/pink.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ - wallpaper = "dark.png"; - - font = "SFProDisplay Nerd Font"; - font-mono = "FiraCode Nerd Font Mono"; - font-size = 14; - - rounding = 15; - gaps-in = 10; - gaps-out = 10 * 2; - border-size = 3; - animation-speed = "fast"; # "fast" | "medium" | "slow" - fetch = "nerdfetch"; # "nerdfetch" | "neofetch" | "pfetch" | "none" - - waybar = { - transparent = true; - float = true; - position = "top"; - font-size = 15; - }; - - colors = { - c0 = "1e1e2e"; # black - c1 = "dea2bd"; # red - c2 = "a6e3a1"; # green - c3 = "fab387"; # yellow - c4 = "89b4fa"; # blue - c5 = "A594FD"; # magenta - c6 = "74c7ec"; # cyan - c7 = "cdd6f4"; # white - c8 = "313244"; # bright black - c9 = "dea2bd"; # bright red - c10 = "94e2d5"; # bright green - c11 = "f9e2af"; # bright yellow - c12 = "b4befe"; # bright blue - c13 = "f5c2e7"; # bright magenta - c14 = "94e2d5"; # bright cyan - c15 = "bac2de"; # bright white - - bg = "0B0B0B"; - fg = "EAF0F5"; - bgalt = "121212"; - fgalt = "EAF0F5"; - - accent = "dea2bd"; - accentFg = "0B0B0B"; - - # Should make those automtic - accentName = "red"; - accentNumber = "9"; - }; -}