laptop changes
This commit is contained in:
parent
455e7f84c0
commit
d34a72b1ec
@ -2,6 +2,7 @@ keys:
|
||||
- &user_patrick 5FA64909521A5C85992F26E0F819AEFF941BB849
|
||||
- &host_celestia age1vadwmwh8ckfal7j83gwrwn9324gqufwgkxskznhp9v867amndcwqgp2w6t
|
||||
- &host_primordial age12u7ayy2q5dps2pcpc6z7962pz07jxv3tt03hna6jyumlu4fdjvtqdg2n3e
|
||||
- &host_laptop age1fhnujflp29sekvwjgw0ue2hnmjum3fpcj80vly0rkt07u9xwlf7ql25mkk
|
||||
creation_rules:
|
||||
- path_regex: nixos/celestia/secrets\.yaml$
|
||||
key_groups:
|
||||
|
595
flake.lock
generated
595
flake.lock
generated
File diff suppressed because it is too large
Load Diff
206
home-modules/firefox-webapp.nix
Normal file
206
home-modules/firefox-webapp.nix
Normal file
@ -0,0 +1,206 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) getAttr stringLength substring;
|
||||
inherit (lib) mkOption;
|
||||
inherit (lib.attrsets) mapAttrs mapAttrs' nameValuePair;
|
||||
inherit (lib.strings) concatStringsSep toUpper;
|
||||
|
||||
make-app-profiles = cfg:
|
||||
mapAttrs' (name: cfg:
|
||||
nameValuePair "home-manager-webapp-${name}" {
|
||||
id = cfg.id;
|
||||
|
||||
userChrome = ''
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
browser {
|
||||
margin-right: 0px; margin-bottom: 0px;
|
||||
}
|
||||
|
||||
#TabsToolbar {
|
||||
visibility: collapse !important;
|
||||
}
|
||||
|
||||
#nav-bar {
|
||||
margin-top: 0;
|
||||
margin-bottom: -42px;
|
||||
z-index: -100;
|
||||
}
|
||||
|
||||
#main-window[windowtype="navigator:browser"] {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.tab-background[selected="true"] {
|
||||
background: ${cfg.backgroundColor} !important;
|
||||
}
|
||||
'';
|
||||
|
||||
settings =
|
||||
cfg.extraSettings
|
||||
// {
|
||||
"browser.sessionstore.resume_session_once" = false;
|
||||
"browser.sessionstore.resume_from_crash" = false;
|
||||
"browser.cache.disk.enable" = false;
|
||||
"browser.cache.disk.capacity" = 0;
|
||||
"browser.cache.disk.filesystem_reported" = 1;
|
||||
"browser.cache.disk.smart_size.enabled" = false;
|
||||
"browser.cache.disk.smart_size.first_run" = false;
|
||||
"browser.cache.disk.smart_size.use_old_max" = false;
|
||||
"browser.ctrlTab.previews" = true;
|
||||
"browser.tabs.warnOnClose" = false;
|
||||
"plugin.state.flash" = 2;
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"browser.tabs.drawInTitlebar" = false;
|
||||
"browser.tabs.inTitlebar" = 0;
|
||||
"browser.contentblocking.category" = "strict";
|
||||
"browser.link.open_newwindow" = 2;
|
||||
"browser.link.open_newwindow.restriction" = 1;
|
||||
"network.cookie.lifetimePolicy" = 0;
|
||||
"layout.css.prefers-color-scheme.content-override" = getAttr cfg.theme {
|
||||
dark = 0;
|
||||
light = 1;
|
||||
system = 2;
|
||||
};
|
||||
};
|
||||
})
|
||||
cfg;
|
||||
in {
|
||||
options.programs.firefox.webapps = mkOption {
|
||||
default = {};
|
||||
|
||||
type = with lib.types;
|
||||
attrsOf (submodule {
|
||||
options = {
|
||||
####################
|
||||
# Firefox settings #
|
||||
####################
|
||||
url = mkOption {
|
||||
type = str;
|
||||
description = "The URL of the webapp to launch.";
|
||||
};
|
||||
|
||||
id = mkOption {
|
||||
type = int;
|
||||
description = "The Firefox profile ID to set.";
|
||||
};
|
||||
|
||||
extraArgs = mkOption {
|
||||
type = listOf string;
|
||||
default = [];
|
||||
description = "Extra args to launch Firefox with.";
|
||||
};
|
||||
|
||||
extraSettings = mkOption {
|
||||
type = attrsOf (either bool (either int str));
|
||||
default = {};
|
||||
description = "Additional Firefox profile settings.";
|
||||
};
|
||||
|
||||
backgroundColor = mkOption {
|
||||
type = str;
|
||||
default = "rgba(0, 0, 0, 0)";
|
||||
description = "The background color to use for loading pages.";
|
||||
};
|
||||
|
||||
theme = mkOption {
|
||||
type = enum ["dark" "light" "system"];
|
||||
default = "system";
|
||||
description = "The application CSS theme to use, if supported.";
|
||||
};
|
||||
|
||||
#########################
|
||||
# Desktop file settings #
|
||||
#########################
|
||||
|
||||
# Copied from xdg.desktopEntries, with slight modification for default settings
|
||||
name = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Specific name of the application. Defaults to the capitalized attribute name.";
|
||||
};
|
||||
|
||||
mimeType = mkOption {
|
||||
description = "The MIME type(s) supported by this application.";
|
||||
type = nullOr (listOf str);
|
||||
default = ["text/html" "text/xml" "application/xhtml_xml"];
|
||||
};
|
||||
|
||||
# Copied verbatim from xdg.desktopEntries.
|
||||
genericName = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Generic name of the application.";
|
||||
};
|
||||
|
||||
comment = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Tooltip for the entry.";
|
||||
};
|
||||
|
||||
categories = mkOption {
|
||||
type = nullOr (listOf str);
|
||||
default = null;
|
||||
description = "Categories in which the entry should be shown in a menu.";
|
||||
};
|
||||
|
||||
icon = mkOption {
|
||||
type = nullOr (either str path);
|
||||
default = null;
|
||||
description = "Icon to display in file manager, menus, etc.";
|
||||
};
|
||||
|
||||
prefersNonDefaultGPU = mkOption {
|
||||
type = nullOr bool;
|
||||
default = null;
|
||||
description = ''
|
||||
If true, the application prefers to be run on a more
|
||||
powerful discrete GPU if available.
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
description = "Websites to create special site-specific Firefox instances for.";
|
||||
};
|
||||
|
||||
config = {
|
||||
programs.firefox.profiles = make-app-profiles config.programs.firefox.webapps;
|
||||
|
||||
xdg.desktopEntries =
|
||||
mapAttrs (name: cfg: {
|
||||
inherit (cfg) genericName comment categories icon mimeType prefersNonDefaultGPU;
|
||||
|
||||
name =
|
||||
if cfg.name == null
|
||||
then (toUpper (substring 0 1 name)) + (substring 1 (stringLength name) name)
|
||||
else cfg.name;
|
||||
|
||||
startupNotify = true;
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
|
||||
exec = concatStringsSep " " ([
|
||||
"${config.programs.firefox.package}/bin/firefox"
|
||||
"--class"
|
||||
"WebApp-${name}"
|
||||
"-P"
|
||||
"${config.programs.firefox.profiles."home-manager-webapp-${name}".path}"
|
||||
"--no-remote"
|
||||
]
|
||||
++ cfg.extraArgs
|
||||
++ ["${cfg.url}"]);
|
||||
|
||||
settings = {
|
||||
X-MultipleArgs = "false"; # Consider enabling, don't know what this does
|
||||
StartupWMClass = "WebApp-${name}";
|
||||
};
|
||||
})
|
||||
config.programs.firefox.webapps;
|
||||
};
|
||||
}
|
5
home-modules/modules-list.nix
Normal file
5
home-modules/modules-list.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{...}: {
|
||||
imports = [
|
||||
./firefox-webapp.nix
|
||||
];
|
||||
}
|
30
home/configurations.nix
Normal file
30
home/configurations.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
nixpkgs,
|
||||
nurpkgs,
|
||||
home-manager,
|
||||
devenv,
|
||||
...
|
||||
}: let
|
||||
pkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
nur = import nurpkgs {
|
||||
inherit pkgs;
|
||||
nurpkgs = pkgs;
|
||||
};
|
||||
in {
|
||||
work = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
extraSpecialArgs = {
|
||||
inherit devenv; # TODO: Remove dependency on devenv
|
||||
ff-addons = nur.repos.rycee.firefox-addons;
|
||||
};
|
||||
|
||||
modules = [
|
||||
../home-modules/modules-list.nix
|
||||
./work
|
||||
];
|
||||
};
|
||||
}
|
24
home/work/default.nix
Normal file
24
home/work/default.nix
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
devenv,
|
||||
...
|
||||
}: {
|
||||
home = {
|
||||
stateVersion = "22.11";
|
||||
username = "patrick";
|
||||
homeDirectory = "/home/${config.home.username}";
|
||||
packages = (pkgs.callPackage ./pkgs.nix {}) ++ [devenv.packages.${pkgs.system}.devenv];
|
||||
sessionPath = ["~/.local/bin"];
|
||||
sessionVariables = {
|
||||
SSH_AUTH_SOCK = "/run/user/1000/ssh-agent";
|
||||
};
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
|
||||
imports = builtins.concatMap import [
|
||||
./programs
|
||||
./services
|
||||
];
|
||||
}
|
42
home/work/pkgs.nix
Normal file
42
home/work/pkgs.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{pkgs, ...}:
|
||||
with pkgs; [
|
||||
age # Modern encryption tool with small explicit keys
|
||||
arandr # simple GUI for xrandr
|
||||
atuin
|
||||
dig # dns command-line tool
|
||||
fd # "find" for files
|
||||
geckodriver # remote controll firefox
|
||||
helix # modal editor
|
||||
htop # process monitor
|
||||
hyperfine # command-line benchmarking tool
|
||||
i3lock # screen locker
|
||||
imagemagick # selection screenshot stuff
|
||||
just # just a command runner
|
||||
keepassxc # password manager
|
||||
lazygit # git client
|
||||
libnotify # notify-send command
|
||||
libsecret
|
||||
libreoffice
|
||||
linphone
|
||||
logseq # note taking utility
|
||||
mtr # traceroute
|
||||
mumble # voice call client
|
||||
ncdu # disk space info (a better du)
|
||||
neovim-unwrapped # best code editor on the planet
|
||||
networkmanagerapplet # systray applet for NetworkManager
|
||||
nitrogen # wallpapger manager
|
||||
nushellFull # A modern shell written in Rust
|
||||
ouch # painless compression and decompression for your terminal
|
||||
pavucontrol # pulseaudio volume control
|
||||
playerctl # music player controller
|
||||
podman-compose # podman manager
|
||||
restic # incremental backup tool
|
||||
ripgrep # fast grep
|
||||
rocketchat-desktop # company chat
|
||||
sops # Mozilla sops (Secrets OPerationS) is an editor of encrypted files
|
||||
thunderbird # email client
|
||||
xclip # clipboard support
|
||||
xsel # clipboard support (also for neovim)
|
||||
zeal # offline documentation browser
|
||||
zellij # A terminal workspace with batteries included
|
||||
]
|
100
home/work/programs/alacritty/default.nix
Normal file
100
home/work/programs/alacritty/default.nix
Normal file
@ -0,0 +1,100 @@
|
||||
{...}: {
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
live_config_reload = true;
|
||||
|
||||
env.TERM = "xterm-256color";
|
||||
bell.duration = 0;
|
||||
cursor.style = "Block";
|
||||
|
||||
scrolling = {
|
||||
history = 10000;
|
||||
multiplier = 3;
|
||||
};
|
||||
|
||||
window = {
|
||||
decorations = "full";
|
||||
dynamic_title = false;
|
||||
opacity = 0.9;
|
||||
|
||||
dimensions = {
|
||||
columns = 0;
|
||||
lines = 0;
|
||||
};
|
||||
|
||||
padding = {
|
||||
x = 2;
|
||||
y = 2;
|
||||
};
|
||||
};
|
||||
|
||||
font = {
|
||||
size = 11.0;
|
||||
|
||||
normal = {
|
||||
family = "Comic Mono Nerd Font";
|
||||
style = "Regular";
|
||||
};
|
||||
|
||||
bold = {
|
||||
family = "Comic Mono Nerd Font";
|
||||
style = "Bold";
|
||||
};
|
||||
|
||||
italic = {
|
||||
family = "Comic Mono Nerd Font";
|
||||
style = "Italic";
|
||||
};
|
||||
};
|
||||
|
||||
mouse.bindings = [
|
||||
{
|
||||
mouse = "Middle";
|
||||
action = "PasteSelection";
|
||||
}
|
||||
];
|
||||
|
||||
colors = {
|
||||
primary = {
|
||||
background = "0x000000";
|
||||
foreground = "0xeaeaea";
|
||||
};
|
||||
|
||||
normal = {
|
||||
black = "0x000000";
|
||||
red = "0xd54e53";
|
||||
green = "0xb9ca4a";
|
||||
yellow = "0xe6c547";
|
||||
blue = "0x7aa6da";
|
||||
magenta = "0xc397d8";
|
||||
cyan = "0x70c0ba";
|
||||
white = "0xffffff";
|
||||
};
|
||||
|
||||
bright = {
|
||||
black = "0x666666";
|
||||
red = "0xff3334";
|
||||
green = "0x9ec400";
|
||||
yellow = "0xe7c547";
|
||||
blue = "0x7aa6da";
|
||||
magenta = "0xb77ee0";
|
||||
cyan = "0x54ced6";
|
||||
white = "0xffffff";
|
||||
};
|
||||
|
||||
dim = {
|
||||
black = "0x333333";
|
||||
red = "0xf2777a";
|
||||
green = "0x99cc99";
|
||||
yellow = "0xffcc66";
|
||||
blue = "0x6699cc";
|
||||
magenta = "0xcc99cc";
|
||||
cyan = "0x66cccc";
|
||||
white = "0xdddddd";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
132
home/work/programs/autorandr/default.nix
Normal file
132
home/work/programs/autorandr/default.nix
Normal file
@ -0,0 +1,132 @@
|
||||
{...}: let
|
||||
eDPId = "00ffffffffffff0006af3d5700000000001c0104a51f1178022285a5544d9a270e505400000001010101010101010101010101010101b43780a070383e401010350035ae100000180000000f0000000000000000000000000020000000fe0041554f0a202020202020202020000000fe004231343048414e30352e37200a0070";
|
||||
homeLGId = "00ffffffffffff001e6df976f2190200071b010380502278eaca95a6554ea1260f5054256b807140818081c0a9c0b300d1c08100d1cfcd4600a0a0381f4030203a001e4e3100001a295900a0a038274030203a001e4e3100001a000000fd00284b5a5a18000a202020202020000000fc004c4720554c545241574944450a0154020323f12309070747100403011f13128301000065030c001000681a00000101284b008c0ad08a20e02d10103e96001e4e31000018000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045";
|
||||
homeFujitsuId = "00ffffffffffff001ab3f4070101010130150103802f1e782ac665a059589d270e5054a54b008180950001010101010101010101010121399030621a274068b03600da281100001c000000fc00423232572d36204c45440a2020000000fd00384c1e5210000a202020202020000000ff00595633553136343932330a20200065";
|
||||
officeFirstId = "00ffffffffffff0022640565000000002d15010380341d78eaeed5a555489b26125054bfef80d1c0b300a9409500904081808140714f023a801871382d40582c450009252100001e000000ff0031323334353637383930313233000000fd00384b1e5312000a202020202020000000fc00484c3234394450420a2020202000c1";
|
||||
officeFirstAltId = "00ffffffffffff0022640565000000002d15010380341d78eaeed5a555489b26125054bfef80d1c0b300a9409500904081808140714f023a801871382d40582c450009252100001e000000ff0031323334353637383930313233000000fd00384b1e5310000a202020202020000000fc00484c3234394450420a2020202000c3";
|
||||
officeSecondId = "00ffffffffffff0022640565000000002d15010380341d78eaeed5a555489b26125054bfef80d1c0b300a9409500904081808140714f023a801871382d40582c450009252100001e000000ff0031323334353637383930313233000000fd00384b1e5312000a202020202020000000fc00484c3234394450420a2020202000c1";
|
||||
officeSecondAltId = "00ffffffffffff0022640565000000002d15010380341d78eaeed5a555489b26125054bfef80d1c0b300a9409500904081808140714f023a801871382d40582c450009252100001e000000ff0031323334353637383930313233000000fd00384b1e5310000a202020202020000000fc00484c3234394450420a2020202000c3";
|
||||
in {
|
||||
programs.autorandr = {
|
||||
enable = true;
|
||||
|
||||
hooks = {
|
||||
predetect = {};
|
||||
preswitch = {};
|
||||
postswitch = {};
|
||||
};
|
||||
|
||||
profiles = {
|
||||
"laptop" = {
|
||||
fingerprint = {
|
||||
eDP-1 = eDPId;
|
||||
};
|
||||
|
||||
config = {
|
||||
eDP-1 = {
|
||||
crtc = 1;
|
||||
mode = "1920x1080";
|
||||
position = "0x0";
|
||||
rate = "60.03";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
"home" = {
|
||||
fingerprint = {
|
||||
eDP-1 = eDPId;
|
||||
DP-3 = homeLGId;
|
||||
DP-5 = homeFujitsuId;
|
||||
};
|
||||
|
||||
config = {
|
||||
eDP-1 = {
|
||||
crtc = 1;
|
||||
mode = "1920x1080";
|
||||
position = "0x0";
|
||||
rate = "60.03";
|
||||
};
|
||||
|
||||
DP-3 = {
|
||||
primary = true;
|
||||
crtc = 0;
|
||||
mode = "2560x1080";
|
||||
position = "1920x0";
|
||||
rate = "59.98";
|
||||
};
|
||||
|
||||
DP-5 = {
|
||||
crtc = 2;
|
||||
mode = "1680x1050";
|
||||
position = "4480x30";
|
||||
rate = "59.95";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
"office" = {
|
||||
fingerprint = {
|
||||
eDP-1 = eDPId;
|
||||
DP-3 = officeFirstId;
|
||||
DP-5 = officeSecondId;
|
||||
};
|
||||
|
||||
config = {
|
||||
eDP-1 = {
|
||||
crtc = 1;
|
||||
mode = "1920x1080";
|
||||
position = "0x0";
|
||||
rate = "60.03";
|
||||
};
|
||||
|
||||
DP-3 = {
|
||||
crtc = 2;
|
||||
mode = "1920x1080";
|
||||
position = "3840x0";
|
||||
rate = "60.00";
|
||||
};
|
||||
|
||||
DP-5 = {
|
||||
primary = true;
|
||||
crtc = 0;
|
||||
mode = "1920x1080";
|
||||
position = "1920x0";
|
||||
rate = "60.00";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
"office-alt" = {
|
||||
fingerprint = {
|
||||
eDP-1 = eDPId;
|
||||
DP-4 = officeFirstAltId;
|
||||
DP-7 = officeSecondAltId;
|
||||
};
|
||||
|
||||
config = {
|
||||
eDP-1 = {
|
||||
crtc = 1;
|
||||
mode = "1920x1080";
|
||||
position = "0x0";
|
||||
rate = "60.03";
|
||||
};
|
||||
|
||||
DP-4 = {
|
||||
crtc = 2;
|
||||
mode = "1920x1080";
|
||||
position = "3840x0";
|
||||
rate = "60.00";
|
||||
};
|
||||
|
||||
DP-7 = {
|
||||
primary = true;
|
||||
crtc = 0;
|
||||
mode = "1920x1080";
|
||||
position = "1920x0";
|
||||
rate = "60.00";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
18
home/work/programs/bash/default.nix
Normal file
18
home/work/programs/bash/default.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{pkgs, ...}: {
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
|
||||
shellAliases = {
|
||||
ls = "eza";
|
||||
jssh = "ssh-wrapper jssh";
|
||||
jrescue = "ssh-wrapper jrescue";
|
||||
rescue = "ssh-wrapper rescue";
|
||||
};
|
||||
|
||||
initExtra = ''
|
||||
source ${pkgs.blesh}/share/blesh/ble.sh
|
||||
export PATH=$PATH:~/.local/bin
|
||||
export SSH_AUTH_SOCK=/run/user/1000/ssh-agent
|
||||
'';
|
||||
};
|
||||
}
|
97
home/work/programs/default.nix
Normal file
97
home/work/programs/default.nix
Normal file
@ -0,0 +1,97 @@
|
||||
[
|
||||
./alacritty
|
||||
./autorandr
|
||||
./bash
|
||||
./firefox
|
||||
./rofi
|
||||
./tmate
|
||||
./xresources
|
||||
./hyprland
|
||||
{
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
bat.enable = true;
|
||||
jq.enable = true;
|
||||
gpg.enable = true;
|
||||
swaylock.enable = true;
|
||||
|
||||
eza = {
|
||||
enable = true;
|
||||
icons = true;
|
||||
git = true;
|
||||
};
|
||||
|
||||
waybar = {
|
||||
enable = true;
|
||||
|
||||
settings.mainbar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 30;
|
||||
|
||||
modules-left = ["hyprland/workspaces"];
|
||||
modules-right = ["pulseaudio" "network" "cpu" "memory" "temperature" "battery" "clock" "tray"];
|
||||
};
|
||||
};
|
||||
|
||||
atuin = {
|
||||
enable = true;
|
||||
flags = ["--disable-up-arrow"];
|
||||
settings = {
|
||||
enter_accept = false;
|
||||
};
|
||||
};
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
fzf = {
|
||||
enable = true;
|
||||
defaultCommand = "fd --type file --follow"; # FZF_DEFAULT_COMMAND
|
||||
defaultOptions = ["--height 20%"]; # FZF_DEFAULT_OPTS
|
||||
fileWidgetCommand = "fd --type file --follow"; # FZF_CTRL_T_COMMAND
|
||||
};
|
||||
|
||||
zoxide = {
|
||||
enable = true;
|
||||
# nushell moves faster than zoxide updates
|
||||
enableNushellIntegration = false;
|
||||
options = ["--cmd" "cd"];
|
||||
};
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
# nushell moves faster than starship updates
|
||||
enableNushellIntegration = false;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
};
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "Patrick Michl";
|
||||
userEmail = "patrick.michl@hetzner.com";
|
||||
|
||||
signing = {
|
||||
key = "BFE0ACEE21CD5EB0";
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
pull = {
|
||||
rebase = true;
|
||||
};
|
||||
merge = {
|
||||
tool = "nvim";
|
||||
};
|
||||
mergetool = {
|
||||
prompt = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
]
|
140
home/work/programs/firefox/default.nix
Normal file
140
home/work/programs/firefox/default.nix
Normal file
@ -0,0 +1,140 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
stdenv,
|
||||
specialArgs,
|
||||
...
|
||||
}: let
|
||||
extensions = with specialArgs.ff-addons; [
|
||||
bitwarden
|
||||
darkreader
|
||||
i-dont-care-about-cookies
|
||||
privacy-badger
|
||||
ublock-origin
|
||||
tree-style-tab
|
||||
tridactyl
|
||||
];
|
||||
|
||||
customChrome = ''
|
||||
@-moz-document url(chrome://browser/content/browser.xhtml) {
|
||||
/* tabs on bottom of window */
|
||||
/* requires that you set
|
||||
* toolkit.legacyUserProfileCustomizations.stylesheets = true
|
||||
* in about:config
|
||||
*/
|
||||
#main-window body { flex-direction: column-reverse !important; }
|
||||
#navigator-toolbox { flex-direction: column-reverse !important; }
|
||||
#urlbar {
|
||||
top: unset !important;
|
||||
bottom: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2) !important;
|
||||
box-shadow: none !important;
|
||||
display: flex !important;
|
||||
flex-direction: column !important;
|
||||
}
|
||||
#urlbar-input-container {
|
||||
order: 2;
|
||||
}
|
||||
#urlbar > .urlbarView {
|
||||
order: 1;
|
||||
border-bottom: 1px solid #666;
|
||||
}
|
||||
#urlbar-results {
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
.search-one-offs { display: none !important; }
|
||||
.tab-background { border-top: none !important; }
|
||||
#navigator-toolbox::after { border: none; }
|
||||
#TabsToolbar .tabbrowser-arrowscrollbox,
|
||||
#tabbrowser-tabs, .tab-stack { min-height: 28px !important; }
|
||||
.tabbrowser-tab { font-size: 80%; }
|
||||
.tab-content { padding: 0 5px; }
|
||||
.tab-close-button .toolbarbutton-icon { width: 12px !important; height: 12px !important; }
|
||||
toolbox[inFullscreen=true] { display: none; }
|
||||
}
|
||||
'';
|
||||
|
||||
userChrome = customChrome;
|
||||
|
||||
# ~/.mozilla/firefox/PROFILE_NAME/prefs.js | user.js
|
||||
settings = {
|
||||
"app.normandy.first_run" = false;
|
||||
"app.shield.optoutstudies.enabled" = false;
|
||||
|
||||
# disable updates (pretty pointless with nix)
|
||||
"app.update.channel" = "default";
|
||||
|
||||
"browser.contentblocking.category" = "standard"; # "strict"
|
||||
"browser.ctrlTab.recentlyUsedOrder" = false;
|
||||
|
||||
"browser.download.viewableInternally.typeWasRegistered.svg" = true;
|
||||
"browser.download.viewableInternally.typeWasRegistered.webp" = true;
|
||||
"browser.download.viewableInternally.typeWasRegistered.xml" = true;
|
||||
|
||||
"browser.search.region" = "DE";
|
||||
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
"browser.tabs.loadInBackground" = true;
|
||||
"browser.urlbar.placeholderName" = "EnteEnteLauf";
|
||||
"browser.urlbar.showSearchSuggestionsFirst" = false;
|
||||
|
||||
# disable all the annoying quick actions
|
||||
"browser.urlbar.quickactions.enabled" = false;
|
||||
"browser.urlbar.quickactions.showPrefs" = false;
|
||||
"browser.urlbar.shortcuts.quickactions" = false;
|
||||
"browser.urlbar.suggest.quickactions" = false;
|
||||
|
||||
"distribution.searchplugins.defaultLocale" = "en-US";
|
||||
|
||||
"doh-rollout.balrog-migration-done" = true;
|
||||
"doh-rollout.doneFirstRun" = true;
|
||||
|
||||
"general.useragent.locale" = "en-US";
|
||||
|
||||
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||
|
||||
"extensions.extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||
"extensions.update.enabled" = false;
|
||||
"extensions.webcompat.enable_picture_in_picture_overrides" = true;
|
||||
"extensions.webcompat.enable_shims" = true;
|
||||
"extensions.webcompat.perform_injections" = true;
|
||||
"extensions.webcompat.perform_ua_overrides" = true;
|
||||
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
|
||||
# Yubikey
|
||||
"security.webauth.u2f" = true;
|
||||
"security.webauth.webauthn" = true;
|
||||
"security.webauth.webauthn_enable_softtoken" = false;
|
||||
"security.webauth.webauthn_enable_usbtoken" = true;
|
||||
|
||||
"network.dns.ipv4OnlyDomains" = "google.com";
|
||||
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"layout.word_select.stop_at_punctuation" = false;
|
||||
};
|
||||
in {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
||||
package = pkgs.firefox-bin;
|
||||
|
||||
profiles = {
|
||||
default = {
|
||||
isDefault = true;
|
||||
id = 0;
|
||||
inherit extensions settings userChrome;
|
||||
};
|
||||
};
|
||||
|
||||
webapps = {
|
||||
rocket-chat = {
|
||||
url = "https://chat.hetzner.company";
|
||||
id = 1;
|
||||
|
||||
genericName = "Internet Messenger";
|
||||
categories = ["Network" "InstantMessaging"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
145
home/work/programs/hyprland/default.nix
Normal file
145
home/work/programs/hyprland/default.nix
Normal file
@ -0,0 +1,145 @@
|
||||
{pkgs, ...}: {
|
||||
wayland.windowManager.hyprland = let
|
||||
locker = "${pkgs.swaylock}/bin/swaylock";
|
||||
set-dpms = "${pkgs.hyprland}/bin/hyprctl dispatcher dpms";
|
||||
locked-dpms = pkgs.writeShellScript "locked-dpms.sh" ''
|
||||
${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 10 'if pgrep -x swaylock; then ${set-dpms} off; fi' \
|
||||
resume '${set-dpms} on'
|
||||
'';
|
||||
idle-script = pkgs.writeShellScript "idle-lock.sh" ''
|
||||
${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 300 '${locker} -f' \
|
||||
timeout 330 '${set-dpms} off' \
|
||||
resume '${set-dpms} on'
|
||||
'';
|
||||
in {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
"$mod" = "SUPER";
|
||||
|
||||
exec-once = [
|
||||
"${pkgs.waybar}/bin/waybar"
|
||||
"${pkgs.mako}/bin/mako"
|
||||
idle-script
|
||||
locked-dpms
|
||||
];
|
||||
|
||||
monitor = [
|
||||
"eDP-1,1920x1080,0x0,1.333333" # Laptop screen
|
||||
"desc:LG Electronics LG ULTRAWIDE 0x000219F2,2560x1080,1440x0,1" # Primary @home
|
||||
# "desc:Fujitsu Siemens Computers GmbH B22W-6 LED YV3U164923,1680x1050,4000x0,1" # Secondary @home
|
||||
",preferred,auto,1" # Automatically configure everything else
|
||||
];
|
||||
|
||||
device = [
|
||||
{
|
||||
name = "razer-razer-blackwidow-chroma";
|
||||
kb_layout = "de";
|
||||
}
|
||||
{
|
||||
name = "at-translated-set-2-keyboard";
|
||||
kb_layout = "de";
|
||||
}
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "us,de";
|
||||
follow_mouse = 1;
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 5;
|
||||
border_size = 1;
|
||||
layout = "dwindle";
|
||||
allow_tearing = false;
|
||||
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 5;
|
||||
drop_shadow = true;
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
"col.shadow" = "rgba(1a1a1aee)";
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
|
||||
animation = [
|
||||
"windows, 1, 3, myBezier"
|
||||
"windowsOut, 1, 3, default, popin 80%"
|
||||
"border, 1, 3, default"
|
||||
"borderangle, 1, 3, default"
|
||||
"fade, 1, 3, default"
|
||||
"workspaces, 1, 3, default"
|
||||
];
|
||||
};
|
||||
|
||||
bind =
|
||||
[
|
||||
", PRINT, exec, ${pkgs.hyprshot}/bin/hyprshot -m region --clipboard-only"
|
||||
"$mod, return, exec, ${pkgs.alacritty}/bin/alacritty"
|
||||
"$mod, D, exec, ${pkgs.rofi-wayland}/bin/rofi -show drun"
|
||||
"$mod SHIFT, Q, killactive, "
|
||||
"$mod, L, exec, ${locker}"
|
||||
"$mod, V, togglefloating, "
|
||||
"$mod, F, fullscreen, 1"
|
||||
"$mod, P, pseudo, # dwindle"
|
||||
"$mod, J, togglesplit, # dwindle"
|
||||
"$mod, left, movefocus, l"
|
||||
"$mod, right, movefocus, r"
|
||||
"$mod, up, movefocus, u"
|
||||
"$mod, down, movefocus, d"
|
||||
"$mod, S, togglespecialworkspace, magic"
|
||||
"$mod SHIFT, S, movetoworkspace, special:magic"
|
||||
]
|
||||
++ builtins.concatLists (builtins.genList (
|
||||
x: let
|
||||
num = builtins.toString (x + 1);
|
||||
in [
|
||||
"$mod, ${num}, workspace, ${num}"
|
||||
"$mod SHIFT, ${num}, movetoworkspace, ${num}"
|
||||
]
|
||||
)
|
||||
9);
|
||||
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
"$mod SHIFT, L, exec, ${locker}"
|
||||
];
|
||||
|
||||
windowrulev2 = [
|
||||
# KeePassXC
|
||||
"float,class:(org.keepassxc.KeePassXC)"
|
||||
"size 800 600,class:(org.keepassxc.KeePassXC)"
|
||||
# Thunderbird
|
||||
"float,class:thunderbird" # Float all thunderbird windows
|
||||
"tile,class:thunderbird,title:^(Write)" # Don't float the new mail window
|
||||
"tile,class:thunderbird,title:(Mozilla Thunderbird)$" # Also dont float the main window
|
||||
"move 100%-606 30,class:thunderbird" # The rest is the notification window. Float it in the top right corner
|
||||
"noinitialfocus,class:thunderbird,title:^()$" # Make it not pull focus
|
||||
];
|
||||
|
||||
misc = {
|
||||
mouse_move_enables_dpms = true;
|
||||
key_press_enables_dpms = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
7
home/work/programs/rofi/default.nix
Normal file
7
home/work/programs/rofi/default.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{pkgs, ...}: {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||
theme = ./theme.rafi;
|
||||
};
|
||||
}
|
168
home/work/programs/rofi/theme.rafi
Normal file
168
home/work/programs/rofi/theme.rafi
Normal file
@ -0,0 +1,168 @@
|
||||
/**
|
||||
* rofi -dump-theme output.
|
||||
* Rofi version: 1.7.5
|
||||
**/
|
||||
* {
|
||||
red: rgba ( 220, 50, 47, 100 % );
|
||||
selected-active-foreground: rgba ( 0, 142, 212, 100 % );
|
||||
lightfg: rgba ( 88, 104, 117, 100 % );
|
||||
separatorcolor: rgba ( 0, 54, 66, 100 % );
|
||||
urgent-foreground: rgba ( 218, 66, 129, 100 % );
|
||||
alternate-urgent-background: rgba ( 0, 43, 55, 100 % );
|
||||
lightbg: rgba ( 238, 232, 213, 100 % );
|
||||
background-color: transparent;
|
||||
border-color: rgba ( 0, 43, 55, 100 % );
|
||||
normal-background: rgba ( 0, 43, 55, 100 % );
|
||||
selected-urgent-background: rgba ( 0, 54, 66, 100 % );
|
||||
alternate-active-background: rgba ( 0, 43, 55, 100 % );
|
||||
spacing: 2;
|
||||
blue: rgba ( 38, 139, 210, 100 % );
|
||||
alternate-normal-foreground: var(foreground);
|
||||
urgent-background: rgba ( 0, 43, 55, 100 % );
|
||||
selected-normal-foreground: rgba ( 129, 147, 150, 100 % );
|
||||
active-foreground: rgba ( 0, 142, 212, 100 % );
|
||||
background: rgba ( 0, 43, 55, 100 % );
|
||||
selected-active-background: rgba ( 0, 54, 66, 100 % );
|
||||
active-background: rgba ( 0, 43, 55, 100 % );
|
||||
selected-normal-background: rgba ( 0, 54, 66, 100 % );
|
||||
alternate-normal-background: rgba ( 0, 43, 55, 100 % );
|
||||
foreground: rgba ( 129, 147, 150, 100 % );
|
||||
selected-urgent-foreground: rgba ( 218, 66, 129, 100 % );
|
||||
normal-foreground: var(foreground);
|
||||
alternate-urgent-foreground: var(urgent-foreground);
|
||||
alternate-active-foreground: var(active-foreground);
|
||||
}
|
||||
element {
|
||||
padding: 1px ;
|
||||
spacing: 5px ;
|
||||
border: 0;
|
||||
}
|
||||
element normal.normal {
|
||||
background-color: var(normal-background);
|
||||
text-color: var(normal-foreground);
|
||||
}
|
||||
element normal.urgent {
|
||||
background-color: var(urgent-background);
|
||||
text-color: var(urgent-foreground);
|
||||
}
|
||||
element normal.active {
|
||||
background-color: var(active-background);
|
||||
text-color: var(active-foreground);
|
||||
}
|
||||
element selected.normal {
|
||||
background-color: var(selected-normal-background);
|
||||
text-color: var(selected-normal-foreground);
|
||||
}
|
||||
element selected.urgent {
|
||||
background-color: var(selected-urgent-background);
|
||||
text-color: var(selected-urgent-foreground);
|
||||
}
|
||||
element selected.active {
|
||||
background-color: var(selected-active-background);
|
||||
text-color: var(selected-active-foreground);
|
||||
}
|
||||
element alternate.normal {
|
||||
background-color: var(alternate-normal-background);
|
||||
text-color: var(alternate-normal-foreground);
|
||||
}
|
||||
element alternate.urgent {
|
||||
background-color: var(alternate-urgent-background);
|
||||
text-color: var(alternate-urgent-foreground);
|
||||
}
|
||||
element alternate.active {
|
||||
background-color: var(alternate-active-background);
|
||||
text-color: var(alternate-active-foreground);
|
||||
}
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
highlight: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
element-icon {
|
||||
background-color: transparent;
|
||||
size: 1.0000em ;
|
||||
text-color: inherit;
|
||||
}
|
||||
window {
|
||||
padding: 10;
|
||||
background-color: var(background);
|
||||
border: 1;
|
||||
}
|
||||
mainbox {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
message {
|
||||
padding: 1px ;
|
||||
border-color: var(separatorcolor);
|
||||
border: 2px dash 0px 0px ;
|
||||
}
|
||||
textbox {
|
||||
text-color: var(foreground);
|
||||
}
|
||||
listview {
|
||||
padding: 2px 0px 0px ;
|
||||
scrollbar: true;
|
||||
border-color: var(separatorcolor);
|
||||
spacing: 2px ;
|
||||
fixed-height: 0;
|
||||
border: 2px dash 0px 0px ;
|
||||
}
|
||||
scrollbar {
|
||||
width: 4px ;
|
||||
padding: 0;
|
||||
handle-width: 8px ;
|
||||
border: 0;
|
||||
handle-color: var(normal-foreground);
|
||||
}
|
||||
sidebar {
|
||||
border-color: var(separatorcolor);
|
||||
border: 2px dash 0px 0px ;
|
||||
}
|
||||
button {
|
||||
spacing: 0;
|
||||
text-color: var(normal-foreground);
|
||||
}
|
||||
button selected {
|
||||
background-color: var(selected-normal-background);
|
||||
text-color: var(selected-normal-foreground);
|
||||
}
|
||||
num-filtered-rows {
|
||||
expand: false;
|
||||
text-color: Gray;
|
||||
}
|
||||
num-rows {
|
||||
expand: false;
|
||||
text-color: Gray;
|
||||
}
|
||||
textbox-num-sep {
|
||||
expand: false;
|
||||
str: "/";
|
||||
text-color: Gray;
|
||||
}
|
||||
inputbar {
|
||||
padding: 1px ;
|
||||
spacing: 0px ;
|
||||
text-color: var(normal-foreground);
|
||||
children: [ "prompt","textbox-prompt-colon","entry","num-filtered-rows","textbox-num-sep","num-rows","case-indicator" ];
|
||||
}
|
||||
case-indicator {
|
||||
spacing: 0;
|
||||
text-color: var(normal-foreground);
|
||||
}
|
||||
entry {
|
||||
text-color: var(normal-foreground);
|
||||
spacing: 0;
|
||||
placeholder-color: Gray;
|
||||
placeholder: "Type to filter";
|
||||
}
|
||||
prompt {
|
||||
spacing: 0;
|
||||
text-color: var(normal-foreground);
|
||||
}
|
||||
textbox-prompt-colon {
|
||||
margin: 0px 0.3000em 0.0000em 0.0000em ;
|
||||
expand: false;
|
||||
str: ":";
|
||||
text-color: inherit;
|
||||
}
|
36
home/work/programs/tmate/.tmate.conf
Normal file
36
home/work/programs/tmate/.tmate.conf
Normal file
@ -0,0 +1,36 @@
|
||||
set -g history-limit 50000
|
||||
set -g default-terminal "screen-256color"
|
||||
set -g mouse on
|
||||
set -sg escape-time 50
|
||||
|
||||
unbind C-b
|
||||
set-option -g prefix C-a
|
||||
bind-key C-a send-prefix
|
||||
bind h split-window -h
|
||||
bind v split-window -v
|
||||
unbind '"'
|
||||
unbind %
|
||||
bind r source-file ~/.tmate.conf
|
||||
bind -n M-Left select-window -p
|
||||
bind -n M-Right select-window -n
|
||||
set-option -g allow-rename off
|
||||
bind -n C-t new-window
|
||||
|
||||
bind -n M-0 select-window -T -t 0
|
||||
bind -n M-1 select-window -T -t 1
|
||||
bind -n M-2 select-window -T -t 2
|
||||
bind -n M-3 select-window -T -t 3
|
||||
bind -n M-4 select-window -T -t 4
|
||||
bind -n M-5 select-window -T -t 5
|
||||
bind -n M-6 select-window -T -t 6
|
||||
bind -n M-7 select-window -T -t 7
|
||||
bind -n M-8 select-window -T -t 8
|
||||
bind -n M-9 select-window -T -t 9
|
||||
|
||||
set -g status-style bg='#44475a',fg='#bd93f9'
|
||||
set -g status-interval 1
|
||||
set -g message-style bg='#44475a',fg='#8be9fd'
|
||||
set-window-option -g window-status-style fg='#bd93f9',bg=default
|
||||
set-window-option -g window-status-current-style fg='#ff79c6',bg='#282a36'
|
||||
set -g window-status-current-format "#[fg=#44475a]#[bg=#bd93f9]#[fg=#f8f8f2]#[bg=#bd93f9] #I #W #[fg=#bd93f9]#[bg=#44475a]"
|
||||
set -g window-status-format "#[fg=#f8f8f2]#[bg=#44475a]#I #W #[fg=#44475a]"
|
12
home/work/programs/tmate/default.nix
Normal file
12
home/work/programs/tmate/default.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{pkgs, ...}: {
|
||||
programs.tmate = {
|
||||
enable = true;
|
||||
host = "tmate.hetzner.company";
|
||||
port = 10022;
|
||||
# dsaFingerprint = "SHA256:YspEXM7hBFT+zEcbq9St+V9sj2TCE6lMczdIn+jeZUU";
|
||||
# rsaFingerprint = "SHA256:pCOEObNY3ihLZn2k6iIgOUDXS8PX10qz1JPBidrEfgA";
|
||||
rsaFingerprint = "SHA256:qILAxjmkvwkqPolJ99qFcnzLg/V5UlfB3q/Z1CDvuWY";
|
||||
dsaFingerprint = "SHA256:zGqypd4klAGEGFYPeGlVMy9KJdycFA14rNpk3eD2VZo";
|
||||
extraConfig = builtins.readFile ./.tmate.conf;
|
||||
};
|
||||
}
|
24
home/work/programs/xresources/default.nix
Normal file
24
home/work/programs/xresources/default.nix
Normal file
@ -0,0 +1,24 @@
|
||||
{...}: {
|
||||
xresources.properties = {
|
||||
"XCursor.size" = 16;
|
||||
"*background" = "#1D1F28";
|
||||
"*foreground" = "#FDFDFD";
|
||||
"*cursorColor" = "#C574DD";
|
||||
"*color0" = "#282A36";
|
||||
"*color1" = "#F37F97";
|
||||
"*color2" = "#5ADECD";
|
||||
"*color3" = "#F2A272";
|
||||
"*color4" = "#8897F4";
|
||||
"*color5" = "#C574DD";
|
||||
"*color6" = "#79E6F3";
|
||||
"*color7" = "#FDFDFD";
|
||||
"*color8" = "#414458";
|
||||
"*color9" = "#FF4971";
|
||||
"*color10" = "#18E3C8";
|
||||
"*color11" = "#FF8037";
|
||||
"*color12" = "#556FFF";
|
||||
"*color13" = "#B043D1";
|
||||
"*color14" = "#3FDCEE";
|
||||
"*color15" = "#BEBEC1";
|
||||
};
|
||||
}
|
3
home/work/services/default.nix
Normal file
3
home/work/services/default.nix
Normal file
@ -0,0 +1,3 @@
|
||||
[
|
||||
./ssh-agent
|
||||
]
|
5
home/work/services/ssh-agent/default.nix
Normal file
5
home/work/services/ssh-agent/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{...}: {
|
||||
services.ssh-agent = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
@ -21,7 +21,7 @@
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
options = "--delete-older-than +4";
|
||||
};
|
||||
|
||||
package = pkgs.nixVersions.stable;
|
||||
@ -67,7 +67,7 @@
|
||||
++ [file];
|
||||
};
|
||||
in {
|
||||
laptop = myNixosSystem {
|
||||
nixos = myNixosSystem {
|
||||
np = nixpkgs;
|
||||
system = "x86_64-linux";
|
||||
ip = "127.0.0.1";
|
||||
|
@ -3,6 +3,7 @@
|
||||
lib,
|
||||
pkgs,
|
||||
mypkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [./hardware-configuration.nix];
|
||||
@ -16,7 +17,7 @@
|
||||
preLVM = true;
|
||||
};
|
||||
};
|
||||
boot.kernelPackages = pkgs.linuxPackages_6_5;
|
||||
boot.kernelPackages = pkgs.linuxPackages_6_8;
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
time.timeZone = "Europe/Berlin";
|
||||
@ -67,6 +68,12 @@
|
||||
illum.enable = true;
|
||||
tlp.enable = true;
|
||||
|
||||
udev.extraRules = ''
|
||||
KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev"
|
||||
# Keymapp Flashing rules for the ZSA Voyager
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", MODE:="0666", SYMLINK+="ignition_dfu"
|
||||
'';
|
||||
|
||||
printing = {
|
||||
enable = true;
|
||||
drivers = [
|
||||
@ -111,14 +118,18 @@
|
||||
enable = true;
|
||||
libinput.enable = true;
|
||||
|
||||
windowManager.awesome = {
|
||||
enable = true;
|
||||
package = pkgs.callPackage ../../overrides/awesome.nix {};
|
||||
};
|
||||
# windowManager.awesome = {
|
||||
# enable = true;
|
||||
# package = pkgs.callPackage ../../overrides/awesome.nix {};
|
||||
# };
|
||||
|
||||
displayManager = {
|
||||
sddm.enable = true;
|
||||
defaultSession = "none+awesome";
|
||||
# sddm.enable = true;
|
||||
# defaultSession = "none+awesome";
|
||||
gdm = {
|
||||
enable = true;
|
||||
wayland = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -128,10 +139,51 @@
|
||||
};
|
||||
};
|
||||
|
||||
# services.jupyter = {
|
||||
# enable = true;
|
||||
# package = pkgs.jupyter-all;
|
||||
# command = "jupyter-lab";
|
||||
# group = "users";
|
||||
# password = "'$argon2i$v=19$m=4096,t=3,p=1$a2pzamhrdjgzaGtzZGZoZGY4NzcydWhkZnM$fuPanvCWOsPNpBjyLaBz3YRRzmSSdpp8kaYJAyEPtWA'";
|
||||
# kernels = let
|
||||
# juliaEnv = pkgs.julia_19-bin.withPackages ["IJulia" "Plots"];
|
||||
# ijulia = builtins.readFile (
|
||||
# pkgs.runCommand "${juliaEnv.name}-ijulia-pkgdir"
|
||||
# {
|
||||
# buildInputs = [juliaEnv];
|
||||
# } ''
|
||||
# ${juliaEnv}/bin/julia -e 'using IJulia; print(pkgdir(IJulia))' >$out
|
||||
# ''
|
||||
# );
|
||||
# in {
|
||||
# ijulia = {
|
||||
# displayName = "Julia ${juliaEnv.julia.version}";
|
||||
# argv = [
|
||||
# "${juliaEnv}/bin/julia"
|
||||
# "-i"
|
||||
# "--color=yes"
|
||||
# "${ijulia}/src/kernel.jl"
|
||||
# "{connection_file}"
|
||||
# ];
|
||||
# language = "julia";
|
||||
# interruptMode = "signal";
|
||||
# logo32 = "${ijulia}/deps/logo-32x32.png";
|
||||
# logo64 = "${ijulia}/deps/logo-64x64.png";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
# # systemd.services.jupyter.environment.JUPYTER_DATA_DIR = builtins.toString (pkgs.jupyter-kernel.create {
|
||||
# # definitions = config.services.jupyter.kernels;
|
||||
# # });
|
||||
# systemd.services.jupyter.environment.JUPYTER_DATA_DIR = ".jupyter/data";
|
||||
# systemd.services.jupyter.environment.JUPYTER_RUNTIME_DIR = "/var/lib/jupyter/.local/share/jupyter/runtime";
|
||||
|
||||
security.sudo.configFile = ''
|
||||
Defaults lecture=always
|
||||
Defaults lecture_file=${../../misc/sudo_lecture}
|
||||
'';
|
||||
security.pam.services.swaylock = {};
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
font-awesome
|
||||
@ -140,11 +192,15 @@
|
||||
];
|
||||
|
||||
programs.fish.enable = true;
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
users.groups.jupyter = {};
|
||||
users.groups.plugdev = {};
|
||||
users.users.jupyter.group = "jupyter";
|
||||
users.users.patrick = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["networkmanager" "wheel"];
|
||||
shell = pkgs.nushellFull;
|
||||
extraGroups = ["networkmanager" "wheel" "plugdev" "jupyter"];
|
||||
shell = pkgs.bashInteractive;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP8zNAXScQ4FoWNxF4+ALJXMSi3EbpqZP5pO9kfg9t8o patrick"
|
||||
];
|
||||
@ -152,27 +208,6 @@
|
||||
|
||||
virtualisation.podman.enable = true;
|
||||
|
||||
# nix = {
|
||||
# gc = {
|
||||
# automatic = true;
|
||||
# dates = "weekly";
|
||||
# options = "--delete-older-than 7d";
|
||||
# };
|
||||
|
||||
# package = pkgs.nixVersions.stable;
|
||||
# # registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
|
||||
# settings = {
|
||||
# auto-optimise-store = true;
|
||||
|
||||
# experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# # Avoid unwanted garbage collection when using nix-direnv
|
||||
# keep-outputs = true;
|
||||
# keep-derivations = true;
|
||||
# };
|
||||
# };
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
|
14
outputs.nix
14
outputs.nix
@ -2,6 +2,7 @@
|
||||
self,
|
||||
flake-utils,
|
||||
nixpkgs,
|
||||
nurpkgs,
|
||||
deploy,
|
||||
home-manager,
|
||||
...
|
||||
@ -12,18 +13,14 @@ in {
|
||||
packages = import ./pkgs {inherit pkgs;};
|
||||
|
||||
devShell = pkgs.callPackage ./shell.nix {
|
||||
inherit (deploy.packages.${pkgs.system}) deploy-rs;
|
||||
inherit (deploy.packages.${system}) deploy-rs;
|
||||
inherit (home-manager.packages.${system}) home-manager;
|
||||
};
|
||||
|
||||
formatter = pkgs.alejandra;
|
||||
}))
|
||||
// {
|
||||
homeConfigurations.patrick = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
# config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
homeConfigurations = import ./home/configurations.nix (inputs // {inherit inputs;});
|
||||
|
||||
nixosConfigurations = import ./nixos/configurations.nix (inputs // {inherit inputs;});
|
||||
|
||||
@ -42,8 +39,11 @@ in {
|
||||
colmena =
|
||||
{
|
||||
meta = {
|
||||
# Default nixpkgs
|
||||
nixpkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
# Per Node nixpkgs override
|
||||
nodeNixpkgs = builtins.mapAttrs (name: value: value.pkgs) self.nixosConfigurations;
|
||||
# Per Node additional specialArgs
|
||||
nodeSpecialArgs = builtins.mapAttrs (name: value: value._module.specialArgs) self.nixosConfigurations;
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user