forked from pub-solar/os
Merge branch 'main' into fix/neovim-cherry-picks
This commit is contained in:
commit
6b396f0840
|
@ -76,7 +76,6 @@
|
|||
overlays = [
|
||||
nur.overlay
|
||||
agenix.overlay
|
||||
nvfetcher.overlay
|
||||
./pkgs/default.nix
|
||||
];
|
||||
};
|
||||
|
|
|
@ -12,4 +12,12 @@
|
|||
networking.networkmanager.enable = true;
|
||||
|
||||
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "22.05"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
@ -18,4 +18,12 @@
|
|||
|
||||
# will be overridden by the bootstrapIso instrumentation
|
||||
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "21.05"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
@ -9,10 +9,21 @@ in
|
|||
options.pub-solar.audio = {
|
||||
enable = mkEnableOption "Life in highs and lows";
|
||||
mopidy.enable = mkEnableOption "Life with mopidy";
|
||||
spotify.enable = mkEnableOption "Life in DRM";
|
||||
spotify.username = mkOption {
|
||||
description = "Spotify login username or email";
|
||||
type = types.str;
|
||||
example = "yourname@example.com";
|
||||
default = "";
|
||||
};
|
||||
bluetooth.enable = mkEnableOption "Life with bluetooth";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.users = pkgs.lib.setAttrByPath [ psCfg.user.name ] {
|
||||
extraGroups = [ "audio" ];
|
||||
};
|
||||
|
||||
home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
|
||||
home.packages = [
|
||||
# easyeffects, e.g. for microphone noise filtering
|
||||
|
@ -24,9 +35,23 @@ in
|
|||
# Needed for pactl cmd, until pw-cli is more mature (vol up/down hotkeys?)
|
||||
pulseaudio
|
||||
vimpc
|
||||
];
|
||||
] ++ (if cfg.spotify.enable then [ pkgs.spotify-tui ] else [ ]);
|
||||
xdg.configFile."vimpc/vimpcrc".source = ./.config/vimpc/vimpcrc;
|
||||
systemd.user.services.easyeffects = import ./easyeffects.service.nix pkgs;
|
||||
|
||||
services.spotifyd = mkIf cfg.spotify.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
username = cfg.spotify.username;
|
||||
password_cmd = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus ${pkgs.libsecret}/bin/secret-tool lookup spotify password";
|
||||
bitrate = 320;
|
||||
volume_normalisation = true;
|
||||
no_audio_cache = false;
|
||||
max_cache_size = 1000000000;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Enable sound using pipewire-pulse
|
||||
|
@ -43,32 +68,19 @@ in
|
|||
};
|
||||
};
|
||||
config.pipewire-pulse = builtins.fromJSON (builtins.readFile ./pipewire-pulse.conf.json);
|
||||
};
|
||||
|
||||
# Bluetooth configuration for pipewire
|
||||
media-session.config.bluez-monitor.rules = mkIf cfg.bluetooth.enable [
|
||||
{
|
||||
# Matches all cards
|
||||
matches = [{ "device.name" = "~bluez_card.*"; }];
|
||||
actions = {
|
||||
"update-props" = {
|
||||
"bluez5.reconnect-profiles" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ];
|
||||
# mSBC is not expected to work on all headset + adapter combinations.
|
||||
"bluez5.msbc-support" = true;
|
||||
};
|
||||
};
|
||||
# Bluetooth configuration using wireplumber
|
||||
# https://nixos.wiki/wiki/PipeWire#Bluetooth_Configuration
|
||||
environment.etc = mkIf cfg.bluetooth.enable {
|
||||
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
|
||||
bluez_monitor.properties = {
|
||||
["bluez5.enable-sbc-xq"] = true,
|
||||
["bluez5.enable-msbc"] = true,
|
||||
["bluez5.enable-hw-volume"] = true,
|
||||
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
# Matches all sources
|
||||
{ "node.name" = "~bluez_input.*"; }
|
||||
# Matches all outputs
|
||||
{ "node.name" = "~bluez_output.*"; }
|
||||
];
|
||||
actions = {
|
||||
"node.pause-on-idle" = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
'';
|
||||
};
|
||||
|
||||
# Enable bluetooth
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
pkgs: {
|
||||
enable = true;
|
||||
extensionPackages = with pkgs; [
|
||||
mopidy-spotify
|
||||
mopidy-mpd
|
||||
mopidy-soundcloud
|
||||
mopidy-youtube
|
||||
|
|
|
@ -12,7 +12,7 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
|
||||
home.packages = [
|
||||
ps-signal-desktop
|
||||
signal-desktop
|
||||
tdesktop
|
||||
element-desktop
|
||||
irssi
|
||||
|
|
|
@ -18,7 +18,7 @@ bindsym $mod+F2 exec firefox
|
|||
bindsym $mod+F3 exec $term -e vifm
|
||||
bindsym $mod+Shift+F3 exec gksu $term -e vifm
|
||||
bindsym $mod+F4 exec nautilus -w
|
||||
bindsym $mod+Shift+F4 exec signal-desktop
|
||||
bindsym $mod+Shift+F4 exec signal-desktop --use-tray-icon
|
||||
bindsym $mod+F5 exec $term -e 'mocp -C $XDG_CONFIG_DIR/mocp/config'
|
||||
bindsym $mod+Shift+m exec mu
|
||||
bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
pkgs:
|
||||
{
|
||||
enable = true;
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
unitConfig = {
|
||||
Description = "Scream IVSHMEM pulse reciever";
|
||||
BindsTo = [ "pipewire-pulse.service" ];
|
||||
After = [ "pipewire-pulse.service" ];
|
||||
Wants = [ "pipewire-pulse.service" ];
|
||||
};
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStartPre = [
|
||||
"${pkgs.coreutils-full}/bin/truncate -s 0 /dev/shm/scream-ivshmem"
|
||||
"${pkgs.coreutils-full}/bin/dd if=/dev/zero of=/dev/shm/scream-ivshmem bs=1M count=2"
|
||||
];
|
||||
ExecStart = "${pkgs.scream}/bin/scream -m /dev/shm/scream-ivshmem";
|
||||
};
|
||||
}
|
|
@ -19,5 +19,4 @@ with final; {
|
|||
drone-docker-runner = writeShellScriptBin "drone-docker-runner" (import ./drone-docker-runner.nix final);
|
||||
|
||||
# ps-fixes
|
||||
ps-signal-desktop = writeShellScriptBin "signal-desktop" (import ./ps-signal-desktop.nix final);
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
self: with self;
|
||||
let
|
||||
signal-desktop = self.signal-desktop.overrideAttrs (old: {
|
||||
meta.platforms = [ "x86_64-linux" "aarch64-linux" ];
|
||||
});
|
||||
in
|
||||
''
|
||||
exec ${signal-desktop}/bin/signal-desktop --disable-gpu -- "$@"
|
||||
''
|
|
@ -16,7 +16,13 @@ in
|
|||
# home to /home/username, useDefaultShell to true, and isSystemUser to false.
|
||||
isNormalUser = true;
|
||||
description = psCfg.user.description;
|
||||
extraGroups = [ "wheel" "docker" "input" "audio" "networkmanager" "lp" "scanner" ];
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"input"
|
||||
"networkmanager"
|
||||
"lp"
|
||||
"scanner"
|
||||
];
|
||||
initialHashedPassword = if psCfg.user.password != null then psCfg.user.password else "";
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keyFiles = if psCfg.user.publicKeys != null then psCfg.user.publicKeys else [ ];
|
||||
|
|
|
@ -38,15 +38,15 @@ in
|
|||
(devos agenix)
|
||||
{
|
||||
category = "devos";
|
||||
name = pkgs.nvfetcher-bin.pname;
|
||||
help = pkgs.nvfetcher-bin.meta.description;
|
||||
command = "cd $PRJ_ROOT/pkgs; ${pkgs.nvfetcher-bin}/bin/nvfetcher -c ./sources.toml $@";
|
||||
name = pkgs.nvfetcher.pname;
|
||||
help = pkgs.nvfetcher.meta.description;
|
||||
command = "cd $PRJ_ROOT/pkgs; ${pkgs.nvfetcher}/bin/nvfetcher -c ./sources.toml $@";
|
||||
}
|
||||
(linter nixpkgs-fmt)
|
||||
(linter editorconfig-checker)
|
||||
# (docs python3Packages.grip) too many deps
|
||||
(docs mdbook)
|
||||
(devos inputs.deploy.packages.${pkgs.system}.deploy-rs)
|
||||
(devos deploy-rs)
|
||||
]
|
||||
++ lib.optional
|
||||
(system != "i686-linux")
|
||||
|
|
Loading…
Reference in a new issue