fixed a bunch of stuff and added geolocation features

This commit is contained in:
Aether 2022-01-29 11:47:38 +00:00
parent 492a97a693
commit 7ac98e510c
20 changed files with 144 additions and 57 deletions

View File

@ -5,22 +5,9 @@
./hardware-configuration.nix
];
user = {
packages = with pkgs; [
curl
# dolphin
# discord
# wl-clipboard
# firefox-wayland
# inkscape
# blender
# polymc
];
};
defaultUsers = {
aether = {
packages = [ ];
packages = with pkgs; [ htop curl mpc_cli gammastep discord obs-studio youtube-dl inkscape audacity dolphin firefox-wayland wl-clipboard steam bitwarden blender neofetch krita celluloid imv firefox zathura ];
uid = 1024;
isNormalUser = true;
shell = "zsh";
@ -44,7 +31,6 @@
enable = true;
term = "alacritty";
};
/*
apps = {
mpc.enable = true;
alacritty.enable = true;
@ -54,7 +40,6 @@
nwggrid.enable = true;
};
};
*/
editors = {
neovim.enable = true;
codium.enable = true;
@ -65,22 +50,23 @@
};
*/
};
/*
dev = {
llvm.enable = true;
haskell.enable = true;
haskell = {
enable = true;
version = "ghc902";
};
c.enable = true;
};
*/
services = {
ssh.enable = true;
/*
mpd = {
enable = true;
# TODO: Make this more dynamic?
musicDir = "/home/aether/Music";
musicDir = "/home/aether/Music";
user = "aether";
};
*/
geoclue2.enable = true;
};
};

View File

@ -63,18 +63,20 @@
options = [ "defaults" "noatime" "nodiratime" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/C507-604E";
fsType = "vfat";
};
"/home" = {
device = "/dev/disk/by-uuid/f3a44427-a212-48c2-91e7-f40e82bbcc02";
fsType = "vfat";
fsType = "f2fs";
options = [ "defaults" "noatime" "nodiratime" ];
};
"/etc/dotfiles" = {
device = "/dev/disk/by-uuid/2777d90a-20f0-4b35-88f1-653ba14114db";
fsType = "f2fs";
options = [ "defaults" "noatime" "nodiratime" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/C507-604E";
fsType = "vfat";
};
@ -82,17 +84,15 @@
device = "none";
fsType = "tmpfs";
};
/*
"/run/media/aether/bf2d91f1-a6b3-4629-8755-76301b3f6f56" = {
device = "/dev/disk/by-uuid/bf2d91f1-a6b3-4629-8755-76301b3f6f56";
fsType = "f2fs";
# fsType = "f2fs";
options = [ "defaults" "noatime" "nodiratime" "user" "nofail" ];
};
*/
/*
"/home/aether/Videos" = {
device = "/run/media/aether/bf2d91f1-a6b3-4629-8755-76301b3f6f56/home delta/home delta delta/Videos";
device = "/run/media/aether/bf2d91f1-a6b3-4629-8755-76301b3f6f56/home delta/Videos";
options = [ "bind" ];
};
@ -100,7 +100,6 @@
device = "/run/media/aether/bf2d91f1-a6b3-4629-8755-76301b3f6f56/home delta/Pictures";
options = [ "bind" ];
};
*/
"/home/aether/Documents" = {
device = "/run/media/aether/bf2d91f1-a6b3-4629-8755-76301b3f6f56/home delta/Documents";
@ -114,4 +113,7 @@
};
swapDevices = [{ device = "/dev/disk/by-uuid/e4a7edca-2c4e-4979-8368-377bc067b8bd"; }];
# Allows for hibernation
boot.resumeDevice = "/dev/disk/by-uuid/e4a7edca-2c4e-4979-8368-377bc067b8bd";
}

View File

@ -16,9 +16,11 @@ in {
};
config = mkIf cfg.enable {
/*
user.packages = with pkgs; [
alacritty
];
*/
home._.programs.alacritty = {
enable = true;
/*

View File

@ -12,11 +12,13 @@ in {
};
};
config = trace "penis" (mkIf cfg.enable {
user.packages = mkMerge (if wayland then with pkgs; [
config = mkIf cfg.enable {
/*
user.packages = if wayland then (with pkgs; [
firefox-wayland
] else with pkgs; [
]) else (with pkgs; [
firefox
]);
});
*/
};
}

View File

@ -17,7 +17,7 @@ in {
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
user.packages = with pkgs; [
wofi
];
};

View File

@ -13,8 +13,10 @@ in {
config = mkIf cfg.enable {
modules.services.mpd.enable = true;
environment.systemPackages = with pkgs; [
/*
user.packages = with pkgs; [
mpc_cli
];
*/
};
}

View File

@ -12,6 +12,6 @@ in {
};
config = mkIf cfg.enable {
user.packages = [ nwg-launchers ];
user.packages = with pkgs; [ nwg-launchers ];
};
}

View File

@ -12,8 +12,10 @@ in {
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
/*
user.packages = with pkgs; [
obs-studio
];
*/
};
}

View File

@ -13,6 +13,6 @@ in {
};
config = mkIf cfg.enable {
user.packages = [ polymc ];
# user.packages = [ polymc ];
};
}

View File

@ -0,0 +1,7 @@
{ lib, pkgs, options, config, ... }:
with lib;
let
cfg = config.modules.desktop.gaming.srb2k;
in {
}

View File

@ -13,8 +13,10 @@ in {
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
/*
user.packages = with pkgs; [
swayidle
];
*/
};
}

View File

@ -13,7 +13,7 @@ in {
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
user.packages = with pkgs; [
swaylock
];
};

View File

@ -31,6 +31,7 @@ in {
extraPackages = with pkgs; [ xwayland ];
};
/*
user.packages = with pkgs; [
grim
slurp
@ -39,9 +40,10 @@ in {
autotiling
brightnessctl
wdisplays
] ++ (mkIf audioSupport (with pkgs; [
] ++ (if audioSupport then (with pkgs; [
playerctl
]));
]) else [ ]);
*/
xdg.portal = {
enable = true;
@ -128,6 +130,8 @@ in {
"${mod}+Shift+8" = "move container to workspace 8";
"${mod}+Shift+9" = "move container to workspace 9";
"${mod}+Shift+0" = "move container to workspace 10";
"Print" = "exec grim -g \"$(slurp -d)\" - | ${scProc}";
};
};
extraSessionCommands = ''

View File

@ -24,6 +24,9 @@ in {
(mkIf cfg.ssd.enable {
services.fstrim.enable = true;
environment.systemPackages = with pkgs; [
nvme-cli
];
})
]);
}

View File

@ -73,5 +73,15 @@ in {
"net.ipv4.tcp_conjestion_control" = "bbr";
"net.core.default_qdisc" = "cake";
};
user = {
initialPassword = "nixos";
};
users.users.root = {
packages = [ pkgs.nologin ];
shell = pkgs.nologin;
hashedPassword = "!";
};
};
}

View File

@ -0,0 +1,17 @@
{ pkgs, lib, config, options, ... }:
with lib;
let
cfg = config.modules.services.geoclue2;
in {
options.modules.services.geoclue2 = {
enable = mkOption {
type = types.bool
default = false;
};
};
config = mkIf cfg.enable {
services.geoclue2.enable = true;
};
}

View File

@ -12,21 +12,27 @@ in {
default = false;
};
musicDir = mkOption {
user = mkOption {
type = types.str;
default = "";
description = "Which user MPD should run on";
};
musicDir = mkOption {
type = types.str;
defaultText = "$XDG_MUSIC_DIR";
};
};
config = mkIf cfg.enable {
services.mpd = {
enable = true;
user = "aether";
user = cfg.user;
};
home._.services.mpd = {
enable = true;
musicDirectory = builtins.trace cfg.musicDir cfg.musicDir;
musicDirectory = cfg.musicDir;
extraConfig =
''
zeroconf_enabled "no"
@ -38,6 +44,7 @@ replaygain "track"
audio_output {
type "pipewire"
name "PipeWire Audio Server"
server "127.0.0.1"
}
'' else "");
};

View File

@ -16,7 +16,7 @@ in {
};
config = mkIf cfg.enable {
user.packages = with pkgs; [ nix-zsh-completions ];
# user.packages = with pkgs; [ nix-zsh-completions ];
# home.configFile."zsh".source = "${configDir}/zsh";

View File

@ -23,7 +23,7 @@ with lib;
user = mkOption {
type = types.attrs;
default = {};
description = "Universal system-level user configuration. Change the default username attribute and I'll change the position of your fucking cranium.";
description = "Universal system-level user configuration";
};
configDir = mkOption {
type = types.path;
@ -34,6 +34,18 @@ with lib;
config = {
home-manager.useUserPackages = true;
/*
user = {
packages = with pkgs; [ curl ];
extraGroups = [ "wheel" ];
shell = {};
home = "/home/default";
isNormalUser = false;
isSystemUser = false;
group = "";
};
*/
home._ = {
home.stateVersion = config.system.stateVersion;
# home.file = mkAliasDefinitions options.home.file;
@ -51,13 +63,13 @@ with lib;
};
};
users.users = mapAttrs (user: prop: {
inherit (prop) uid;
extraGroups = prop.extraGroups ++ config.user.extraGroups;
packages = prop.packages ++ config.user.packages;
users.users = mapAttrs (user: prop: /* (mkAliasDefinitions options.user) // */ {
packages = prop.packages;
extraGroups = prop.extraGroups;
shell = pkgs."${config.defaultUsers."${user}".shell}";
home = "/home/${user}/";
home = "/home/${user}";
isNormalUser = true;
group = user;
}) config.defaultUsers;
home-manager.users = mapAttrs (user: prop: mkAliasDefinitions options.home._

View File

@ -0,0 +1,29 @@
{ lib
, stdenv
, SDL2
, SDL2_mixer
, libgme
, fetchFromGitLab
, cmake
}:
stdenv.mkDerivation rec {
pname = "srb2k";
version = "1.3";
src = fetchFromGitLab {
owner = "himie";
repo = "kart-public";
rev = "8cd205cd2807c6a2064935c8b873972c6570e715";
sha256 = "0";
};
buldInputs = [
SDL2
SDL2_mixer
libgme
cmake
];
cmakeFlags = [ "-march=native" ];
}