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