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:
parent
b0dc4d9fe4
commit
bf3ca86089
6 changed files with 83 additions and 70 deletions
|
@ -3,5 +3,16 @@
|
||||||
modules = {
|
modules = {
|
||||||
system.audio.enable = true;
|
system.audio.enable = true;
|
||||||
system.bluetooth.enable = true;
|
system.bluetooth.enable = true;
|
||||||
|
|
||||||
|
root = {
|
||||||
|
user = {
|
||||||
|
full_name = "__ROOT__";
|
||||||
|
email = "__ROOT__@${config.networking.hostName}";
|
||||||
|
};
|
||||||
|
|
||||||
|
shell = {
|
||||||
|
default = "zsh";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,23 +2,15 @@
|
||||||
{
|
{
|
||||||
imports = [ ./hardware.nix ];
|
imports = [ ./hardware.nix ];
|
||||||
|
|
||||||
fileSystems."/var/media_from_conf" = {
|
fileSystems."/var/media" = {
|
||||||
device = "/dev/disk/by-label/data";
|
device = "/dev/disk/by-label/data";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
themes = {
|
|
||||||
enable = true;
|
|
||||||
theme = "everforest";
|
|
||||||
polarity = "dark";
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.enable = true;
|
|
||||||
networking.ssh.enable = true;
|
networking.ssh.enable = true;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
enable = true;
|
|
||||||
media.enable = true;
|
media.enable = true;
|
||||||
|
|
||||||
games = {
|
games = {
|
||||||
|
@ -26,24 +18,15 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
desktop = {
|
root = {
|
||||||
plasma.enable = true;
|
user = {
|
||||||
type = "wayland";
|
full_name = "__ROOT__";
|
||||||
|
email = "__ROOT__@${config.networking.hostName}";
|
||||||
terminal = {
|
|
||||||
default = "alacritty";
|
|
||||||
alacritty.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
editors = {
|
|
||||||
default = "nano";
|
|
||||||
nano.enable = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
shell = {
|
shell = {
|
||||||
default = "zsh";
|
default = "zsh";
|
||||||
corePkgs.enable = true;
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,11 @@
|
||||||
args@{
|
{ inputs, lib, pkgs, self, ... }: let
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
self,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (inputs.nixpkgs.lib) nixosSystem;
|
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) filterAttrs nameValuePair attrNames;
|
||||||
inherit (lib.modules) mkAliasOptionModule mkDefault mkIf;
|
inherit (lib.modules) mkDefault mkIf;
|
||||||
inherit (lib.strings) removeSuffix;
|
inherit (lib.strings) removeSuffix;
|
||||||
inherit (self.modules) mapModules mapModulesRec';
|
inherit (self.modules) mapModules mapModulesRec';
|
||||||
inherit (self) mkSysUser mkHmUser;
|
inherit (self) mkSysUser;
|
||||||
in rec
|
in rec
|
||||||
{
|
{
|
||||||
mkHost = path: attrs @ {system ? "x86_64-linux", ...}:
|
mkHost = path: attrs @ {system ? "x86_64-linux", ...}:
|
||||||
|
@ -22,17 +16,17 @@ in rec
|
||||||
|
|
||||||
modules = let
|
modules = let
|
||||||
stateVersion = "23.11";
|
stateVersion = "23.11";
|
||||||
users = attrNames (mapModules "${path}/users" (p: p));
|
users = if (pathExists "${path}/users") then attrNames (mapModules "${path}/users" (p: p)) else [];
|
||||||
in [
|
in [
|
||||||
inputs.nixos-boot.nixosModules.default
|
inputs.nixos-boot.nixosModules.default
|
||||||
({ options, config, ...}: {
|
({ ... }: {
|
||||||
nixpkgs.pkgs = pkgs;
|
nixpkgs.pkgs = pkgs;
|
||||||
|
|
||||||
networking.hostName = mkDefault (removeSuffix ".nix" (baseNameOf path));
|
networking.hostName = mkDefault (removeSuffix ".nix" (baseNameOf path));
|
||||||
|
|
||||||
system = {
|
system = {
|
||||||
inherit stateVersion;
|
inherit stateVersion;
|
||||||
configurationRevision = with inputs; mkIf (self ? rev) self.rev;
|
configurationRevision = mkIf (self ? rev) self.rev;
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -43,7 +37,7 @@ in rec
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
mutableUsers = true; # Set this to false when I get sops with passwords set up properly
|
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 = {
|
home-manager = {
|
||||||
|
|
|
@ -1,40 +1,68 @@
|
||||||
{ inputs, options, config, lib, pkgs, user, ... }:
|
{ config, lib, pkgs, user, ... }:
|
||||||
let
|
let
|
||||||
inherit (builtins) toJSON;
|
inherit (lib.options) mkEnableOption;
|
||||||
inherit (lib.attrsets) attrValues mapAttrsToList;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
inherit (builtins) fetchurl;
|
||||||
inherit (lib.strings) concatStrings;
|
|
||||||
|
|
||||||
cfg = config.modules.${user}.desktop.browsers.chrome;
|
cfg = config.modules.${user}.desktop.browsers.chrome;
|
||||||
in {
|
in {
|
||||||
options.modules.${user}.desktop.browsers.chrome = let
|
options.modules.${user}.desktop.browsers.chrome = {
|
||||||
inherit (lib.options) mkEnableOption;
|
|
||||||
inherit (lib.types) attrsOf oneOf bool int lines str;
|
|
||||||
inherit (lib.my) mkOpt mkOpt';
|
|
||||||
in {
|
|
||||||
enable = mkEnableOption "Enable Chrome";
|
enable = mkEnableOption "Enable Chrome";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.${user}.home.packages = with pkgs; [
|
home-manager.users.${user}.home.packages = [
|
||||||
(ungoogled-chromium.override {
|
pkgs.chromium
|
||||||
commandLineArgs = [
|
# (pkgs.ungoogled-chromium.override {
|
||||||
"--enable-features=AcceleratedVideoEncoder"
|
# commandLineArgs = [
|
||||||
"--ignore-gpu-blocklist"
|
# "--enable-features=AcceleratedVideoEncoder"
|
||||||
"--enable-zero-copy"
|
# "--ignore-gpu-blocklist"
|
||||||
"--ozone-platform-hint=auto"
|
# "--enable-zero-copy"
|
||||||
"--password-store=basic"
|
# "--ozone-platform-hint=auto"
|
||||||
];
|
# "--password-store=basic"
|
||||||
})
|
# ];
|
||||||
|
# })
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.chromium = {
|
programs.chromium = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enablePlasmaBrowserIntegration = 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
|
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # UBlock origin
|
||||||
|
"mnjggcdmjocbbbhaepdhchncahnbgone" # Sponsor block
|
||||||
"eimadpbcbfnmbkopoojfekhnkhdbieeh" # Dark reader
|
"eimadpbcbfnmbkopoojfekhnkhdbieeh" # Dark reader
|
||||||
"nngceckbapebfimnlniiiahkandclblb" # Bitwarden
|
"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;
|
defaultSearchProviderEnabled = true;
|
||||||
defaultSearchProviderSearchURL = "https://duckduckgo.com?q={searchTerms}";
|
defaultSearchProviderSearchURL = "https://duckduckgo.com?q={searchTerms}";
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
{ config, options, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.attrsets) attrValues;
|
inherit (lib.options) mkEnableOption;
|
||||||
|
|
||||||
|
cfg = config.modules.networking.ssh;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.networking.ssh = let
|
options.modules.networking.ssh = {
|
||||||
inherit (lib.options) mkEnableOption;
|
|
||||||
in {
|
|
||||||
enable = mkEnableOption "enable ssh";
|
enable = mkEnableOption "enable ssh";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.modules.networking.ssh.enable {
|
config = mkIf cfg.enable {
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
{ config, options, lib, pkgs, ... }:
|
{ config, options, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib.attrsets) attrValues;
|
inherit (lib.options) mkEnableOption;
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
|
|
||||||
cfg = config.modules.shell;
|
cfg = config.modules.shell;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.shell = let
|
options.modules.shell = {};
|
||||||
inherit (lib.options) mkEnableOption;
|
|
||||||
in
|
|
||||||
{};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {};
|
config = mkIf cfg.enable {};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue