From 81ab14b2569a70a5f659dd63f1621aa96882853b Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Thu, 2 May 2024 15:40:12 +0200 Subject: [PATCH] Update --- flake.lock | 112 +++++++++++------- flake.nix | 5 +- home/{misc => apps}/cava/default.nix | 0 home/apps/default.nix | 4 + home/{ => apps}/kitty/default.nix | 0 home/{ => apps}/lf/config/colors | 0 home/{ => apps}/lf/config/icons | 0 home/{ => apps}/lf/default.nix | 2 +- home/{ => apps}/neofetch/default.nix | 0 home/{ => apps}/nvim/alpha.nix | 0 home/{ => apps}/nvim/auto-pairs.nix | 0 home/{ => apps}/nvim/bufferline.nix | 0 home/{ => apps}/nvim/cmp.nix | 0 home/{ => apps}/nvim/comment.nix | 0 home/{ => apps}/nvim/copilot.nix | 0 home/{ => apps}/nvim/default.nix | 0 home/{ => apps}/nvim/git.nix | 0 home/{ => apps}/nvim/keymaps.nix | 0 home/{ => apps}/nvim/lightline.nix | 0 home/{ => apps}/nvim/lsp.nix | 0 home/{ => apps}/nvim/none-ls.nix | 0 home/{ => apps}/nvim/nvim-tree.nix | 0 home/{ => apps}/nvim/obsidian.nix | 0 home/{ => apps}/nvim/oil.nix | 0 home/{ => apps}/nvim/options.nix | 0 home/{ => apps}/nvim/telescope.nix | 0 home/{ => apps}/nvim/toggleterm.nix | 0 home/{ => apps}/nvim/treesitter.nix | 0 home/{ => apps}/nvim/trouble.nix | 0 home/{ => apps}/nvim/whichkey.nix | 0 home/{ => apps}/nvim/wilder.nix | 0 home/{ => apps}/qutebrowser/default.nix | 47 +++++--- .../qutebrowser/duckduckgo-colorscheme.nix | 0 .../qutebrowser/homepage/default.nix | 0 home/{ => apps}/spicetify/default.nix | 0 home/{ => apps}/wofi/default.nix | 0 home/git/default.nix | 12 -- home/home.nix | 32 ++--- home/misc/default.nix | 1 - home/scripts/brightness.nix | 1 - home/scripts/default.nix | 2 +- .../default.nix} | 2 +- .../nerdfont_fzf}/nerdfont_glyphnames.json | 0 home/scripts/startup.nix | 8 +- home/system/default.nix | 4 + home/{ => system}/dunst/default.nix | 2 +- home/system/git/default.nix | 12 ++ home/{ => system}/hyprland/default.nix | 6 +- home/{ => system}/hyprland/hyprcursor.nix | 2 +- home/{ => system}/hyprland/hypridle.nix | 0 home/{ => system}/hyprland/hyprlock.nix | 0 home/{ => system}/hyprland/hyprpaper.nix | 0 home/{ => system}/shell/default.nix | 0 home/{ => system}/shell/fzf.nix | 0 home/{ => system}/shell/starship.nix | 0 home/{ => system}/shell/zoxide.nix | 0 home/{ => system}/shell/zsh.nix | 2 + home/{ => system}/sops/default.nix | 4 +- home/{ => system}/waybar/default.nix | 3 +- home/{ => system}/wlogout/default.nix | 0 home/{ => system}/wlogout/icons/hibernate.png | Bin home/{ => system}/wlogout/icons/lock.png | Bin home/{ => system}/wlogout/icons/logout.png | Bin home/{ => system}/wlogout/icons/reboot.png | Bin home/{ => system}/wlogout/icons/shutdown.png | Bin home/{ => system}/wlogout/icons/suspend.png | Bin home/{theme => themes}/config/template.nix | 5 +- home/{theme => themes}/default.nix | 2 +- home/{theme => themes}/nixy.nix | 0 home/{ => themes}/wallpapers/default.nix | 2 +- .../wallpapers/wallpapers/barcode.png | Bin .../wallpapers/wallpapers/cat_leaves.png | Bin .../wallpapers/wallpapers/default.png | Bin .../wallpapers/wallpapers/galaxy.png | Bin .../wallpapers/wallpapers/house_cloud.png | Bin .../wallpapers/wallpapers/mountains.png | Bin .../wallpapers/wallpapers/mountains_black.png | Bin .../wallpapers/wallpapers/tokyo.png | Bin .../wallpapers/wallpapers/windows.png | Bin hosts/default.nix | 3 - nixos/configuration.nix | 61 ++++++---- hosts/fonts/default.nix => nixos/fonts.nix | 0 nixos/nvidia.nix | 2 +- nixos/prime.nix | 13 ++ .../default.nix => nixos/tuigreet.nix | 0 variables.nix | 22 ++++ 86 files changed, 227 insertions(+), 146 deletions(-) rename home/{misc => apps}/cava/default.nix (100%) create mode 100644 home/apps/default.nix rename home/{ => apps}/kitty/default.nix (100%) rename home/{ => apps}/lf/config/colors (100%) rename home/{ => apps}/lf/config/icons (100%) rename home/{ => apps}/lf/default.nix (98%) rename home/{ => apps}/neofetch/default.nix (100%) rename home/{ => apps}/nvim/alpha.nix (100%) rename home/{ => apps}/nvim/auto-pairs.nix (100%) rename home/{ => apps}/nvim/bufferline.nix (100%) rename home/{ => apps}/nvim/cmp.nix (100%) rename home/{ => apps}/nvim/comment.nix (100%) rename home/{ => apps}/nvim/copilot.nix (100%) rename home/{ => apps}/nvim/default.nix (100%) rename home/{ => apps}/nvim/git.nix (100%) rename home/{ => apps}/nvim/keymaps.nix (100%) rename home/{ => apps}/nvim/lightline.nix (100%) rename home/{ => apps}/nvim/lsp.nix (100%) rename home/{ => apps}/nvim/none-ls.nix (100%) rename home/{ => apps}/nvim/nvim-tree.nix (100%) rename home/{ => apps}/nvim/obsidian.nix (100%) rename home/{ => apps}/nvim/oil.nix (100%) rename home/{ => apps}/nvim/options.nix (100%) rename home/{ => apps}/nvim/telescope.nix (100%) rename home/{ => apps}/nvim/toggleterm.nix (100%) rename home/{ => apps}/nvim/treesitter.nix (100%) rename home/{ => apps}/nvim/trouble.nix (100%) rename home/{ => apps}/nvim/whichkey.nix (100%) rename home/{ => apps}/nvim/wilder.nix (100%) rename home/{ => apps}/qutebrowser/default.nix (85%) rename home/{ => apps}/qutebrowser/duckduckgo-colorscheme.nix (100%) rename home/{ => apps}/qutebrowser/homepage/default.nix (100%) rename home/{ => apps}/spicetify/default.nix (100%) rename home/{ => apps}/wofi/default.nix (100%) delete mode 100644 home/git/default.nix delete mode 100644 home/misc/default.nix rename home/scripts/{nerdfont_fzf.nix => nerdfont_fzf/default.nix} (96%) rename home/{misc => scripts/nerdfont_fzf}/nerdfont_glyphnames.json (100%) create mode 100644 home/system/default.nix rename home/{ => system}/dunst/default.nix (98%) create mode 100644 home/system/git/default.nix rename home/{ => system}/hyprland/default.nix (97%) rename home/{ => system}/hyprland/hyprcursor.nix (86%) rename home/{ => system}/hyprland/hypridle.nix (100%) rename home/{ => system}/hyprland/hyprlock.nix (100%) rename home/{ => system}/hyprland/hyprpaper.nix (100%) rename home/{ => system}/shell/default.nix (100%) rename home/{ => system}/shell/fzf.nix (100%) rename home/{ => system}/shell/starship.nix (100%) rename home/{ => system}/shell/zoxide.nix (100%) rename home/{ => system}/shell/zsh.nix (93%) rename home/{ => system}/sops/default.nix (85%) rename home/{ => system}/waybar/default.nix (99%) rename home/{ => system}/wlogout/default.nix (100%) rename home/{ => system}/wlogout/icons/hibernate.png (100%) rename home/{ => system}/wlogout/icons/lock.png (100%) rename home/{ => system}/wlogout/icons/logout.png (100%) rename home/{ => system}/wlogout/icons/reboot.png (100%) rename home/{ => system}/wlogout/icons/shutdown.png (100%) rename home/{ => system}/wlogout/icons/suspend.png (100%) rename home/{theme => themes}/config/template.nix (99%) rename home/{theme => themes}/default.nix (96%) rename home/{theme => themes}/nixy.nix (100%) rename home/{ => themes}/wallpapers/default.nix (82%) rename home/{ => themes}/wallpapers/wallpapers/barcode.png (100%) rename home/{ => themes}/wallpapers/wallpapers/cat_leaves.png (100%) rename home/{ => themes}/wallpapers/wallpapers/default.png (100%) rename home/{ => themes}/wallpapers/wallpapers/galaxy.png (100%) rename home/{ => themes}/wallpapers/wallpapers/house_cloud.png (100%) rename home/{ => themes}/wallpapers/wallpapers/mountains.png (100%) rename home/{ => themes}/wallpapers/wallpapers/mountains_black.png (100%) rename home/{ => themes}/wallpapers/wallpapers/tokyo.png (100%) rename home/{ => themes}/wallpapers/wallpapers/windows.png (100%) delete mode 100644 hosts/default.nix rename hosts/fonts/default.nix => nixos/fonts.nix (100%) create mode 100644 nixos/prime.nix rename hosts/tuigreet/default.nix => nixos/tuigreet.nix (100%) create mode 100644 variables.nix diff --git a/flake.lock b/flake.lock index f3106b8..8d59be7 100644 --- a/flake.lock +++ b/flake.lock @@ -33,11 +33,11 @@ ] }, "locked": { - "lastModified": 1711099426, - "narHash": "sha256-HzpgM/wc3aqpnHJJ2oDqPBkNsqWbW0WfWUO8lKu8nGk=", + "lastModified": 1713532798, + "narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=", "owner": "numtide", "repo": "devshell", - "rev": "2d45b54ca4a183f2fdcf4b19c895b64fbf620ee8", + "rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40", "type": "github" }, "original": { @@ -198,11 +198,11 @@ ] }, "locked": { - "lastModified": 1713566308, - "narHash": "sha256-7Y91t8pheIzjJveUMAPyeh5NOq5F49Nq4Hl2532QpJs=", + "lastModified": 1714515075, + "narHash": "sha256-azMK7aWH0eUc3IqU4Fg5rwZdB9WZBvimOGG3piqvtsY=", "owner": "nix-community", "repo": "home-manager", - "rev": "057117a401a34259c9615ce62218aea7afdee4d3", + "rev": "6d3b6dc9222c12b951169becdf4b0592ee9576ef", "type": "github" }, "original": { @@ -219,11 +219,11 @@ ] }, "locked": { - "lastModified": 1712989663, - "narHash": "sha256-r2X/DIAyKOLiHoncjcxUk1TENWDTTaigRBaY53Cts/w=", + "lastModified": 1714343445, + "narHash": "sha256-OzD1P0o46uD3Ix4ZI/g9z3YAeg+4g+W3qctB6bNOReo=", "owner": "nix-community", "repo": "home-manager", - "rev": "40ab43ae98cb3e6f07eaeaa3f3ed56d589da21b0", + "rev": "9fe79591c1005ce6f93084ae7f7dab0a2891440d", "type": "github" }, "original": { @@ -248,11 +248,11 @@ ] }, "locked": { - "lastModified": 1713214463, - "narHash": "sha256-zAOOjqHAbccCRgJSuvTCA0FNLqKswN63LgVo43R7pxw=", + "lastModified": 1713612213, + "narHash": "sha256-zJboXgWNpNhKyNF8H/3UYzWkx7w00TOCGKi3cwi+tsw=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "0a53b9957f0b17f1a0036b25198f569969ad43a0", + "rev": "cab4746180f210a3c1dd3d53e45c510e309e90e1", "type": "github" }, "original": { @@ -266,17 +266,18 @@ "hyprcursor": "hyprcursor", "hyprland-protocols": "hyprland-protocols", "hyprlang": "hyprlang", + "hyprwayland-scanner": "hyprwayland-scanner", "nixpkgs": "nixpkgs_2", "systems": "systems_2", "wlroots": "wlroots", "xdph": "xdph" }, "locked": { - "lastModified": 1713576016, - "narHash": "sha256-myIH+dRrr4PX8CEeWqHY+FsV86yxqaux7uDw1JPbly8=", + "lastModified": 1714612681, + "narHash": "sha256-Uv+XnqVAXzljkFVkGm92mgrmA2MRiszX8j7TmJUV1uA=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "10caa03ce5bc2ce8238c494d59405213d32ddead", + "rev": "56de72f357222beca94e3d4f8152e2523a22c0b3", "type": "github" }, "original": { @@ -335,6 +336,31 @@ "type": "github" } }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1714589749, + "narHash": "sha256-zzkb5vc4n/YI5KHrMie7oMZlgCKxs7zm/ybVXNL02Z0=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "c8c2151c607a036ddfc790f5f70237ab984266aa", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -343,11 +369,11 @@ ] }, "locked": { - "lastModified": 1711763326, - "narHash": "sha256-sXcesZWKXFlEQ8oyGHnfk4xc9f2Ip0X/+YZOq3sKviI=", + "lastModified": 1713946171, + "narHash": "sha256-lc75rgRQLdp4Dzogv5cfqOg6qYc5Rp83oedF2t0kDp8=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "36524adc31566655f2f4d55ad6b875fb5c1a4083", + "rev": "230a197063de9287128e2c68a7a4b0cd7d0b50a7", "type": "github" }, "original": { @@ -358,11 +384,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1713521961, - "narHash": "sha256-EwR8wW9AqJhSIY+0oxWRybUZ32BVKuZ9bjlRh8SJvQ8=", + "lastModified": 1714465198, + "narHash": "sha256-ySkEJvS0gPz2UhXm0H3P181T8fUxvDVcoUyGn0Kc5AI=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "5d48925b815fd202781bfae8fb6f45c07112fdb2", + "rev": "68d680c1b7c0e67a9b2144d6776583ee83664ef4", "type": "github" }, "original": { @@ -390,11 +416,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1713434076, - "narHash": "sha256-+/p5edwlkqKZc6GDAQl+92Hoe1f3NNbUF9uj+X9H3pU=", + "lastModified": 1713638189, + "narHash": "sha256-q7APLfB6FmmSMI1Su5ihW9IwntBsk2hWNXh8XtSdSIk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8494ae076b7878d61a7d2d25e89a847fe8f8364c", + "rev": "74574c38577914733b4f7a775dd77d24245081dd", "type": "github" }, "original": { @@ -406,11 +432,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1712963716, - "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "lastModified": 1714253743, + "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", "type": "github" }, "original": { @@ -465,11 +491,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1713530381, - "narHash": "sha256-54sXzrwhKkI9uzeHRPNtpB4pCQqIkzzr1FFUiG4znQU=", + "lastModified": 1714600955, + "narHash": "sha256-AHz9OVQeVlbhTboR5Wchjet9a2h+a8aPTDjEyVQLz/g=", "owner": "nix-community", "repo": "nixvim", - "rev": "83a7ce9846b1b01a34b3e6b25077c1a5044ad7b3", + "rev": "82a19581defe682ff9ca7cb8b1b980b6dc297cf2", "type": "github" }, "original": { @@ -505,11 +531,11 @@ ] }, "locked": { - "lastModified": 1712897695, - "narHash": "sha256-nMirxrGteNAl9sWiOhoN5tIHyjBbVi5e2tgZUgZlK3Y=", + "lastModified": 1713954846, + "narHash": "sha256-RWFafuSb5nkWGu8dDbW7gVb8FOQOPqmX/9MlxUUDguw=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "40e6053ecb65fcbf12863338a6dcefb3f55f1bf8", + "rev": "6fb82e44254d6a0ece014ec423cb62d92435336f", "type": "github" }, "original": { @@ -586,11 +612,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1713532771, - "narHash": "sha256-vfKxhYVMzG2tg48/1rewBoSLCrKIjQsG1j7Nm/Y2gf4=", + "lastModified": 1713892811, + "narHash": "sha256-uIGmA2xq41vVFETCF1WW4fFWFT2tqBln+aXnWrvjGRE=", "owner": "Mic92", "repo": "sops-nix", - "rev": "a929a011a09db735abc45a8a45d1ff7fdee62755", + "rev": "f1b0adc27265274e3b0c9b872a8f476a098679bd", "type": "github" }, "original": { @@ -696,17 +722,17 @@ "wlroots": { "flake": false, "locked": { - "lastModified": 1713124002, - "narHash": "sha256-vPeZCY+sdiGsz4fl3AVVujfyZyQBz6+vZdkUE4hQ+HI=", + "lastModified": 1713731601, + "narHash": "sha256-bdcKdtLkusvv85DNuJsajZLFeq7bXp+x5AGP1Sd4wD8=", "owner": "hyprwm", "repo": "wlroots-hyprland", - "rev": "611a4f24cd2384378f6e500253983107c6656c64", + "rev": "5c1d51c5a2793480f5b6c4341ad0797052aec2ea", "type": "github" }, "original": { "owner": "hyprwm", "repo": "wlroots-hyprland", - "rev": "611a4f24cd2384378f6e500253983107c6656c64", + "rev": "5c1d51c5a2793480f5b6c4341ad0797052aec2ea", "type": "github" } }, @@ -730,11 +756,11 @@ ] }, "locked": { - "lastModified": 1713214484, - "narHash": "sha256-h1bSIsDuPk1FGgvTuSHJyiU2Glu7oAyoPMJutKZmLQ8=", + "lastModified": 1714060055, + "narHash": "sha256-j43TS9wv9luaAlpxcxw0sjxkbcc2mGANVR2RYgo3RCw=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "bb44921534a9cee9635304fdb876c1b3ec3a8f61", + "rev": "0fe840441e43da12cd7865ed9aa8cdc35a8da85a", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index b862cf6..b1e9c50 100644 --- a/flake.nix +++ b/flake.nix @@ -29,14 +29,15 @@ modules = [ nixos-hardware.nixosModules.omen-16-n0005ne # REMOVE ./nixos/configuration.nix - ./hosts + ./nixos/fonts.nix + ./nixos/tuigreet.nix { _module.args = { inherit inputs; }; } home-manager.nixosModules.home-manager { home-manager = { useGlobalPkgs = true; useUserPackages = true; - users.hadi = import ./home/home.nix; # CHANGEME - replace "hadi" + users."hadi" = import ./home/home.nix; extraSpecialArgs = { inherit inputs; inherit spicetify-nix; diff --git a/home/misc/cava/default.nix b/home/apps/cava/default.nix similarity index 100% rename from home/misc/cava/default.nix rename to home/apps/cava/default.nix diff --git a/home/apps/default.nix b/home/apps/default.nix new file mode 100644 index 0000000..9569f5e --- /dev/null +++ b/home/apps/default.nix @@ -0,0 +1,4 @@ +{ + imports = + [ ./kitty ./lf ./neofetch ./nvim ./qutebrowser ./spicetify ./wofi ./cava ]; +} diff --git a/home/kitty/default.nix b/home/apps/kitty/default.nix similarity index 100% rename from home/kitty/default.nix rename to home/apps/kitty/default.nix diff --git a/home/lf/config/colors b/home/apps/lf/config/colors similarity index 100% rename from home/lf/config/colors rename to home/apps/lf/config/colors diff --git a/home/lf/config/icons b/home/apps/lf/config/icons similarity index 100% rename from home/lf/config/icons rename to home/apps/lf/config/icons diff --git a/home/lf/default.nix b/home/apps/lf/default.nix similarity index 98% rename from home/lf/default.nix rename to home/apps/lf/default.nix index 6d0cbc0..5bf1e0e 100644 --- a/home/lf/default.nix +++ b/home/apps/lf/default.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: { +{ pkgs, ... }: { home.packages = with pkgs; [ pistol ]; programs.lf = { diff --git a/home/neofetch/default.nix b/home/apps/neofetch/default.nix similarity index 100% rename from home/neofetch/default.nix rename to home/apps/neofetch/default.nix diff --git a/home/nvim/alpha.nix b/home/apps/nvim/alpha.nix similarity index 100% rename from home/nvim/alpha.nix rename to home/apps/nvim/alpha.nix diff --git a/home/nvim/auto-pairs.nix b/home/apps/nvim/auto-pairs.nix similarity index 100% rename from home/nvim/auto-pairs.nix rename to home/apps/nvim/auto-pairs.nix diff --git a/home/nvim/bufferline.nix b/home/apps/nvim/bufferline.nix similarity index 100% rename from home/nvim/bufferline.nix rename to home/apps/nvim/bufferline.nix diff --git a/home/nvim/cmp.nix b/home/apps/nvim/cmp.nix similarity index 100% rename from home/nvim/cmp.nix rename to home/apps/nvim/cmp.nix diff --git a/home/nvim/comment.nix b/home/apps/nvim/comment.nix similarity index 100% rename from home/nvim/comment.nix rename to home/apps/nvim/comment.nix diff --git a/home/nvim/copilot.nix b/home/apps/nvim/copilot.nix similarity index 100% rename from home/nvim/copilot.nix rename to home/apps/nvim/copilot.nix diff --git a/home/nvim/default.nix b/home/apps/nvim/default.nix similarity index 100% rename from home/nvim/default.nix rename to home/apps/nvim/default.nix diff --git a/home/nvim/git.nix b/home/apps/nvim/git.nix similarity index 100% rename from home/nvim/git.nix rename to home/apps/nvim/git.nix diff --git a/home/nvim/keymaps.nix b/home/apps/nvim/keymaps.nix similarity index 100% rename from home/nvim/keymaps.nix rename to home/apps/nvim/keymaps.nix diff --git a/home/nvim/lightline.nix b/home/apps/nvim/lightline.nix similarity index 100% rename from home/nvim/lightline.nix rename to home/apps/nvim/lightline.nix diff --git a/home/nvim/lsp.nix b/home/apps/nvim/lsp.nix similarity index 100% rename from home/nvim/lsp.nix rename to home/apps/nvim/lsp.nix diff --git a/home/nvim/none-ls.nix b/home/apps/nvim/none-ls.nix similarity index 100% rename from home/nvim/none-ls.nix rename to home/apps/nvim/none-ls.nix diff --git a/home/nvim/nvim-tree.nix b/home/apps/nvim/nvim-tree.nix similarity index 100% rename from home/nvim/nvim-tree.nix rename to home/apps/nvim/nvim-tree.nix diff --git a/home/nvim/obsidian.nix b/home/apps/nvim/obsidian.nix similarity index 100% rename from home/nvim/obsidian.nix rename to home/apps/nvim/obsidian.nix diff --git a/home/nvim/oil.nix b/home/apps/nvim/oil.nix similarity index 100% rename from home/nvim/oil.nix rename to home/apps/nvim/oil.nix diff --git a/home/nvim/options.nix b/home/apps/nvim/options.nix similarity index 100% rename from home/nvim/options.nix rename to home/apps/nvim/options.nix diff --git a/home/nvim/telescope.nix b/home/apps/nvim/telescope.nix similarity index 100% rename from home/nvim/telescope.nix rename to home/apps/nvim/telescope.nix diff --git a/home/nvim/toggleterm.nix b/home/apps/nvim/toggleterm.nix similarity index 100% rename from home/nvim/toggleterm.nix rename to home/apps/nvim/toggleterm.nix diff --git a/home/nvim/treesitter.nix b/home/apps/nvim/treesitter.nix similarity index 100% rename from home/nvim/treesitter.nix rename to home/apps/nvim/treesitter.nix diff --git a/home/nvim/trouble.nix b/home/apps/nvim/trouble.nix similarity index 100% rename from home/nvim/trouble.nix rename to home/apps/nvim/trouble.nix diff --git a/home/nvim/whichkey.nix b/home/apps/nvim/whichkey.nix similarity index 100% rename from home/nvim/whichkey.nix rename to home/apps/nvim/whichkey.nix diff --git a/home/nvim/wilder.nix b/home/apps/nvim/wilder.nix similarity index 100% rename from home/nvim/wilder.nix rename to home/apps/nvim/wilder.nix diff --git a/home/qutebrowser/default.nix b/home/apps/qutebrowser/default.nix similarity index 85% rename from home/qutebrowser/default.nix rename to home/apps/qutebrowser/default.nix index 378b04d..e50c464 100644 --- a/home/qutebrowser/default.nix +++ b/home/apps/qutebrowser/default.nix @@ -49,13 +49,21 @@ odd.fg = "#${config.theme.colors.fg}"; even.bg = "#${config.theme.colors.bg}"; even.fg = "#${config.theme.colors.fg}"; - selected.odd.bg = "#${config.theme.colors.primary-bg}"; - selected.odd.fg = "#${config.theme.colors.primary-fg}"; - selected.even.bg = "#${config.theme.colors.primary-bg}"; - selected.even.fg = "#${config.theme.colors.primary-fg}"; - indicator.error = "#${config.theme.colors.color1}"; - indicator.start = "#${config.theme.colors.alt-bg}"; - indicator.stop = "#${config.theme.colors.alt-bg}"; + selected = { + odd = { + bg = "#${config.theme.colors.primary-bg}"; + fg = "#${config.theme.colors.primary-fg}"; + }; + even = { + bg = "#${config.theme.colors.primary-bg}"; + fg = "#${config.theme.colors.primary-fg}"; + }; + }; + indicator = { + error = "#${config.theme.colors.color1}"; + start = "#${config.theme.colors.alt-bg}"; + stop = "#${config.theme.colors.alt-bg}"; + }; }; hints = { @@ -65,10 +73,14 @@ }; completion = { - category.bg = "#${config.theme.colors.bg}"; - category.fg = "#${config.theme.colors.fg}"; - category.border.top = "#${config.theme.colors.bg}"; - category.border.bottom = "#${config.theme.colors.bg}"; + category = { + bg = "#${config.theme.colors.bg}"; + fg = "#${config.theme.colors.fg}"; + border = { + top = "#${config.theme.colors.bg}"; + bottom = "#${config.theme.colors.bg}"; + }; + }; odd.bg = "#${config.theme.colors.bg}"; even.bg = "#${config.theme.colors.bg}"; @@ -77,11 +89,13 @@ match.fg = "#${config.theme.colors.primary-bg}"; - item.selected.bg = "#${config.theme.colors.primary-bg}"; - item.selected.border.top = "#${config.theme.colors.primary-bg}"; - item.selected.border.bottom = "#${config.theme.colors.primary-bg}"; - item.selected.fg = "#${config.theme.colors.primary-fg}"; - item.selected.match.fg = "#${config.theme.colors.primary-fg}"; + item.selected = { + bg = "#${config.theme.colors.primary-bg}"; + border.top = "#${config.theme.colors.primary-bg}"; + border.bottom = "#${config.theme.colors.primary-bg}"; + fg = "#${config.theme.colors.primary-fg}"; + match.fg = "#${config.theme.colors.primary-fg}"; + }; }; statusbar = { @@ -136,6 +150,7 @@ content = { autoplay = false; javascript.clipboard = "access"; + javascript.enabled = true; pdfjs = true; }; diff --git a/home/qutebrowser/duckduckgo-colorscheme.nix b/home/apps/qutebrowser/duckduckgo-colorscheme.nix similarity index 100% rename from home/qutebrowser/duckduckgo-colorscheme.nix rename to home/apps/qutebrowser/duckduckgo-colorscheme.nix diff --git a/home/qutebrowser/homepage/default.nix b/home/apps/qutebrowser/homepage/default.nix similarity index 100% rename from home/qutebrowser/homepage/default.nix rename to home/apps/qutebrowser/homepage/default.nix diff --git a/home/spicetify/default.nix b/home/apps/spicetify/default.nix similarity index 100% rename from home/spicetify/default.nix rename to home/apps/spicetify/default.nix diff --git a/home/wofi/default.nix b/home/apps/wofi/default.nix similarity index 100% rename from home/wofi/default.nix rename to home/apps/wofi/default.nix diff --git a/home/git/default.nix b/home/git/default.nix deleted file mode 100644 index 45029f7..0000000 --- a/home/git/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - programs.git = { - enable = true; - userName = "Hadi"; # CHANGEME - userEmail = "112569860+anotherhadi@users.noreply.github.com"; # CHANGEME - extraConfig = { - init.defaultBranch = "main"; - # Automatically track remote branch - push.autoSetupRemote = true; - }; - }; -} diff --git a/home/home.nix b/home/home.nix index c462e15..50a6700 100644 --- a/home/home.nix +++ b/home/home.nix @@ -1,29 +1,12 @@ -{ config, pkgs, ... }: { +{ pkgs, ... }: +let variable = import ../variables.nix; +in { - imports = [ - ./hyprland - ./nvim - ./waybar - ./kitty - ./dunst - ./wlogout - ./wofi - ./qutebrowser - ./git - ./shell - ./misc - ./scripts - ./neofetch - ./spicetify - ./theme - ./wallpapers - ./lf - ./sops # REMOVE - ]; + imports = [ ./themes ./system ./scripts ./apps ]; home = { - username = "hadi"; # CHANGEME - homeDirectory = "/home/hadi"; # CHANGEME + username = variable.username; + homeDirectory = variable.homeDirectory; packages = with pkgs; [ swappy @@ -49,6 +32,7 @@ bc gcc blueman + zip unzip xdg_utils tldr @@ -68,7 +52,7 @@ firefox ]; - stateVersion = "23.11"; + stateVersion = variable.stateVersion; }; programs.home-manager.enable = true; } diff --git a/home/misc/default.nix b/home/misc/default.nix deleted file mode 100644 index 19068a2..0000000 --- a/home/misc/default.nix +++ /dev/null @@ -1 +0,0 @@ -{ imports = [ ./cava/default.nix ]; } diff --git a/home/scripts/brightness.nix b/home/scripts/brightness.nix index 236ed59..67677bd 100644 --- a/home/scripts/brightness.nix +++ b/home/scripts/brightness.nix @@ -1,7 +1,6 @@ { pkgs, config, ... }: let - homedir = config.home.homeDirectory; increments = "5"; brightness-change = pkgs.writeShellScriptBin "brightness-change" '' diff --git a/home/scripts/default.nix b/home/scripts/default.nix index 0159d6f..229dff8 100644 --- a/home/scripts/default.nix +++ b/home/scripts/default.nix @@ -9,6 +9,6 @@ ./night-shift.nix ./screenshot.nix ./startup.nix - ./nerdfont_fzf.nix + ./nerdfont_fzf ]; } diff --git a/home/scripts/nerdfont_fzf.nix b/home/scripts/nerdfont_fzf/default.nix similarity index 96% rename from home/scripts/nerdfont_fzf.nix rename to home/scripts/nerdfont_fzf/default.nix index a464ad4..75b8db8 100644 --- a/home/scripts/nerdfont_fzf.nix +++ b/home/scripts/nerdfont_fzf/default.nix @@ -29,7 +29,7 @@ in { home.packages = with pkgs; [ nerdfont-fzf nerdfont-fzf-fetch nerdfont-popup ]; xdg.configFile."nerdfont_glyphnames.json" = { - source = ../misc/nerdfont_glyphnames.json; + source = ./nerdfont_glyphnames.json; }; } diff --git a/home/misc/nerdfont_glyphnames.json b/home/scripts/nerdfont_fzf/nerdfont_glyphnames.json similarity index 100% rename from home/misc/nerdfont_glyphnames.json rename to home/scripts/nerdfont_fzf/nerdfont_glyphnames.json diff --git a/home/scripts/startup.nix b/home/scripts/startup.nix index 6a04e82..4945ee6 100644 --- a/home/scripts/startup.nix +++ b/home/scripts/startup.nix @@ -2,6 +2,7 @@ { pkgs, config, ... }: let homedir = config.home.homeDirectory; + variable = import ../../variables.nix; battery-notif = pkgs.writeShellScriptBin "battery-notif" '' # Send notifications when low on battery and not in charge @@ -44,9 +45,12 @@ let startup = pkgs.writeShellScriptBin "startup" '' # Because HM enabling services suck. - systemctl --user start sops-nix + [[ ${ + toString variable.enableSops + } == "true" ]] && systemctl --user start sops-nix + + [[ ${toString variable.enableNextcloud} == "true" ]] && nextcloud-watch & - nextcloud-watch & battery-notif & ${pkgs.waybar}/bin/waybar & ''; diff --git a/home/system/default.nix b/home/system/default.nix new file mode 100644 index 0000000..4e2920f --- /dev/null +++ b/home/system/default.nix @@ -0,0 +1,4 @@ +{ + imports = + [ ./git ./dunst ./hyprland ./shell ./sops ./waybar ./wlogout ./sops ]; +} diff --git a/home/dunst/default.nix b/home/system/dunst/default.nix similarity index 98% rename from home/dunst/default.nix rename to home/system/dunst/default.nix index 0f9d315..9f45a84 100644 --- a/home/dunst/default.nix +++ b/home/system/dunst/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: { +{ config, pkgs, ... }: { home.packages = with pkgs; [ libnotify ]; diff --git a/home/system/git/default.nix b/home/system/git/default.nix new file mode 100644 index 0000000..7f87118 --- /dev/null +++ b/home/system/git/default.nix @@ -0,0 +1,12 @@ +let variable = import ../../../variables.nix; +in { + programs.git = { + enable = true; + userName = variable.git.username; + userEmail = variable.git.email; + extraConfig = { + init.defaultBranch = "main"; + push.autoSetupRemote = true; + }; + }; +} diff --git a/home/hyprland/default.nix b/home/system/hyprland/default.nix similarity index 97% rename from home/hyprland/default.nix rename to home/system/hyprland/default.nix index 8ccc2d2..d14d1ce 100644 --- a/home/hyprland/default.nix +++ b/home/system/hyprland/default.nix @@ -1,4 +1,6 @@ -{ self, pkgs, config, hyprland, ... }: { +{ self, pkgs, config, hyprland, ... }: +let variable = import ../../../variables.nix; +in { imports = [ ./hyprlock.nix ./hypridle.nix ./hyprpaper.nix ./hyprcursor.nix ]; @@ -142,7 +144,7 @@ }; input = { - kb_layout = "fr"; # CHANGEME + kb_layout = variable.keyboardLayout; kb_options = "caps:escape"; follow_mouse = 1; diff --git a/home/hyprland/hyprcursor.nix b/home/system/hyprland/hyprcursor.nix similarity index 86% rename from home/hyprland/hyprcursor.nix rename to home/system/hyprland/hyprcursor.nix index e553fa1..de12613 100644 --- a/home/hyprland/hyprcursor.nix +++ b/home/system/hyprland/hyprcursor.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: { +{ pkgs, ... }: { home.packages = with pkgs; [ hyprcursor ]; # home.file.".local/share/icons/rose-pine-hyprcursor" = { diff --git a/home/hyprland/hypridle.nix b/home/system/hyprland/hypridle.nix similarity index 100% rename from home/hyprland/hypridle.nix rename to home/system/hyprland/hypridle.nix diff --git a/home/hyprland/hyprlock.nix b/home/system/hyprland/hyprlock.nix similarity index 100% rename from home/hyprland/hyprlock.nix rename to home/system/hyprland/hyprlock.nix diff --git a/home/hyprland/hyprpaper.nix b/home/system/hyprland/hyprpaper.nix similarity index 100% rename from home/hyprland/hyprpaper.nix rename to home/system/hyprland/hyprpaper.nix diff --git a/home/shell/default.nix b/home/system/shell/default.nix similarity index 100% rename from home/shell/default.nix rename to home/system/shell/default.nix diff --git a/home/shell/fzf.nix b/home/system/shell/fzf.nix similarity index 100% rename from home/shell/fzf.nix rename to home/system/shell/fzf.nix diff --git a/home/shell/starship.nix b/home/system/shell/starship.nix similarity index 100% rename from home/shell/starship.nix rename to home/system/shell/starship.nix diff --git a/home/shell/zoxide.nix b/home/system/shell/zoxide.nix similarity index 100% rename from home/shell/zoxide.nix rename to home/system/shell/zoxide.nix diff --git a/home/shell/zsh.nix b/home/system/shell/zsh.nix similarity index 93% rename from home/shell/zsh.nix rename to home/system/shell/zsh.nix index efb81c5..4cadf72 100644 --- a/home/shell/zsh.nix +++ b/home/system/shell/zsh.nix @@ -42,6 +42,8 @@ sl = "ls"; open = "${pkgs.xdg_utils}/bin/xdg-open"; icat = "${pkgs.kitty}/bin/kitty +kitten icat"; + note = "vim ~/Nextcloud/obsidian"; + obs = "vim ~/Nextcloud/obsidian"; }; }; } diff --git a/home/sops/default.nix b/home/system/sops/default.nix similarity index 85% rename from home/sops/default.nix rename to home/system/sops/default.nix index 5fd1d46..773d39a 100644 --- a/home/sops/default.nix +++ b/home/system/sops/default.nix @@ -1,9 +1,9 @@ -{ sops-nix, config, ... }: { +{ sops-nix, ... }: { imports = [ sops-nix.homeManagerModules.sops ]; sops = { age.keyFile = "/home/hadi/.config/sops/age/keys.txt"; - defaultSopsFile = ../../secrets/secrets.yaml; + defaultSopsFile = ../../../secrets/secrets.yaml; secrets = { sshconfig = { path = "/home/hadi/.ssh/config"; }; oxk = { path = "/home/hadi/.ssh/oxserver"; }; diff --git a/home/waybar/default.nix b/home/system/waybar/default.nix similarity index 99% rename from home/waybar/default.nix rename to home/system/waybar/default.nix index 52ffe39..d637368 100644 --- a/home/waybar/default.nix +++ b/home/system/waybar/default.nix @@ -1,4 +1,4 @@ -{ pkgs, config, lib, ... }: { +{ config, ... }: { services = { blueman-applet.enable = true; network-manager-applet.enable = true; @@ -31,6 +31,7 @@ "hyprland/window" = { "format" = "{title:30}"; "max-length" = 30; + "separate-outputs" = true; }; "hyprland/workspaces" = { diff --git a/home/wlogout/default.nix b/home/system/wlogout/default.nix similarity index 100% rename from home/wlogout/default.nix rename to home/system/wlogout/default.nix diff --git a/home/wlogout/icons/hibernate.png b/home/system/wlogout/icons/hibernate.png similarity index 100% rename from home/wlogout/icons/hibernate.png rename to home/system/wlogout/icons/hibernate.png diff --git a/home/wlogout/icons/lock.png b/home/system/wlogout/icons/lock.png similarity index 100% rename from home/wlogout/icons/lock.png rename to home/system/wlogout/icons/lock.png diff --git a/home/wlogout/icons/logout.png b/home/system/wlogout/icons/logout.png similarity index 100% rename from home/wlogout/icons/logout.png rename to home/system/wlogout/icons/logout.png diff --git a/home/wlogout/icons/reboot.png b/home/system/wlogout/icons/reboot.png similarity index 100% rename from home/wlogout/icons/reboot.png rename to home/system/wlogout/icons/reboot.png diff --git a/home/wlogout/icons/shutdown.png b/home/system/wlogout/icons/shutdown.png similarity index 100% rename from home/wlogout/icons/shutdown.png rename to home/system/wlogout/icons/shutdown.png diff --git a/home/wlogout/icons/suspend.png b/home/system/wlogout/icons/suspend.png similarity index 100% rename from home/wlogout/icons/suspend.png rename to home/system/wlogout/icons/suspend.png diff --git a/home/theme/config/template.nix b/home/themes/config/template.nix similarity index 99% rename from home/theme/config/template.nix rename to home/themes/config/template.nix index ecb965a..a7dc40a 100644 --- a/home/theme/config/template.nix +++ b/home/themes/config/template.nix @@ -1,8 +1,5 @@ { lib, ... }: - -with lib; - -{ +with lib; { options.theme = { waybar-transparent = mkOption { diff --git a/home/theme/default.nix b/home/themes/default.nix similarity index 96% rename from home/theme/default.nix rename to home/themes/default.nix index a06055e..9910123 100644 --- a/home/theme/default.nix +++ b/home/themes/default.nix @@ -1,5 +1,5 @@ { config, ... }: { - imports = [ ./nixy.nix ]; + imports = [ ./nixy.nix ./wallpapers ]; config.theme.colors.primary-ansi-16-number = if config.theme.colors.primary-ansi-16 == "black" then 0 diff --git a/home/theme/nixy.nix b/home/themes/nixy.nix similarity index 100% rename from home/theme/nixy.nix rename to home/themes/nixy.nix diff --git a/home/wallpapers/default.nix b/home/themes/wallpapers/default.nix similarity index 82% rename from home/wallpapers/default.nix rename to home/themes/wallpapers/default.nix index 2174792..9ce011d 100644 --- a/home/wallpapers/default.nix +++ b/home/themes/wallpapers/default.nix @@ -1,4 +1,4 @@ -{ config, ... }: { +{ xdg.configFile."wallpapers" = { recursive = true; source = ./wallpapers; diff --git a/home/wallpapers/wallpapers/barcode.png b/home/themes/wallpapers/wallpapers/barcode.png similarity index 100% rename from home/wallpapers/wallpapers/barcode.png rename to home/themes/wallpapers/wallpapers/barcode.png diff --git a/home/wallpapers/wallpapers/cat_leaves.png b/home/themes/wallpapers/wallpapers/cat_leaves.png similarity index 100% rename from home/wallpapers/wallpapers/cat_leaves.png rename to home/themes/wallpapers/wallpapers/cat_leaves.png diff --git a/home/wallpapers/wallpapers/default.png b/home/themes/wallpapers/wallpapers/default.png similarity index 100% rename from home/wallpapers/wallpapers/default.png rename to home/themes/wallpapers/wallpapers/default.png diff --git a/home/wallpapers/wallpapers/galaxy.png b/home/themes/wallpapers/wallpapers/galaxy.png similarity index 100% rename from home/wallpapers/wallpapers/galaxy.png rename to home/themes/wallpapers/wallpapers/galaxy.png diff --git a/home/wallpapers/wallpapers/house_cloud.png b/home/themes/wallpapers/wallpapers/house_cloud.png similarity index 100% rename from home/wallpapers/wallpapers/house_cloud.png rename to home/themes/wallpapers/wallpapers/house_cloud.png diff --git a/home/wallpapers/wallpapers/mountains.png b/home/themes/wallpapers/wallpapers/mountains.png similarity index 100% rename from home/wallpapers/wallpapers/mountains.png rename to home/themes/wallpapers/wallpapers/mountains.png diff --git a/home/wallpapers/wallpapers/mountains_black.png b/home/themes/wallpapers/wallpapers/mountains_black.png similarity index 100% rename from home/wallpapers/wallpapers/mountains_black.png rename to home/themes/wallpapers/wallpapers/mountains_black.png diff --git a/home/wallpapers/wallpapers/tokyo.png b/home/themes/wallpapers/wallpapers/tokyo.png similarity index 100% rename from home/wallpapers/wallpapers/tokyo.png rename to home/themes/wallpapers/wallpapers/tokyo.png diff --git a/home/wallpapers/wallpapers/windows.png b/home/themes/wallpapers/wallpapers/windows.png similarity index 100% rename from home/wallpapers/wallpapers/windows.png rename to home/themes/wallpapers/wallpapers/windows.png diff --git a/hosts/default.nix b/hosts/default.nix deleted file mode 100644 index 887811b..0000000 --- a/hosts/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{inputs, ...}:{ - imports = [ ./tuigreet ./fonts ]; -} diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 9529278..01fd2c5 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -1,5 +1,16 @@ -{ pkgs, config, ... }: { - imports = [ ./hardware-configuration.nix ./nvidia.nix ]; +{ pkgs, ... }: +let + variable = import ../variables.nix; + imports = [ ./hardware-configuration.nix ]; + # Weird variable name to avoid conflict with the `imports` variable... + secondImports = + if variable.enableNvidia then imports ++ [ ./nvidia.nix ] else imports; + thirdImports = if variable.enablePrime then + secondImports ++ [ ./prime.nix ] + else + secondImports; +in { + imports = thirdImports; # Bootloader. boot.loader.efi.canTouchEfiVariables = true; @@ -12,36 +23,36 @@ ############## - # CHANGEME - networking.hostName = "nixy"; - time.timeZone = "Europe/Paris"; - i18n.defaultLocale = "en_US.UTF-8"; + networking.hostName = variable.hostName; + + time.timeZone = variable.timeZone; + i18n.defaultLocale = variable.defaultLocale; i18n.extraLocaleSettings = { - LC_ADDRESS = "fr_FR.UTF-8"; - LC_IDENTIFICATION = "fr_FR.UTF-8"; - LC_MEASUREMENT = "fr_FR.UTF-8"; - LC_MONETARY = "fr_FR.UTF-8"; - LC_NAME = "fr_FR.UTF-8"; - LC_NUMERIC = "fr_FR.UTF-8"; - LC_PAPER = "fr_FR.UTF-8"; - LC_TELEPHONE = "fr_FR.UTF-8"; - LC_TIME = "fr_FR.UTF-8"; + LC_ADDRESS = variable.extraLocale; + LC_IDENTIFICATION = variable.extraLocale; + LC_MEASUREMENT = variable.extraLocale; + LC_MONETARY = variable.extraLocale; + LC_NAME = variable.extraLocale; + LC_NUMERIC = variable.extraLocale; + LC_PAPER = variable.extraLocale; + LC_TELEPHONE = variable.extraLocale; + LC_TIME = variable.extraLocale; }; - users.users.hadi = { # CHANGEME + users.users.${variable.username} = { isNormalUser = true; - description = "Hadi account"; + description = "${variable.username} account"; extraGroups = [ "networkmanager" "wheel" ]; }; # Auto Update & Clean - system.autoUpgrade = { - enable = true; - dates = "04:00"; - flake = "${config.users.users.hadi.home}/.config/nixos"; # CHANGEME - flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ]; - allowReboot = false; - }; + # system.autoUpgrade = { + # enable = true; + # dates = "04:00"; + # flake = "${config.users.users.${variable.username}.home}/.config/nixos"; + # flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ]; + # allowReboot = false; + # }; ############## @@ -110,5 +121,5 @@ services.dbus.enable = true; - system.stateVersion = "23.11"; + system.stateVersion = variable.stateVersion; } diff --git a/hosts/fonts/default.nix b/nixos/fonts.nix similarity index 100% rename from hosts/fonts/default.nix rename to nixos/fonts.nix diff --git a/nixos/nvidia.nix b/nixos/nvidia.nix index e0650d8..6b6557b 100644 --- a/nixos/nvidia.nix +++ b/nixos/nvidia.nix @@ -13,7 +13,7 @@ modesetting.enable = true; powerManagement.enable = true; powerManagement.finegrained = false; - open = false; + open = true; nvidiaSettings = true; }; } diff --git a/nixos/prime.nix b/nixos/prime.nix new file mode 100644 index 0000000..1e4e507 --- /dev/null +++ b/nixos/prime.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: { + hardware.nvidia.prime = { + offload = { + enable = true; + enableOffloadCmd = true; + }; + + # sync.enable = true; + + amdgpuBusId = "PCI:5:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} diff --git a/hosts/tuigreet/default.nix b/nixos/tuigreet.nix similarity index 100% rename from hosts/tuigreet/default.nix rename to nixos/tuigreet.nix diff --git a/variables.nix b/variables.nix new file mode 100644 index 0000000..41d8601 --- /dev/null +++ b/variables.nix @@ -0,0 +1,22 @@ +{ + # CHANGEME + hostName = "nixy"; + username = "hadi"; + homeDirectory = "/home/hadi"; + + keyboardLayout = "fr"; + timeZone = "Europe/Paris"; + defaultLocale = "en_US.UTF-8"; + extraLocale = "fr_FR.UTF-8"; + + git = { + username = "Hadi"; + email = "112569860+anotherhadi@users.noreply.github.com"; + }; + + stateVersion = "23.11"; + enableSops = true; + enableNextcloud = true; + enableNvidia = true; + enablePrime = true; +}