summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-07-20 12:08:08 +0200
committerAlex Auvolat <alex@adnab.me>2023-07-20 12:08:08 +0200
commit958063f086e1bfd7d75208dae9339acec33b1942 (patch)
treef7d5fc56f452260973afd3e99a7259d042e14120
parent07a0c5465e608f3378f8405a56d2fd062a190e4e (diff)
downloaduser-config-958063f086e1bfd7d75208dae9339acec33b1942.tar.gz
user-config-958063f086e1bfd7d75208dae9339acec33b1942.zip
kusanagi with non-persistent home
-rw-r--r--icewm/keys7
-rw-r--r--icewm/preferences2
-rw-r--r--nixos/common.nix3
-rw-r--r--nixos/icewm.nix1
-rw-r--r--nixos/kusanagi.nix26
-rw-r--r--nixpkgs/common.nix4
-rw-r--r--nixpkgs/kusanagi.nix49
-rw-r--r--qutebrowser/config.py4
-rw-r--r--qutebrowser/quickmarks6
9 files changed, 88 insertions, 14 deletions
diff --git a/icewm/keys b/icewm/keys
index 4d8c855..547c1aa 100644
--- a/icewm/keys
+++ b/icewm/keys
@@ -3,7 +3,6 @@ key "Super+p" dmenu_run
key "Super+Shift+r" icewm --restart
key "Super+Shift+x" i3lock -c 000000
-
key "XF86MonBrightnessDown" xbacklight -dec 10
key "XF86MonBrightnessUp" xbacklight -inc 10
@@ -11,3 +10,9 @@ key "XF86AudioMute" pactl set-sink-mute @DEFAULT_SINK@ toggle
key "XF86AudioRaiseVolume" sh -c "pactl set-sink-mute @DEFAULT_SINK@ false && pactl set-sink-volume @DEFAULT_SINK@ +5%"
key "XF86AudioLowerVolume" sh -c "pactl set-sink-mute @DEFAULT_SINK@ false && pactl set-sink-volume @DEFAULT_SINK@ -5%"
+key "Super+h" icesh -f sizeto 50% 100% top left
+key "Super+l" icesh -f sizeto 50% 100% top right
+key "Super+j" icesh -f sizeto 50% 50% bottom left
+key "Super+k" icesh -f sizeto 50% 50% bottom right
+key "Super+u" icesh -f sizeto 50% 50% top left
+key "Super+i" icesh -f sizeto 50% 50% top right
diff --git a/icewm/preferences b/icewm/preferences
index c2d7584..bc90b14 100644
--- a/icewm/preferences
+++ b/icewm/preferences
@@ -2,3 +2,5 @@ TerminalCommand=st
TaskBarGraphHeight=28
SmallIconSize=24
DesktopBackgroundColor="rgb:00/80/80"
+WorkspaceNames=" 1 "," 2 "
+QuickSwitchRaiseCandidate=1
diff --git a/nixos/common.nix b/nixos/common.nix
index 5a653a6..a3397c1 100644
--- a/nixos/common.nix
+++ b/nixos/common.nix
@@ -12,7 +12,7 @@ in
];
boot.supportedFilesystems = [ "ntfs" ];
- boot.cleanTmpDir = true;
+ boot.tmp.cleanOnBoot = true;
time.timeZone = "Europe/Paris";
@@ -191,6 +191,7 @@ in
inkscape
krita
mupdf
+ llpp
xournalpp
pdfarranger
nextcloud-client
diff --git a/nixos/icewm.nix b/nixos/icewm.nix
index 3e8d81f..cf02cc1 100644
--- a/nixos/icewm.nix
+++ b/nixos/icewm.nix
@@ -12,7 +12,6 @@
dmenu
feh
- mupdf
acpi
netsurf.browser
midori
diff --git a/nixos/kusanagi.nix b/nixos/kusanagi.nix
index 52ba1eb..cf5450c 100644
--- a/nixos/kusanagi.nix
+++ b/nixos/kusanagi.nix
@@ -3,12 +3,16 @@
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
+let
+ home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz";
+in
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
./common.nix
./icewm.nix
+ (import "${home-manager}/nixos")
];
networking.hostName = "kusanagi";
@@ -37,7 +41,7 @@
fsType = "vfat";
};
- fileSystems."/home" =
+ fileSystems."/Z" =
{ device = "kusanagi/nixos/home";
fsType = "zfs";
neededForBoot = true; # because contains password files used below
@@ -80,19 +84,23 @@
options = [ "bind" ];
};
- # .cache as tmpfs
- fileSystems."/home/lx/.cache" = {
- device = "none";
- fsType = "tmpfs";
- options = [ "defaults" "size=4G" "mode=755" "uid=1000" ];
- };
-
# ---- immutable user config for tmpfs root ----
users.mutableUsers = false;
- users.users.lx.passwordFile = "/home/lx/.password";
+ users.users.lx.passwordFile = "/Z/lx/.password";
users.users.lx.uid = 1000;
+ # ---- no persistent home, use home manager to set everything up ----
+
+ # nur has to be imported twice, otherwise doesn't work
+ nixpkgs.config.packageOverrides = pkgs: {
+ nur = import (builtins.fetchTarball
+ "https://github.com/nix-community/NUR/archive/master.tar.gz") {
+ inherit pkgs;
+ };
+ };
+ home-manager.users.lx = import ../nixpkgs/kusanagi.nix { inherit pkgs; };
+
# ----
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
diff --git a/nixpkgs/common.nix b/nixpkgs/common.nix
index d652db4..7450d40 100644
--- a/nixpkgs/common.nix
+++ b/nixpkgs/common.nix
@@ -43,6 +43,7 @@
home.file = {
".vim/coc-settings.json".source = ../vim/coc-settings.json;
".config/tmux/tmux.conf".source = ../tmux/tmux.conf;
+ ".config/qutebrowser/config.py".source = ../qutebrowser/config.py;
".config/sx/sxrc".executable = true;
".config/sx/sxrc".text = ''
${pkgs.xorg.xsetroot}/bin/xsetroot -solid "#008080"
@@ -57,9 +58,8 @@
".config/icewm/toolbar".text = ''
prog "Terminal" xterm st
prog "Qutebrowser" ${pkgs.qutebrowser}/share/icons/hicolor/32x32/apps/qutebrowser.png qutebrowser
- prog "Firefox" ${pkgs.firefox-esr}/share/icons/hicolor/32x32/apps/firefox.png ${pkgs.firefox-esr}/bin/firefox
+ prog "Firefox" ${pkgs.firefox}/share/icons/hicolor/32x32/apps/firefox.png ${pkgs.firefox}/bin/firefox
prog "Midori" ${pkgs.midori}/share/icons/hicolor/22x22/apps/org.midori_browser.Midori.png midori
- prog "Sylpheed" ${pkgs.sylpheed}/share/pixmaps/sylpheed.png sylpheed
prog "Thunderbird" ${pkgs.thunderbird}/share/icons/hicolor/32x32/apps/thunderbird.png thunderbird
prog "Spotify" ${pkgs.spotify}/share/icons/hicolor/32x32/apps/spotify-client.png spotify
'';
diff --git a/nixpkgs/kusanagi.nix b/nixpkgs/kusanagi.nix
index 2eb8900..bb61451 100644
--- a/nixpkgs/kusanagi.nix
+++ b/nixpkgs/kusanagi.nix
@@ -1,9 +1,58 @@
{ pkgs, ... }: {
imports = [ ./common.nix ];
+ programs.bash.profileExtra = ''
+ ln -sf /Z/lx/.ssh ~/.ssh
+ mkdir -p ~/.gnupg
+ ln -sf /Z/lx/.gnupg/pubring.kbx ~/.gnupg/
+ ln -sf /Z/lx/.gnupg/trustdb.gpg ~/.gnupg/
+ ln -sf /Z/lx/.gnupg/private-keys-v1.d ~/.gnupg/
+ ln -sf /Z/lx/Downloads ~/Downloads
+ ln -sf /Z/lx/.cargo ~/.cargo
+ '';
+
+ nixpkgs.config.packageOverrides = pkgs: {
+ nur = import (builtins.fetchTarball
+ "https://github.com/nix-community/NUR/archive/master.tar.gz") {
+ inherit pkgs;
+ };
+ };
+
+ home.file.".config/qutebrowser/quickmarks".source = ../qutebrowser/quickmarks;
+
+ programs.firefox.enable = true;
+ programs.firefox.profiles.default = {
+ isDefault = true;
+ extensions = with pkgs.nur.repos.rycee.firefox-addons; [
+ ublock-origin
+ privacy-badger
+ startpage-private-search
+ ];
+ settings = {
+ "extensions.autoDisableScopes" = 0;
+ "extensions.enabledScopes" = 15;
+ };
+ };
+
+ xdg.desktopEntries.llpp = {
+ name = "llpp";
+ genericName = "PDF viewer";
+ exec = "llpp %f";
+ terminal = false;
+ categories = [ "Graphics" "Viewer" ];
+ mimeType = [ "application/pdf" "application/x-pdf" ];
+ type = "Application";
+ };
+ xdg.mimeApps.enable = true;
+ xdg.mimeApps.defaultApplications = {
+ "application/pdf" = [ "llpp.desktop" ];
+ };
+
home.homeDirectory = "/home/lx";
xdg.userDirs.download = "/home/lx/Downloads";
+ programs.bash.shellAliases.z = "cd /Z/lx";
+
services.gpg-agent.enable = true;
services.gpg-agent.enableSshSupport = false;
services.gpg-agent.pinentryFlavor = "qt";
diff --git a/qutebrowser/config.py b/qutebrowser/config.py
new file mode 100644
index 0000000..3245e62
--- /dev/null
+++ b/qutebrowser/config.py
@@ -0,0 +1,4 @@
+config.load_autoconfig(False) # disable saved configs
+
+c.hints.chars = "qsdjflkmazeruiopghwxcvn"
+config.bind('ed', 'download-open')
diff --git a/qutebrowser/quickmarks b/qutebrowser/quickmarks
new file mode 100644
index 0000000..69a941d
--- /dev/null
+++ b/qutebrowser/quickmarks
@@ -0,0 +1,6 @@
+sp https://search.nixos.org/packages
+so https://search.nixos.org/options?
+hs https://mipmip.github.io/home-manager-option-search/
+grgit https://git.deuxfleurs.fr/Deuxfleurs/garage
+hq https://garagehq.deuxfleurs.fr
+man https://guide.deuxfleurs.fr