summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
Diffstat (limited to 'profiles')
-rw-r--r--profiles/core/configuration.nix31
-rw-r--r--profiles/core/hm.nix5
-rw-r--r--profiles/core/home.nix39
-rw-r--r--profiles/station/mpv.nix4
-rw-r--r--profiles/station/music.nix33
-rw-r--r--profiles/station/nonfree.nix16
-rw-r--r--profiles/station/packages.nix83
-rw-r--r--profiles/station/suckless.nix13
8 files changed, 145 insertions, 79 deletions
diff --git a/profiles/core/configuration.nix b/profiles/core/configuration.nix
index 87403eb..b5f5262 100644
--- a/profiles/core/configuration.nix
+++ b/profiles/core/configuration.nix
@@ -6,18 +6,41 @@
}: with lib; {
imports = [ (mkAliasOptionModule [ "ivi" ] [ "users" "users" ivi.username ]) ];
+ services = optionalAttrs (builtins.hasAttr "resolved" config.services) {
+ resolved.fallbackDns = [
+ "1.1.1.1#one.one.one.one"
+ "1.0.0.1#one.one.one.one"
+ "2606:4700:4700::1111#one.one.one.one"
+ "2606:4700:4700::1001#one.one.one.one"
+ ];
+ };
+ security = optionalAttrs (builtins.hasAttr "sudo" config.security) {
+ sudo = {
+ wheelNeedsPassword = false;
+ extraConfig = ''
+ Defaults env_keep+="EDITOR"
+ Defaults env_keep+="SSH_CONNECTION SSH_CLIENT SSH_TTY"
+ Defaults env_keep+="http_proxy https_proxy"
+ '';
+ };
+ };
+
time.timeZone = "Europe/Amsterdam";
users.users = {
${ivi.username} = {
- home = "/Users/ivi";
+ home = mkIf pkgs.stdenv.isDarwin "/Users/ivi";
uid = 1000;
description = ivi.realName;
openssh.authorizedKeys.keys = ivi.sshKeys;
+ } // optionalAttrs (!pkgs.stdenv.isDarwin) {
+ extraGroups = ["wheel" "networkmanager" "docker" "transmission"];
+ isNormalUser = true;
};
root = {
openssh.authorizedKeys.keys = config.ivi.openssh.authorizedKeys.keys;
};
};
+
environment.systemPackages = with pkgs; [
man-pages
man-pages-posix
@@ -39,6 +62,12 @@
zoxide
binwalk
unzip
+ ] ++ optionals (!pkgs.stdenv.isDarwin) [
+ pciutils
+ dnsutils
+ iputils
+ inetutils
+ usbutils
];
nix.package = pkgs.nixUnstable;
diff --git a/profiles/core/hm.nix b/profiles/core/hm.nix
index 9e5174d..76dd2e6 100644
--- a/profiles/core/hm.nix
+++ b/profiles/core/hm.nix
@@ -1,6 +1,5 @@
-{inputs, config, lib, ...}: with lib; {
+{inputs, lib, pkgs, ...}: with lib; {
imports = [
- inputs.home-manager.darwinModules.default
(mkAliasOptionModule [ "hm" ] [ "home-manager" "users" ivi.username ])
];
@@ -12,7 +11,7 @@
};
hm = {
- home.stateVersion = "24.05";
+ home.stateVersion = if pkgs.stdenv.isDarwin then "24.05" else config.system.stateVersion;
home.enableNixpkgsReleaseCheck = false;
systemd.user.startServices = "sd-switch";
diff --git a/profiles/core/home.nix b/profiles/core/home.nix
index 5a659ae..fa2cd22 100644
--- a/profiles/core/home.nix
+++ b/profiles/core/home.nix
@@ -1,8 +1,9 @@
{
+ lib,
config,
pkgs,
...
-}: {
+}: with lib; {
hm = {
home.packages = with pkgs; [
github-cli
@@ -12,7 +13,39 @@
# home.file.".local/bin".source = config.lib.meta.mkMutableSymlink /mut/bin;
xdg = {
enable = true;
- mime.enable = false;
+ mime.enable = !pkgs.stdenv.isDarwin;
+ mimeApps = optionalAttrs (!pkgs.stdenv.isDarwin) {
+ enable = true;
+ defaultApplications = {
+ "text/x-shellscript" = ["text.desktop"];
+ "application/x-bittorrent" = ["torrent.desktop"];
+ "text/plain" = ["text.desktop"];
+ "application/postscript" = ["pdf.desktop"];
+ "application/pdf" = ["pdf.desktop"];
+ "image/png" = ["img.desktop"];
+ "image/jpeg" = ["img.desktop"];
+ "image/gif" = ["img.desktop"];
+ "application/rss+xml" = ["rss.desktop"];
+ "video/x-matroska" = ["video.desktop"];
+ "video/mp4" = ["video.desktop"];
+ "x-scheme-handler/lbry" = ["lbry.desktop"];
+ "inode/directory" = ["file.desktop"];
+ "application/x-ica" = ["wfica.desktop"];
+ "x-scheme-handler/magnet" = ["torrent.desktop"];
+ "x-scheme-handler/mailto" = ["mail.desktop"];
+ "x-scheme-handler/msteams" = ["teams.desktop"];
+ };
+ };
+ desktopEntries = optionalAttrs (!pkgs.stdenv.isDarwin) {
+ text= { type = "Application"; name = "Text editor"; exec = "${pkgs.st}/bin/st -e kak %u"; };
+ file = { type = "Application"; name = "File Manager"; exec = "${pkgs.st}/bin/st -e lfub %u"; };
+ torrent = { type = "Application"; name = "Torrent"; exec = "${pkgs.coreutils}/bin/env transadd %U"; };
+ img = { type = "Application"; name = "Image Viewer"; exec = "${pkgs.sxiv}/bin/sxiv -a %u"; };
+ video = { type = "Application"; name = "Video Viewer"; exec = "${pkgs.mpv}/bin/mpv -quiet %f"; };
+ mail = { type = "Application"; name = "Mail"; exec = "${pkgs.st}/bin/st -e neomutt %u"; };
+ pdf = { type = "Application"; name = "PDF reader"; exec = "${pkgs.zathura}/bin/zathura %u"; };
+ rss = { type = "Application"; name = "RSS feed addition"; exec = "${pkgs.coreutils}/bin/env rssadd %u"; };
+ };
};
programs.ssh = {
@@ -155,7 +188,7 @@
};
};
services.gpg-agent = {
- enable = false;
+ enable = !pkgs.stdenv.isDarwin;
enableSshSupport = true;
defaultCacheTtl = 34550000;
maxCacheTtl = 34550000;
diff --git a/profiles/station/mpv.nix b/profiles/station/mpv.nix
index 71b152c..8271c2f 100644
--- a/profiles/station/mpv.nix
+++ b/profiles/station/mpv.nix
@@ -5,9 +5,9 @@
}: {
hm = {
programs.mpv = {
- enable = false;
+ enable = !pkgs.stdenv.isDarwin;
scripts = [
- (with pkgs; stdenv.mkDerivation rec {
+ (with pkgs; stdenv.mkDerivation {
pname = "mpv-sockets";
version = "1.0";
diff --git a/profiles/station/music.nix b/profiles/station/music.nix
index 9ab9327..7503ac4 100644
--- a/profiles/station/music.nix
+++ b/profiles/station/music.nix
@@ -1,21 +1,22 @@
{ config, pkgs, lib, ... }: {
+ # TODO: what about secrets on nix-darwin...
# secrets.mopidy.owner = lib.ivi.username;
- # hm.home.packages = [pkgs.mpc-cli];
- # hm.services.mopidy = {
- # enable = true;
- # extensionPackages = with pkgs; [mopidy-spotify mopidy-mpd];
- # settings = {
- # mpd = {
- # enabled = true;
- # hostname = "127.0.0.1";
- # port = 6600;
- # max_connections = 20;
- # connection_timeout = 60;
- # };};
- # extraConfigFiles = [
- # config.secrets.mopidy.path
- # ];
- # };
+ hm.home.packages = [pkgs.mpc-cli];
+ hm.services.mopidy = {
+ enable = !pkgs.stdenv.isDarwin;
+ extensionPackages = with pkgs; [mopidy-spotify mopidy-mpd];
+ settings = {
+ mpd = {
+ enabled = true;
+ hostname = "127.0.0.1";
+ port = 6600;
+ max_connections = 20;
+ connection_timeout = 60;
+ };};
+ extraConfigFiles = [
+ config.secrets.mopidy.path
+ ];
+ };
hm.programs.ncmpcpp = {
enable = true;
bindings = [
diff --git a/profiles/station/nonfree.nix b/profiles/station/nonfree.nix
index 8bee42a..4f0c83c 100644
--- a/profiles/station/nonfree.nix
+++ b/profiles/station/nonfree.nix
@@ -1,4 +1,4 @@
-{pkgs, lib, ...}: {
+{pkgs, lib, ...}: with lib; {
hm.home.packages = with pkgs; [
teams
discord
@@ -18,10 +18,12 @@
"steam-run"
];
- # programs.steam = {
- # enable = true;
- # remotePlay.openFirewall = true;
- # dedicatedServer.openFirewall = true;
- # };
- # hardware.opengl.driSupport32Bit = true;
+ programs = optionalAttrs (!pkgs.stdenv.isDarwin) {
+ steam = {
+ enable = true;
+ remotePlay.openFirewall = true;
+ dedicatedServer.openFirewall = true;
+ };
+ hardware.opengl.driSupport32Bit = true;
+ };
}
diff --git a/profiles/station/packages.nix b/profiles/station/packages.nix
index c9d1af8..e823fb8 100644
--- a/profiles/station/packages.nix
+++ b/profiles/station/packages.nix
@@ -1,50 +1,51 @@
{
pkgs,
+ lib,
...
-}: {
+}: with lib; {
hm = {
home.packages = with pkgs; [
+ (nerdfonts.override {fonts = ["FiraCode"];})
+ noto-fonts
+ noto-fonts-emoji
k9s
- # krew
- # dasel
- # # initool
- # python311Packages.editorconfig
- # gcc
- # # pkgsi686Linux.glibc
- # gnumake
- # raylib
- # # gdb
- # maim
- # calcurse
- # profanity
- # file
- # ueberzug
- # mypaint
- # lynx
- # pstree
- # pywal
- # bashInteractive
- # k9s
- # powershell
- # azure-cli
- # inotify-tools
- # alejandra
- # statix
- # github-cli
- # lazygit
- # argocd
- # bc
- # # sxiv
- # nushell
- # # sent
- # (nerdfonts.override {fonts = ["FiraCode"];})
- # noto-fonts
- # noto-fonts-emoji
- # # dmenu
- # # librewolf
- # # firefox-wayland
- # # libreoffice
- # # xclip
+ krew
+ dasel
+ python311Packages.editorconfig
+ gcc
+ gnumake
+ calcurse
+ file
+ ueberzug
+ pstree
+ pywal
+ bashInteractive
+ powershell
+ azure-cli
+ alejandra
+ statix
+ github-cli
+ lazygit
+ argocd
+ bc
+ nushell
+ ] ++ optionals (!pkgs.stdenv.isDarwin) [
+ inotify-tools
+ raylib
+ maim
+ profanity
+ mypaint
+ lynx
+ sxiv
+ sent
+ initool
+ pkgsi686Linux.glibc
+ gdb
+ dmenu
+ librewolf
+ firefox-wayland
+ libreoffice
+ xclip
];
};
}
diff --git a/profiles/station/suckless.nix b/profiles/station/suckless.nix
index f0742c4..d3941d9 100644
--- a/profiles/station/suckless.nix
+++ b/profiles/station/suckless.nix
@@ -8,7 +8,7 @@
nixpkgs.overlays = [(import (self + "/overlays/suckless.nix") {inherit pkgs; home = config.ivi.home;})];
hm = {
xsession = {
- enable = false;
+ enable = !pkgs.stdenv.isDarwin;
initExtra = ''
${pkgs.xorg.xmodmap}/bin/xmodmap -e "remove mod1 = Alt_R"
${pkgs.xorg.xmodmap}/bin/xmodmap -e "add mod3 = Alt_R"
@@ -18,7 +18,7 @@
'';
};
services.picom = {
- enable = false;
+ enable = !pkgs.stdenv.isDarwin;
activeOpacity = 0.99;
inactiveOpacity = 0.7;
opacityRules = [
@@ -37,7 +37,7 @@
};
};
services.dunst = {
- enable = false;
+ enable = !pkgs.stdenv.isDarwin;
settings = {
global = {
monitor = 0;
@@ -70,10 +70,11 @@
};
};
home.packages = with pkgs; [
- # st
- # dwm
- # dwmblocks
libnotify
+ ] ++ optionals (!pkgs.stdenv.isDarwin) [
+ st
+ dwm
+ dwmblocks
];
};
}