summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstuebinm2022-02-05 01:21:32 +0100
committerstuebinm2022-02-05 01:21:32 +0100
commite6718bd6298af2f6d540d97ab184fab5ab4d164b (patch)
treefc56c49ddc55d06a3e85e432643fd9db10ec0cb2
parentf486a1f424d49ff0ecc73e94cd2f17146a555cd9 (diff)
add minimal home manager config
(mostly to reduce hassle / build times for smaller machines)
-rw-r--r--flake.nix22
-rw-r--r--home/home-minimal.nix117
-rw-r--r--home/home.nix137
-rw-r--r--home/packages-minimal.nix41
-rw-r--r--home/packages.nix20
5 files changed, 212 insertions, 125 deletions
diff --git a/flake.nix b/flake.nix
index 5549885..cf6d382 100644
--- a/flake.nix
+++ b/flake.nix
@@ -65,15 +65,21 @@
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
- homeConfigurations.stuebinm = inputs.home-manager.lib.homeManagerConfiguration rec {
- system = "x86_64-linux";
- homeDirectory = "/home/stuebinm";
- username = "stuebinm";
- configuration.imports = [ ./home/home.nix ];
- stateVersion = "21.03";
- extraSpecialArgs = { inherit inputs system; };
- };
+ homeConfigurations =
+ let home = root: inputs.home-manager.lib.homeManagerConfiguration rec {
+ system = "x86_64-linux";
+ homeDirectory = "/home/stuebinm";
+ username = "stuebinm";
+ configuration.imports = [ root ];
+ stateVersion = "21.03";
+ extraSpecialArgs = { inherit inputs system; };
+ };
+ in {
+ stuebinm = home ./home/home.nix;
+ stuebinm-minimal = home ./home/home-minimal.nix;
+ };
home = self.homeConfigurations.stuebinm.activationPackage;
+ home-minimal = self.homeConfigurations.stuebinm-minimal.activationPackage;
};
}
diff --git a/home/home-minimal.nix b/home/home-minimal.nix
new file mode 100644
index 0000000..a2031dd
--- /dev/null
+++ b/home/home-minimal.nix
@@ -0,0 +1,117 @@
+{ config, lib, pkgs, inputs, ... }:
+
+{
+ # Let Home Manager install and manage itself.
+ programs.home-manager.enable = true;
+
+ imports = [
+ ./packages-minimal.nix
+ ];
+
+ home.keyboard.options = [ "caps:escape" ];
+
+ programs.bash = {
+ enable = true;
+ historyControl = [ "ignoredups" "ignorespace" ];
+ historyFileSize = 10000;
+
+ # set shell prompt & tty for the gnu pinentry (otherwise gnupg will crash)
+ initExtra = ''
+ export GPG_TTY=`tty`
+ # this shouldn't be necessary, but apparently nix is broken ...
+ NIX_PATH=$HOME/.nix-defexpr/channels''${NIX_PATH:+:}$NIX_PATH
+ PS1='\[\033[1;36m\] >>> [\j|\u@\w]\$: \[\033[00m\]'
+ '';
+
+ shellAliases = {
+ ll = "ls -slF";
+ };
+ };
+
+ programs.starship = {
+ enable = true;
+ enableBashIntegration = true;
+ enableFishIntegration = true;
+ settings = {
+ directory.truncation_length = 10;
+ };
+ };
+
+ programs.fish = {
+ enable = true;
+ shellAliases = {
+ nix-shell = "nix-shell --command fish";
+ le = "exa";
+ ll = "exa -lh --icons";
+ llt = "exa -lh --tree --icons";
+ lt = "exa --tree --icons";
+ };
+ functions = {
+ fish_greeting = {
+ body = "";
+ };
+ };
+ };
+
+ programs.bat = {
+ enable = true;
+ config.wrap = "never";
+ };
+
+ programs.git = {
+ enable = true;
+ package = pkgs.gitAndTools.gitFull;
+ userEmail = "stuebinm@disroot.org";
+ userName = "stuebinm";
+
+ signing = {
+ # signByDefault = true;
+ key = "0x8FBE8AAD32FA12B7";
+ };
+
+ extraConfig = {
+ log.showSignature = true;
+ init.defaultBranch = "main";
+ };
+
+ delta = {
+ enable = true;
+ options = {
+ decorations = {
+ commit-decoration-style = "bold yellow";
+ file-decoration-style = "bold blue";
+ file-style = "bold yellow";
+ };
+ features = "decorations line-numbers navigate";
+ whitespace-error-style = "22 reverse";
+ };
+ };
+ };
+
+ programs.htop = {
+ package = pkgs.htop-vim;
+ enable = true;
+ settings = {
+ fields = "0 48 17 18 38 46 47 49 1";
+ sort_key = 46;
+ sort_direction = -1;
+ hide_kernel_threads = 1;
+ hide_userland_threads = 0;
+ shadow_other_users = 1;
+ show_program_path = 0;
+ highlight_base_name = 1;
+ find_comm_in_cmdline = 1;
+ header_margin = 1;
+ show_cpu_usage = 1;
+ color_scheme = 5;
+ enable_mouse = 1;
+ delay = 15;
+ header_layout = "two_67_33";
+ column_meters_0 = "AllCPUs Memory Swap";
+ column_meter_modes_0 = "1 1 1";
+ column_meters_1 = "Tasks LoadAverage Uptime NetworkIO";
+ column_meter_modes_1 = "2 2 2 2";
+ };
+ };
+
+}
diff --git a/home/home.nix b/home/home.nix
index f61e7d8..1846e12 100644
--- a/home/home.nix
+++ b/home/home.nix
@@ -7,10 +7,9 @@
imports = [
./packages.nix
./unstable.nix
+ ./home-minimal.nix
];
- home.keyboard.options = [ "caps:escape" ];
-
programs.msmtp.enable = true;
programs.mbsync.enable = true;
programs.mu.enable = true;
@@ -34,35 +33,13 @@
};
programs.bash = {
- enable = true;
- historyControl = [ "ignoredups" "ignorespace" ];
- historyFileSize = 10000;
-
- # set shell prompt & tty for the gnu pinentry (otherwise gnupg will crash)
- initExtra = ''
- export GPG_TTY=`tty`
- # this shouldn't be necessary, but apparently nix is broken ...
- NIX_PATH=$HOME/.nix-defexpr/channels''${NIX_PATH:+:}$NIX_PATH
- PS1='\[\033[1;36m\] >>> [\j|\u@\w]\$: \[\033[00m\]'
- '';
-
shellAliases = {
"lrz-vpn" = "sudo openconnect https://asa-cluster.lrz.de -g AnyConnect";
- ll = "ls -slF";
news = "newsboat";
pj = "pijul";
};
};
- programs.starship = {
- enable = true;
- enableBashIntegration = true;
- enableFishIntegration = true;
- settings = {
- directory.truncation_length = 10;
- };
- };
-
programs.nushell = {
enable = true;
settings = {
@@ -76,23 +53,12 @@
};
programs.fish = {
- enable = true;
shellAliases = {
"lrz-vpn" = "sudo openconnect https://asa-cluster.lrz.de";
news = "newsboat";
pj = "pijul";
- nix-shell = "nix-shell --command fish";
- le = "exa";
- ll = "exa -lh --icons";
- llt = "exa -lh --tree --icons";
- lt = "exa --tree --icons";
agenda = "almanac month ~/.cache/feedsync/*";
};
- functions = {
- fish_greeting = {
- body = "";
- };
- };
};
programs.kitty = {
@@ -101,6 +67,44 @@
background_opacity 0.8
'';
};
+
+ programs.neovim = {
+ enable = true;
+ viAlias = true;
+ plugins = with pkgs; [
+ (vimPlugins.nvim-treesitter.withPlugins
+ (plugins: [ tree-sitter-grammars.tree-sitter-nix ]))
+ ];
+ generatedConfigViml = ''
+ lua <<EOF
+ require'nvim-treesitter.configs'.setup {
+ -- One of "all", "maintained" (parsers with maintainers), or a list of languages
+ ensure_installed = "all",
+
+ -- Install languages synchronously (only applied to `ensure_installed`)
+ sync_install = false,
+
+ -- List of parsers to ignore installing
+ ignore_install = { "javascript" },
+
+ highlight = {
+ -- `false` will disable the whole extension
+ enable = true,
+
+ -- list of language that will be disabled
+ -- disable = { "c", "rust" },
+
+ -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
+ -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
+ -- Using this option may slow down your editor, and you may see some duplicate highlights.
+ -- Instead of true it can also be a list of languages
+ additional_vim_regex_highlighting = false,
+ },
+ }
+ EOF
+ '';
+ };
+
systemd.user.services.syncical = let
feeds = (import inputs.feeds).ical; in {
Unit.Description = "syncs ical feeds for almanac agenda";
@@ -150,12 +154,6 @@
};
- programs.bat = {
- enable = true;
- config.wrap = "never";
- };
-
-
programs.obs-studio = {
enable = true;
plugins = let
@@ -166,36 +164,6 @@
];
};
- programs.git = {
- enable = true;
- package = pkgs.gitAndTools.gitFull;
- userEmail = "stuebinm@disroot.org";
- userName = "stuebinm";
-
- signing = {
- # signByDefault = true;
- key = "0x8FBE8AAD32FA12B7";
- };
-
- extraConfig = {
- log.showSignature = true;
- init.defaultBranch = "main";
- };
-
- delta = {
- enable = true;
- options = {
- decorations = {
- commit-decoration-style = "bold yellow";
- file-decoration-style = "bold blue";
- file-style = "bold yellow";
- };
- features = "decorations line-numbers navigate";
- whitespace-error-style = "22 reverse";
- };
- };
- };
-
programs.gpg = {
enable = true;
settings = {
@@ -209,33 +177,6 @@
maxCacheTtl = 1800;
};
-
- programs.htop = {
- package = pkgs.htop-vim;
- enable = true;
- settings = {
- fields = "0 48 17 18 38 46 47 49 1";
- sort_key = 46;
- sort_direction = -1;
- hide_kernel_threads = 1;
- hide_userland_threads = 0;
- shadow_other_users = 1;
- show_program_path = 0;
- highlight_base_name = 1;
- find_comm_in_cmdline = 1;
- header_margin = 1;
- show_cpu_usage = 1;
- color_scheme = 5;
- enable_mouse = 1;
- delay = 15;
- header_layout = "two_67_33";
- column_meters_0 = "AllCPUs Memory Swap";
- column_meter_modes_0 = "1 1 1";
- column_meters_1 = "Tasks LoadAverage Uptime NetworkIO";
- column_meter_modes_1 = "2 2 2 2";
- };
- };
-
programs.ssh = {
forwardAgent = true;
enable = true;
diff --git a/home/packages-minimal.nix b/home/packages-minimal.nix
new file mode 100644
index 0000000..8544f12
--- /dev/null
+++ b/home/packages-minimal.nix
@@ -0,0 +1,41 @@
+{ config, lib, pkgs, inputs, system, ... }:
+
+let
+ naersk = pkgs.callPackage inputs.naersk {};
+ extras = {
+ sfz = naersk.buildPackage inputs.sfz;
+ leylines = pkgs.callPackage "${(pkgs.fetchgit {
+ url = "https://gitlab.infra4future.de/stuebinm/leylines";
+ sha256 = "sha256-AFZVZeLPCWEjfUcILErag/J+susf7ovEQOg1RaFr4ko=";
+ }).outPath}/package.nix" {};
+ };
+in
+{
+ home.packages = with pkgs; [
+ emacs-all-the-icons-fonts
+
+ # flake-enabled version of nix
+ (pkgs.writeScriptBin "nif" ''
+ #!/usr/bin/env bash
+ exec ${pkgs.nixFlakes}/bin/nix --experimental-features "nix-command flakes" "$@"
+ '')
+ lynx
+ pandoc
+ # extra documentation, data, resources that aren't programs
+ manpages nerdfonts
+ # general cli utils
+ tree dnsutils inetutils pijul bat age libsecret gping bottom dogdns
+ cifs-utils jekyll fzf ripgrep fd bandwhich exa dive
+ ripgrep python39Packages.isort shellcheck graphviz
+ poppler unzip acpi extras.sfz viu extras.leylines
+ yt-dlp weechat
+ # git
+ gitAndTools.gitAnnex git-bug git-appraise
+ # other things
+ gauche
+ # html, js & co
+ jq html-tidy nodePackages.stylelint nodePackages.js-beautify zola
+ # nix things
+ nixfmt niv inputs.deploy-rs.defaultPackage.${system}
+ ];
+}
diff --git a/home/packages.nix b/home/packages.nix
index 13aadbf..cb43030 100644
--- a/home/packages.nix
+++ b/home/packages.nix
@@ -3,12 +3,7 @@
let
naersk = pkgs.callPackage inputs.naersk {};
extras = {
- sfz = naersk.buildPackage inputs.sfz;
almanac = naersk.buildPackage inputs.almanac;
- leylines = pkgs.callPackage "${(pkgs.fetchgit {
- url = "https://gitlab.infra4future.de/stuebinm/leylines";
- sha256 = "sha256-AFZVZeLPCWEjfUcILErag/J+susf7ovEQOg1RaFr4ko=";
- }).outPath}/package.nix" {};
};
in
{
@@ -16,11 +11,6 @@ in
(emacsWithPackages (epkgs: [ epkgs.exwm epkgs.pdf-tools epkgs.vterm ]))
emacs-all-the-icons-fonts
- # flake-enabled version of nix
- (pkgs.writeScriptBin "nif" ''
- #!/usr/bin/env bash
- exec ${pkgs.nixFlakes}/bin/nix --experimental-features "nix-command flakes" "$@"
- '')
# internet apps & clients
firefox thunderbird keepassxc chromium signal-desktop mumble lynx
openconnect matterhorn
@@ -30,16 +20,8 @@ in
gst_all_1.gstreamer
# LaTeX & documents
texlive.combined.scheme-full xournal pandoc zathura
- # extra documentation, data, resources that aren't programs
- manpages nerdfonts
# general cli utils
- tree dnsutils inetutils pijul bat age libsecret gping bottom dogdns
- cifs-utils jekyll fzf ripgrep fd bandwhich exa dive
- ripgrep python39Packages.isort shellcheck graphviz
- poppler unzip acpi extras.sfz extras.almanac viu extras.leylines
- yt-dlp weechat
- # git
- gitAndTools.gitAnnex git-bug git-appraise
+ extras.almanac
# graphical utils
kitty baobab
# things for emacs