mwahahahaha, got everything building again, deskop is also in working state. so lets hope that my work laptop will also work tomorrow!!!

This commit is contained in:
Chris Kruining 2025-03-24 01:09:06 +01:00
parent b0dc4d9fe4
commit bf3ca86089
Signed by: chris
SSH key fingerprint: SHA256:nG82MUfuVdRVyCKKWqhY+pCrbz9nbX6uzUns4RKa1Pg
6 changed files with 83 additions and 70 deletions

View file

@ -3,5 +3,16 @@
modules = {
system.audio.enable = true;
system.bluetooth.enable = true;
root = {
user = {
full_name = "__ROOT__";
email = "__ROOT__@${config.networking.hostName}";
};
shell = {
default = "zsh";
};
};
};
}

View file

@ -2,23 +2,15 @@
{
imports = [ ./hardware.nix ];
fileSystems."/var/media_from_conf" = {
fileSystems."/var/media" = {
device = "/dev/disk/by-label/data";
fsType = "ext4";
};
modules = {
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
networking.enable = true;
networking.ssh.enable = true;
services = {
enable = true;
media.enable = true;
games = {
@ -26,24 +18,15 @@
};
};
desktop = {
plasma.enable = true;
type = "wayland";
terminal = {
default = "alacritty";
alacritty.enable = true;
root = {
user = {
full_name = "__ROOT__";
email = "__ROOT__@${config.networking.hostName}";
};
editors = {
default = "nano";
nano.enable = true;
shell = {
default = "zsh";
};
};
shell = {
default = "zsh";
corePkgs.enable = true;
};
};
}

View file

@ -1,17 +1,11 @@
args@{
inputs,
lib,
pkgs,
self,
...
}: let
{ inputs, lib, pkgs, self, ... }: let
inherit (inputs.nixpkgs.lib) nixosSystem;
inherit (builtins) baseNameOf elem map listToAttrs;
inherit (builtins) baseNameOf elem map listToAttrs pathExists;
inherit (lib) filterAttrs nameValuePair attrNames;
inherit (lib.modules) mkAliasOptionModule mkDefault mkIf;
inherit (lib.modules) mkDefault mkIf;
inherit (lib.strings) removeSuffix;
inherit (self.modules) mapModules mapModulesRec';
inherit (self) mkSysUser mkHmUser;
inherit (self) mkSysUser;
in rec
{
mkHost = path: attrs @ {system ? "x86_64-linux", ...}:
@ -22,17 +16,17 @@ in rec
modules = let
stateVersion = "23.11";
users = attrNames (mapModules "${path}/users" (p: p));
users = if (pathExists "${path}/users") then attrNames (mapModules "${path}/users" (p: p)) else [];
in [
inputs.nixos-boot.nixosModules.default
({ options, config, ...}: {
({ ... }: {
nixpkgs.pkgs = pkgs;
networking.hostName = mkDefault (removeSuffix ".nix" (baseNameOf path));
system = {
inherit stateVersion;
configurationRevision = with inputs; mkIf (self ? rev) self.rev;
configurationRevision = mkIf (self ? rev) self.rev;
};
imports = [
@ -43,7 +37,7 @@ in rec
users = {
mutableUsers = true; # Set this to false when I get sops with passwords set up properly
users = mapModules "${path}/users" mkSysUser;
users = mkIf (pathExists "${path}/users") (mapModules "${path}/users" mkSysUser);
};
home-manager = {

View file

@ -1,40 +1,68 @@
{ inputs, options, config, lib, pkgs, user, ... }:
{ config, lib, pkgs, user, ... }:
let
inherit (builtins) toJSON;
inherit (lib.attrsets) attrValues mapAttrsToList;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.strings) concatStrings;
inherit (lib.options) mkEnableOption;
inherit (lib.modules) mkIf;
inherit (builtins) fetchurl;
cfg = config.modules.${user}.desktop.browsers.chrome;
in {
options.modules.${user}.desktop.browsers.chrome = let
inherit (lib.options) mkEnableOption;
inherit (lib.types) attrsOf oneOf bool int lines str;
inherit (lib.my) mkOpt mkOpt';
in {
options.modules.${user}.desktop.browsers.chrome = {
enable = mkEnableOption "Enable Chrome";
};
config = mkIf cfg.enable {
home-manager.users.${user}.home.packages = with pkgs; [
(ungoogled-chromium.override {
commandLineArgs = [
"--enable-features=AcceleratedVideoEncoder"
"--ignore-gpu-blocklist"
"--enable-zero-copy"
"--ozone-platform-hint=auto"
"--password-store=basic"
];
})
home-manager.users.${user}.home.packages = [
pkgs.chromium
# (pkgs.ungoogled-chromium.override {
# commandLineArgs = [
# "--enable-features=AcceleratedVideoEncoder"
# "--ignore-gpu-blocklist"
# "--enable-zero-copy"
# "--ozone-platform-hint=auto"
# "--password-store=basic"
# ];
# })
];
programs.chromium = {
enable = true;
enablePlasmaBrowserIntegration = true;
extensions = [
extensions = let
# create_extension_for = browserVersion: { id, sha256, version }: {
# inherit id;
# crxPath = fetchurl {
# url = "https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&prodversion=${browserVersion}&x=id%3D${id}%26installsource%3Dondemand%26uc";
# name = "${id}.crx";
# inherit sha256;
# };
# inherit version;
# };
# create_extension = create_extension_for (lib.versions.major pkgs.ungoogled-chromium.version);
in [
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # UBlock origin
"mnjggcdmjocbbbhaepdhchncahnbgone" # Sponsor block
"eimadpbcbfnmbkopoojfekhnkhdbieeh" # Dark reader
"nngceckbapebfimnlniiiahkandclblb" # Bitwarden
# (create_extension {
# id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; # UBlock origin
# sha256 = "sha256:1lnk0k8zy0w33cxpv93q1am0d7ds2na64zshvbwdnbjq8x4sw5p6";
# version = "1.63.2";
# })
# (create_extension {
# id = "mnjggcdmjocbbbhaepdhchncahnbgone"; # Sponsor block
# sha265 = "";
# version = "";
# })
# (create_extension {
# id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; # Dark reader
# sha265 = "";
# version = "";
# })
# (create_extension {
# id = "nngceckbapebfimnlniiiahkandclblb"; # Bitwarden
# sha265 = "";
# version = "";
# })
];
defaultSearchProviderEnabled = true;
defaultSearchProviderSearchURL = "https://duckduckgo.com?q={searchTerms}";

View file

@ -1,16 +1,16 @@
{ config, options, lib, pkgs, ... }:
{ config, lib, ... }:
let
inherit (lib.modules) mkIf;
inherit (lib.attrsets) attrValues;
inherit (lib.options) mkEnableOption;
cfg = config.modules.networking.ssh;
in
{
options.modules.networking.ssh = let
inherit (lib.options) mkEnableOption;
in {
options.modules.networking.ssh = {
enable = mkEnableOption "enable ssh";
};
config = mkIf config.modules.networking.ssh.enable {
config = mkIf cfg.enable {
services.openssh = {
enable = true;
openFirewall = true;

View file

@ -1,15 +1,12 @@
{ config, options, lib, pkgs, ... }:
let
inherit (lib.attrsets) attrValues;
inherit (lib.options) mkEnableOption;
inherit (lib.modules) mkIf;
cfg = config.modules.shell;
in
{
options.modules.shell = let
inherit (lib.options) mkEnableOption;
in
{};
options.modules.shell = {};
config = mkIf cfg.enable {};
}