2019-11-05 21:59:51 +01:00
|
|
|
{ pkgs, lib, config, options, ... }:
|
2020-10-24 13:27:36 +02:00
|
|
|
let
|
|
|
|
|
inherit (lib.strings) makeBinPath;
|
2020-10-30 11:05:26 +01:00
|
|
|
inherit (import <niveum/lib>) localAddresses kieran;
|
2020-06-10 17:37:25 +02:00
|
|
|
in {
|
2019-04-19 03:11:51 +02:00
|
|
|
imports = [
|
|
|
|
|
<home-manager/nixos>
|
2020-10-30 11:05:26 +01:00
|
|
|
<niveum/modules/system-dependent.nix>
|
2020-10-18 17:26:19 +02:00
|
|
|
{
|
|
|
|
|
boot.supportedFilesystems = [ "ntfs" ];
|
|
|
|
|
}
|
2020-09-23 00:32:28 +02:00
|
|
|
{
|
|
|
|
|
nix.nixPath = [
|
|
|
|
|
"/var/src"
|
|
|
|
|
"nixpkgs-overlays=${toString ../overlays}"
|
|
|
|
|
];
|
|
|
|
|
}
|
2020-06-10 17:37:25 +02:00
|
|
|
{ services.dbus.packages = [ pkgs.gnome3.dconf ]; }
|
2019-11-05 21:59:51 +01:00
|
|
|
{
|
|
|
|
|
nixpkgs = {
|
2020-04-09 17:51:16 +02:00
|
|
|
config = {
|
|
|
|
|
allowUnfree = true;
|
|
|
|
|
packageOverrides = pkgs: {
|
2020-06-10 17:37:25 +02:00
|
|
|
nur = import (builtins.fetchTarball
|
2020-12-16 22:25:04 +01:00
|
|
|
"https://github.com/nix-community/NUR/archive/222ea29ec4afb09c5565a7e5dda14bfd65a4a9f6.tar.gz") {
|
2020-06-10 17:37:25 +02:00
|
|
|
inherit pkgs;
|
|
|
|
|
};
|
2020-04-22 17:42:45 +02:00
|
|
|
writeDashBin = pkgs.writers.writeDashBin;
|
|
|
|
|
writeDash = pkgs.writers.writeDash;
|
2020-10-28 21:56:14 +01:00
|
|
|
gfs-fonts = pkgs.callPackage <niveum/packages/gfs-fonts.nix> {};
|
2020-06-10 17:37:25 +02:00
|
|
|
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> { };
|
|
|
|
|
ix = pkgs.callPackage <niveum/packages/ix.nix> { };
|
2020-04-09 17:51:16 +02:00
|
|
|
};
|
|
|
|
|
};
|
2019-11-05 21:59:51 +01:00
|
|
|
overlays = [
|
2020-06-22 08:44:09 +02:00
|
|
|
(self: super: {
|
|
|
|
|
scripts = import <niveum/packages/scripts> { pkgs = super; lib = super.lib; };
|
|
|
|
|
})
|
2020-09-10 13:07:07 +02:00
|
|
|
(import <niveum/overlays/toml.nix>)
|
2020-09-23 00:32:28 +02:00
|
|
|
(import <stockholm/krebs/5pkgs/haskell>)
|
2020-09-24 11:13:21 +02:00
|
|
|
(import <stockholm/submodules/nix-writers/pkgs>)
|
|
|
|
|
(import <stockholm/krebs/5pkgs/override>)
|
2019-11-05 21:59:51 +01:00
|
|
|
];
|
2019-04-19 03:11:51 +02:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
boot.cleanTmpDir = true;
|
|
|
|
|
boot.loader.timeout = 1;
|
|
|
|
|
boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
home-manager.users.me = {
|
|
|
|
|
programs.zathura = {
|
|
|
|
|
enable = true;
|
2019-11-19 07:47:33 +01:00
|
|
|
options = {
|
|
|
|
|
selection-clipboard = "clipboard";
|
|
|
|
|
# first-page-column = "1:1"; # makes side-by-side mode start on the left side
|
|
|
|
|
};
|
2019-04-19 03:11:51 +02:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
users.mutableUsers = false;
|
|
|
|
|
|
2019-08-26 17:27:09 +02:00
|
|
|
users.defaultUserShell = pkgs.zsh;
|
|
|
|
|
|
2019-04-19 03:11:51 +02:00
|
|
|
users.users.me = {
|
|
|
|
|
name = "kfm";
|
2020-10-30 11:05:26 +01:00
|
|
|
description = kieran.name;
|
2020-06-10 17:37:25 +02:00
|
|
|
hashedPassword =
|
|
|
|
|
"$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
|
2019-08-26 17:27:09 +02:00
|
|
|
isNormalUser = true;
|
2020-12-18 10:27:34 +01:00
|
|
|
uid = 1000;
|
2019-04-19 03:11:51 +02:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
sound.enable = true;
|
|
|
|
|
|
|
|
|
|
hardware.pulseaudio = {
|
|
|
|
|
enable = true;
|
|
|
|
|
package = pkgs.pulseaudioFull; # for bluetooth sound output
|
2021-03-23 20:28:08 +01:00
|
|
|
# copy server:/run/pulse/.config/pulse/cookie to client:~/.config/pulse/cookie to authenticate a client machine
|
2021-03-24 20:25:48 +01:00
|
|
|
zeroconf.discovery.enable = true;
|
2021-03-23 20:28:08 +01:00
|
|
|
extraConfig = ''
|
|
|
|
|
load-module ${toString [
|
|
|
|
|
"module-tunnel-sink-new"
|
|
|
|
|
"server=zaatar.r"
|
|
|
|
|
"sink_name=zaatar"
|
|
|
|
|
"channels=2"
|
|
|
|
|
"rate=44100"
|
|
|
|
|
]}
|
|
|
|
|
'';
|
2019-04-19 03:11:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
users.users.me.extraGroups = [ "audio" ];
|
|
|
|
|
|
2020-11-14 13:24:25 +01:00
|
|
|
environment.systemPackages = [ pkgs.pavucontrol pkgs.pamixer pkgs.pulsemixer ];
|
2019-04-19 03:11:51 +02:00
|
|
|
}
|
|
|
|
|
{
|
2020-06-10 17:37:25 +02:00
|
|
|
environment.interactiveShellInit =
|
|
|
|
|
"export PATH=$PATH:$HOME/projects/niveum";
|
|
|
|
|
environment.shellAliases = let
|
2019-09-24 16:46:04 +02:00
|
|
|
wcd = pkgs.writers.writeDash "wcd" ''
|
2019-10-26 19:43:29 +02:00
|
|
|
cd "$(readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname)/.."
|
2019-08-23 18:27:06 +02:00
|
|
|
'';
|
2019-09-24 16:46:04 +02:00
|
|
|
where = pkgs.writers.writeDash "where" ''
|
2019-10-26 19:43:29 +02:00
|
|
|
readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname
|
2019-08-23 18:27:06 +02:00
|
|
|
'';
|
2019-09-24 16:46:04 +02:00
|
|
|
take = pkgs.writers.writeDash "take" ''
|
2019-08-23 18:27:06 +02:00
|
|
|
mkdir "$1" && cd "$1"
|
|
|
|
|
'';
|
2020-06-22 08:44:09 +02:00
|
|
|
swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}";
|
2019-08-22 09:44:11 +02:00
|
|
|
in {
|
2020-04-23 13:15:48 +02:00
|
|
|
"ß" = "${pkgs.utillinux}/bin/setsid";
|
2019-09-24 16:46:04 +02:00
|
|
|
cat = "${pkgs.bat}/bin/bat --style=plain";
|
2020-06-10 17:37:25 +02:00
|
|
|
chromium-incognito =
|
|
|
|
|
"chromium --user-data-dir=$(mktemp -d /tmp/chr.XXXXXX) --no-first-run --incognito";
|
2020-11-23 15:26:50 +01:00
|
|
|
cp = "cp --interactive";
|
2019-09-24 16:46:04 +02:00
|
|
|
ip = "${pkgs.iproute}/bin/ip -c";
|
2020-12-11 18:43:41 +01:00
|
|
|
l = "ls --color=auto --time-style=long-iso --almost-all";
|
|
|
|
|
ls = "ls --color=auto --time-style=long-iso";
|
2020-11-23 15:26:50 +01:00
|
|
|
ll = "ls --color=auto --time-style=long-iso -l";
|
|
|
|
|
la = "ls --color=auto --time-style=long-iso --almost-all -l";
|
|
|
|
|
mv = "mv --interactive";
|
2019-11-05 21:59:51 +01:00
|
|
|
nixi = "nix repl '<nixpkgs>'";
|
2019-09-24 16:46:04 +02:00
|
|
|
ns = "nix-shell --run zsh";
|
|
|
|
|
o = "${pkgs.xdg_utils}/bin/xdg-open";
|
2020-04-23 13:15:48 +02:00
|
|
|
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in";
|
|
|
|
|
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out";
|
2020-11-23 15:26:50 +01:00
|
|
|
rm = "rm --interactive";
|
2020-04-23 13:15:48 +02:00
|
|
|
s = "${pkgs.systemd}/bin/systemctl";
|
2019-08-23 18:27:06 +02:00
|
|
|
take = "source ${take}";
|
2019-09-24 16:46:04 +02:00
|
|
|
tmux = "${pkgs.tmux}/bin/tmux -2";
|
2020-06-22 08:44:09 +02:00
|
|
|
sxiv = swallow "${pkgs.sxiv}/bin/sxiv";
|
|
|
|
|
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
2020-04-23 13:15:48 +02:00
|
|
|
us = "${pkgs.systemd}/bin/systemctl --user";
|
2019-09-24 16:46:04 +02:00
|
|
|
wcd = "source ${wcd}";
|
2021-02-06 13:44:38 +01:00
|
|
|
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
|
2019-09-24 16:46:04 +02:00
|
|
|
where = "source ${where}";
|
2020-06-10 17:37:25 +02:00
|
|
|
yt =
|
|
|
|
|
"${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -ic"; # Download video link
|
|
|
|
|
yta =
|
|
|
|
|
"${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -xic"; # Download with audio
|
2019-04-19 03:11:51 +02:00
|
|
|
};
|
|
|
|
|
}
|
2020-06-10 17:37:25 +02:00
|
|
|
{ i18n.defaultLocale = "en_GB.UTF-8"; }
|
|
|
|
|
{ services.illum.enable = true; }
|
2019-04-19 03:11:51 +02:00
|
|
|
{
|
|
|
|
|
services.xserver = {
|
|
|
|
|
enable = true;
|
2020-10-24 11:49:34 +02:00
|
|
|
displayManager = {
|
2019-09-14 18:43:23 +02:00
|
|
|
autoLogin = {
|
|
|
|
|
enable = true;
|
|
|
|
|
user = config.users.users.me.name;
|
|
|
|
|
};
|
2020-10-24 11:49:34 +02:00
|
|
|
lightdm = {
|
2019-05-02 15:28:17 +02:00
|
|
|
enable = true;
|
2020-10-24 11:49:34 +02:00
|
|
|
greeters.gtk = {
|
|
|
|
|
enable = true;
|
|
|
|
|
indicators = [ "~spacer" "~host" "~spacer" "~session" "~power" ];
|
|
|
|
|
};
|
2019-05-02 15:28:17 +02:00
|
|
|
};
|
2019-04-19 03:11:51 +02:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
security.wrappers = {
|
|
|
|
|
pmount.source = "${pkgs.pmount}/bin/pmount";
|
|
|
|
|
pumount.source = "${pkgs.pmount}/bin/pumount";
|
|
|
|
|
};
|
|
|
|
|
}
|
2020-06-10 17:37:25 +02:00
|
|
|
{ programs.command-not-found.enable = true; }
|
2020-04-26 20:21:39 +02:00
|
|
|
{
|
|
|
|
|
programs.gnupg.agent.enable = true;
|
|
|
|
|
|
2020-11-23 15:28:22 +01:00
|
|
|
environment.systemPackages = [
|
|
|
|
|
pkgs.gnupg
|
|
|
|
|
(pkgs.pass.withExtensions (e: [e.pass-otp]))
|
2020-11-14 13:24:25 +01:00
|
|
|
];
|
2020-04-26 20:21:39 +02:00
|
|
|
}
|
2020-07-19 16:18:07 +02:00
|
|
|
{
|
|
|
|
|
services.atd.enable = true;
|
|
|
|
|
}
|
2020-07-19 07:57:44 +02:00
|
|
|
{
|
|
|
|
|
services.mingetty = {
|
|
|
|
|
greetingLine = lib.mkForce "";
|
|
|
|
|
helpLine = lib.mkForce "";
|
|
|
|
|
};
|
|
|
|
|
}
|
2020-10-24 13:27:36 +02:00
|
|
|
{
|
|
|
|
|
networking.hosts = lib.mapAttrs' (name: address: {
|
|
|
|
|
name = address;
|
|
|
|
|
value = [ "${name}.local" ];
|
|
|
|
|
}) localAddresses;
|
|
|
|
|
}
|
2020-09-23 00:32:28 +02:00
|
|
|
./alacritty.nix
|
|
|
|
|
./bash.nix
|
|
|
|
|
./bluetooth.nix
|
|
|
|
|
./ccc.nix
|
|
|
|
|
./kleiter.nix
|
|
|
|
|
./calcurse.nix
|
2021-03-30 23:20:21 +02:00
|
|
|
./engiadina.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./chromium.nix
|
|
|
|
|
./cloud.nix
|
|
|
|
|
./compton.nix
|
|
|
|
|
./direnv.nix
|
|
|
|
|
./distrobump.nix
|
|
|
|
|
./docker.nix
|
|
|
|
|
./dunst.nix
|
|
|
|
|
./flix.nix
|
|
|
|
|
./fonts.nix
|
|
|
|
|
./fzf.nix
|
|
|
|
|
./gaslight.nix
|
|
|
|
|
./git.nix
|
|
|
|
|
./hledger.nix
|
|
|
|
|
./htop.nix
|
|
|
|
|
./hu-berlin.nix
|
|
|
|
|
./i3.nix
|
|
|
|
|
./keybase.nix
|
|
|
|
|
./keyboard.nix
|
2021-02-07 16:08:11 +01:00
|
|
|
./mail/client.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./mpv.nix
|
2020-09-30 11:40:49 +02:00
|
|
|
./mime.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./nano.nix
|
|
|
|
|
./neovim.nix
|
2021-01-01 02:48:37 +01:00
|
|
|
./nix.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./newsboat.nix
|
|
|
|
|
./flameshot-once.nix
|
|
|
|
|
./packages
|
2021-01-26 22:59:57 +01:00
|
|
|
./power-action.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./printing.nix
|
|
|
|
|
./wallpaper.nix
|
|
|
|
|
./redshift.nix
|
|
|
|
|
./retiolum.nix
|
|
|
|
|
./rofi.nix
|
2020-10-28 20:25:59 +01:00
|
|
|
./spacetime.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./ssh.nix
|
2020-10-28 21:43:33 +01:00
|
|
|
./sshd.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./sudo.nix
|
|
|
|
|
./sxiv.nix
|
|
|
|
|
./theming.nix
|
|
|
|
|
./tmux.nix
|
2020-10-27 12:03:56 +01:00
|
|
|
./tor.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./todo-txt.nix
|
|
|
|
|
./traadfri.nix
|
|
|
|
|
./unclutter.nix
|
|
|
|
|
./version.nix
|
|
|
|
|
./vscode.nix
|
2020-10-19 18:57:29 +02:00
|
|
|
./watson.nix
|
2020-10-28 20:26:26 +01:00
|
|
|
./wifi.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./zsh.nix
|
2019-04-19 03:11:51 +02:00
|
|
|
];
|
|
|
|
|
}
|