Migrate to home manager flakes

This commit is contained in:
insert 2024-04-13 15:42:15 -04:00
parent 4a8d829cd8
commit cebfdb848a
Signed by: insert
GPG key ID: A70775C389ACF105
5 changed files with 248 additions and 206 deletions

View file

@ -9,9 +9,9 @@
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
<home-manager/nixos> #<home-manager/nixos>
./sunshine.nix ./sunshine.nix
./home-files.nix #./home-files.nix
#./flatpak.nix #./flatpak.nix
]; ];
@ -186,185 +186,8 @@
group = "users"; group = "users";
}; };
home-manager.users.insert= { pkgs, ... }: { #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;
# 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; security.polkit.enable = true;
# Enable automatic login for the user. # Enable automatic login for the user.
@ -435,6 +258,26 @@
# "--unsupported-gpu" # "--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 = { services.earlyoom = {
enable = true; enable = true;
freeSwapThreshold = 5; freeSwapThreshold = 5;

View file

@ -88,6 +88,26 @@
"type": "github" "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": { "hyprcursor": {
"inputs": { "inputs": {
"hyprlang": [ "hyprlang": [
@ -213,6 +233,7 @@
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"flatpaks": "flatpaks", "flatpaks": "flatpaks",
"home-manager": "home-manager_2",
"hyprland": "hyprland", "hyprland": "hyprland",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }

View file

@ -8,15 +8,25 @@
hyprland.inputs.nixpkgs.follows = "nixpkgs"; hyprland.inputs.nixpkgs.follows = "nixpkgs";
agenix.url = "github:ryantm/agenix"; agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs"; 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 { nixosConfigurations.insertpclinux = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
flatpaks.nixosModules.default flatpaks.nixosModules.default
./configuration.nix ./configuration.nix
agenix.nixosModules.default 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;
}
]; ];
}; };
}; };

View file

@ -2,7 +2,7 @@
#Yes I manage my home files like this, yes I am insane #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 #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] 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 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 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 text = ''# Colors
background-color=#303446 background-color=#303446
@ -22,27 +22,9 @@ progress-color=over #414559
border-color=#ef9f76''; 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 home.file.".config/waybar/config.jsonc" = {
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" = {
text = ''{ text = ''{
"layer": "top", "layer": "top",
"position": "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"; text = ''@import "frappe.css";
* { * {
@ -270,7 +252,7 @@ icon_theme_name = "Breeze Dark"
border-radius: 1rem;*/ 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 text = ''autogenerated = 0 # remove this line to remove the warning
# See https://wiki.hyprland.org/Configuring/Monitors/ # 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:272, movewindow
bindm = $mainMod, mouse:273, resizewindow''; bindm = $mainMod, mouse:273, resizewindow'';
}; };
home-manager.users.insert.home.file.".config/hypr/frappe.conf" = { home.file.".config/hypr/frappe.conf" = {
text = ''$rosewaterAlpha = f2d5cf text = ''$rosewaterAlpha = f2d5cf
$flamingoAlpha = eebebe $flamingoAlpha = eebebe
$pinkAlpha = f4b8e4 $pinkAlpha = f4b8e4
@ -505,7 +487,7 @@ $base = 0xff303446
$mantle = 0xff292c3c $mantle = 0xff292c3c
$crust = 0xff232634''; $crust = 0xff232634'';
}; };
home-manager.users.insert.home.file.".config/waybar/frappe.css" = { home.file.".config/waybar/frappe.css" = {
text = ''/* text = ''/*
* *
* Catppuccin Frappe palette * Catppuccin Frappe palette

186
home.nix Normal file
View file

@ -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;
}