From 1ea3c72321a83143591bd4e9989da94798c2d71b Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 22 Jun 2025 01:25:32 +0530 Subject: Add immish dashboard link + refactor stuff --- configuration.nix | 37 ------------------------------------- flake.nix | 6 ++---- modules/config.nix | 31 +++++++++++++++++++++++++++++++ modules/dashboard/links.nix | 16 ++++++++-------- modules/hardware/default.nix | 3 ++- modules/packages.nix | 11 +++++++++++ 6 files changed, 54 insertions(+), 50 deletions(-) delete mode 100644 configuration.nix create mode 100644 modules/config.nix create mode 100644 modules/packages.nix diff --git a/configuration.nix b/configuration.nix deleted file mode 100644 index 6622ec1..0000000 --- a/configuration.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ pkgs, ... }: -{ - imports = [ - ./modules/hardware - ./modules/users - ./modules/network - ./modules/media - ./modules/dashboard - ./modules/storage - ./modules/notifications - ./modules/monitoring - ]; - - environment.systemPackages = with pkgs; [ - bottom - mtm - neovim - lf - util-linux - dig - ]; - - time.timeZone = "Asia/Kolkata"; - i18n.defaultLocale = "en_GB.UTF-8"; - - nix.settings = { - experimental-features = [ "nix-command" "flakes" ]; - auto-optimise-store = true; - }; - nix.gc = { - automatic = true; - dates = "weekly"; - }; - nixpkgs.config.allowUnfree = true; - - system.stateVersion = "25.05"; -} diff --git a/flake.nix b/flake.nix index 8875022..2605a68 100644 --- a/flake.nix +++ b/flake.nix @@ -9,11 +9,9 @@ system = "x86_64-linux"; specialArgs = { settings = import ./settings.nix { inherit (nixpkgs) lib; }; + inherit nixos-hardware; }; - modules = [ - "${nixos-hardware}/lenovo/ideapad" - ./configuration.nix - ]; + modules = [ ./modules/config.nix ]; }; }; } diff --git a/modules/config.nix b/modules/config.nix new file mode 100644 index 0000000..a4b6c79 --- /dev/null +++ b/modules/config.nix @@ -0,0 +1,31 @@ +{ ... }: +{ + imports = [ + ./hardware + ./users + ./network + ./media + ./dashboard + ./storage + ./notifications + ./monitoring + ./packages.nix + ]; + + time.timeZone = "Asia/Kolkata"; + i18n.defaultLocale = "en_GB.UTF-8"; + + nix = { + settings = { + experimental-features = [ "nix-command" "flakes" ]; + auto-optimise-store = true; + }; + gc = { + automatic = true; + dates = "weekly"; + }; + }; + nixpkgs.config.allowUnfree = true; + + system.stateVersion = "25.05"; +} diff --git a/modules/dashboard/links.nix b/modules/dashboard/links.nix index 1ccded8..4ac0337 100644 --- a/modules/dashboard/links.nix +++ b/modules/dashboard/links.nix @@ -10,6 +10,13 @@ in [ altUrl = "http://${host}:${toString ports.jellyfin}"; color = "#AA5CC3"; } + { + title = "Immich"; + key = "i"; + url = "http://photos.local"; + altUrl = "http://${host}:${toString ports.immich}"; + color = "#fa2921"; + } { title = "Jellyseer"; key = "l"; @@ -64,13 +71,6 @@ in [ key = "f"; url = "http://send.local"; altUrl = "http://${host}:${toString ports.send}"; - color = "#AA5CC3"; - } - { - title = "Immich"; - key = "i"; - url = "http://photos.local"; - altUrl = "http://${host}:${toString ports.immich}"; - color = "#fa2921"; + color = "#0a84ff"; } ] diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix index 098b3cc..34b7e7e 100644 --- a/modules/hardware/default.nix +++ b/modules/hardware/default.nix @@ -1,7 +1,8 @@ -{ lib, modulesPath, ... }: +{ lib, nixos-hardware, modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") + "${nixos-hardware}/lenovo/ideapad" ./fs.nix ]; diff --git a/modules/packages.nix b/modules/packages.nix new file mode 100644 index 0000000..a596fc1 --- /dev/null +++ b/modules/packages.nix @@ -0,0 +1,11 @@ +{ pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + bottom + mtm + neovim + lf + util-linux + dig + ]; +} -- cgit v1.3.1