hah, fixed manwe only to break orome

This commit is contained in:
Chris Kruining 2025-03-18 21:57:16 +01:00
parent af58cfb4ab
commit 1172e2bd68
15 changed files with 133 additions and 105 deletions

View file

@ -12,64 +12,10 @@
};
modules = {
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
system.audio.enable = true;
networking.enable = true;
develop = {
rust.enable = true;
js.enable = true;
dotnet.enable = true;
};
# EXPERIMENTS
# services.games.minecraft.enable = true;
services.auth.enable = true;
desktop = {
plasma.enable = true;
applications = {
communication.enable = true;
email.enable = true;
office.enable = true;
steam.enable = true;
recording.enable = true;
};
terminal = {
default = "ghostty";
alacritty.enable = true;
ghostty.enable = true;
};
editors = {
default = "zed";
vscodium.enable = true;
zed.enable = true;
nvim.enable = true;
nano.enable = true;
kate.enable = true;
};
browsers = {
default = "chromium";
firefox.enable = true;
chrome.enable = true;
};
games = {
minecraft.enable = true;
};
};
shell = {
default = "zsh";
};
};
}

View file

@ -1,5 +1,58 @@
{}:
{ ... }:
{
full_name = "WOOOP WOOOP";
is_trusted = false;
# full_name = "WOOOP WOOOP";
# is_trusted = false;
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
develop = {
rust.enable = true;
js.enable = true;
dotnet.enable = true;
};
desktop = {
plasma.enable = true;
applications = {
communication.enable = true;
email.enable = true;
office.enable = true;
steam.enable = true;
recording.enable = true;
};
terminal = {
default = "ghostty";
alacritty.enable = true;
ghostty.enable = true;
};
editors = {
default = "zed";
vscodium.enable = true;
zed.enable = true;
nvim.enable = true;
nano.enable = true;
kate.enable = true;
};
browsers = {
default = "chromium";
firefox.enable = true;
chrome.enable = true;
};
games = {
minecraft.enable = true;
};
};
shell = {
default = "zsh";
};
}

View file

@ -0,0 +1,4 @@
{ ... }:
{
kaas = true;
}

View file

@ -7,7 +7,7 @@ args@{
}: let
inherit (inputs.nixpkgs.lib) nixosSystem;
inherit (builtins) baseNameOf elem map;
inherit (lib.attrsets) filterAttrs;
inherit (lib) filterAttrs attrValues attrNames;
inherit (lib.modules) mkAliasOptionModule mkDefault mkIf;
inherit (lib.strings) removeSuffix;
inherit (self.modules) mapModules mapModulesRec';
@ -23,6 +23,8 @@ in rec
modules =
let
stateVersion = "23.11";
users = attrNames (mapModules "${path}/users" (p: p));
in [
inputs.nixos-boot.nixosModules.default
{
@ -38,7 +40,7 @@ in rec
inputs.home-manager.nixosModules.home-manager
"${path}/hardware.nix"
]
++ (mapModulesRec' (toString ../modules/system) import);
++ (mapModulesRec' ../modules/system import);
users = {
mutableUsers = true; # Set this to false when I get sops with passwords set up properly
@ -55,22 +57,20 @@ in rec
users = mapModules "${path}/users" (p: mkHmUser p stateVersion);
};
}
{
_module.args.user = "chris";
imports = []
++ (mapModulesRec' ../modules/home (file: file));
# ++ (mapModulesRec' ../modules/home (file: file));
# ++ (mapModulesRec' ../modules/home (file: import file (args // { user = "chris"; })))
# ++ (mapModulesRec' ../modules/home (file: import file (args // { user = "kaas"; })));
modules.chris = (import "${path}/users/chris/default.nix" args);
# modules.kaas = (import "${path}/users/kaas/default.nix" args);
}
(filterAttrs (n: v: !elem n ["system"]) attrs)
../. # ../default.nix
(import path)
];
]
++ (map (user: {
_module.args.user = user;
imports = [
"${path}/users/${user}/test.nix"
]
++ (mapModulesRec' ../modules/home (file: file));
modules.${user} = (import "${path}/users/${user}/default.nix" args);
}) users);
};
mapHosts = dir: attrs @ {system ? system, ...}:

View file

@ -22,7 +22,7 @@ in rec
};
mkHmUser = path: stateVersion: let
user = import path {};
# user = import path {};
name = removeSuffix ".nix" (baseNameOf path);
in
{

View file

@ -16,7 +16,7 @@ in {
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
user.packages = with pkgs; [
(ungoogled-chromium.override {
commandLineArgs = [
"--enable-features=AcceleratedVideoEncoder"
@ -28,7 +28,7 @@ in {
})
];
home-manager.users.${user}.programs.chromium = {
programs.chromium = {
enable = true;
enablePlasmaBrowserIntegration = true;
extensions = [

View file

@ -6,6 +6,7 @@ let
inherit (lib.strings) concatStrings;
cfg = config.modules.${user}.desktop.browsers.firefox;
usr = config.users.users.${user};
in {
options.modules.${user}.desktop.browsers.firefox = let
inherit (lib.options) mkEnableOption;
@ -15,7 +16,7 @@ in {
enable = mkEnableOption "Gecko-based libre browser";
privacy.enable = mkEnableOption "Privacy Focused Firefox fork";
profileName = mkOpt str config.user.name;
profileName = mkOpt str usr.name;
settings = mkOpt' (attrsOf (oneOf [bool int str])) {} ''
Firefox preferences set in <filename>user.js</filename>
'';
@ -69,7 +70,7 @@ in {
# Enables userContent.css and userChrome.css for our theme modules
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
# Stop creating ~/Downloads!
"browser.download.dir" = "${config.user.home}/downloads";
"browser.download.dir" = "${usr.home}/downloads";
# Disables built-in password manager -> use external PM!
"signon.rememberSignons" = false;
# Firefox, DO NOT CHECK if you are the default browser..

View file

@ -11,7 +11,11 @@ in
in { enable = mkEnableOption "nano"; };
config = mkIf cfg.enable {
home-manager.users.${user}.programs.nano = {
user.packages = with pkgs; [
nano
];
programs.nano = {
enable = true;
syntaxHighlight = true;
nanorc = ''

View file

@ -15,7 +15,7 @@ in
config = mkIf cfg.enable {
modules.desktop.editors.nvim.enable = true;
home-manager.users.${user}.programs.nvf = {
programs.nvf = {
enable = true;
settings = {
vim = {

View file

@ -1,14 +1,14 @@
{ config, options, lib, pkgs, user, ... }:
let
inherit (lib.meta) getExe;
inherit (lib.modules) mkOption mkIf;
inherit (lib.modules) mkIf;
cfg = config.modules.${user}.desktop.plasma;
in
{
options.modules.${user}.desktop.plasma = let
inherit (lib.options) mkEnableOption;
in {
inherit (lib.options) mkEnableOption mkOption;
in {
enable = mkEnableOption "plasma 6";
autoLogin = mkOption {
@ -42,18 +42,20 @@ in
];
# should enable theme integration with gtk apps (i.e. firefox, thunderbird)
home-manager.users.${user}.programs.dconf.enable = true;
programs.dconf.enable = true;
home-manager.users.${user}.programs.plasma = {
enable = true;
home-manager.users.${user}.programs = {
plasma = {
enable = true;
kwin = {
edgeBarrier = 0;
cornerBarrier = false;
};
kwin = {
edgeBarrier = 0;
cornerBarrier = false;
};
spectacle.shortcuts = {
captureRectangularRegion = "Meta+Shift+S";
spectacle.shortcuts = {
captureRectangularRegion = "Meta+Shift+S";
};
};
};
};

View file

@ -1,16 +1,16 @@
{ config, options, lib, pkgs, ... }:
{ config, options, lib, pkgs, user, ... }:
let
inherit (lib.modules) mkIf;
in
{
options.modules.develop = let
options.modules.${user}.develop = let
inherit (lib.options) mkEnableOption;
in
{
xdg.enable = mkEnableOption "XDG-related conf" // { default = true; };
};
config = mkIf config.modules.develop.xdg.enable {
config = mkIf config.modules.${user}.develop.xdg.enable {
};
}

View file

@ -1,16 +1,16 @@
{ inputs, config, options, lib, pkgs, ... }:
{ inputs, config, options, lib, pkgs, user, ... }:
let
inherit (lib.attrsets) attrValues;
inherit (lib.modules) mkIf mkMerge;
in
{
options.modules.develop.dotnet = let
options.modules.${user}.develop.dotnet = let
inherit (lib.options) mkEnableOption;
in {
enable = mkEnableOption ".NET developmnt";
};
config = mkIf config.modules.develop.dotnet.enable {
config = mkIf config.modules.${user}.develop.dotnet.enable {
user.packages = attrValues {
inherit (pkgs) dotnet-sdk_8;
};

View file

@ -1,17 +1,17 @@
{ inputs, config, options, lib, pkgs, ... }:
{ inputs, config, options, lib, pkgs, user, ... }:
let
inherit (lib.attrsets) attrValues;
inherit (lib.modules) mkIf mkMerge;
in
{
options.modules.develop.js = let
options.modules.${user}.develop.js = let
inherit (lib.options) mkEnableOption;
in {
enable = mkEnableOption "JS developmnt";
};
config = mkMerge [
(mkIf config.modules.develop.js.enable {
(mkIf config.modules.${user}.develop.js.enable {
user.packages = with pkgs; [
bun
nodejs
@ -20,7 +20,7 @@ in
})
(mkIf config.modules.develop.xdg.enable {
(mkIf config.modules.${user}.develop.xdg.enable {
# home = {
# };
})

View file

@ -1,18 +1,18 @@
{ inputs, config, options, lib, pkgs, ... }:
{ inputs, config, options, lib, pkgs, user, ... }:
let
inherit (lib.attrsets) attrValues;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.meta) getExe;
in
{
options.modules.develop.rust = let
options.modules.${user}.develop.rust = let
inherit (lib.options) mkEnableOption;
in {
enable = mkEnableOption "Rust developmnt";
};
config = mkMerge [
# (mkIf config.modules.develop.rust.enable {
# (mkIf config.modules.${user}.develop.rust.enable {
# # nixpkgs.overlays = [inputs.rust.overlays.default];
#
# user.packages = attrValues {
@ -26,7 +26,7 @@ in
# };
# })
#
# (mkIf config.modules.develop.xdg.enable {
# (mkIf config.module.${user}s.develop.xdg.enable {
# home = {
# sessionVariables.CARGO_HOME = "$XDG_DATA_HOME/cargo";
# sessionPath = ["$CARGO_HOME/bin"];

18
modules/home/options.nix Normal file
View file

@ -0,0 +1,18 @@
{ lib, user, config, ... }:
{
options = let
inherit (lib) mkOption;
in
{
kaas = mkOption {
type = lib.types.bool;
default = false;
example = true;
description = "";
};
};
config = {
modules.${user}.themes.enable = config.kaas;
};
}