restructure
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
channel.enable = false;
|
channel.enable = false;
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
builders-use-substitutes = lib.mkIf true;
|
builders-use-substitutes = (config.sops.secrets ? "remoteBuildKey");
|
||||||
|
|
||||||
substituters = lib.mkIf config.programs.hyprland.enable ["https://hyprland.cachix.org"];
|
substituters = lib.mkIf config.programs.hyprland.enable ["https://hyprland.cachix.org"];
|
||||||
trusted-substituters = lib.mkIf config.programs.hyprland.enable ["https://hyprland.cachix.org"];
|
trusted-substituters = lib.mkIf config.programs.hyprland.enable ["https://hyprland.cachix.org"];
|
||||||
|
|||||||
@@ -113,29 +113,6 @@
|
|||||||
};
|
};
|
||||||
};*/
|
};*/
|
||||||
|
|
||||||
programs.fuse.userAllowOther = true;
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
backupFileExtension = "backup";
|
|
||||||
extraSpecialArgs = {inherit inputs;};
|
|
||||||
users = {
|
|
||||||
"nathan" = lib.mkMerge [
|
|
||||||
inputs.nathan-home-manager
|
|
||||||
{
|
|
||||||
config.homeconfig = {
|
|
||||||
minimal = false;
|
|
||||||
hyprland.enable = false;
|
|
||||||
wal.enable = false;
|
|
||||||
mpd.enable = true;
|
|
||||||
calcurse.enable = true;
|
|
||||||
rofi.enable = true;
|
|
||||||
firefox.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fonts.packages = with pkgs; [ nerd-fonts.fira-code ];
|
fonts.packages = with pkgs; [ nerd-fonts.fira-code ];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -32,6 +32,9 @@
|
|||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|
||||||
|
hostName = "homebox";
|
||||||
|
|
||||||
nameservers = lib.mkDefault [ "1.1.1.1" "1.0.0.1" ];
|
nameservers = lib.mkDefault [ "1.1.1.1" "1.0.0.1" ];
|
||||||
networkmanager = {
|
networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
flake.nixosConfigurations."homebox" = inputs.nixpkgs.lib.nixosSystem {
|
flake.nixosConfigurations."homebox" = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
|
||||||
modules = [
|
modules = with self.nixosModules; [
|
||||||
self.nixosModules.homebox
|
(user-nathan "laptop")
|
||||||
self.nixosModules.homebox-hardware
|
homebox
|
||||||
|
homebox-hardware
|
||||||
self.diskoConfigurations.homebox
|
self.diskoConfigurations.homebox
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
imports = with self.nixosModules; [
|
imports = with self.nixosModules; [
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
|
|
||||||
|
self.nixosModules.default
|
||||||
self.nixosModules.default
|
self.nixosModules.default
|
||||||
aurora-greeter
|
aurora-greeter
|
||||||
hyprland
|
hyprland
|
||||||
@@ -71,6 +72,9 @@
|
|||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|
||||||
|
hostName = "laptop";
|
||||||
|
|
||||||
nameservers = [
|
nameservers = [
|
||||||
"1.1.1.1"
|
"1.1.1.1"
|
||||||
"1.0.0.1"
|
"1.0.0.1"
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
flake.nixosConfigurations."laptop" = inputs.nixpkgs.lib.nixosSystem {
|
flake.nixosConfigurations."laptop" = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
|
||||||
modules = [
|
modules = with self.nixosModules; [
|
||||||
self.nixosModules.laptop
|
user-nathan
|
||||||
self.nixosModules.laptop-hardware
|
laptop
|
||||||
|
laptop-hardware
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -6,71 +6,29 @@
|
|||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
];
|
];
|
||||||
|
|
||||||
options.homeconfig = with lib; {
|
|
||||||
|
|
||||||
name = mkOption {
|
|
||||||
type = with types; nullOr str;
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
graphical = mkOption {
|
|
||||||
type = with types; bool;
|
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
standalone = mkOption {
|
|
||||||
type = with types; bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
virtual-machines = mkOption {
|
|
||||||
type = with types; bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
homeconfig = {
|
home.username = "nathan";
|
||||||
name = "nathan";
|
|
||||||
|
|
||||||
mpd.enable = lib.mkDefault true;
|
|
||||||
calcurse.enable = lib.mkDefault true;
|
|
||||||
git.enable = lib.mkDefault true;
|
|
||||||
nh.enable = lib.mkDefault true;
|
|
||||||
|
|
||||||
minimal = lib.mkDefault false;
|
|
||||||
hyprland.enable = lib.mkDefault config.homeconfig.graphical;
|
|
||||||
hypridle.enable = lib.mkDefault config.homeconfig.hyprland.enable;
|
|
||||||
wal.enable = lib.mkDefault config.homeconfig.graphical;
|
|
||||||
rofi.enable = lib.mkDefault config.homeconfig.hyprland.enable;
|
|
||||||
firefox.enable = lib.mkDefault config.homeconfig.graphical;
|
|
||||||
|
|
||||||
aurora.enable = lib.mkDefault config.homeconfig.hyprland.enable;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.username = lib.mkDefault config.homeconfig.name;
|
|
||||||
|
|
||||||
home.homeDirectory = lib.mkDefault "/home/${config.home.username}";
|
home.homeDirectory = lib.mkDefault "/home/${config.home.username}";
|
||||||
|
|
||||||
home.stateVersion = "23.11";
|
home.stateVersion = "23.11";
|
||||||
|
|
||||||
home.pointerCursor = lib.mkIf config.homeconfig.graphical {
|
home.pointerCursor = {
|
||||||
gtk.enable = true;
|
gtk.enable = true;
|
||||||
package = pkgs.bibata-cursors;
|
package = pkgs.bibata-cursors;
|
||||||
name = "Bibata-Modern-Classic";
|
name = "Bibata-Modern-Classic";
|
||||||
size = 16;
|
size = 16;
|
||||||
};
|
};
|
||||||
|
|
||||||
dconf.settings = lib.mkIf config.homeconfig.virtual-machines {
|
dconf.settings = {
|
||||||
"org/virt-manager/virt-manager/connections" = {
|
"org/virt-manager/virt-manager/connections" = {
|
||||||
autoconnect = ["qemu:///system"];
|
autoconnect = ["qemu:///system"];
|
||||||
uris = ["qemu:///system"];
|
uris = ["qemu:///system"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
gtk = lib.mkIf (config.homeconfig.graphical && config.homeconfig.hyprland.enable) {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme.name = "Tokyonight-Dark";
|
theme.name = "Tokyonight-Dark";
|
||||||
theme.package = pkgs.tokyonight-gtk-theme;
|
theme.package = pkgs.tokyonight-gtk-theme;
|
||||||
@@ -108,7 +66,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = lib.mkIf (!config.homeconfig.wal.enable) [
|
home.packages = lib.mkIf (!(builtins.any (x: x == pkgs.pywal16) config.home.packages)) [
|
||||||
inputs.nixvim.packages.${pkgs.stdenv.hostPlatform.system}.default
|
inputs.nixvim.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, ... }: {
|
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/hypr" = lib.mkIf config.homeconfig.hyprland.enable { source = ./hypr; recursive = true; };
|
".config/hypr" = lib.mkIf config.wayland.windowManager.hyprland.enable { source = ./hypr; recursive = true; };
|
||||||
".config/wal/templates" = lib.mkIf config.homeconfig.wal.enable { source = ./wal/templates; recursive = true; };
|
".config/wal/templates" = lib.mkIf (builtins.any (x: x == pkgs.pywal16) config.home.packages) { source = ./wal/templates; recursive = true; };
|
||||||
".config/ohmyposh" = { source = ./ohmyposh; recursive = true; };
|
".config/ohmyposh" = { source = ./ohmyposh; recursive = true; };
|
||||||
"Pictures/Wallpaper" = lib.mkIf config.homeconfig.graphical { source = ./Wallpaper; recursive = true; };
|
"Pictures/Wallpaper" = lib.mkIf config.wayland.windowManager.hyprland.enable { source = ./Wallpaper; recursive = true; };
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,17 +1,12 @@
|
|||||||
{ inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, ... }: {
|
flake.homeModules.nathan-aurora = { config, lib, ... }: {
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.aurora.homeModules.default
|
inputs.aurora.homeModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
options.homeconfig.aurora.enable = with lib; mkOption {
|
config = {
|
||||||
type = with types; bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.homeconfig.aurora.enable {
|
|
||||||
|
|
||||||
programs.aurora = {
|
programs.aurora = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
|
flake.homeModules.nathan-bash = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
home.packages = with pkgs; [ oh-my-posh ];
|
home.packages = with pkgs; [ oh-my-posh ];
|
||||||
|
|
||||||
@@ -24,12 +24,16 @@
|
|||||||
source ${pkgs.blesh}/share/blesh/ble.sh
|
source ${pkgs.blesh}/share/blesh/ble.sh
|
||||||
'';
|
'';
|
||||||
|
|
||||||
initExtra = if config.homeconfig.wal.enable then (lib.mkBefore ''
|
initExtra = lib.mkMerge [
|
||||||
cat ${config.home.homeDirectory}/.cache/wal/sequences
|
(lib.mkIf (builtins.any (x: x == pkgs.pywal16) config.home.packages) (lib.mkBefore ''
|
||||||
eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)"
|
cat ${config.home.homeDirectory}/.cache/wal/sequences
|
||||||
'') else (lib.mkBefore ''
|
eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)"
|
||||||
eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.config/ohmyposh/ohmyposh.toml)"
|
''))
|
||||||
'');
|
|
||||||
|
(lib.mkIf (!(builtins.any (x: x == pkgs.pywal16) config.home.packages)) (lib.mkBefore ''
|
||||||
|
eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.config/ohmyposh/ohmyposh.toml)"
|
||||||
|
''))
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
|
flake.homeModules.nathan-bat = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
programs.bat = {
|
programs.bat = {
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
|
flake.homeModules.nathan-calcurse = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
options.homeconfig.calcurse.enable = lib.options.mkOption {
|
config = {
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.homeconfig.calcurse.enable {
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
calcurse
|
calcurse
|
||||||
libnotify
|
libnotify
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
|
flake.homeModules.nathan-eza = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
programs.eza = {
|
programs.eza = {
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,12 @@
|
|||||||
{ inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
|
flake.homeModules.nathan-firefox = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
options.homeconfig.firefox.enable = lib.options.mkOption {
|
config = {
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.homeconfig.firefox.enable {
|
|
||||||
|
|
||||||
home.sessionVariables.BROWSER = "${config.programs.firefox.package}/bin/firefox";
|
home.sessionVariables.BROWSER = "${config.programs.firefox.package}/bin/firefox";
|
||||||
|
|
||||||
home.packages = lib.mkIf config.homeconfig.wal.enable [
|
home.packages = lib.mkIf (builtins.any (x: x == pkgs.pywal16) config.home.packages) [
|
||||||
pkgs.pywalfox-native
|
pkgs.pywalfox-native
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
|
flake.homeModules.nathan-fzf = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
programs.fzf = {
|
programs.fzf = {
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, ... }: {
|
flake.homeModules.nathan-git = { config, lib, ... }: {
|
||||||
|
|
||||||
options.homeconfig.git.enable = lib.options.mkOption {
|
config = {
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.homeconfig.git.enable {
|
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
secrets = {
|
secrets = {
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
|
flake.homeModules.nathan-hypridle = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
options.homeconfig.hypridle.enable = lib.options.mkOption {
|
config = {
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.homeconfig.hypridle.enable {
|
|
||||||
|
|
||||||
services.hypridle = {
|
services.hypridle = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
|
flake.homeModules.nathan-hyprland = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
options.homeconfig.hyprland.enable = lib.options.mkOption {
|
config = {
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.homeconfig.hyprland.enable {
|
|
||||||
|
|
||||||
home.sessionVariables.NIX_OZONE_WL = "1";
|
home.sessionVariables.NIX_OZONE_WL = "1";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, ... }: {
|
flake.homeModules.nathan-kitty = { config, ... }: {
|
||||||
|
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,8 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
|
flake.homeModules.nathan-mpd = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
options = {
|
config = {
|
||||||
homeconfig.mpd.enable = lib.options.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.homeconfig.mpd.enable {
|
|
||||||
services.mpd = {
|
services.mpd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
network.startWhenNeeded = true;
|
network.startWhenNeeded = true;
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
{ inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, ... }: {
|
flake.homeModules.nathan-nh = { config, lib, ... }: {
|
||||||
|
|
||||||
options.homeconfig.nh.enable = lib.options.mkOption {
|
config = {
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.homeconfig.nh.enable {
|
|
||||||
|
|
||||||
programs.nh = {
|
programs.nh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
|
flake.homeModules.nathan-ohmyposh = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
oh-my-posh
|
oh-my-posh
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
|
|
||||||
initContent = with lib; mkMerge [
|
initContent = with lib; mkMerge [
|
||||||
(mkIf config.homeconfig.wal.enable (mkBefore ''
|
(mkIf (builtins.any (x: x == pkgs.pywal16) config.home.packages) (mkBefore ''
|
||||||
cat ${config.home.homeDirectory}/.cache/wal/sequences
|
cat ${config.home.homeDirectory}/.cache/wal/sequences
|
||||||
eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)"
|
eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)"
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
bindkey '\r' _colorRefresh
|
bindkey '\r' _colorRefresh
|
||||||
''))
|
''))
|
||||||
|
|
||||||
(mkIf (!config.homeconfig.wal.enable) (mkBefore ''
|
(mkIf (!(builtins.any (x: x == pkgs.pywal16) config.home.packages)) (mkBefore ''
|
||||||
eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.config/ohmyposh/ohmyposh.toml)"
|
eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.config/ohmyposh/ohmyposh.toml)"
|
||||||
''))
|
''))
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, ... }: {
|
flake.homeModules.nathan-opencode = { config, lib, ... }: {
|
||||||
|
|
||||||
options.homeconfig.opencode.enable = with lib; mkOption {
|
config = {
|
||||||
type = with types; bool;
|
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.homeconfig.opencode.enable {
|
|
||||||
|
|
||||||
programs.opencode = {
|
programs.opencode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
{ inputs, ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, pkgs, ... }: let
|
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
|
||||||
system = pkgs.stdenv.hostPlatform;
|
|
||||||
|
|
||||||
pkgs-us = import inputs.nixpkgs-us {
|
|
||||||
inherit system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
in {
|
|
||||||
|
|
||||||
options.homeconfig.minimal = with lib; options.mkOption {
|
|
||||||
type = with types; bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
config = with lib; mkMerge [
|
config = with lib; mkMerge [
|
||||||
{
|
{
|
||||||
@@ -41,11 +28,27 @@
|
|||||||
pyusb
|
pyusb
|
||||||
requests
|
requests
|
||||||
]))
|
]))
|
||||||
|
|
||||||
|
cava
|
||||||
|
android-tools
|
||||||
|
neovim-remote
|
||||||
|
zulu
|
||||||
|
fastfetch
|
||||||
|
ncmpcpp
|
||||||
|
playerctl
|
||||||
|
mpc
|
||||||
|
ffmpeg
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(mkIf config.homeconfig.graphical {
|
(mkIf config.wayland.windowManager.hyprland.enable {
|
||||||
|
|
||||||
|
nixpkgs.config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
|
||||||
grim
|
grim
|
||||||
@@ -53,30 +56,6 @@
|
|||||||
wl-clipboard
|
wl-clipboard
|
||||||
xfce.thunar
|
xfce.thunar
|
||||||
blueberry
|
blueberry
|
||||||
];
|
|
||||||
})
|
|
||||||
|
|
||||||
(mkIf (!config.homeconfig.minimal) {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
cava
|
|
||||||
android-tools
|
|
||||||
neovim-remote
|
|
||||||
zulu
|
|
||||||
fastfetch
|
|
||||||
ncmpcpp
|
|
||||||
playerctl
|
|
||||||
mpc
|
|
||||||
ffmpeg
|
|
||||||
];
|
|
||||||
})
|
|
||||||
|
|
||||||
(mkIf (!config.homeconfig.minimal && config.homeconfig.graphical) {
|
|
||||||
|
|
||||||
nixpkgs.config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
|
|
||||||
handbrake
|
handbrake
|
||||||
quickemu
|
quickemu
|
||||||
@@ -111,7 +90,7 @@
|
|||||||
#games
|
#games
|
||||||
prismlauncher
|
prismlauncher
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,13 @@
|
|||||||
{ inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
|
flake.homeModules.nathan-pywal = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
options.homeconfig.wal.enable = lib.options.mkOption {
|
config = {
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.homeconfig.wal.enable {
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
inputs.nixvim.packages.${pkgs.stdenv.hostPlatform.system}.pywal
|
inputs.nixvim.packages.${pkgs.stdenv.hostPlatform.system}.pywal
|
||||||
|
pywal16
|
||||||
pywal16
|
imagemagick
|
||||||
imagemagick
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { ... }: {
|
flake.homeModules.nathan-ripgrep = { ... }: {
|
||||||
|
|
||||||
programs.ripgrep = {
|
programs.ripgrep = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
|
flake.homeModules.nathan-rofi = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
options.homeconfig.rofi.enable = lib.options.mkOption {
|
config = {
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.homeconfig.rofi.enable {
|
|
||||||
programs.rofi = {
|
programs.rofi = {
|
||||||
|
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,17 +1,8 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
|
flake.homeModules.nathan-scripts = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
options = {
|
config = {
|
||||||
homeconfig.scripts.enable = lib.options.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkMerge [
|
|
||||||
|
|
||||||
(lib.mkIf config.homeconfig.scripts.enable {
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
|
|
||||||
#scripts
|
#scripts
|
||||||
@@ -64,8 +55,7 @@
|
|||||||
'')
|
'')
|
||||||
|
|
||||||
];
|
];
|
||||||
})
|
};
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { ... }: {
|
flake.homeModules.nathan-ssh = { ... }: {
|
||||||
|
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
|
flake.homeModules.nathan-tmux = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { ... }: {
|
flake.homeModules.nathan-yazi = { ... }: {
|
||||||
config = {
|
config = {
|
||||||
programs.yazi = {
|
programs.yazi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { ... }: {
|
flake.homeModules.nathan-zoxide = { ... }: {
|
||||||
|
|
||||||
programs.zoxide = {
|
programs.zoxide = {
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
flake.homeModules.nathan = { lib, ... }: {
|
flake.homeModules.nathan-zsh = { lib, ... }: {
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{ self, inputs, ... }: {
|
{ self, inputs, ... }: {
|
||||||
|
|
||||||
flake.nixosModules.user-nathan = host: { config, lib, pkgs, ... }: {
|
flake.nixosModules.user-nathan = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
sops.secrets."nathan/pass".neededForUsers = true;
|
sops.secrets."nathan/pass".neededForUsers = true;
|
||||||
|
|
||||||
users.users.nathan = {
|
users.users.nathan = {
|
||||||
shell = lib.mkDefault pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
name = lib.mkDefault "nathan";
|
name = lib.mkDefault "nathan";
|
||||||
isNormalUser = lib.mkDefault true;
|
isNormalUser = lib.mkDefault true;
|
||||||
#hashedPasswordFile = lib.mkIf (cfg.hashedPasswordFile != null) cfg.hashedPasswordFile;
|
#hashedPasswordFile = lib.mkIf (cfg.hashedPasswordFile != null) cfg.hashedPasswordFile;
|
||||||
@@ -20,11 +20,18 @@
|
|||||||
packages = lib.mkIf (false) [ pkgs.home-manager ];
|
packages = lib.mkIf (false) [ pkgs.home-manager ];
|
||||||
|
|
||||||
};
|
};
|
||||||
wayland.windowManager.hyprland.extraConfig = if host == "laptop" then ''
|
|
||||||
monitor=eDP-1,1920x1080@60,0x0,1
|
home-manager.users.nathan = lib.mkMerge [
|
||||||
bind = CTRL SHIFT, XF86Launch2, exec, bash -c 'if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then pkexec --user root /nix/var/nix/profiles/system/bin/switch-to-configuration switch; else pkexec --user root /nix/var/nix/profiles/system/specialisation/docked/bin/switch-to-configuration switch; fi'
|
self.homeModules.nathan
|
||||||
bind = ALT, Escape, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi
|
|
||||||
'' else '''';
|
(lib.mkIf (config.networking.hostName == "laptop") {
|
||||||
|
wayland.windowManager.hyprland.extraConfig = ''
|
||||||
|
monitor=eDP-1,1920x1080@60,0x0,1
|
||||||
|
bind = CTRL SHIFT, XF86Launch2, exec, bash -c 'if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then pkexec --user root /nix/var/nix/profiles/system/bin/switch-to-configuration switch; else pkexec --user root /nix/var/nix/profiles/system/specialisation/docked/bin/switch-to-configuration switch; fi'
|
||||||
|
bind = ALT, Escape, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -33,13 +40,6 @@
|
|||||||
{
|
{
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
homeconfig = {
|
|
||||||
graphical = lib.mkDefault false;
|
|
||||||
minimal = lib.mkDefault false;
|
|
||||||
|
|
||||||
hyprland.enable = lib.mkDefault false;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||||
|
|||||||
Reference in New Issue
Block a user