diff --git a/configuration.nix b/configuration.nix index 08d8659..6b45e35 100644 --- a/configuration.nix +++ b/configuration.nix @@ -9,9 +9,9 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix - + # ./sunshine.nix - ./home-files.nix + #./home-files.nix #./flatpak.nix ]; @@ -186,185 +186,8 @@ group = "users"; }; - home-manager.users.insert= { pkgs, ... }: { - home.packages = [ - pkgs.git - pkgs.fluffychat - pkgs.cinny-desktop - pkgs.libsForQt5.lightly - pkgs.pfetch - pkgs.git-credential-oauth - pkgs.wayvnc - pkgs.android-tools - pkgs.gnome.eog - pkgs.libsForQt5.gwenview - pkgs.libsForQt5.qtstyleplugins - pkgs.libsForQt5.qt5ct - pkgs.oh-my-zsh - pkgs.zsh - pkgs.kubectl - pkgs.kubernetes-helm - pkgs.vscodium - #pkgs.atool - #pkgs.httpie - pkgs.webcord - pkgs.pika-backup - pkgs.tigervnc - pkgs.syncthing - pkgs.zsh-syntax-highlighting - pkgs.zsh-history-substring-search - pkgs.kitty - pkgs.grim - pkgs.slurp - pkgs.prismlauncher - pkgs.glfw-wayland-minecraft - ]; - services.syncthing.enable = true; + #home-manager.users.insert= { pkgs, ... }: { - # programs.zsh.oh-my-zsh.enable = true; - #programs.waybar = { - #enable = true; - #package = pkgs.waybar.overrideAttrs (oldAttrs: { - #mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; - #}); - #config = { - # modules = [{module = "wlr/workspace"};]; - #}; - #} - gtk = { - enable = true; - iconTheme = { - name = "Papirus-Dark"; - package = pkgs.papirus-icon-theme; - }; - cursorTheme = { - name = "Catppuccin-Frappe-Blue-Cursors"; - package = pkgs.catppuccin-cursors.frappeBlue; - size = 24; - }; - theme = { - name = "Catppuccin-Frappe-Standard-Mauve-Dark"; - package = pkgs.catppuccin-gtk.override { - accents = [ "mauve" ]; - size = "standard"; - #tweaks = [ "black" ]; - variant = "frappe"; - }; - }; - - gtk3.extraConfig = { - Settings = '' - gtk-application-prefer-dark-theme=1 - ''; - }; - - gtk4.extraConfig = { - Settings = '' - gtk-application-prefer-dark-theme=1 - ''; - }; - - }; - programs.nnn = { - enable = true; - #plugins = { "launch", "imgview" }; - plugins.src = (pkgs.fetchFromGitHub { - owner = "jarun"; - repo = "nnn"; - rev = "v4.9"; - sha256 = "sha256-Hpc8YaJeAzJoEi7aJ6DntH2VLkoR6ToP6tPYn3llR7k="; - }) + "/plugins"; - plugins.mappings = { - l = "launch"; - v = "imgview"; - g = "getplugs"; - }; - - }; - - accounts.email = { - accounts.insert = { - address = "insert@insertapp.net"; - gpg = { - key = "A70775C389ACF105"; - signByDefault = true; - }; - imap.host = "imap.purelymail.com"; - imap.port = 993; - primary = true; - realName = "Insert"; - smtp = { - host = "smtp.purelymail.com"; - port = 465; - }; - passwordCommand = "cat ${config.age.secrets.email.path}"; - userName = "insert@insertapp.net"; - #notmuch.enable = true; - thunderbird.enable = true; - }; - }; - - #programs.notmuch.enable = true; - programs.himalaya.enable = false; - programs.thunderbird = { - enable = true; - profiles.insert = { - #name = "Insert"; - isDefault = true; - withExternalGnupg = false; - settings = {"mail.openpgp.alternative_gpg_path" = "/run/current-system/sw/bin/gpg-agent";}; - }; - }; - - programs.librewolf.enable = true; - - programs.git = { - enable = true; - userName = "insert"; - userEmail = "insert@insertapp.net"; - signing = { - key = "A70775C389ACF105"; - signByDefault = true; - }; - }; - programs.git-credential-oauth.enable = true; - programs.kitty = { - enable = true; - theme = "Catppuccin-Frappe"; - settings = { - font_family = "Monocraft Nerd Font"; - }; - }; - programs.zsh = { - enable = true; - shellAliases = { - update = "sudo nixos-rebuild switch --flake /home/insert/Documents/nixos# -v --impure --upgrade --recreate-lock-file"; - update-locked = "sudo nixos-rebuild switch --flake /home/insert/Documents/nixos# -v --impure"; - garbage = "nix-collect-garbage"; - }; - initExtra = '' - - source ~/.p10k.zsh - export TERM=xterm-256color - PF_INFO="ascii title os kernel uptime pkgs memory wm de palette" pfetch - - ''; - plugins = [ - - {name = "powerlevel10k";src = pkgs.zsh-powerlevel10k;file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";} - - ]; - syntaxHighlighting.enable = true; - historySubstringSearch.enable = true; - autosuggestion.enable = true; - oh-my-zsh = { - enable = true; - plugins = [ "git" "kubectl" ]; - #theme = "powerlevel10k/powerlevel10k"; - }; - }; - home.stateVersion = "23.05"; - }; security.polkit.enable = true; # Enable automatic login for the user. @@ -435,6 +258,26 @@ # "--unsupported-gpu" # ]; #}; + environment.etc."greetd/regreet.toml".text = lib.mkForce ''[background] +path = "/home/insert/Documents/cat-background/background.png" +fit = "Fill" +[GTK] +# Whether to use the dark theme +application_prefer_dark_theme = true + +# Cursor theme name +#cursor_theme_name = "Adwaita" + +# Font name and size +font_name = "Monocraft 20" + +# Icon theme name +icon_theme_name = "Breeze Dark" + +# GTK theme name +#theme_name = "Adwaita" + ''; + services.earlyoom = { enable = true; freeSwapThreshold = 5; diff --git a/flake.lock b/flake.lock index 7ca54f3..75dd4d7 100644 --- a/flake.lock +++ b/flake.lock @@ -88,6 +88,26 @@ "type": "github" } }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1713019815, + "narHash": "sha256-jzTo97VeKMNfnKw3xU+uiU5C7wtnLudsbwl/nwPLC7s=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "8fdf329526f06886b53b94ddf433848a0d142984", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "hyprcursor": { "inputs": { "hyprlang": [ @@ -213,6 +233,7 @@ "inputs": { "agenix": "agenix", "flatpaks": "flatpaks", + "home-manager": "home-manager_2", "hyprland": "hyprland", "nixpkgs": "nixpkgs" } diff --git a/flake.nix b/flake.nix index 3bae78d..e045c15 100644 --- a/flake.nix +++ b/flake.nix @@ -8,15 +8,25 @@ hyprland.inputs.nixpkgs.follows = "nixpkgs"; agenix.url = "github:ryantm/agenix"; agenix.inputs.nixpkgs.follows = "nixpkgs"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { nixpkgs, flatpaks, agenix, ... } @ inputs: { + outputs = { nixpkgs, flatpaks, agenix, home-manager, ... } @ inputs: { nixosConfigurations.insertpclinux = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; modules = [ flatpaks.nixosModules.default ./configuration.nix agenix.nixosModules.default + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.insert = import /home/insert/Documents/nixos/home.nix; + } ]; }; }; diff --git a/home-files.nix b/home-files.nix index 95a7bf3..f383df1 100644 --- a/home-files.nix +++ b/home-files.nix @@ -2,7 +2,7 @@ #Yes I manage my home files like this, yes I am insane #Credit to anyone I got these config files from, I would add it here but its been months { - home-manager.users.insert.home.file.".config/qt5ct/colors/Catppuccin-Frappe.conf" = { + home.file.".config/qt5ct/colors/Catppuccin-Frappe.conf" = { text = ''[ColorScheme] active_colors=#ffc6d0f5, #ff292c3c, #ffa5adce, #ff949cbb, #ff51576d, #ff737994, #ffc6d0f5, #ffc6d0f5, #ffc6d0f5, #ff303446, #ff292c3c, #ff838ba7, #ff8caaee, #ff303446, #ff8caaee, #ffe78284, #ff303446, #ffc6d0f5, #ff232634, #ffc6d0f5, #80838ba7 disabled_colors=#ffa5adce, #ff292c3c, #ffa5adce, #ff949cbb, #ff51576d, #ff737994, #ffa5adce, #ffa5adce, #ffa5adce, #ff303446, #ff292c3c, #ff838ba7, #ff626880, #ffb5bfe2, #ff8caaee, #ffe78284, #ff303446, #ffc6d0f5, #ff232634, #ffc6d0f5, #80838ba7 @@ -10,7 +10,7 @@ inactive_colors=#ffc6d0f5, #ff292c3c, #ffa5adce, #ff949cbb, #ff51576d, #ff737994 }; - home-manager.users.insert.home.file.".config/mako/config" = { + home.file.".config/mako/config" = { text = ''# Colors background-color=#303446 @@ -22,27 +22,9 @@ progress-color=over #414559 border-color=#ef9f76''; }; - environment.etc."greetd/regreet.toml".text = lib.mkForce ''[background] -path = "/home/insert/Documents/cat-background/background.png" -fit = "Fill" -[GTK] -# Whether to use the dark theme -application_prefer_dark_theme = true -# Cursor theme name -#cursor_theme_name = "Adwaita" -# Font name and size -font_name = "Monocraft 20" - -# Icon theme name -icon_theme_name = "Breeze Dark" - -# GTK theme name -#theme_name = "Adwaita" - ''; - - home-manager.users.insert.home.file.".config/waybar/config.jsonc" = { + home.file.".config/waybar/config.jsonc" = { text = ''{ "layer": "top", "position": "top", @@ -143,7 +125,7 @@ icon_theme_name = "Breeze Dark" } ''; }; - home-manager.users.insert.home.file.".config/waybar/style.css" = { + home.file.".config/waybar/style.css" = { text = ''@import "frappe.css"; * { @@ -270,7 +252,7 @@ icon_theme_name = "Breeze Dark" border-radius: 1rem;*/ }''; }; - home-manager.users.insert.home.file.".config/hypr/hyprland.conf" = { + home.file.".config/hypr/hyprland.conf" = { text = ''autogenerated = 0 # remove this line to remove the warning # See https://wiki.hyprland.org/Configuring/Monitors/ @@ -442,7 +424,7 @@ bind = $mainMod, mouse_up, workspace, e-1 bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow''; }; - home-manager.users.insert.home.file.".config/hypr/frappe.conf" = { + home.file.".config/hypr/frappe.conf" = { text = ''$rosewaterAlpha = f2d5cf $flamingoAlpha = eebebe $pinkAlpha = f4b8e4 @@ -505,7 +487,7 @@ $base = 0xff303446 $mantle = 0xff292c3c $crust = 0xff232634''; }; - home-manager.users.insert.home.file.".config/waybar/frappe.css" = { + home.file.".config/waybar/frappe.css" = { text = ''/* * * Catppuccin Frappe palette diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..7a76d2f --- /dev/null +++ b/home.nix @@ -0,0 +1,186 @@ +{ inputs, config, lib, pkgs, ... }: +{ +#home-manager.users.insert= { pkgs, ... }: { + imports = [ + ./home-files.nix + ]; + + home.packages = [ + pkgs.git + pkgs.fluffychat + pkgs.cinny-desktop + pkgs.libsForQt5.lightly + pkgs.pfetch + pkgs.git-credential-oauth + pkgs.wayvnc + pkgs.android-tools + pkgs.gnome.eog + pkgs.libsForQt5.gwenview + pkgs.libsForQt5.qtstyleplugins + pkgs.libsForQt5.qt5ct + pkgs.oh-my-zsh + pkgs.zsh + pkgs.kubectl + pkgs.kubernetes-helm + pkgs.vscodium + #pkgs.atool + #pkgs.httpie + pkgs.webcord + pkgs.pika-backup + pkgs.tigervnc + pkgs.syncthing + pkgs.zsh-syntax-highlighting + pkgs.zsh-history-substring-search + pkgs.kitty + pkgs.grim + pkgs.slurp + pkgs.prismlauncher + pkgs.glfw-wayland-minecraft + ]; + services.syncthing.enable = true; + + # programs.zsh.oh-my-zsh.enable = true; + #programs.waybar = { + #enable = true; + #package = pkgs.waybar.overrideAttrs (oldAttrs: { + #mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; + #}); + #config = { + # modules = [{module = "wlr/workspace"};]; + #}; + #} + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + cursorTheme = { + name = "Catppuccin-Frappe-Blue-Cursors"; + package = pkgs.catppuccin-cursors.frappeBlue; + size = 24; + }; + theme = { + name = "Catppuccin-Frappe-Standard-Mauve-Dark"; + package = pkgs.catppuccin-gtk.override { + accents = [ "mauve" ]; + size = "standard"; + #tweaks = [ "black" ]; + variant = "frappe"; + }; + }; + + gtk3.extraConfig = { + Settings = '' + gtk-application-prefer-dark-theme=1 + ''; + }; + + gtk4.extraConfig = { + Settings = '' + gtk-application-prefer-dark-theme=1 + ''; + }; + + }; + programs.nnn = { + enable = true; + #plugins = { "launch", "imgview" }; + plugins.src = (pkgs.fetchFromGitHub { + owner = "jarun"; + repo = "nnn"; + rev = "v4.9"; + sha256 = "sha256-Hpc8YaJeAzJoEi7aJ6DntH2VLkoR6ToP6tPYn3llR7k="; + }) + "/plugins"; + plugins.mappings = { + l = "launch"; + v = "imgview"; + g = "getplugs"; + }; + + }; + + accounts.email = { + accounts.insert = { + address = "insert@insertapp.net"; + gpg = { + key = "A70775C389ACF105"; + signByDefault = true; + }; + imap.host = "imap.purelymail.com"; + imap.port = 993; + primary = true; + realName = "Insert"; + smtp = { + host = "smtp.purelymail.com"; + port = 465; + }; + passwordCommand = "cat ${config.age.secrets.email.path}"; + userName = "insert@insertapp.net"; + #notmuch.enable = true; + thunderbird.enable = true; + }; + }; + + #programs.notmuch.enable = true; + programs.himalaya.enable = false; + programs.thunderbird = { + enable = true; + profiles.insert = { + #name = "Insert"; + isDefault = true; + withExternalGnupg = false; + settings = {"mail.openpgp.alternative_gpg_path" = "/run/current-system/sw/bin/gpg-agent";}; + }; + }; + + programs.librewolf.enable = true; + + programs.git = { + enable = true; + userName = "insert"; + userEmail = "insert@insertapp.net"; + signing = { + key = "A70775C389ACF105"; + signByDefault = true; + }; + }; + programs.git-credential-oauth.enable = true; + programs.kitty = { + enable = true; + theme = "Catppuccin-Frappe"; + settings = { + font_family = "Monocraft Nerd Font"; + }; + }; + programs.zsh = { + enable = true; + shellAliases = { + update = "sudo nixos-rebuild switch --flake /home/insert/Documents/nixos# -v --impure --upgrade --option commit-lockfile-summary 'Update flake.lock' --commit-lock-file"; + update-locked = "sudo nixos-rebuild switch --flake /home/insert/Documents/nixos# -v --impure"; + garbage = "nix-collect-garbage"; + }; + initExtra = '' + + source ~/.p10k.zsh + export TERM=xterm-256color + PF_INFO="ascii title os kernel uptime pkgs memory wm de palette" pfetch + + ''; + plugins = [ + + {name = "powerlevel10k";src = pkgs.zsh-powerlevel10k;file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";} + + ]; + syntaxHighlighting.enable = true; + historySubstringSearch.enable = true; + autosuggestion.enable = true; + oh-my-zsh = { + enable = true; + plugins = [ "git" "kubectl" ]; + #theme = "powerlevel10k/powerlevel10k"; + }; + }; + home.stateVersion = "23.05"; + programs.home-manager.enable = true; +}