diff --git a/flake.lock b/flake.lock index fa8cc4d..1738511 100644 --- a/flake.lock +++ b/flake.lock @@ -46,11 +46,11 @@ ] }, "locked": { - "lastModified": 1771683283, - "narHash": "sha256-WxAEkAbo8dP7qiyPM6VN4ZGAxfuBVlNBNPkrqkrXVEc=", + "lastModified": 1771851181, + "narHash": "sha256-gFgE6mGUftwseV3DUENMb0k0EiHd739lZexPo5O/sdQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "c6ed3eab64d23520bcbb858aa53fe2b533725d4a", + "rev": "9a4b494b1aa1b93d8edf167f46dc8e0c0011280c", "type": "github" }, "original": { @@ -118,7 +118,8 @@ "catppuccin": "catppuccin", "home-manager": "home-manager", "nixpkgs": "nixpkgs_2", - "nixvim": "nixvim" + "nixvim": "nixvim", + "wallpapers": "wallpapers" } }, "systems": { @@ -135,6 +136,22 @@ "repo": "default", "type": "github" } + }, + "wallpapers": { + "flake": false, + "locked": { + "lastModified": 1762937381, + "narHash": "sha256-N+MZHSRcwOldS5Ai8B3YfKquKs9oeUW/GkV1iKM5+i8=", + "owner": "orangci", + "repo": "walls-catppuccin-mocha", + "rev": "7bfdf10d16ad3a689f9f0cf3a0930da3d1a245a8", + "type": "github" + }, + "original": { + "owner": "orangci", + "repo": "walls-catppuccin-mocha", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index a3fd908..89113b1 100644 --- a/flake.nix +++ b/flake.nix @@ -7,7 +7,13 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + catppuccin.url = "github:catppuccin/nix"; + wallpapers = { + url = "github:orangci/walls-catppuccin-mocha"; + flake = false; + }; + nixvim = { url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; @@ -20,21 +26,31 @@ home-manager, catppuccin, nixvim, + wallpapers, ... - }: + }@inputs: let - username = "szymon"; - # for git - email = "szymon_jozef@proton.me"; - full_name = "Szymon P"; + userConfig = { + username = "szymon"; + # for git + email = "szymon_jozef@proton.me"; + fullName = "Szymon P"; + }; + pathConfig = { + wallpaper = "Obrazy/tapety/catppuccin"; + }; in { homeConfigurations = { "arch" = home-manager.lib.homeManagerConfiguration { pkgs = import nixpkgs { system = "x86_64-linux"; }; extraSpecialArgs = { - inherit username email full_name; + inherit + inputs + userConfig + pathConfig + ; isNixOS = false; }; modules = [ @@ -47,13 +63,17 @@ "nixos" = home-manager.lib.homeManagerConfiguration { pkgs = import nixpkgs { system = "x86_64-linux"; }; extraSpecialArgs = { - inherit username email full_name; + inherit + inputs + userConfig + pathConfig + ; isNixOS = true; }; modules = [ ./home.nix catppuccin.homeModules.catppuccin - nixvim.homeManagerModules.nixvim + nixvim.homeModules.nixvim ]; }; }; diff --git a/home.nix b/home.nix index df54922..5a9b970 100644 --- a/home.nix +++ b/home.nix @@ -1,12 +1,14 @@ { pkgs, - username, + inputs, + userConfig, + pathConfig, ... }: { - home.username = username; - home.homeDirectory = "/home/${username}"; + home.username = userConfig.username; + home.homeDirectory = "/home/${userConfig.username}"; nix = { package = pkgs.nix; @@ -60,6 +62,7 @@ # === SCRIPTS IMPORT === home.file = { ".local/bin".source = ./scripts; + ${pathConfig.wallpaper}.source = inputs.wallpapers; }; # === VARS === diff --git a/modules/cli/git.nix b/modules/cli/git.nix index 2675194..49107fa 100644 --- a/modules/cli/git.nix +++ b/modules/cli/git.nix @@ -1,7 +1,6 @@ { pkgs, - full_name, - email, + userConfig, ... }: @@ -14,8 +13,8 @@ enable = true; settings = { user = { - name = full_name; - email = email; + name = userConfig.fullName; + email = userConfig.email; }; init.defaultBranch = "master"; push.autoSetupRemote = true; @@ -23,7 +22,7 @@ }; signing = { - key = email; + key = userConfig.email; signByDefault = true; }; diff --git a/modules/cli/ssh.nix b/modules/cli/ssh.nix index 5a8e017..7acac8b 100644 --- a/modules/cli/ssh.nix +++ b/modules/cli/ssh.nix @@ -1,4 +1,4 @@ -{ username, ... }: +{ userConfig, ... }: { services.ssh-agent.enable = true; @@ -10,13 +10,13 @@ matchBlocks = { "dmowski" = { hostname = "192.168.0.30"; - user = username; + user = userConfig.username; port = 22; identityFile = "~/.ssh/dmowski"; }; "aur.archlinux.org" = { - user = username; + user = userConfig.username; identityFile = "~/.ssh/aur"; }; diff --git a/modules/gui/satty.nix b/modules/gui/satty.nix index 9a8e3d7..c177d5e 100644 --- a/modules/gui/satty.nix +++ b/modules/gui/satty.nix @@ -1,7 +1,7 @@ { lib, isNixOS, - username, + userConfig, ... }: @@ -14,7 +14,7 @@ fullscreen = true; early-exit = true; initial-tool = "crop"; - output-filename = "/home/${username}/Obrazy/zrzuty/%d-%m-%Y_%H:%M:%S.png"; + output-filename = "/home/${userConfig.username}/Obrazy/zrzuty/%d-%m-%Y_%H:%M:%S.png"; save-after-copy = true; copy-command = "wl-copy"; disable-notifications = false;