switch to default.nix for home-manager

This commit is contained in:
2025-01-12 10:03:11 -06:00
parent 1689da5b56
commit e7ac0a8c26
18 changed files with 183 additions and 425 deletions

View File

@@ -32,12 +32,13 @@
#simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
system.url = "./system-config";
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
tokyo-night-sddm = {
url = "github:siddrs/tokyo-night-sddm";
flake = false;
};
sugar-dark-sddm = {
url = "github:MarianArlt/sddm-sugar-dark";
flake = false;
@@ -45,7 +46,12 @@
nixvim.url = "/home/nathan/Projects/Nixvim";
nathan.url = "./home-manager";
ags.url = "github:Aylur/ags/v1";
themecord = {
url = "github:danihek/themecord";
inputs.nixpkgs.follows = "nixpkgs";
};
};

View File

@@ -1,8 +1,38 @@
{ ... }: {
{ config, lib, pkgs, ... }: {
imports = [
./programs
./services
./packages
./dotfiles
./impermanence
./services
];
config = {
home.stateVersion = "23.11";
home.username = "nathan";
home.homeDirectory = "/home/nathan";
home.pointerCursor = {
gtk.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 16;
};
gtk = {
enable = true;
theme.name = "Tokyonight-Dark-B";
theme.package = pkgs.tokyonight-gtk-theme;
iconTheme.name = "Tokyonight-Dark";
};
services.mpris-proxy.enable = true;
programs.ssh.enable = true;
};
}

View File

@@ -1,26 +1,12 @@
{ config, lib, ... }: {
config = lib.mkMerge [
(lib.mkIf config.homeconfig.ags.enable {
home.file."ags" = { source = ./ags; target = ".config/ags"; recursive = true; };
})
(lib.mkIf config.homeconfig.hyprland.enable {
home.file = {
"Wallpaper" = { source = ./Wallpaper; target = "Pictures/Wallpaper"; recursive = true; };
"hyprland" = { source = ./hypr; target = ".config/hypr"; recursive = true; };
".config/ags" = { source = ./dotfiles/ags; recursive = true; };
".config/hypr" = { source = ./dotfiles/hypr; recursive = true; };
".config/swaylock" = { source = ./dotfiles/swaylock; recursive = true; };
".config/wal/templates" = { source = ./dotfiles/wal/templates; recursive = true; };
".config/wayvnc" = { source = ./dotfiles/wayvnc; recursive = true; };
"Pictures/Wallpaper" = { source = ./dotfiles/Wallpaper; recursive = true; };
};
})
(lib.mkIf config.homeconfig.swaylock.enable {
home.file."swaylock" = { source = ./swaylock; target = ".config/swaylock"; recursive = true; };
})
(lib.mkIf config.homeconfig.wal.enable {
home.file."wal" = { source = ./wal/templates; target = ".config/wal/templates"; recursive = true; };
})
];
}

View File

@@ -1,65 +0,0 @@
{
description = "Nathan user settings";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
prgms.url = "./programs";
packages.url = "./packages";
};
outputs = { self, ... }@inputs: {
homeManagerModule = { config, lib, pkgs, ... }: {
imports = [
inputs.prgms.hmModule
./services
inputs.packages.hmModule
# ./dotfiles
./impermanence
];
home.stateVersion = "23.11";
home.file = {
".config/ags" = { source = ./dotfiles/ags; recursive = true; };
".config/hypr" = { source = ./dotfiles/hypr; recursive = true; };
".config/swaylock" = { source = ./dotfiles/swaylock; recursive = true; };
".config/wal/templates" = { source = ./dotfiles/wal/templates; recursive = true; };
".config/wayvnc" = { source = ./dotfiles/wayvnc; recursive = true; };
"Pictures/Wallpaper" = { source = ./dotfiles/Wallpaper; recursive = true; };
};
home.username = "nathan";
home.homeDirectory = "/home/nathan";
home.pointerCursor = {
gtk.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 16;
};
gtk = {
enable = true;
theme.name = "Tokyonight-Dark-B";
theme.package = pkgs.tokyonight-gtk-theme;
iconTheme.name = "Tokyonight-Dark";
};
services.mpris-proxy.enable = true;
programs.ssh.enable = true;
};
};
}

View File

@@ -1,8 +1,15 @@
{ config, lib, pkgs, pkgs-us, self, ... }: {
{ config, lib, pkgs, inputs, ... }: let
system = "x86_64-linux";
pkgs-us = import inputs.nixpkgs-us {
inherit system;
config.allowUnfree = true;
};
in {
imports = [
./scripts
self.inputs.external.hmModule
];
options.homeconfig.minimal = lib.options.mkOption {

View File

@@ -1,15 +0,0 @@
{ config, lib, pkgs, self, ... }: {
options = {
homeconfig.externalPackages.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf config.homeconfig.externalPackages.enable {
home.packages = [
self.packages.${pkgs.system}.digital
];
};
}

View File

@@ -1,40 +0,0 @@
{
description = "Nathan user External Flakes";
inputs = {
digital = {
url = "https://github.com/hneemann/Digital/releases/latest/download/Digital.zip";
flake = false;
};
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
};
outputs = { self, ... }@inputs: let
system = "x86_64-linux";
_pkgs = import inputs.nixpkgs { inherit system; };
in {
packages.${system}.digital = _pkgs.stdenv.mkDerivation {
name = "digital";
src = inputs.digital;
buildPhase = ''
'';
installPhase = ''
mkdir -p $out/bin
echo "${_pkgs.zulu}/bin/java -jar $src/Digital.jar" > $out/bin/$name
chmod +x $out/bin/digital
'';
};
hmModule = { config, lib, pkgs, ... }: import ./. { inherit config lib pkgs self; };
};
}

View File

@@ -1,24 +0,0 @@
{
description = "Nathan user packages";
inputs = {
nixpkgs-us.url = "github:nixos/nixpkgs/nixos-unstable";
external.url = "./external";
};
outputs = { self, ... }@inputs: let
system = "x86_64-linux";
pkgs-us = import inputs.nixpkgs-us {
inherit system;
config.allowUnfree = true;
};
in {
hmModule = { config, lib, pkgs, ... }: import ./. { inherit config lib pkgs pkgs-us self; };
};
}

View File

@@ -1,12 +0,0 @@
{
description = "Nathan user scripts";
inputs = {
};
outputs = { self, ... }: {
hmModule = import ./.;
};
}

View File

@@ -0,0 +1,39 @@
{ config, lib, pkgs, inputs, ... }: {
imports = [ inputs.ags.homeManagerModules.default ];
options.homeconfig.ags.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.homeconfig.ags.enable {
programs.ags = {
enable = true;
extraPackages = with pkgs; [
gtksourceview
webkitgtk
accountsservice
];
};
home.file.".config/ags/launcher.js".text = /*javascript*/ ''
function Launcher() {
return Widget.EventBox({
class_name: "launcher",
hpack: "center",
child: Widget.Icon({
icon: '${pkgs.nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake.png',
css: 'font-size: 24px;'
}),
on_primary_click: () => {Utils.execAsync('rofi -show drun')},
margin_left: 10,
})
}
export default Launcher
'';
};
}

View File

@@ -1,52 +0,0 @@
{
description = "ags config";
inputs = {
ags.url = "github:Aylur/ags/v1";
};
outputs = { self, ... }@inputs: {
hmModule = { config, lib, pkgs, ... }: {
imports = [ inputs.ags.homeManagerModules.default ];
options.homeconfig.ags.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.homeconfig.ags.enable {
programs.ags = {
enable = true;
extraPackages = with pkgs; [
gtksourceview
webkitgtk
accountsservice
];
};
home.file.".config/ags/launcher.js".text = /*javascript*/ ''
function Launcher() {
return Widget.EventBox({
class_name: "launcher",
hpack: "center",
child: Widget.Icon({
icon: '${pkgs.nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake.png',
css: 'font-size: 24px;'
}),
on_primary_click: () => {Utils.execAsync('rofi -show drun')},
margin_left: 10,
})
}
export default Launcher
'';
};
};
};
}

View File

@@ -0,0 +1,23 @@
{ config, lib, pkgs, inputs, ... }: {
imports = [
./ags
./hyprland
./terminal
./rofi
./pywal
./swaylock
./calcurse
./wayvnc
./firefox
];
config = {
home.packages = [
inputs.nixvim.packages.${pkgs.system}.default
];
home.sessionVariables.EDITOR = "nvim";
};
}

View File

@@ -1,42 +0,0 @@
{
description = "Nathan user program config";
inputs = {
ags.url = "./ags";
nixvim.url = "/home/nathan/Projects/Nixvim";
rofi.url = "./rofi";
pywal.url = "./pywal";
hyprland.url = "./hyprland";
};
outputs = { self, ... }@inputs: {
hmModule = { config, lib, pkgs, ... }: {
imports = [
inputs.ags.hmModule
inputs.hyprland.hmModule
./terminal
inputs.rofi.hmModule
inputs.pywal.hmModule
./swaylock
./calcurse
./wayvnc
./firefox
];
home.packages = [
inputs.nixvim.packages.${pkgs.system}.default
];
home.sessionVariables.EDITOR = "nvim";
};
};
}

View File

@@ -0,0 +1,31 @@
{ config, lib, pkgs, ... }: {
options.homeconfig.hyprland.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.homeconfig.hyprland.enable {
home.sessionVariables.NIX_OZONE_WL = "1";
programs.kitty.enable = lib.mkDefault true;
home.packages = with pkgs; [
pyprland
];
wayland.windowManager.hyprland = {
enable = true;
systemd.variables = [ "--all" ];
extraConfig = ''
source = /home/nathan/.config/hypr/main.conf
'';
};
};
}

View File

@@ -1,43 +0,0 @@
{
description = "Hyprland Config";
inputs = {
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
};
outputs = { self, ... }@inputs: {
hmModule = { config, lib, pkgs, ... }: {
options.homeconfig.hyprland.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.homeconfig.hyprland.enable {
home.sessionVariables.NIX_OZONE_WL = "1";
programs.kitty.enable = lib.mkDefault true;
home.packages = with pkgs; [
pyprland
];
wayland.windowManager.hyprland = {
enable = true;
systemd.variables = [ "--all" ];
extraConfig = ''
source = /home/nathan/.config/hypr/main.conf
'';
};
};
};
};
}

View File

@@ -0,0 +1,29 @@
{ config, lib, pkgs, inputs, ... }: {
options.homeconfig.wal.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = let
pywalfox-wrapper = pkgs.writeShellScriptBin "pywalfox-wrapper" ''
${pkgs.pywalfox-native}/bin/pywalfox start
'';
in lib.mkIf config.homeconfig.wal.enable {
home.packages = with pkgs; [
inputs.themecord.packages.${pkgs.system}.default
vesktop
pywal16
imagemagick
pywalfox-native
];
home.file.".mozilla/native-messaging-hosts/pywalfox.json".text = lib.replaceStrings [ "<path>" ] [
"${pywalfox-wrapper}/bin/pywalfox-wrapper"
] (lib.readFile "${pkgs.pywalfox-native}/lib/python3.12/site-packages/pywalfox/assets/manifest.json");
};
}

View File

@@ -1,90 +0,0 @@
{
description = "Pywal Config";
inputs = {
themecord = {
url = "github:danihek/themecord";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
};
/*spicetify-nix = {
url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
};
spicetify-ext = {
url = "github:rxri/spicetify-extensions";
flake = false;
};*/
nixpkgs-us.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, ... }@inputs: let
system = "x86_64-linux";
pkgs-us = import inputs.nixpkgs-us {
inherit system;
config.allowUnfree = true;
};
in {
hmModule = { config, lib, pkgs, ... }:{
imports = [
#inputs.spicetify-nix.homeManagerModules.default
];
options.homeconfig.wal.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = let
pywalfox-wrapper = pkgs.writeShellScriptBin "pywalfox-wrapper" ''
${pkgs-us.pywalfox-native}/bin/pywalfox start
'';
in lib.mkIf config.homeconfig.wal.enable {
/*programs.spicetify = let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
in {
enable = true;
spotifyPackage = pkgs-us.spotify;
theme = spicePkgs.themes.default;
enabledExtensions = with spicePkgs.extensions; [
({
src = "${inputs.spicetify-ext}/adblock";
name = "adblock.js";
})
copyToClipboard
oneko
#randomBadToTheBoneRiff #this could be hilarious
];
enabledCustomApps = with spicePkgs.apps; [
ncsVisualizer
];
};*/
home.packages = with pkgs; [
inputs.themecord.packages.${pkgs.system}.default
vesktop
pkgs-us.pywal16
imagemagick
pkgs-us.pywalfox-native
];
home.file.".mozilla/native-messaging-hosts/pywalfox.json".text = lib.replaceStrings [ "<path>" ] [
"${pywalfox-wrapper}/bin/pywalfox-wrapper"
]
(lib.readFile "${pkgs.pywalfox-native}/lib/python3.12/site-packages/pywalfox/assets/manifest.json");
};
};
};
}

View File

@@ -1,10 +0,0 @@
{
description = "Rofi Config";
outputs = { self, ... }: {
hmModule = import ./.;
};
}