Successfully separated home-manager configs from system configs
This commit is contained in:
160
flake.nix
160
flake.nix
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "pagedMov's NixOS configuration";
|
description = "pagedMov's NixOS and Home Manager configuration";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
@@ -30,77 +30,111 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = { self, home-manager, nixpkgs, nur, nixvim, stylix, ... } @ inputs:
|
||||||
nixpkgs,
|
let
|
||||||
nur,
|
system = "x86_64-linux";
|
||||||
self,
|
pkgs = import nixpkgs { inherit system; };
|
||||||
nixvim,
|
username = "pagedmov";
|
||||||
stylix,
|
in {
|
||||||
...
|
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||||
} @ inputs: let
|
|
||||||
system = "x86_64-linux";
|
|
||||||
username = "pagedmov";
|
|
||||||
in {
|
|
||||||
homeManagerModules.default = ./modules/home;
|
|
||||||
nixosModules.default = ./modules/sys;
|
|
||||||
serverModules.default = ./modules/server;
|
|
||||||
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
|
||||||
|
|
||||||
nixosConfigurations = {
|
# Home Manager configurations for each user/machine
|
||||||
oganesson = nixpkgs.lib.nixosSystem {
|
homeConfigurations = {
|
||||||
specialArgs = {
|
oganessonHome = home-manager.lib.homeManagerConfiguration {
|
||||||
host = "oganesson";
|
inherit pkgs;
|
||||||
inherit self inputs username;
|
extraSpecialArgs = {
|
||||||
|
host = "oganesson";
|
||||||
|
inherit self username inputs nur;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Specific Home Manager config for oganesson
|
||||||
|
modules = [
|
||||||
|
./hosts/desktop/home.nix
|
||||||
|
./modules/home
|
||||||
|
stylix.homeManagerModules.stylix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
mercuryHome = home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit system;
|
||||||
|
pkgs = pkgs;
|
||||||
|
extraSpecialArgs = { inherit self inputs username; };
|
||||||
|
|
||||||
|
# Specific Home Manager config for mercury
|
||||||
|
configuration = import ./hosts/laptop/home.nix;
|
||||||
|
};
|
||||||
|
|
||||||
|
xenonHome = home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit system;
|
||||||
|
pkgs = pkgs;
|
||||||
|
extraSpecialArgs = { inherit self inputs username; };
|
||||||
|
|
||||||
|
# Specific Home Manager config for xenon
|
||||||
|
configuration = import ./hosts/server/home.nix;
|
||||||
};
|
};
|
||||||
inherit system;
|
|
||||||
modules = [
|
|
||||||
./hosts/desktop/config.nix
|
|
||||||
./modules/sys
|
|
||||||
stylix.nixosModules.stylix
|
|
||||||
nixvim.nixosModules.nixvim
|
|
||||||
nur.nixosModules.nur
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mercury = nixpkgs.lib.nixosSystem {
|
nixosConfigurations = {
|
||||||
specialArgs = {
|
oganesson = nixpkgs.lib.nixosSystem {
|
||||||
host = "mercury";
|
specialArgs = {
|
||||||
inherit self inputs username;
|
host = "oganesson";
|
||||||
|
inherit self inputs username;
|
||||||
|
};
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
./hosts/desktop/config.nix
|
||||||
|
./modules/sys
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
stylix.nixosModules.stylix
|
||||||
|
nixvim.nixosModules.nixvim
|
||||||
|
nur.nixosModules.nur
|
||||||
|
];
|
||||||
};
|
};
|
||||||
modules = [
|
|
||||||
./hosts/laptop/config.nix
|
|
||||||
./modules/sys
|
|
||||||
stylix.nixosModules.stylix
|
|
||||||
nixvim.nixosModules.nixvim
|
|
||||||
nur.nixosModules.nur
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
xenon = nixpkgs.lib.nixosSystem {
|
mercury = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
host = "xenon";
|
host = "mercury";
|
||||||
inherit self inputs username;
|
inherit self inputs username;
|
||||||
|
};
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
./hosts/laptop/config.nix
|
||||||
|
./modules/sys
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
stylix.nixosModules.stylix
|
||||||
|
nixvim.nixosModules.nixvim
|
||||||
|
nur.nixosModules.nur
|
||||||
|
];
|
||||||
};
|
};
|
||||||
modules = [
|
|
||||||
./hosts/server/config.nix
|
|
||||||
./modules/sys
|
|
||||||
./modules/server
|
|
||||||
stylix.nixosModules.stylix
|
|
||||||
nixvim.nixosModules.nixvim
|
|
||||||
nur.nixosModules.nur
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
installer = nixpkgs.lib.nixosSystem {
|
xenon = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
host = "installer";
|
host = "xenon";
|
||||||
inherit self inputs;
|
inherit self inputs username;
|
||||||
|
};
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
./hosts/server/config.nix
|
||||||
|
./modules/sys
|
||||||
|
./modules/server
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
stylix.nixosModules.stylix
|
||||||
|
nixvim.nixosModules.nixvim
|
||||||
|
nur.nixosModules.nur
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
installer = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {
|
||||||
|
host = "installer";
|
||||||
|
inherit self inputs;
|
||||||
|
};
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
./hosts/installer
|
||||||
|
nixvim.nixosModules.nixvim
|
||||||
|
];
|
||||||
};
|
};
|
||||||
modules = [
|
|
||||||
./hosts/installer
|
|
||||||
nixvim.nixosModules.nixvim
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
{pkgs, ...}: {
|
{pkgs, username, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./home.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# My module options
|
# My module options
|
||||||
@@ -43,6 +42,23 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
users = {
|
||||||
|
groups.persist = {};
|
||||||
|
users = {
|
||||||
|
root.initialPassword = "1234";
|
||||||
|
${username} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
initialPassword = "1234";
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
extraGroups = ["wheel" "persist" "libvirtd"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
security.sudo.extraConfig = ''
|
||||||
|
${username} ALL=(ALL) NOPASSWD: /etc/profiles/per-user/${username}/bin/rebuild
|
||||||
|
'';
|
||||||
|
nix.settings.allowed-users = ["${username}"];
|
||||||
|
|
||||||
time.timeZone = "America/New_York";
|
time.timeZone = "America/New_York";
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,94 +1,56 @@
|
|||||||
{
|
{
|
||||||
host,
|
|
||||||
pkgs,
|
|
||||||
self,
|
|
||||||
inputs,
|
|
||||||
username,
|
username,
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
nur = config.nur;
|
{
|
||||||
in {
|
home.username = "${username}"; # Replace with your actual username
|
||||||
imports = [inputs.home-manager.nixosModules.home-manager];
|
home.homeDirectory = "/home/${username}"; # Replace with your actual home directory
|
||||||
home-manager = {
|
home.stateVersion = "24.05"; # Adjust this based on your system's NixOS version
|
||||||
useUserPackages = true;
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
backupFileExtension = "backup";
|
|
||||||
extraSpecialArgs = {inherit self inputs host username nur;};
|
|
||||||
users = {
|
|
||||||
${username} = {
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
imports = [
|
|
||||||
inputs.self.outputs.homeManagerModules.default
|
|
||||||
];
|
|
||||||
|
|
||||||
# My custom home-manager modules
|
programs.home-manager.enable = true;
|
||||||
movOpts = {
|
|
||||||
# modules/home/files
|
|
||||||
homeFiles.enable = true;
|
|
||||||
|
|
||||||
# modules/home/environment
|
movOpts = {
|
||||||
hyprlandConfig.enable = true;
|
# modules/home/files
|
||||||
autojumpConfig.enable = true;
|
homeFiles.enable = true;
|
||||||
stylixHomeConfig.enable = true;
|
|
||||||
waybarConfig.enable = true;
|
|
||||||
gtkConfig.enable = true;
|
|
||||||
spicetifyConfig.enable = true;
|
|
||||||
starshipConfig.enable = true;
|
|
||||||
|
|
||||||
# modules/home/programs
|
# modules/home/environment
|
||||||
btopConfig.enable = true;
|
hyprlandConfig.enable = true;
|
||||||
swayncConfig.enable = true;
|
autojumpConfig.enable = true;
|
||||||
userPkgs.enable = true;
|
stylixHomeConfig.enable = true;
|
||||||
cavaConfig.enable = true;
|
waybarConfig.enable = true;
|
||||||
ezaConfig.enable = true;
|
gtkConfig.enable = true;
|
||||||
firefoxConfig.enable = true;
|
spicetifyConfig.enable = true;
|
||||||
fuzzelConfig.enable = true;
|
starshipConfig.enable = true;
|
||||||
fzfConfig.enable = true;
|
|
||||||
gitConfig.enable = true;
|
|
||||||
kittyConfig.enable = true;
|
|
||||||
yaziConfig.enable = true;
|
|
||||||
zshConfig.enable = true;
|
|
||||||
passConfig.enable = true;
|
|
||||||
batConfig.enable = true;
|
|
||||||
|
|
||||||
# modules/home/scripts
|
# modules/home/programs
|
||||||
movScripts.enable = true;
|
btopConfig.enable = true;
|
||||||
movScripts.commandScripts.enable = true;
|
swayncConfig.enable = true;
|
||||||
movScripts.hyprlandControls.enable = true;
|
userPkgs.enable = true;
|
||||||
movScripts.nixShortcuts.enable = true;
|
cavaConfig.enable = true;
|
||||||
};
|
ezaConfig.enable = true;
|
||||||
|
firefoxConfig.enable = true;
|
||||||
|
fuzzelConfig.enable = true;
|
||||||
|
fzfConfig.enable = true;
|
||||||
|
gitConfig.enable = true;
|
||||||
|
kittyConfig.enable = true;
|
||||||
|
yaziConfig.enable = true;
|
||||||
|
zshConfig.enable = true;
|
||||||
|
passConfig.enable = true;
|
||||||
|
batConfig.enable = true;
|
||||||
|
|
||||||
dconf.settings = lib.mkIf config.movOpts.virtConfig.enable {
|
# modules/home/scripts
|
||||||
"org/virt-manager/virt-manager/connections" = {
|
movScripts.enable = true;
|
||||||
autoconnect = ["qemu:///system"];
|
movScripts.commandScripts.enable = true;
|
||||||
uris = ["qemu:///system"];
|
movScripts.hyprlandControls.enable = true;
|
||||||
};
|
movScripts.nixShortcuts.enable = true;
|
||||||
};
|
|
||||||
home = {
|
|
||||||
username = "${username}";
|
|
||||||
homeDirectory = "/home/${username}";
|
|
||||||
stateVersion = "24.05";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
users = {
|
dconf.settings = {
|
||||||
groups.persist = {};
|
"org/virt-manager/virt-manager/connections" = {
|
||||||
users = {
|
autoconnect = ["qemu:///system"];
|
||||||
root.initialPassword = "1234";
|
uris = ["qemu:///system"];
|
||||||
${username} = {
|
|
||||||
isNormalUser = true;
|
|
||||||
initialPassword = "1234";
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
extraGroups = ["wheel" "persist" "libvirtd"];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
security.sudo.extraConfig = ''
|
|
||||||
${username} ALL=(ALL) NOPASSWD: /etc/profiles/per-user/${username}/bin/rebuild
|
|
||||||
'';
|
|
||||||
nix.settings.allowed-users = ["${username}"];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,16 +7,17 @@
|
|||||||
./hardware.nix
|
./hardware.nix
|
||||||
./home.nix
|
./home.nix
|
||||||
];
|
];
|
||||||
nixSettings.enable = true;
|
movOpts = {
|
||||||
networkModule.enable = true;
|
nixSettings.enable = true;
|
||||||
bootLoader.enable = true;
|
networkModule.enable = true;
|
||||||
issue.enable = true;
|
bootLoader.enable = true;
|
||||||
sysPkgs.enable = true;
|
issue.enable = true;
|
||||||
sysProgs.enable = true;
|
sysPkgs.enable = true;
|
||||||
sysServices.enable = true;
|
sysProgs.enable = true;
|
||||||
jellyfinConfig.enable = true;
|
sysServices.enable = true;
|
||||||
caddyConfig.enable = true;
|
jellyfinConfig.enable = true;
|
||||||
|
caddyConfig.enable = true;
|
||||||
|
};
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedTCPPorts = [ 443 8920 ];
|
allowedTCPPorts = [ 443 8920 ];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,18 +1,49 @@
|
|||||||
{lib, config, pkgs, ... }: {
|
{lib, self, config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
scheme = "tokyo-night-dark";
|
||||||
|
wallpaper = "${self}/assets/wallpapers/dark-waves.jpg";
|
||||||
|
in
|
||||||
|
{
|
||||||
options = {
|
options = {
|
||||||
movOpts.stylixHomeConfig.enable = lib.mkEnableOption "enables my stylix Home-Manager options";
|
movOpts.stylixHomeConfig.enable = lib.mkEnableOption "enables my stylix Home-Manager options";
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.movOpts.stylixHomeConfig.enable {
|
config = lib.mkIf config.movOpts.stylixHomeConfig.enable {
|
||||||
stylix = {
|
stylix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
base16Scheme = "${pkgs.base16-schemes}/share/themes/${scheme}.yaml";
|
||||||
|
image = wallpaper;
|
||||||
|
polarity = "dark";
|
||||||
autoEnable = true;
|
autoEnable = true;
|
||||||
|
opacity.terminal = 0.50;
|
||||||
targets = {
|
targets = {
|
||||||
# fzf.enable = true;
|
|
||||||
# kitty.enable = true;
|
|
||||||
# vesktop.enable = true;
|
|
||||||
waybar.enable = false;
|
waybar.enable = false;
|
||||||
btop.enable = false;
|
btop.enable = false;
|
||||||
};
|
};
|
||||||
|
cursor = {
|
||||||
|
package = pkgs.bibata-cursors;
|
||||||
|
name = "Bibata-Modern-Ice";
|
||||||
|
};
|
||||||
|
fonts = {
|
||||||
|
monospace = {
|
||||||
|
package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
|
||||||
|
name = "JetBrains Mono Nerd Font";
|
||||||
|
};
|
||||||
|
sansSerif = {
|
||||||
|
package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
|
||||||
|
name = "JetBrains Mono Nerd Font";
|
||||||
|
};
|
||||||
|
serif = {
|
||||||
|
package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
|
||||||
|
name = "JetBrains Mono Nerd Font";
|
||||||
|
};
|
||||||
|
sizes = {
|
||||||
|
desktop = 10;
|
||||||
|
applications = 14;
|
||||||
|
terminal = 14;
|
||||||
|
popups = 16;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{lib, config, nur, username, self, ... }: {
|
{lib, config, nur, username, self, pkgs, ... }: {
|
||||||
options = {
|
options = {
|
||||||
movOpts.firefoxConfig.enable = lib.mkEnableOption "enables my firefox configuration";
|
movOpts.firefoxConfig.enable = lib.mkEnableOption "enables my firefox configuration";
|
||||||
};
|
};
|
||||||
@@ -83,17 +83,6 @@
|
|||||||
url = "https://www.nerdfonts.com/cheat-sheet";
|
url = "https://www.nerdfonts.com/cheat-sheet";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
extensions = with nur.repos.rycee.firefox-addons; [
|
|
||||||
darkreader
|
|
||||||
adnauseam
|
|
||||||
cookie-autodelete
|
|
||||||
disconnect
|
|
||||||
firefox-color
|
|
||||||
vimium
|
|
||||||
firenvim
|
|
||||||
privacy-badger
|
|
||||||
new-tab-override
|
|
||||||
];
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
"browser.startup.homepage" = "${self}/glasshouse-desktop/home/firefox/homepage.html";
|
"browser.startup.homepage" = "${self}/glasshouse-desktop/home/firefox/homepage.html";
|
||||||
"browser.active_color" = "#EE0000";
|
"browser.active_color" = "#EE0000";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
jellyfinConfig.enable = lib.mkEnableOption "Enables the server's jellyfin config";
|
movOpts.jellyfinConfig.enable = lib.mkEnableOption "Enables the server's jellyfin config";
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.movOpts.jellyfinConfig.enable {
|
config = lib.mkIf config.movOpts.jellyfinConfig.enable {
|
||||||
services.jellyfin = {
|
services.jellyfin = {
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
./cdn
|
./cdn
|
||||||
./glasshaus
|
./glasshaus
|
||||||
];
|
];
|
||||||
|
movOpts = {
|
||||||
jellyfinConfig.enable = lib.mkDefault false;
|
jellyfinConfig.enable = lib.mkDefault false;
|
||||||
caddyConfig.enable = lib.mkDefault false;
|
caddyConfig.enable = lib.mkDefault false;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
caddyConfig.enable = lib.mkEnableOption "Enable my caddy config for the glasshaus.info domain name";
|
movOpts.caddyConfig.enable = lib.mkEnableOption "Enable my caddy config for the glasshaus.info domain name";
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.movOpts.caddyConfig.enable {
|
config = lib.mkIf config.movOpts.caddyConfig.enable {
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
|
|||||||
Reference in New Issue
Block a user