diff --git a/flake.lock b/flake.lock index 959e710..b09005c 100644 --- a/flake.lock +++ b/flake.lock @@ -356,11 +356,11 @@ ] }, "locked": { - "lastModified": 1730016908, - "narHash": "sha256-bFCxJco7d8IgmjfNExNz9knP8wvwbXU4s/d53KOK6U0=", + "lastModified": 1730490306, + "narHash": "sha256-AvCVDswOUM9D368HxYD25RsSKp+5o0L0/JHADjLoD38=", "owner": "nix-community", "repo": "home-manager", - "rev": "e83414058edd339148dc142a8437edb9450574c8", + "rev": "1743615b61c7285976f85b303a36cdf88a556503", "type": "github" }, "original": { @@ -472,11 +472,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1730373668, - "narHash": "sha256-8p5JTUGFuhnyuF9lD98ioeE3zYaCmsizLWk4Y3KszAI=", + "lastModified": 1730499652, + "narHash": "sha256-De3YRKpowtm15xN7hK0PdBpu96wwSyQE+qFoq9Gi6lM=", "ref": "refs/heads/main", - "rev": "93b4478e70af6ffb08a4a66a6d0364c3296db296", - "revCount": 5396, + "rev": "32b18179dd789cde948c97eb3c2ebbdd6af36bf7", + "revCount": 5402, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -822,11 +822,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1730368298, - "narHash": "sha256-5z4pDqRSSovXPPtN1BNEJOkGoCd/XSYuCWh8AsvoTio=", + "lastModified": 1730499477, + "narHash": "sha256-olt0Sx4alDxv3ko9BgbV3SsE2KQ/Tf0/Az1Fr9s2Y6U=", "owner": "nix-community", "repo": "nixvim", - "rev": "42ea1626cb002fa759a6b1e2841bfc80a4e59615", + "rev": "356896f58dde22ee16481b7c954e340dceec340d", "type": "github" }, "original": { @@ -837,11 +837,11 @@ }, "nur": { "locked": { - "lastModified": 1730411166, - "narHash": "sha256-o1JcjEnWhnxkkKXYN1gQeO53RUsQExFsgMOJ/FzuFX0=", + "lastModified": 1730540878, + "narHash": "sha256-JYfoVW5lsfv4bo87U6mqbC3Jh+EBImU5iUsHJlOkyAI=", "owner": "nix-community", "repo": "NUR", - "rev": "761c6a7d6859126681d206126ba26ec58306d068", + "rev": "57df81c2bcabc503171defb232a0e11710ddaaf9", "type": "github" }, "original": { @@ -918,11 +918,11 @@ ] }, "locked": { - "lastModified": 1730348281, - "narHash": "sha256-c5lP7JFqWlrEScvPXKxg7Z2+f5wdlznYZPjEa5jmEkw=", + "lastModified": 1730521028, + "narHash": "sha256-vZtg4J+jOADDKgS+s821PeJiTXfawan8mzX3JM3xjqc=", "owner": "gerg-l", "repo": "spicetify-nix", - "rev": "22d250d6a4dcc492a2d8836d3f2c901a09e7cb76", + "rev": "191323d81e19efa0be5071e17263851e62f35685", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 4241a9d..3bf797d 100644 --- a/flake.nix +++ b/flake.nix @@ -67,7 +67,7 @@ ) {} colors; in { - homeManagerModules.default = ./modules/home/default.nix; + homeManagerModules.default = ./modules/home; nixosConfigurations = { oganesson = nixpkgs.lib.nixosSystem { diff --git a/hosts/laptop/config.nix b/hosts/laptop/config.nix index 7b6b1de..bd52d19 100644 --- a/hosts/laptop/config.nix +++ b/hosts/laptop/config.nix @@ -1,7 +1,10 @@ {pkgs, config, ...}: { system.stateVersion = "24.05"; nixpkgs.config.allowUnfree = true; - imports = [ ./hardware.nix ]; + imports = [ + ./hardware.nix + ./home.nix + ]; powerProfiles.enable = true; boot = { @@ -14,21 +17,31 @@ ++ [pkgs.cpupower-gui]; }; - environment = { - variables = { - PATH = "${pkgs.clang-tools}/bin:$PATH"; - }; - shells = with pkgs; [ - zsh - bash - ]; - systemPackages = with pkgs; [ - acpi - brightnessctl - cpupower-gui - powertop - ]; + networkModule.enable = true; + nixSettings.enable = true; + bootLoader.enable = true; + issue.enable = true; + sddmConfig.enable = true; + stylixConfig.enable = true; + sysPkgs.enable = true; + sysProgs.enable = true; + sysServices.enable = true; + + environment = { + variables = { + PATH = "${pkgs.clang-tools}/bin:$PATH"; }; + shells = with pkgs; [ + zsh + bash + ]; + systemPackages = with pkgs; [ + acpi + brightnessctl + cpupower-gui + powertop + ]; + }; } diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix new file mode 100644 index 0000000..1786879 --- /dev/null +++ b/hosts/laptop/home.nix @@ -0,0 +1,96 @@ +{ + host, + pkgs, + self, + inputs, + username, + wallpaper, + lib, + scheme, + config, + ... +}: let + nur = config.nur; +in { + imports = [inputs.home-manager.nixosModules.home-manager]; + home-manager = { + useUserPackages = true; + useGlobalPkgs = true; + backupFileExtension = "backup"; + extraSpecialArgs = {inherit self inputs host wallpaper scheme username nur;}; + users = { + ${username} = { + programs.home-manager.enable = true; + imports = [ + inputs.spicetify-nix.homeManagerModules.default + inputs.self.outputs.homeManagerModules.default + ]; + + # My custom home-manager modules + + # modules/home/files + homeFiles.enable = true; + + # modules/home/environment + hyprlandConfig.enable = true; + autojumpConfig.enable = true; + stylixHomeConfig.enable = true; + waybarConfig.enable = true; + gtkConfig.enable = true; + spicetifyConfig.enable = true; + starshipConfig.enable = true; + + # modules/home/programs + btopConfig.enable = true; + swayncConfig.enable = true; + userPkgs.enable = true; + cavaConfig.enable = true; + ezaConfig.enable = true; + firefoxConfig.enable = true; + fuzzelConfig.enable = true; + fzfConfig.enable = true; + gitConfig.enable = true; + kittyConfig.enable = true; + yaziConfig.enable = true; + zshConfig.enable = true; + passConfig.enable = true; + batConfig.enable = true; + + # modules/home/scripts + movScripts.enable = true; + movScripts.commandScripts.enable = true; + movScripts.hyprlandControls.enable = true; + movScripts.nixShortcuts.enable = true; + + dconf.settings = lib.mkIf config.virtConfig.enable { + "org/virt-manager/virt-manager/connections" = { + autoconnect = ["qemu:///system"]; + uris = ["qemu:///system"]; + }; + }; + home = { + username = "${username}"; + homeDirectory = "/home/${username}"; + stateVersion = "24.05"; + }; + }; + }; + }; + + users = { + groups.persist = {}; + users = { + root.initialPassword = "1234"; + ${username} = { + isNormalUser = true; + initialPassword = "1234"; + shell = pkgs.zsh; + extraGroups = ["wheel" "persist" "libvirtd"]; + }; + }; + }; + security.sudo.extraConfig = '' + ${username} ALL=(ALL) NOPASSWD: /etc/profiles/per-user/${username}/bin/rebuild + ''; + nix.settings.allowed-users = ["${username}"]; +} diff --git a/modules/home/environment/zshell.nix b/modules/home/environment/zshell.nix index 10f8620..4ed1723 100644 --- a/modules/home/environment/zshell.nix +++ b/modules/home/environment/zshell.nix @@ -27,6 +27,13 @@ svcu = "systemctl --user"; svc = "sudo systemctl"; viflake = "nvim flake.nix"; + + #git + "ga" = "playshellsound ${self}/assets/sound/gitadd.wav; git add"; + gcomm = "gitcommit_sfx"; + gpush = "gitpush_sfx"; + gpull = "gitpull_sfx"; + greb = "gitrebase_sfx"; }; sessionVariables = { diff --git a/modules/sys/software/default.nix b/modules/sys/software/default.nix index a37ed94..e2f7de3 100644 --- a/modules/sys/software/default.nix +++ b/modules/sys/software/default.nix @@ -6,18 +6,13 @@ username, host, ... -}: let - desktop = host == "oganesson"; - desktop_modules = - if desktop - then [(import ./virtualization.nix)] ++ [(import ./gaming)] - else []; -in { +}: { imports = [(import ./packages.nix)] ++ [(import ./programs.nix)] ++ [(import ./services.nix)] ++ [(import ./nixvim)] ++ [(import ./module-test.nix)] - ++ desktop_modules; + ++ [(import ./virtualization.nix)] + ++ [(import ./gaming)]; }