refactor home-manager
This commit is contained in:
parent
a48829bbe6
commit
caed1fc0d4
|
@ -1,73 +0,0 @@
|
|||
# This is your home-manager configuration file
|
||||
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
||||
|
||||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
||||
# You can import other home-manager modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/home-manager):
|
||||
# outputs.homeManagerModules.example
|
||||
|
||||
# Or modules exported from other flakes (such as nix-colors):
|
||||
# inputs.nix-colors.homeManagerModules.default
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
../common/programs/git
|
||||
../common/programs/nvim
|
||||
../common/programs/zsh
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
|
||||
# Enable home-manager
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
"fuchsia" = {
|
||||
hostname = "192.168.1.101";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
# Setup our user environment
|
||||
username = "sabrina";
|
||||
homeDirectory = "/home/sabrina";
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
};
|
||||
|
||||
# Nicely reload system units when changing configs
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
home.stateVersion = "22.11";
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH+aPO/4odcdOtNbjpD1IinQSyO4vW98LcOvSXhwQutZ
|
17
home-manager/sajenim/features/cli/default.nix
Normal file
17
home-manager/sajenim/features/cli/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./git.nix
|
||||
./zsh.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
lazygit
|
||||
];
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks."viridian".hostname = "192.168.1.102";
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
|
@ -11,6 +11,8 @@
|
|||
userEmail = "its.jassy@pm.me";
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
core.sshCommand = "~/.ssh/sajenim_sk";
|
||||
user.signingkey = "~/.ssh/signing_sk";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
|
@ -31,8 +31,8 @@
|
|||
# An attribute set that adds to named directory hash table
|
||||
dirHashes = {
|
||||
# QMK Keymaps
|
||||
crkbd = "$HOME/Github/qmk_keymaps/keyboards/crkbd/keymaps/sajenim";
|
||||
kchrn = "$HOME/Github/qmk_keymaps/keyboards/keychron/q4/ansi_v2/keymaps/sajenim";
|
||||
crkbd = "$HOME/.github/qmk_keymaps/keyboards/crkbd/keymaps/sajenim";
|
||||
kchrn = "$HOME/.github/qmk_keymaps/keyboards/keychron/q4/ansi_v2/keymaps/sajenim";
|
||||
};
|
||||
|
||||
# Install plugins
|
7
home-manager/sajenim/features/desktop/common/default.nix
Normal file
7
home-manager/sajenim/features/desktop/common/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./discord
|
||||
];
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
:root {
|
||||
--font-primary: Fira Code;
|
||||
--font-primary: Fisa Code;
|
||||
|
||||
/* Gruvbox Material Dark Hard */
|
||||
--fg0: #d4be98;
|
||||
|
@ -22,6 +22,7 @@
|
|||
--interactive-normal: var(--grey0);
|
||||
--interactive-active: var(--grey0);
|
||||
--channel-icon: var(--grey0);
|
||||
--channeltextarea-background: var(--bg0_66);
|
||||
|
||||
--scrollbar-auto-thumb: var(--grey0);
|
||||
--scrollbar-auto-track: var(--bg1);
|
||||
|
@ -33,35 +34,8 @@
|
|||
--background-secondary: var(--bg0_66);
|
||||
--background-secondary-alt: var(--bg0_33);
|
||||
--background-tertiary: var(--bg1);
|
||||
--background-message-hover: var(--bg1);
|
||||
--background-mentioned: var(--bg1);
|
||||
--background-message-hover: var(--bg0_33);
|
||||
--background-mentioned: var(--bg0_66);
|
||||
--bg-overlay-selected: var(--bg1);
|
||||
}
|
||||
|
||||
/* Message Box */
|
||||
.scrollableContainer-15eg7h {
|
||||
background-color: var(--bg1);
|
||||
}
|
||||
.slateTextArea-27tjG0 {
|
||||
color: var(--grey0);
|
||||
}
|
||||
|
||||
/* Search Box */
|
||||
.search-39IXmY {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Add a Server + Explore Public Servers */
|
||||
.circleIconButton-1VxDrg {
|
||||
color: var(--grey0);
|
||||
}
|
||||
/* Remove: Nitro, Gif, Stickers, Emoji buttons */
|
||||
.buttons-uaqb-5 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Remove: New Message Bar */
|
||||
.newMessagesBar-1hF-9G {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
|
@ -16,4 +16,9 @@
|
|||
enable = true;
|
||||
source = ./config/custom.css;
|
||||
};
|
||||
|
||||
home.persistence."/persist/home/sajenim".directories = [
|
||||
".config/discord"
|
||||
".config/BetterDiscord"
|
||||
];
|
||||
}
|
33
home-manager/sajenim/features/desktop/jade/default.nix
Normal file
33
home-manager/sajenim/features/desktop/jade/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./picom.nix
|
||||
./rofi.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
feh
|
||||
xmobar
|
||||
unstable.wezterm
|
||||
];
|
||||
|
||||
home.file = {
|
||||
".local/share/fonts" = {
|
||||
recursive = true;
|
||||
source = "${inputs.self}/pkgs/patched-fonts";
|
||||
};
|
||||
".xinitrc".source = ./xinitrc;
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
wezterm = { source = ./wezterm/config; recursive = true; };
|
||||
};
|
||||
|
||||
xsession.windowManager.xmonad = {
|
||||
enable = true;
|
||||
enableContribAndExtras = true;
|
||||
config = "${inputs.self}/pkgs/xmonad-config/src/xmonad.hs";
|
||||
};
|
||||
}
|
||||
|
9
home-manager/sajenim/features/desktop/jade/rofi.nix
Normal file
9
home-manager/sajenim/features/desktop/jade/rofi.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
font = "Fisa Code 10";
|
||||
};
|
||||
}
|
||||
|
21
home-manager/sajenim/features/games/default.nix
Normal file
21
home-manager/sajenim/features/games/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./mangohud.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
gamemode
|
||||
protonup-ng
|
||||
prismlauncher
|
||||
runelite
|
||||
];
|
||||
persistence."/persist/home/sajenim" = {
|
||||
directories = [
|
||||
".runelite"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -81,5 +81,18 @@ return {
|
|||
end,
|
||||
opts = { },
|
||||
},
|
||||
|
||||
--
|
||||
-- Preview Markdown
|
||||
--
|
||||
{
|
||||
'iamcco/markdown-preview.nvim',
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
build = "cd app && npm install",
|
||||
init = function ()
|
||||
vim.g.mkdp_filetypes = { "markdown" }
|
||||
end,
|
||||
ft = { "markdown" },
|
||||
},
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.neovim = {
|
||||
|
@ -6,13 +6,14 @@
|
|||
#package = pkgs.neovim-nightly;
|
||||
defaultEditor = true;
|
||||
extraPackages = with pkgs; [
|
||||
# Misc
|
||||
lazygit
|
||||
# Required for nvim-treesitter
|
||||
gcc
|
||||
# Required for telescope.nvim
|
||||
fd
|
||||
ripgrep
|
||||
# Required for markdown-preview.nvim
|
||||
nodejs
|
||||
yarn
|
||||
# Language server packages
|
||||
nil
|
||||
haskell-language-server
|
||||
|
@ -20,5 +21,7 @@
|
|||
];
|
||||
};
|
||||
|
||||
home.persistence."/persist/home/sajenim".directories = [ ".local/share/nvim" ];
|
||||
|
||||
xdg.configFile.nvim = { source = ./config; recursive = true; };
|
||||
}
|
17
home-manager/sajenim/features/printing/default.nix
Normal file
17
home-manager/sajenim/features/printing/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
blender
|
||||
freecad
|
||||
openscad
|
||||
prusa-slicer
|
||||
];
|
||||
persistence."/persist/home/sajenim" = {
|
||||
directories = [
|
||||
".config/PrusaSlicer"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
48
home-manager/sajenim/fuchsia.nix
Normal file
48
home-manager/sajenim/fuchsia.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./global
|
||||
|
||||
./features/desktop/common
|
||||
./features/desktop/jade
|
||||
|
||||
./features/printing
|
||||
./features/games
|
||||
];
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
spotify
|
||||
jellyfin-media-player
|
||||
firefox
|
||||
pulsemixer
|
||||
# Graphics
|
||||
gimp
|
||||
inkscape
|
||||
krita
|
||||
# Games
|
||||
gamemode
|
||||
protonup-ng
|
||||
prismlauncher
|
||||
runelite
|
||||
# Hardware
|
||||
libratbag
|
||||
piper
|
||||
];
|
||||
persistence."/persist/home/sajenim" = {
|
||||
directories = [
|
||||
".mozilla"
|
||||
".config/Yubico"
|
||||
"Documents"
|
||||
"Downloads"
|
||||
"Games"
|
||||
"Music"
|
||||
"Pictures"
|
||||
"Printer"
|
||||
"Videos"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
48
home-manager/sajenim/global/default.nix
Normal file
48
home-manager/sajenim/global/default.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{ inputs, outputs, ... }: {
|
||||
imports = [
|
||||
inputs.impermanence.nixosModules.home-manager.impermanence
|
||||
../features/cli
|
||||
../features/nvim
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
];
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home = {
|
||||
username = "sajenim";
|
||||
homeDirectory = "/home/sajenim";
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
persistence."/persist/home/sajenim" = {
|
||||
directories = [
|
||||
".backup"
|
||||
".github"
|
||||
".gnupg"
|
||||
".ssh"
|
||||
|
||||
".local/bin"
|
||||
".local/share/nix"
|
||||
];
|
||||
files = [
|
||||
".zsh_history"
|
||||
];
|
||||
allowOther = true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.startServices = "sd-switch";
|
||||
home.stateVersion = "22.11";
|
||||
}
|
|
@ -1,148 +0,0 @@
|
|||
# This is your home-manager configuration file
|
||||
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
||||
|
||||
{ inputs, outputs, pkgs, ... }: {
|
||||
# You can import other home-manager modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/home-manager):
|
||||
# outputs.homeManagerModules.example
|
||||
|
||||
# Or modules exported from other flakes (such as nix-colors):
|
||||
# inputs.nix-colors.homeManagerModules.default
|
||||
inputs.impermanence.nixosModules.home-manager.impermanence
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
|
||||
# User services
|
||||
./services/picom
|
||||
|
||||
# User programs
|
||||
./programs/discord
|
||||
./programs/mangohud
|
||||
./programs/rofi
|
||||
|
||||
# Common programs
|
||||
../common/programs/git
|
||||
../common/programs/zsh
|
||||
../common/programs/nvim
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# inputs.neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
|
||||
# Enable home-manager
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
"viridian" = {
|
||||
hostname = "192.168.1.102";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
# Setup our user environment
|
||||
username = "sajenim";
|
||||
homeDirectory = "/home/sajenim";
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
# Install some packages
|
||||
packages = with pkgs; [
|
||||
# Stable user programs
|
||||
feh
|
||||
gamemode
|
||||
spotify
|
||||
prismlauncher
|
||||
runelite
|
||||
jellyfin-media-player
|
||||
xmobar
|
||||
# Unstable user programs
|
||||
unstable.wezterm
|
||||
];
|
||||
|
||||
persistence."/persist/home/sajenim" = {
|
||||
directories = [
|
||||
"Documents"
|
||||
"Downloads"
|
||||
"Games"
|
||||
"Music"
|
||||
"Pictures"
|
||||
"Printer"
|
||||
"Videos"
|
||||
|
||||
".gnupg"
|
||||
".ssh"
|
||||
".github"
|
||||
".mozilla"
|
||||
".zsh_history"
|
||||
".runelite"
|
||||
|
||||
".local/bin"
|
||||
".local/share/nix"
|
||||
".local/share/nvim"
|
||||
|
||||
".config/discord"
|
||||
".config/BetterDiscord"
|
||||
".config/PrusaSlicer"
|
||||
".config/Yubico"
|
||||
];
|
||||
allowOther = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Setup our window manager
|
||||
xsession.windowManager.xmonad = {
|
||||
enable = true;
|
||||
enableContribAndExtras = true;
|
||||
config = ../../pkgs/xmonad-config/src/xmonad.hs;
|
||||
};
|
||||
|
||||
# Copy our personal font collection
|
||||
home.file.".local/share/fonts" = {
|
||||
recursive = true;
|
||||
source = ../common/fonts;
|
||||
};
|
||||
|
||||
# Copy some configuration files to $XDG_CONFIG_HOME
|
||||
xdg.configFile = {
|
||||
wezterm = { source = ./programs/wezterm/config; recursive = true; };
|
||||
};
|
||||
|
||||
# Setup our desktop environment
|
||||
home.file.".xinitrc".source = ./xinitrc;
|
||||
|
||||
# Nicely reload system units when changing configs
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
home.stateVersion = "22.11";
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIN6zrgWQj9NbuZEvqK3r2U9jSJjLotGb8asUkcr+co5sAAAABHNzaDo= sajenim@fuchsia
|
|
@ -1,9 +0,0 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
font = "Fira Code 10";
|
||||
};
|
||||
}
|
||||
|
1
home-manager/sajenim/sajenim_sk.pub
Normal file
1
home-manager/sajenim/sajenim_sk.pub
Normal file
|
@ -0,0 +1 @@
|
|||
sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBAyOgJgJ1d3uNb/sRWp7cN2n6CoJ4zyvf8VklwdwmV8zx0uNipD/HxRKkCEpSR3Ids72i5uSBtEzjAtv9UR5r4IAAAALc3NoOnNhamVuaW0= sajenim@fuchsia
|
7
home-manager/sajenim/viridian.nix
Normal file
7
home-manager/sajenim/viridian.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./global
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue