2022-03-10 21:52:12 +01:00
|
|
|
{
|
|
|
|
|
pkgs,
|
|
|
|
|
lib,
|
|
|
|
|
config,
|
2023-02-24 23:10:45 +01:00
|
|
|
niveumPackages,
|
2024-06-26 19:35:05 +02:00
|
|
|
unstablePackages,
|
2023-02-24 23:41:01 +01:00
|
|
|
inputs,
|
2022-03-10 21:52:12 +01:00
|
|
|
...
|
|
|
|
|
}: let
|
2020-10-24 13:27:36 +02:00
|
|
|
inherit (lib.strings) makeBinPath;
|
2024-04-08 08:17:52 +02:00
|
|
|
inherit (import ../lib) localAddresses kieran remoteDir;
|
2023-02-22 10:02:55 +01:00
|
|
|
defaultApplications = (import ../lib).defaultApplications {inherit pkgs;};
|
2020-06-10 17:37:25 +02:00
|
|
|
in {
|
2019-04-19 03:11:51 +02:00
|
|
|
imports = [
|
2023-02-24 23:41:01 +01:00
|
|
|
inputs.self.nixosModules.system-dependent
|
2023-03-26 19:24:38 +02:00
|
|
|
inputs.self.nixosModules.power-action
|
2020-10-18 17:26:19 +02:00
|
|
|
{
|
2022-03-10 21:52:12 +01:00
|
|
|
boot.supportedFilesystems = ["ntfs"];
|
2020-10-18 17:26:19 +02:00
|
|
|
}
|
2019-11-05 21:59:51 +01:00
|
|
|
{
|
|
|
|
|
nixpkgs = {
|
2020-04-09 17:51:16 +02:00
|
|
|
config = {
|
|
|
|
|
allowUnfree = true;
|
|
|
|
|
packageOverrides = pkgs: {
|
2022-01-23 11:44:31 +01:00
|
|
|
dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
|
2020-04-09 17:51:16 +02:00
|
|
|
};
|
2022-11-30 09:19:30 +01:00
|
|
|
permittedInsecurePackages = [
|
|
|
|
|
"qtwebkit-5.212.0-alpha4"
|
2023-11-03 10:02:33 +01:00
|
|
|
"zotero-6.0.26"
|
2023-12-29 20:01:26 +01:00
|
|
|
"electron-25.9.0"
|
2022-11-30 09:19:30 +01:00
|
|
|
];
|
2020-04-09 17:51:16 +02:00
|
|
|
};
|
2019-04-19 03:11:51 +02:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
{
|
2023-06-06 19:59:27 +02:00
|
|
|
boot.tmp.cleanOnBoot = true;
|
2019-04-19 03:11:51 +02:00
|
|
|
boot.loader.timeout = 1;
|
|
|
|
|
}
|
2023-02-22 10:02:55 +01:00
|
|
|
{
|
2023-02-24 23:10:45 +01:00
|
|
|
age.secrets = {
|
|
|
|
|
di-fm-key = {
|
2023-07-04 16:28:26 +02:00
|
|
|
file = ../secrets/di-fm-key.age;
|
2023-02-24 23:10:45 +01:00
|
|
|
owner = config.users.users.me.name;
|
|
|
|
|
group = config.users.users.me.group;
|
|
|
|
|
mode = "400";
|
|
|
|
|
};
|
|
|
|
|
restic = {
|
2023-07-04 16:28:26 +02:00
|
|
|
file = ../secrets/restic.age;
|
2023-02-24 23:10:45 +01:00
|
|
|
owner = config.users.users.me.name;
|
|
|
|
|
group = config.users.users.me.group;
|
|
|
|
|
mode = "400";
|
|
|
|
|
};
|
|
|
|
|
};
|
2023-02-22 10:02:55 +01:00
|
|
|
}
|
2019-04-19 03:11:51 +02:00
|
|
|
{
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|
2023-07-26 08:18:09 +02:00
|
|
|
{
|
|
|
|
|
environment.systemPackages = [
|
|
|
|
|
pkgs.capitaine-cursors
|
|
|
|
|
];
|
|
|
|
|
|
2024-06-03 07:27:01 +02:00
|
|
|
stylix.cursor = {
|
|
|
|
|
name = "capitaine-cursors-white";
|
|
|
|
|
package = pkgs.capitaine-cursors;
|
|
|
|
|
size = 12;
|
2023-07-26 08:18:09 +02:00
|
|
|
};
|
|
|
|
|
}
|
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;
|
2024-03-19 23:05:43 +01:00
|
|
|
hashedPasswordFile = config.age.secrets.kfm-password.path;
|
2019-08-26 17:27:09 +02:00
|
|
|
isNormalUser = true;
|
2020-12-18 10:27:34 +01:00
|
|
|
uid = 1000;
|
2024-01-02 10:35:03 +01:00
|
|
|
extraGroups = ["pipewire" "audio"];
|
2019-04-19 03:11:51 +02:00
|
|
|
};
|
2021-04-05 08:33:11 +02:00
|
|
|
|
2024-05-16 22:10:17 +02:00
|
|
|
nix.settings.trusted-users = [ config.users.users.me.name ];
|
|
|
|
|
|
2024-03-19 23:05:43 +01:00
|
|
|
age.secrets = {
|
|
|
|
|
kfm-password.file = ../secrets/kfm-password.age;
|
|
|
|
|
};
|
|
|
|
|
|
2021-04-05 08:33:11 +02:00
|
|
|
home-manager.users.me.xdg.enable = true;
|
2019-04-19 03:11:51 +02:00
|
|
|
}
|
|
|
|
|
{
|
2024-04-03 07:56:07 +02:00
|
|
|
environment.interactiveShellInit = "export PATH=$PATH";
|
2020-06-10 17:37:25 +02:00
|
|
|
environment.shellAliases = let
|
2023-02-24 23:10:45 +01:00
|
|
|
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
|
2019-08-22 09:44:11 +02:00
|
|
|
in {
|
2022-10-06 10:22:55 +02:00
|
|
|
o = "${pkgs.xdg-utils}/bin/xdg-open";
|
2024-01-09 08:00:33 +01:00
|
|
|
ns = "nix-shell --run zsh";
|
2020-04-23 13:15:48 +02:00
|
|
|
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in";
|
|
|
|
|
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out";
|
2019-09-24 16:46:04 +02:00
|
|
|
tmux = "${pkgs.tmux}/bin/tmux -2";
|
2022-08-30 19:32:27 +02:00
|
|
|
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
|
2020-06-22 08:44:09 +02:00
|
|
|
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
2024-10-01 21:03:33 +02:00
|
|
|
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
|
2022-05-07 11:26:51 +02:00
|
|
|
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
|
|
|
|
|
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio
|
2019-04-19 03:11:51 +02:00
|
|
|
};
|
|
|
|
|
}
|
2022-07-29 21:30:28 +02:00
|
|
|
{
|
|
|
|
|
i18n = {
|
|
|
|
|
defaultLocale = "en_DK.UTF-8";
|
|
|
|
|
supportedLocales = ["all"];
|
|
|
|
|
};
|
|
|
|
|
}
|
2019-04-19 03:11:51 +02:00
|
|
|
{
|
2024-06-03 07:27:01 +02:00
|
|
|
services.displayManager = {
|
|
|
|
|
autoLogin = {
|
|
|
|
|
enable = true;
|
|
|
|
|
user = config.users.users.me.name;
|
|
|
|
|
};
|
|
|
|
|
};
|
2019-04-19 03:11:51 +02:00
|
|
|
services.xserver = {
|
|
|
|
|
enable = true;
|
2024-06-03 07:27:01 +02:00
|
|
|
displayManager.lightdm = {
|
|
|
|
|
enable = true;
|
|
|
|
|
greeters.gtk = {
|
2019-05-02 15:28:17 +02:00
|
|
|
enable = true;
|
2024-06-03 07:27:01 +02:00
|
|
|
indicators = ["~spacer" "~host" "~spacer" "~session" "~power"];
|
2019-05-02 15:28:17 +02:00
|
|
|
};
|
2019-04-19 03:11:51 +02:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
security.wrappers = {
|
2021-12-01 17:38:47 +01:00
|
|
|
pmount = {
|
2022-05-11 11:23:21 +02:00
|
|
|
setuid = true;
|
2021-12-13 11:58:00 +01:00
|
|
|
owner = "root";
|
2022-05-11 11:23:21 +02:00
|
|
|
group = "root";
|
2021-12-01 17:38:47 +01:00
|
|
|
source = "${pkgs.pmount}/bin/pmount";
|
|
|
|
|
};
|
|
|
|
|
pumount = {
|
2022-05-11 11:23:21 +02:00
|
|
|
setuid = true;
|
2021-12-13 11:58:00 +01:00
|
|
|
owner = "root";
|
2022-05-11 11:23:21 +02:00
|
|
|
group = "root";
|
2021-12-01 17:38:47 +01:00
|
|
|
source = "${pkgs.pmount}/bin/pumount";
|
|
|
|
|
};
|
2019-04-19 03:11:51 +02:00
|
|
|
};
|
|
|
|
|
}
|
2022-03-10 21:52:12 +01:00
|
|
|
{programs.command-not-found.enable = true;}
|
2020-04-26 20:21:39 +02:00
|
|
|
{
|
2024-10-07 22:58:55 +02:00
|
|
|
programs.gnupg = {
|
|
|
|
|
agent = {
|
2022-12-13 14:38:14 +01:00
|
|
|
enable = true;
|
2024-06-05 17:02:22 +02:00
|
|
|
pinentryPackage = pkgs.pinentry-rofi;
|
2024-10-07 22:58:55 +02:00
|
|
|
settings = rec {
|
|
|
|
|
default-cache-ttl = 2 * 60 * 60;
|
|
|
|
|
max-cache-ttl = 4 * default-cache-ttl;
|
|
|
|
|
};
|
2022-12-13 14:38:14 +01:00
|
|
|
};
|
|
|
|
|
};
|
2020-04-26 20:21:39 +02:00
|
|
|
|
2020-11-23 15:28:22 +01:00
|
|
|
environment.systemPackages = [
|
|
|
|
|
pkgs.gnupg
|
2022-03-13 10:29:21 +01:00
|
|
|
(pkgs.pass.withExtensions (e: [e.pass-otp e.pass-import e.pass-genphrase]))
|
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
|
|
|
{
|
2021-06-01 19:14:00 +02:00
|
|
|
services.getty = {
|
2020-07-19 07:57:44 +02:00
|
|
|
greetingLine = lib.mkForce "";
|
|
|
|
|
helpLine = lib.mkForce "";
|
|
|
|
|
};
|
|
|
|
|
}
|
2020-10-24 13:27:36 +02:00
|
|
|
{
|
2022-03-13 10:31:19 +01:00
|
|
|
networking.hosts =
|
|
|
|
|
lib.mapAttrs' (name: address: {
|
|
|
|
|
name = address;
|
|
|
|
|
value = ["${name}.local"];
|
|
|
|
|
})
|
|
|
|
|
localAddresses;
|
2020-10-24 13:27:36 +02:00
|
|
|
}
|
2022-06-28 15:27:36 +02:00
|
|
|
{
|
|
|
|
|
home-manager.users.me.home.stateVersion = "22.05";
|
2024-06-03 07:27:01 +02:00
|
|
|
home-manager.backupFileExtension = "bak";
|
2023-02-07 22:26:59 +01:00
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
systemd.user.services.udiskie = {
|
|
|
|
|
after = ["udisks2.service"];
|
|
|
|
|
wants = ["udisks2.service"];
|
|
|
|
|
wantedBy = ["graphical-session.target"];
|
|
|
|
|
serviceConfig = {
|
|
|
|
|
ExecStart = "${pkgs.udiskie}/bin/udiskie --verbose --no-config --notify";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
services.udisks2.enable = true;
|
|
|
|
|
programs.dconf.enable = true;
|
|
|
|
|
home-manager.users.me = {
|
|
|
|
|
dconf.enable = true;
|
|
|
|
|
dconf.settings = {
|
|
|
|
|
# Change the default terminal for Nemo
|
|
|
|
|
"org/cinnamon/desktop/applications/terminal".exec = defaultApplications.terminal;
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-06-28 15:27:36 +02:00
|
|
|
}
|
2023-07-22 23:43:17 +02:00
|
|
|
./android.nix
|
2024-01-09 08:00:33 +01:00
|
|
|
./admin-essentials.nix
|
2023-07-26 07:38:52 +02:00
|
|
|
./stylix.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./alacritty.nix
|
2022-01-18 21:29:30 +01:00
|
|
|
./backup.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./bash.nix
|
|
|
|
|
./bluetooth.nix
|
2023-02-21 11:57:26 +01:00
|
|
|
./aerc.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./ccc.nix
|
2021-04-07 20:10:48 +02:00
|
|
|
./khal.nix
|
2024-01-09 20:38:01 +01:00
|
|
|
./browser.nix
|
2022-11-29 22:49:51 +01:00
|
|
|
./clipboard.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./cloud.nix
|
|
|
|
|
./direnv.nix
|
|
|
|
|
./docker.nix
|
|
|
|
|
./dunst.nix
|
|
|
|
|
./flix.nix
|
|
|
|
|
./fonts.nix
|
|
|
|
|
./fzf.nix
|
|
|
|
|
./git.nix
|
|
|
|
|
./hledger.nix
|
|
|
|
|
./htop.nix
|
2023-08-04 16:03:51 +02:00
|
|
|
./fu-berlin.nix
|
2023-08-06 21:18:42 +02:00
|
|
|
./fysi.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./i3.nix
|
2023-07-26 07:38:52 +02:00
|
|
|
./i3status-rust.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./keyboard.nix
|
2024-05-04 22:44:49 +02:00
|
|
|
./kdeconnect.nix
|
2024-03-17 21:40:37 +01:00
|
|
|
{home-manager.users.me.home.file.".XCompose".source = ../lib/keyboards/XCompose;}
|
2021-10-07 00:29:50 +02:00
|
|
|
./lb.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
|
|
|
./neovim.nix
|
2021-01-01 02:48:37 +01:00
|
|
|
./nix.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./newsboat.nix
|
2023-02-22 10:02:55 +01:00
|
|
|
./flameshot.nix
|
2024-09-23 19:19:14 +02:00
|
|
|
./fritzbox.nix
|
2021-12-31 13:21:22 +01:00
|
|
|
./packages.nix
|
2023-02-13 23:19:44 +01:00
|
|
|
./picom.nix
|
2021-12-31 13:21:22 +01:00
|
|
|
./stardict.nix
|
2022-02-02 18:07:08 +01:00
|
|
|
./polkit.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./printing.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
|
2023-01-06 15:32:20 +01:00
|
|
|
./sound.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./sudo.nix
|
|
|
|
|
./tmux.nix
|
|
|
|
|
./unclutter.nix
|
|
|
|
|
./vscode.nix
|
2020-10-19 18:57:29 +02:00
|
|
|
./watson.nix
|
2024-01-08 14:55:04 +01:00
|
|
|
./wallpaper.nix
|
2020-09-23 00:32:28 +02:00
|
|
|
./zsh.nix
|
2022-03-29 20:10:12 +02:00
|
|
|
./tor.nix
|
2023-08-11 07:30:45 +02:00
|
|
|
./stw-berlin.nix
|
2023-01-01 14:53:43 +01:00
|
|
|
./mastodon-bot.nix
|
2024-04-08 08:17:52 +02:00
|
|
|
{
|
|
|
|
|
fileSystems."${remoteDir}/fritz" = {
|
|
|
|
|
device = "//192.168.178.1/FRITZ.NAS/Backup";
|
|
|
|
|
fsType = "cifs";
|
|
|
|
|
options = [
|
|
|
|
|
"username=ftpuser"
|
|
|
|
|
"password=ftppassword"
|
|
|
|
|
"noauto"
|
|
|
|
|
"nounix"
|
|
|
|
|
"rw"
|
2024-04-08 10:51:12 +02:00
|
|
|
# "noserverino" # ref https://askubuntu.com/a/1265165
|
|
|
|
|
"uid=${toString config.users.users.me.uid}"
|
|
|
|
|
"gid=${toString config.users.groups.users.gid}"
|
2024-04-08 08:17:52 +02:00
|
|
|
"x-systemd.automount"
|
|
|
|
|
"x-systemd.device-timeout=1"
|
|
|
|
|
"x-systemd.idle-timeout=1min"
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
}
|
2024-04-30 17:28:34 +02:00
|
|
|
{
|
|
|
|
|
home-manager.users.me = {
|
|
|
|
|
xdg.userDirs = rec {
|
|
|
|
|
enable = true;
|
|
|
|
|
documents = "${config.users.users.me.home}/cloud/nextcloud/Documents";
|
|
|
|
|
desktop = "/tmp";
|
2024-05-04 22:45:06 +02:00
|
|
|
download = "${config.users.users.me.home}/sync/Downloads";
|
2024-04-30 17:28:34 +02:00
|
|
|
music = "${config.users.users.me.home}/mobile/audio";
|
|
|
|
|
pictures = "${config.users.users.me.home}/cloud/nextcloud/Bilder";
|
|
|
|
|
publicShare = "${config.users.users.me.home}/cloud/nextcloud/tmp";
|
|
|
|
|
videos = pictures;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|
2019-04-19 03:11:51 +02:00
|
|
|
];
|
|
|
|
|
}
|