Skip to content

Commit

Permalink
add daross user
Browse files Browse the repository at this point in the history
  • Loading branch information
BCNelson committed Dec 10, 2024
1 parent 9bc7776 commit 62b07aa
Show file tree
Hide file tree
Showing 7 changed files with 197 additions and 6 deletions.
6 changes: 1 addition & 5 deletions home-manager/_mixins/programs/firefox.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
bitwarden
darkreader
pay-by-privacy
google-cal-event-merge
ublock-origin
i-dont-care-about-cookies
languagetool
refined-github
firefox-color
stylus
];
search = {
default = "Google";
Expand All @@ -28,6 +23,7 @@
"signon.rememberSignons" = false;
"signon.rememberSignons.visibilityToggle" = false;
"trailhead.firstrun.didSeeAboutWelcome" = true;
"datareporting.policy.dataSubmissionPolicyBypassNotification" = true;
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.activity-stream.topSitesRows" = 3;
Expand Down
44 changes: 44 additions & 0 deletions home-manager/bcnelson/_mixins/firefox.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{ pkgs, ... }:
{
programs.firefox = {
enable = true;
package = pkgs.firefox-wayland;
profiles = {
personal = {
name = "Personal";
isDefault = true;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
bitwarden
darkreader
pay-by-privacy
google-cal-event-merge
ublock-origin
i-dont-care-about-cookies
languagetool
refined-github
firefox-color
stylus
];
search = {
default = "Google";
force = true;
};
settings = {
# Disable the builtin Password manager
"signon.rememberSignons" = false;
"signon.rememberSignons.visibilityToggle" = false;
"trailhead.firstrun.didSeeAboutWelcome" = true;
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.activity-stream.topSitesRows" = 3;
"extensions.formautofill.creditCards.enabled" = false;
"widget.use-xdg-desktop-portal.file-picker" = 1;
};
};
};
policies = {
DisablePocket = true;
DisableSetDesktopBackground = true;
};
};
}
2 changes: 1 addition & 1 deletion home-manager/bcnelson/desktop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

imports = [
outputs.homeManagerModules.autostart
../_mixins/programs/firefox.nix
./_mixins/firefox.nix
../_mixins/programs/chrome.nix
../_mixins/programs/vscode.nix
./_mixins/kde.nix
Expand Down
67 changes: 67 additions & 0 deletions home-manager/dsross/_mixins/kde.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{ inputs, pkgs, ... }:
{
imports = [
inputs.plasma-manager.homeManagerModules.plasma-manager
];
programs.plasma = {
enable = true;
shortcuts = {
"kwin"."Window One Desktop to the Left" = "Meta+Ctrl+Shift+Left";
"kwin"."Window One Desktop to the Right" = "Meta+Ctrl+Shift+Right";
"plasmashell"."show-on-mouse-pos" = "Meta+V";
"kwin"."Edit Tiles" = [ ];
"services/org.kde.konsole.desktop"."_launch" = "Meta+T";
"services/org.kde.krunner.desktop"."_launch" = "Meta+Space";
"yakuake"."toggle-window-state" = "F12";
};
workspace.theme = "breeze-dark";
configFile = { };
panels = [{
floating = true;
height = 42;
alignment = "center";
hiding = "none";
lengthMode = "fill";
location = "bottom";
screen = "all";
widgets = [
"org.kde.plasma.kickoff"
{
name = "org.kde.plasma.taskmanager";
config = {
showOnlyCurrentScreen = true;
showOnlyCurrentDesktop = true;
showOnlyCurrentActivity = true;
launchers = [
"preferred://browser"
"file://${pkgs.libreoffice-qt6-still}/share/applications/writer.desktop"
];
};
}
"org.kde.plasma.marginsseparator"
{
systemTray = {
items.hidden = [ "Yakuake" ];
};
}
{
name = "org.kde.plasma.digitalclock";
config = {
showSeconds = 2; # 0 = never, 1 = on hover, 2 = always
};
}
];
}];
input.keyboard.numlockOnStartup = "on";
kwin = {
edgeBarrier = 0;
};
fonts = {
fixedWidth = {
family = "Monaspace Neon";
pointSize = 10;
};
};
};
qt.style.catppuccin.enable = true;
}
28 changes: 28 additions & 0 deletions home-manager/dsross/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{ hostname, desktop, config, lib, ... }:

let
# Get the hostname prefix from the hostname (e.g. sierria in sierria-1)
hostnamePrefix = lib.strings.concatStrings (lib.lists.take 1 (lib.strings.splitString "-" hostname));
in
{
imports = [ ]
++ lib.optional (builtins.pathExists ./${hostnamePrefix}.nix) ./${hostnamePrefix}.nix
++ lib.optional (builtins.isString desktop) ./desktop.nix;

xdg.enable = true;
xdg.mime.enable = true;
targets.genericLinux.enable = true;
xdg.systemDirs.data = [ "${config.home.homeDirectory}/.nix-profile/share/applications" ];

programs = {
bash = {
enable = true;
};
};

home.packages = [ ];

home.sessionVariables = {
EDITOR = "vim";
};
}
38 changes: 38 additions & 0 deletions home-manager/dsross/desktop.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ pkgs, outputs, ... }:

{
# Home Manager needs a bit of information about you and the paths it should
# manage

imports = [
outputs.homeManagerModules.autostart
../_mixins/programs/firefox.nix
./_mixins/kde.nix
];

home.packages = [
pkgs.yakuake
pkgs.libreoffice-qt6-still
pkgs.hunspell
pkgs.hunspellDicts.en_US-large
];

programs.bash.enable = true;

services.freedesktop.autostart = {
enable = true;
packageSourced = [
{
package = pkgs.yakuake;
path = "share/applications/org.kde.yakuake.desktop";
}
];
};

services.kdeconnect = {
enable = true;
indicator = true;
};

systemd.user.startServices = "sd-switch";
}
18 changes: 18 additions & 0 deletions nixos/_mixins/users/dsross/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{ libx, ... }:
let
init_password = libx.getSecret ../../../sensitive.nix "hlnelson_init_password";
in
{
users.users.dsross = {
# TODO: make this more generic
isNormalUser = true;
description = "Diane Ross";
extraGroups = [ "networkmanager" "plugdev" "dialout" ];
# The install script will change mark this user as needing a password change on first login.
# Note SDDM does not support password changes so this will need to be done via the command line.
initialPassword = init_password;
packages = [
# Console Apps here
];
};
}

0 comments on commit 62b07aa

Please sign in to comment.