added parametarized flake path to hosts configs
This commit is contained in:
parent
37d9e918d4
commit
509a02d847
@ -18,6 +18,7 @@
|
||||
hostName = hostName;
|
||||
fullName = fullName;
|
||||
de = desktop;
|
||||
flakePath = "/home/${userName}/nixos";
|
||||
};
|
||||
|
||||
# Limit the number of generations to keep
|
||||
|
||||
@ -33,6 +33,10 @@ in
|
||||
default = "User";
|
||||
description = "Full display name for the user";
|
||||
};
|
||||
flakePath = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Absolute path to the NixOS flake configuration directory";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
@ -101,8 +105,10 @@ in
|
||||
dark = "Papirus-Dark";
|
||||
};
|
||||
|
||||
targets = {
|
||||
# Keep custom Framework plymouth theme
|
||||
targets.plymouth.enable = false;
|
||||
plymouth.enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
@ -46,7 +47,16 @@ in
|
||||
};
|
||||
|
||||
# Stylix auto-theming - applies to all programs.<name>.enable apps
|
||||
stylix.autoEnable = true;
|
||||
stylix = {
|
||||
autoEnable = true;
|
||||
|
||||
# Must tell which profile
|
||||
targets.firefox = {
|
||||
profileNames = [ "default" ];
|
||||
colorTheme.enable = true; # use firefox color
|
||||
firefoxGnomeTheme.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Enable niri home configuration
|
||||
nirihome = {
|
||||
@ -257,7 +267,8 @@ in
|
||||
# Active symlinks
|
||||
xdg.configFile = {
|
||||
# Active linked dotfiles
|
||||
"niri".source = config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/frame12/linked-dotfiles/niri";
|
||||
"niri".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "${osConfig.deskCfg.flakePath}/frame12/linked-dotfiles/niri";
|
||||
};
|
||||
|
||||
# Override Flatpak Steam to disable GPU acceleration (fixes black window on Niri)
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
fullName = fullName;
|
||||
de = desktop;
|
||||
installGaming = gaming;
|
||||
flakePath = "/home/${userName}/nixos";
|
||||
};
|
||||
|
||||
# Limit the number of generations to keep
|
||||
|
||||
@ -38,6 +38,10 @@ in
|
||||
default = true;
|
||||
description = "Whether to install gaming software or not";
|
||||
};
|
||||
flakePath = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Absolute path to the NixOS flake configuration directory";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
@ -103,8 +107,10 @@ in
|
||||
dark = "Reversal";
|
||||
};
|
||||
|
||||
# Disable plymouth styling (use default)
|
||||
targets.plymouth.enable = false;
|
||||
targets = {
|
||||
# Disable plymouth styling (use custom)
|
||||
plymouth.enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
pkgs,
|
||||
lib,
|
||||
unstablePkgs,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
@ -37,7 +38,16 @@ in
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
# Stylix auto-theming - applies to all programs.<name>.enable apps
|
||||
stylix.autoEnable = true;
|
||||
stylix = {
|
||||
autoEnable = true;
|
||||
targets.firefox = {
|
||||
profileNames = [
|
||||
"default"
|
||||
];
|
||||
colorTheme.enable = true; # use firefox color
|
||||
firefoxGnomeTheme.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Enable niri home configuration
|
||||
nirihome = {
|
||||
@ -137,7 +147,7 @@ in
|
||||
# Active symlinks for live-edited config
|
||||
xdg.configFile = {
|
||||
"niri".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "/home/${userName}/nixos/jaci/linked-dotfiles/niri";
|
||||
config.lib.file.mkOutOfStoreSymlink "${osConfig.deskCfg.flakePath}/jaci/linked-dotfiles/niri";
|
||||
};
|
||||
|
||||
# Override Flatpak Steam to disable GPU acceleration (fixes black window on Niri)
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
nfsIpExport = "192.168.1.1/24";
|
||||
syncthingEnable = true;
|
||||
caldavEnable = true;
|
||||
flakePath = "/home/${userName}/nixos";
|
||||
};
|
||||
|
||||
# deskCfg = {
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
fullName = fullName;
|
||||
de = desktop;
|
||||
installGaming = gaming;
|
||||
flakePath = "/home/${userName}/nixos";
|
||||
};
|
||||
|
||||
# Limit the number of generations to keep
|
||||
@ -62,6 +63,8 @@
|
||||
|
||||
autoCfg = {
|
||||
userName = userName;
|
||||
flakePath = "/home/${userName}/nixos";
|
||||
hostName = hostName;
|
||||
};
|
||||
|
||||
services.clamav.daemon.enable = true;
|
||||
|
||||
@ -1,6 +1,19 @@
|
||||
{ config, lib, inputs, outputs, pkgs, timeZone, system, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
timeZone,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
supportedDesktops = [ "sway" "hyprland" "niri" ];
|
||||
supportedDesktops = [
|
||||
"sway"
|
||||
"hyprland"
|
||||
"niri"
|
||||
];
|
||||
supportedDesktopsStr = lib.strings.concatStringsSep ", " supportedDesktops;
|
||||
deskCfg = config.deskCfg;
|
||||
in
|
||||
@ -29,6 +42,10 @@ in
|
||||
default = true;
|
||||
description = "Whether to install gaming software or not";
|
||||
};
|
||||
flakePath = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Absolute path to the NixOS flake configuration directory";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
@ -100,18 +117,20 @@ in
|
||||
dark = "Papirus-Dark";
|
||||
};
|
||||
|
||||
targets = {
|
||||
# Let plymouth use its own theme
|
||||
targets.plymouth.enable = false;
|
||||
plymouth.enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
inputs.nur.overlays.default
|
||||
];
|
||||
|
||||
|
||||
# Enable flakes feature
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command" "flakes"
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
@ -142,7 +161,14 @@ in
|
||||
userName = deskCfg.userName;
|
||||
fullName = deskCfg.fullName;
|
||||
isDesktopUser = true;
|
||||
extraGroups = [ "dialout" "docker" "i2c" "lp" "scanner" "syncthing" ];
|
||||
extraGroups = [
|
||||
"dialout"
|
||||
"docker"
|
||||
"i2c"
|
||||
"lp"
|
||||
"scanner"
|
||||
"syncthing"
|
||||
];
|
||||
};
|
||||
|
||||
swaywm = {
|
||||
@ -179,4 +205,3 @@ in
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
@ -35,7 +36,15 @@ in
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
|
||||
# Stylix auto-theming - applies to all programs.<name>.enable apps
|
||||
stylix.autoEnable = true;
|
||||
stylix = {
|
||||
autoEnable = true;
|
||||
# Must tell which profile
|
||||
targets.firefox = {
|
||||
profileNames = [ "default" ];
|
||||
colorTheme.enable = true; # use firefox color
|
||||
firefoxGnomeTheme.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Enable shared modules
|
||||
firefoxApp.enable = true;
|
||||
@ -339,9 +348,9 @@ in
|
||||
xdg.configFile = {
|
||||
# Active linked dotfiles
|
||||
"hypr".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/nate-work/linked-dotfiles/hypr";
|
||||
config.lib.file.mkOutOfStoreSymlink "${osConfig.deskCfg.flakePath}/nate-work/linked-dotfiles/hypr";
|
||||
"niri".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/nate-work/linked-dotfiles/niri";
|
||||
config.lib.file.mkOutOfStoreSymlink "${osConfig.deskCfg.flakePath}/nate-work/linked-dotfiles/niri";
|
||||
# waybar is now managed by shared/modules/home-manager/waybar.nix via waybarConfig.enable
|
||||
};
|
||||
|
||||
|
||||
@ -9,6 +9,14 @@ in
|
||||
type = lib.types.str;
|
||||
description = "username for enabling sudo-less system updates";
|
||||
};
|
||||
flakePath = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Absolute path to the NixOS flake configuration directory";
|
||||
};
|
||||
hostName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Hostname for the nixos-rebuild flake target";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
@ -35,7 +43,7 @@ in
|
||||
Type = "oneshot";
|
||||
ExecStart = pkgs.writeShellScript "nixos-flake-update.sh" ''
|
||||
set -e
|
||||
cd ~/nixos
|
||||
cd ${autoCfg.flakePath}
|
||||
|
||||
echo "Updating flake inputs..."
|
||||
${pkgs.nix}/bin/nix flake lock \
|
||||
@ -60,7 +68,7 @@ in
|
||||
echo "Rebuilding NixOS..."
|
||||
${pkgs.nixos-rebuild}/bin/nixos-rebuild switch \
|
||||
-L \
|
||||
--flake ~/nixos#nate-work
|
||||
--flake ${autoCfg.flakePath}#${autoCfg.hostName}
|
||||
|
||||
echo "NixOS rebuild completed successfully"
|
||||
'';
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
fullName = fullName;
|
||||
de = desktop;
|
||||
installGaming = gaming;
|
||||
flakePath = "/home/${userName}/nixos";
|
||||
};
|
||||
|
||||
# Limit the number of generations to keep
|
||||
|
||||
@ -29,6 +29,10 @@ in
|
||||
default = true;
|
||||
description = "Whether to install gaming software or not";
|
||||
};
|
||||
flakePath = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Absolute path to the NixOS flake configuration directory";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{ inputs, config, pkgs, lib, ... }:
|
||||
{ inputs, config, pkgs, lib, osConfig, ... }:
|
||||
let
|
||||
userName = "nate";
|
||||
fullName = "Nathan Anderson";
|
||||
@ -159,7 +159,7 @@
|
||||
|
||||
xdg.configFile = {
|
||||
# Active linked dotfiles
|
||||
"niri".source = config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/nate/linked-dotfiles/niri";
|
||||
"niri".source = config.lib.file.mkOutOfStoreSymlink "${osConfig.deskCfg.flakePath}/nate/linked-dotfiles/niri";
|
||||
};
|
||||
|
||||
# Configure default applications for opening links
|
||||
|
||||
@ -87,7 +87,7 @@ in
|
||||
};
|
||||
settings = {
|
||||
"browser.startup.blankWindow" = true;
|
||||
"browser.startup.homepage" = "https://www.startpage.com/do/mypage.pl?prfe=11898a1adf7b7dfb587580692f358773a11ca25e993b8e077476641cec033319e15f2449c345f5be919fd0a082015c3e4ed23143bd4337512466c04c2999831a54abca2eaeb42963c63ff064";
|
||||
"browser.startup.homepage" = "https://www.kagi.com";
|
||||
"browser.search.region" = "US";
|
||||
"browser.search.isUS" = true;
|
||||
"distribution.searchplugins.defaultLocale" = "en-US";
|
||||
|
||||
@ -56,6 +56,10 @@ in
|
||||
default = false;
|
||||
description = "Setups up avahi and printer services to expose local printer to network";
|
||||
};
|
||||
flakePath = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Absolute path to the NixOS flake configuration directory";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user