users: Add system.singleUser

This commit is contained in:
PapaTutuWawa 2021-08-04 19:07:42 +02:00
parent 3bf532866b
commit 97c6fece4c
14 changed files with 370 additions and 328 deletions

View File

@ -8,6 +8,7 @@ in {
./generic.nix
./modules/hardware/generic.nix ./modules/hardware/bluetooth.nix ./modules/hardware/wifi.nix ./modules/hardware/video.nix ./modules/hardware/mobile.nix
./modules/fonts.nix
./modules/users
./modules/users/alexander.nix
./modules/programs/zsh ./modules/programs/mpv ./modules/programs/git ./modules/programs/tmux ./modules/programs/firefox ./modules/programs/gnome-terminal ./modules/programs/gnome ./modules/programs/nonvm
./modules/programs/distributed-build/offload.nix

View File

@ -11,6 +11,7 @@ in
# Install home-manager
imports = [
"${home-manager}/nixos"
./modules/users # For system.singleUser
];
home-manager.useGlobalPkgs = true;
@ -68,8 +69,6 @@ in
avahi.enable = false;
};
documentation.nixos.enable = false;
security.sudo.extraConfig = ''
Defaults env_keep += "NIXOS_CONFIG"
'';

View File

@ -1,7 +1,7 @@
{ ... }:
{ config, ... }:
{
home-manager.users.alexander.home.file = {
config.home-manager.users."${config.system.singleUser}".home.file = {
".emacs".source = ./dotemacs;
".emacs.d/early-init.el".source = ./early-init.el;
".emacs.d/mu4e.el".source = ./mu4e.el;

View File

@ -1,134 +1,136 @@
{ pkgs, ... }:
{ config, pkgs, ... }:
{
environment = {
systemPackages = with pkgs; [ firefox-wayland tor-browser-bundle-bin ];
config = {
environment = {
systemPackages = with pkgs; [ firefox-wayland tor-browser-bundle-bin ];
# Deploy a Firefox policy to set the search engine and do some other things
etc."firefox/policies/policies.json".source = ./policies.json;
# Deploy a Firefox policy to set the search engine and do some other things
etc."firefox/policies/policies.json".source = ./policies.json;
variables = {
# TODO: Use pam_environment once I figure out how to enable it.
# Enable multi-touch...
"MOZ_USE_XINPUT2" = "1";
# ... and Wayland
"MOZ_USE_WAYLAND" = "1";
variables = {
# TODO: Use pam_environment once I figure out how to enable it.
# Enable multi-touch...
"MOZ_USE_XINPUT2" = "1";
# ... and Wayland
"MOZ_USE_WAYLAND" = "1";
};
};
};
home-manager.users.alexander.programs.firefox = {
enable = true;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
https-everywhere
ublock-origin
umatrix
decentraleyes
privacy-redirect
];
profiles.default = {
id = 0; # NOTE: This is important
isDefault = true;
name = "Default Profile";
settings = {
"browser.search.suggest.enabled" = false;
"browser.tabs.drawInTitlebar" = true;
"browser.aboutConfig.showWarning" = false;
"browser.crashReports.unsubmittedCheck.autoSubmit" = false;
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
"browser.crashReports.unsubmittedCheck.enabled" = false;
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
"browser.newtabpage.activity-stream.feeds.topsites" = false;
"browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts" = false;
"browser.newtabpage.enabled" = false;
"browser.newtabpage.enhanced" = false;
"browser.newtabpage.introShown" = true;
"browser.send_pings" = false;
"browser.shell.checkDefaultBrowser" = false; # NixOS is a bit wonky here
"app.shield.optoutstudies.enabled" = false;
"app.normandy.api_url" = "";
"app.normandy.enabled" = false;
"breakpad.reportURL" = "";
"services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsoredTopSite" = false;
"signon.autofillForms" = false;
"signon.rememberSignons" = false;
"signon.management.page.breach-alerts.enabled" = false;
"toolkit.telemetry.archive.enabled" = false;
"toolkit.telemetry.bhrPing.enabled" = false;
"toolkit.telemetry.cachedClientID" = "";
"toolkit.telemetry.enabled" = false;
"toolkit.telemetry.firstShutdownPing.enabled" = false;
"toolkit.telemetry.hybridContent.enabled" = false;
"toolkit.telemetry.newProfilePing.enabled" = false;
"toolkit.telemetry.prompted" = 2;
"toolkit.telemetry.rejected" = true;
"toolkit.telemetry.reportingpolicy.firstRun" = false;
"toolkit.telemetry.server" = "";
"toolkit.telemetry.shutdownPingSender.enabled" = false;
"toolkit.telemetry.unified" = false;
"toolkit.telemetry.unifiedIsOptIn" = false;
"toolkit.telemetry.updatePing.enabled" = false;
"webgl.disabled" = true;
"webgl.renderer-string-override" = " ";
"webgl.vendor-string-override" = " ";
"experiments.activeExperiment" = false;
"experiments.enabled" = false;
"experiments.manifest.uri" = "";
"experiments.supported" = false;
"extensions.getAddons.cache.enabled" = false;
"extensions.getAddons.showPane" = false;
"extensions.pocket.enabled" = false;
"extensions.screenshots.upload-disabled" = true;
"extensions.shield-recipe-client.api_url" = "";
"extensions.shield-recipe-client.enabled" = false;
"extensions.webservice.discoverURL" = "";
"extensions.htmlaboutaddons.recommendations.enabled" = false;
"media.autoplay.default" = 2;
"media.eme.enabled" = false;
"media.gmp-widevinecdm.enabled" = false;
"media.navigator.enabled" = false;
"media.peerconnection.enabled" = false;
"media.video_stats.enabled" = false;
"network.IDN_show_punycode" = true;
"network.allow-experiments" = false;
"network.captive-portal-service.enabled" = false;
"network.cookie.cookieBehavior" = 1;
"network.dns.disablePrefetch" = true;
"network.dns.disablePrefetchFromHTTPS" = true;
"network.http.referer.spoofSource" = true;
"network.http.speculative-parallel-limit" = 0;
"network.predictor.enable-prefetch" = false;
"network.predictor.enabled" = false;
"network.prefetch-next" = false;
"network.trr.mode" = 5;
"privacy.donottrackheader.enabled" = true;
"privacy.donottrackheader.value" = 1;
"privacy.trackingprotection.cryptomining.enabled" = true;
"privacy.trackingprotection.enabled" = true;
"privacy.trackingprotection.fingerprinting.enabled" = true;
"privacy.trackingprotection.pbmode.enabled" = true;
"privacy.usercontext.about_newtab_segregation.enabled" = true;
"security.ssl.disable_session_identifiers" = true;
# Hardware Video Acceleration
"media.ffmpeg.vaapi.enabled" = true;
"media.ffvpx.enabled" = false;
"media.rdd-vpx.enabled" = false;
"media.navigator.mediadataencoder_vpx_enabled" = true;
# WebRender
"gfx.webrender.all" = true;
# Better smooth scrolling
"general.smoothScroll.msdPhysics.continuousMotionMaxDeltaMS" = 250;
"general.smoothScroll.msdPhysics.enabled" = true;
"general.smoothScroll.msdPhysics.motionBeginSpringConstant" = 450;
"general.smoothScroll.msdPhysics.regularSpringConstant" = 450;
"general.smoothScroll.msdPhysics.slowdownMinDeltaMS" = 50;
"general.smoothScroll.msdPhysics.slowdownMinDeltaRatio;0" = 4;
"general.smoothScroll.msdPhysics.slowdownSpringConstant" = 5000;
"mousewheel.min_line_scroll_amount" = 22;
"toolkit.scrollbox.horizontalScrollDistance" = 4;
"toolkit.scrollbox.verticalScrollDistance" = 5;
# Misc
"layout.spellcheckDefault" = 0; # I don't use spellcheck
"extensions.activeThemeID" = "firefox-alpenglow@mozilla.org"; # It's a nice theme
home-manager.users."${config.system.singleUser}".programs.firefox = {
enable = true;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
https-everywhere
ublock-origin
umatrix
decentraleyes
privacy-redirect
];
profiles.default = {
id = 0; # NOTE: This is important
isDefault = true;
name = "Default Profile";
settings = {
"browser.search.suggest.enabled" = false;
"browser.tabs.drawInTitlebar" = true;
"browser.aboutConfig.showWarning" = false;
"browser.crashReports.unsubmittedCheck.autoSubmit" = false;
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
"browser.crashReports.unsubmittedCheck.enabled" = false;
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
"browser.newtabpage.activity-stream.feeds.topsites" = false;
"browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts" = false;
"browser.newtabpage.enabled" = false;
"browser.newtabpage.enhanced" = false;
"browser.newtabpage.introShown" = true;
"browser.send_pings" = false;
"browser.shell.checkDefaultBrowser" = false; # NixOS is a bit wonky here
"app.shield.optoutstudies.enabled" = false;
"app.normandy.api_url" = "";
"app.normandy.enabled" = false;
"breakpad.reportURL" = "";
"services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsoredTopSite" = false;
"signon.autofillForms" = false;
"signon.rememberSignons" = false;
"signon.management.page.breach-alerts.enabled" = false;
"toolkit.telemetry.archive.enabled" = false;
"toolkit.telemetry.bhrPing.enabled" = false;
"toolkit.telemetry.cachedClientID" = "";
"toolkit.telemetry.enabled" = false;
"toolkit.telemetry.firstShutdownPing.enabled" = false;
"toolkit.telemetry.hybridContent.enabled" = false;
"toolkit.telemetry.newProfilePing.enabled" = false;
"toolkit.telemetry.prompted" = 2;
"toolkit.telemetry.rejected" = true;
"toolkit.telemetry.reportingpolicy.firstRun" = false;
"toolkit.telemetry.server" = "";
"toolkit.telemetry.shutdownPingSender.enabled" = false;
"toolkit.telemetry.unified" = false;
"toolkit.telemetry.unifiedIsOptIn" = false;
"toolkit.telemetry.updatePing.enabled" = false;
"webgl.disabled" = true;
"webgl.renderer-string-override" = " ";
"webgl.vendor-string-override" = " ";
"experiments.activeExperiment" = false;
"experiments.enabled" = false;
"experiments.manifest.uri" = "";
"experiments.supported" = false;
"extensions.getAddons.cache.enabled" = false;
"extensions.getAddons.showPane" = false;
"extensions.pocket.enabled" = false;
"extensions.screenshots.upload-disabled" = true;
"extensions.shield-recipe-client.api_url" = "";
"extensions.shield-recipe-client.enabled" = false;
"extensions.webservice.discoverURL" = "";
"extensions.htmlaboutaddons.recommendations.enabled" = false;
"media.autoplay.default" = 2;
"media.eme.enabled" = false;
"media.gmp-widevinecdm.enabled" = false;
"media.navigator.enabled" = false;
"media.peerconnection.enabled" = false;
"media.video_stats.enabled" = false;
"network.IDN_show_punycode" = true;
"network.allow-experiments" = false;
"network.captive-portal-service.enabled" = false;
"network.cookie.cookieBehavior" = 1;
"network.dns.disablePrefetch" = true;
"network.dns.disablePrefetchFromHTTPS" = true;
"network.http.referer.spoofSource" = true;
"network.http.speculative-parallel-limit" = 0;
"network.predictor.enable-prefetch" = false;
"network.predictor.enabled" = false;
"network.prefetch-next" = false;
"network.trr.mode" = 5;
"privacy.donottrackheader.enabled" = true;
"privacy.donottrackheader.value" = 1;
"privacy.trackingprotection.cryptomining.enabled" = true;
"privacy.trackingprotection.enabled" = true;
"privacy.trackingprotection.fingerprinting.enabled" = true;
"privacy.trackingprotection.pbmode.enabled" = true;
"privacy.usercontext.about_newtab_segregation.enabled" = true;
"security.ssl.disable_session_identifiers" = true;
# Hardware Video Acceleration
"media.ffmpeg.vaapi.enabled" = true;
"media.ffvpx.enabled" = false;
"media.rdd-vpx.enabled" = false;
"media.navigator.mediadataencoder_vpx_enabled" = true;
# WebRender
"gfx.webrender.all" = true;
# Better smooth scrolling
"general.smoothScroll.msdPhysics.continuousMotionMaxDeltaMS" = 250;
"general.smoothScroll.msdPhysics.enabled" = true;
"general.smoothScroll.msdPhysics.motionBeginSpringConstant" = 450;
"general.smoothScroll.msdPhysics.regularSpringConstant" = 450;
"general.smoothScroll.msdPhysics.slowdownMinDeltaMS" = 50;
"general.smoothScroll.msdPhysics.slowdownMinDeltaRatio;0" = 4;
"general.smoothScroll.msdPhysics.slowdownSpringConstant" = 5000;
"mousewheel.min_line_scroll_amount" = 22;
"toolkit.scrollbox.horizontalScrollDistance" = 4;
"toolkit.scrollbox.verticalScrollDistance" = 5;
# Misc
"layout.spellcheckDefault" = 0; # I don't use spellcheck
"extensions.activeThemeID" = "firefox-alpenglow@mozilla.org"; # It's a nice theme
};
};
};
};

View File

@ -1,24 +1,26 @@
{ pkgs, ... }:
{ config, pkgs, ... }:
{
environment.systemPackages = [ pkgs.diff-so-fancy ];
home-manager.users.alexander.programs.git = {
enable = true;
userEmail = "papatutuwawa@polynom.me";
userName = "Alexander \"PapaTutuWawa\"";
extraConfig = {
init = {
defaultBranch = "master";
};
config = {
environment.systemPackages = [ pkgs.diff-so-fancy ];
home-manager.users."${config.system.singleUser}".programs.git = {
enable = true;
userEmail = "papatutuwawa@polynom.me";
userName = "Alexander \"PapaTutuWawa\"";
extraConfig = {
init = {
defaultBranch = "master";
};
pull = {
rebase = true;
};
pull = {
rebase = true;
};
core = {
editor = "rvim";
filemode = "false";
pager = "diff-so-fancy | less --tabs=4 -RFX";
core = {
editor = "rvim";
filemode = "false";
pager = "diff-so-fancy | less --tabs=4 -RFX";
};
};
};
};

View File

@ -1,16 +1,18 @@
{ pkgs, ... }:
{ config, pkgs, ... }:
{
environment.systemPackages = [ pkgs.gnome.gnome-terminal ];
home-manager.users.alexander.programs.gnome-terminal = {
enable = true;
profile.default = {
visibleName = "default";
audibleBell = false;
#boldIsBright = true;
default = true;
# TODO: Make this configurable
font = "Source Code Pro 12";
config = {
environment.systemPackages = [ pkgs.gnome.gnome-terminal ];
home-manager.users."${config.system.singleUser}".programs.gnome-terminal = {
enable = true;
profile.default = {
visibleName = "default";
audibleBell = false;
#boldIsBright = true;
default = true;
# TODO: Make this configurable
font = "Source Code Pro 12";
};
};
};
}

View File

@ -3,64 +3,115 @@
let
unstable = (import ../../unstable.nix config);
in {
environment = {
systemPackages = with pkgs; [
arc-theme
gnomeExtensions.appindicator
gnomeExtensions.caffeine
gnomeExtensions.gnome-40-ui-improvements
gnomeExtensionsCustom.notification-timeout # Custom package
gnomeExtensions.application-volume-mixer
gnome.eog
gnome.nautilus
unstable.gnome.gnome-shell
gnome.gnome-terminal
pinentry-gnome
dconf # For home-manager
];
gnome.excludePackages = pkgs.gnome.optionalPackages;
};
services = {
accounts-daemon.enable = true;
colord.enable = false;
geoclue2.enable = false;
dleyna-renderer.enable = false;
dleyna-server.enable = false;
gvfs.enable = lib.mkForce false;
telepathy.enable = false;
gnome = {
chrome-gnome-shell.enable = false;
gnome-initial-setup.enable = false;
gnome-remote-desktop.enable = false;
rygel.enable = false;
gnome-online-accounts.enable = false;
evolution-data-server.enable = lib.mkForce false;
tracker.enable = false;
tracker-miners.enable = false;
core-utilities.enable = false;
games.enable = false;
config = {
environment = {
systemPackages = with pkgs; [
arc-theme
gnomeExtensions.appindicator
gnomeExtensions.caffeine
gnomeExtensions.gnome-40-ui-improvements
gnomeExtensionsCustom.notification-timeout # Custom package
gnomeExtensions.application-volume-mixer
gnome.eog
gnome.nautilus
unstable.gnome.gnome-shell
gnome.gnome-terminal
pinentry-gnome
dconf # For home-manager
];
gnome.excludePackages = pkgs.gnome.optionalPackages;
};
udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
services = {
accounts-daemon.enable = true;
colord.enable = false;
geoclue2.enable = false;
dleyna-renderer.enable = false;
dleyna-server.enable = false;
gvfs.enable = lib.mkForce false;
telepathy.enable = false;
gnome = {
chrome-gnome-shell.enable = false;
gnome-initial-setup.enable = false;
gnome-remote-desktop.enable = false;
rygel.enable = false;
gnome-online-accounts.enable = false;
evolution-data-server.enable = lib.mkForce false;
tracker.enable = false;
tracker-miners.enable = false;
core-utilities.enable = false;
games.enable = false;
};
xserver = {
udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
xserver = {
enable = true;
layout = "de";
libinput.enable = true;
desktopManager.gnome.enable = true;
displayManager = {
gdm.enable = true;
gdm.wayland = true;
};
};
};
xdg.portal = {
enable = true;
layout = "de";
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
gtkUsePortal = true;
};
libinput.enable = true;
home-manager.users."${config.system.singleUser}" = {
dconf.settings = {
# The packages come in from modules/programs/gnome
# Theme
"org/gnome/desktop/interface" = {
gtk-theme = "Arc-Dark";
};
desktopManager.gnome.enable = true;
displayManager = {
gdm.enable = true;
gdm.wayland = true;
# Nightlight (TODO: ?)
"org/gnome/settings-daemon/plugins/color" = {
night-light-enabled = true;
};
# Extensions
"org/gnome/shell" = {
enabled-extensions = [
"caffeine@patapon.info"
"notification-timeout@chlumskyvaclav.gmail.com"
"gnome-ui-tune@itstime.tech"
"volume-mixer@evermiss.net"
];
};
"org/gnome/shell/extensions/caffeine" = {
show-notifications = false;
inhibit-apps = [ "mpv.desktop" ];
};
"org/gnome/shell/extensions/notification-timeout" = {
timeout = 3000;
};
"org/gnome/shell/extensions/gnome-ui-tune" = {
hide-search = true;
};
# Shortcuts
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
binding = "<Alt>Return";
command = "gnome-terminal";
name = "Terminal";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
binding = "<Super>s";
command = "systemctl suspend";
name = "Suspend";
};
};
};
};
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
gtkUsePortal = true;
};
}

View File

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ config, pkgs, ... }:
let
makeMpvProfile = { shader, additional ? {} }: {
@ -14,30 +14,32 @@ let
tscale = "oversample";
} // additional;
in {
environment.systemPackages = [ pkgs.mpv ];
config = {
environment.systemPackages = [ pkgs.mpv ];
home-manager.users.alexander = {
xdg.configFile = {
"mpv/shaders/Anime4K_Upscale_CNN_UL_x2_Deblur.glsl".source = ./shaders/Anime4K_Upscale_CNN_UL_x2_Deblur.glsl;
"mpv/shaders/Anime4K_Upscale_CNN_UL_x2_Denoise.glsl".source = ./shaders/Anime4K_Upscale_CNN_UL_x2_Denoise.glsl;
};
programs.mpv = {
enable = true;
config = {
script-opts = "try_ytdl_first=no";
home-manager.users."${config.system.singleUser}" = {
xdg.configFile = {
"mpv/shaders/Anime4K_Upscale_CNN_UL_x2_Deblur.glsl".source = ./shaders/Anime4K_Upscale_CNN_UL_x2_Deblur.glsl;
"mpv/shaders/Anime4K_Upscale_CNN_UL_x2_Denoise.glsl".source = ./shaders/Anime4K_Upscale_CNN_UL_x2_Denoise.glsl;
};
defaultProfiles = [ "anime" ];
profiles = {
anime = (makeMpvProfile {
shader = "Anime4K_Upscale_CNN_UL_x2_Deblur.glsl";
additional = {
fullscreen = "";
};
});
"anime-denoise" = (makeMpvProfile {
shader = "Anime4K_Upscale_CNN_UL_x2_Denoise.glsl";
});
programs.mpv = {
enable = true;
config = {
script-opts = "try_ytdl_first=no";
};
defaultProfiles = [ "anime" ];
profiles = {
anime = (makeMpvProfile {
shader = "Anime4K_Upscale_CNN_UL_x2_Deblur.glsl";
additional = {
fullscreen = "";
};
});
"anime-denoise" = (makeMpvProfile {
shader = "Anime4K_Upscale_CNN_UL_x2_Denoise.glsl";
});
};
};
};
};

View File

@ -1,56 +1,58 @@
{ pkgs, ... }:
{ config, pkgs, ... }:
{
environment.systemPackages = [ pkgs.tmux ];
home-manager.users.alexander.programs.tmux = {
enable = true;
extraConfig = ''
set -g mouse on
set -g history-limit 1000
setw -g monitor-activity on
set -g visual-activity on
config = {
environment.systemPackages = [ pkgs.tmux ];
home-manager.users."${config.system.singleUser}".programs.tmux = {
enable = true;
extraConfig = ''
set -g mouse on
set -g history-limit 1000
setw -g monitor-activity on
set -g visual-activity on
bind r source-file ~/.config/tmux/config
bind r source-file ~/.config/tmux/config
## Status bar design
# status line
set -g status-justify left
set -g status-interval 2
## Status bar design
# status line
set -g status-justify left
set -g status-interval 2
# window status
setw -g window-status-format " #F#I:#W#F "
setw -g window-status-current-format " #F#I:#W#F "
setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
# window status
setw -g window-status-format " #F#I:#W#F "
setw -g window-status-current-format " #F#I:#W#F "
setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
# Info on left (I don't have a session display for now)
set -g status-left ""
# Info on left (I don't have a session display for now)
set -g status-left ""
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
set -g default-terminal "screen-256color"
set -g default-terminal "screen-256color"
# The modes {
setw -g clock-mode-colour colour135
# The modes {
setw -g clock-mode-colour colour135
# }
# }
# The statusbar {
set -g status-position bottom
set -g status-left ""
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
# The statusbar {
set -g status-position bottom
set -g status-left ""
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
# }
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
# }
'';
};
};
}

View File

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ config, pkgs, ... }:
{
environment = {
@ -11,7 +11,7 @@
# Otherwise the user won't appear on the GDM login screen
programs.zsh.enable = true;
home-manager.users.alexander.programs.zsh = {
home-manager.users."${config.system.singleUser}".programs.zsh = {
enable = true;
history.ignoreSpace = true;
shellAliases = {

View File

@ -12,10 +12,14 @@
isSystemUser = false;
};
system.singleUser = "alexander";
# Activate gpg
programs.gnupg.agent.enable = true;
# No need to use users."${system.singleUser}" as we already know it
home-manager.users.alexander = {
# TODO: Move into a generic
pam.sessionVariables = {
NIXOS_CONFIG = "\${HOME}/Development/Personal/nixos-config/${config.networking.hostName}.nix";
};
@ -37,53 +41,6 @@
enable = true;
pinentryFlavor = "gnome3";
};
dconf.settings = {
# The packages come in from modules/programs/gnome
# Theme
"org/gnome/desktop/interface" = {
gtk-theme = "Arc-Dark";
};
# Nightlight (TODO: ?)
"org/gnome/settings-daemon/plugins/color" = {
night-light-enabled = true;
};
# Extensions
"org/gnome/shell" = {
enabled-extensions = [
"caffeine@patapon.info"
"notification-timeout@chlumskyvaclav.gmail.com"
"gnome-ui-tune@itstime.tech"
"volume-mixer@evermiss.net"
];
};
"org/gnome/shell/extensions/caffeine" = {
show-notifications = false;
inhibit-apps = [ "mpv.desktop" ];
};
"org/gnome/shell/extensions/notification-timeout" = {
timeout = 3000;
};
"org/gnome/shell/extensions/gnome-ui-tune" = {
hide-search = true;
};
# Shortcuts
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
binding = "<Alt>Return";
command = "gnome-terminal";
name = "Terminal";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
binding = "<Super>s";
command = "systemctl suspend";
name = "Suspend";
};
};
};
};
}

11
modules/users/default.nix Normal file
View File

@ -0,0 +1,11 @@
{ lib, ... }:
{
options.system = {
singleUser = lib.options.mkOption {
example = "PapaTutuWawa";
readOnly = true;
description = "The username of this single-user system";
};
};
}

View File

@ -1,5 +1,18 @@
{ pkgs, ... }:
{ pkgs, lib, config, ... }:
{
# TODO
config = {
users.users.fuck-xi = {
isNormalUser = true;
extraGroups = [ "wheel" "audio" "video" "kvm" "input" ];
# -> abc123
hashedPassword = "$5$etg0.qVfujgh8JZu$HxGwG.aTZIT1vVo/E2wNdgVLr6dtg.XEPxvAro.iJ29";
shell = pkgs.zsh;
useDefaultShell = false;
uid = 1000;
isSystemUser = false;
};
system.singleUser = "fuck-xi";
};
}