Compare commits

...

18 Commits

Author SHA1 Message Date
c0473fd0d9
mopidy: add scrobbler plugin 2024-03-06 02:52:23 -05:00
49c89cc1ab
pin Hyprland version
fixes weird cursor position bug (i do not know the cause and i'm too
lazy to bug report rn i might bisect it tomorrow)
2024-03-06 02:42:45 -05:00
2f82569431
slab: no i don't want lightdm 2024-03-06 02:13:16 -05:00
329a1e75a5
Hyprland: display manager mkDefault 2024-03-06 02:06:26 -05:00
54c4b32c89
slab: fix option name 2024-03-06 02:03:01 -05:00
f52ce32538
slab: plasma specialisation 2024-03-06 02:00:29 -05:00
f831f791b4
slab: disable display manager 2024-03-06 01:59:59 -05:00
c66d58ae8f Switch WSL to unstable 2024-03-05 07:01:58 +00:00
7f216979ff Fix locale settings 2024-03-05 06:43:17 +00:00
85b60842d4
move option from home to system 2024-03-04 21:58:12 -05:00
ff5bd34efd
Add home-manager options arg to an option
good for repl stuff
2024-03-04 21:13:29 -05:00
373d32f5c9
nullbox: auto_cache /ntfs 2024-03-04 21:11:16 -05:00
3aece4f65b
wm: Enable XDG MIME and set some defaults 2024-03-04 21:09:08 -05:00
513e741704
hyprland: re-enable idle dpms 2024-03-04 02:01:16 -05:00
ec25272dd4
system: add nvd 2024-03-04 01:58:59 -05:00
251bb5df50 home: add alias 2024-03-03 02:25:24 +00:00
44dbc34bb7 Update flake.lock 2024-03-03 02:25:18 +00:00
2a0cef9908 flake: add wsl host 2024-03-03 02:24:59 +00:00
15 changed files with 129 additions and 24 deletions

37
flake.lock generated
View File

@ -80,11 +80,11 @@
]
},
"locked": {
"lastModified": 1708988456,
"narHash": "sha256-RCz7Xe64tN2zgWk+MVHkzg224znwqknJ1RnB7rVqUWw=",
"lastModified": 1709204054,
"narHash": "sha256-U1idK0JHs1XOfSI1APYuXi4AEADf+B+ZU4Wifc0pBHk=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "1d085ea4444d26aa52297758b333b449b2aa6fca",
"rev": "2f3367769a93b226c467551315e9e270c3f78b15",
"type": "github"
},
"original": {
@ -113,6 +113,7 @@
"original": {
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "4bc669f9331bb66ab30bd705d09f1239bc3e83ed",
"type": "github"
}
},
@ -173,11 +174,11 @@
]
},
"locked": {
"lastModified": 1706198673,
"narHash": "sha256-bHlxFd+3QHy6eXtTzzhwVNcyxBSOxTvBuJGNUzI4C4M=",
"lastModified": 1709391291,
"narHash": "sha256-NJwAgXRKLVuO3YLkGxXIanLvTKN+cJsYwbLoWOa7ODk=",
"owner": "hyprwm",
"repo": "contrib",
"rev": "16884001b26e6955ff4b88b4dfe4c8986e20f153",
"rev": "2d4ece4a008feefddc194bde785b1d39f987b5a7",
"type": "github"
},
"original": {
@ -215,11 +216,11 @@
]
},
"locked": {
"lastModified": 1708788887,
"narHash": "sha256-4HprTKLKiY8rXmthsuRAwXHW7hGaXsSlzmbXSWdOa7g=",
"lastModified": 1709211223,
"narHash": "sha256-1cjd+yXbTlnCwNwEDjn289rJ2f0er5M8pOig4PxniEM=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "7e3fc6a99a2c9e6701e2e0d37f1755e29a798b91",
"rev": "3257ad7f173b0314c8a42fec450fa6556495b97c",
"type": "github"
},
"original": {
@ -246,11 +247,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1709101946,
"narHash": "sha256-TsySgcWm/GlbYdL3AEva49ceeI2BdPQ7muwfYNr1fwo=",
"lastModified": 1709356872,
"narHash": "sha256-mvxCirJbtkP0cZ6ABdwcgTk0u3bgLoIoEFIoYBvD6+4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d53c2037394da6fe98decca417fc8fda64bf2443",
"rev": "458b097d81f90275b3fdf03796f0563844926708",
"type": "github"
},
"original": {
@ -262,11 +263,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1708979614,
"narHash": "sha256-FWLWmYojIg6TeqxSnHkKpHu5SGnFP5um1uUjH+wRV6g=",
"lastModified": 1709309926,
"narHash": "sha256-VZFBtXGVD9LWTecGi6eXrE0hJ/mVB3zGUlHImUs2Qak=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b7ee09cf5614b02d289cd86fcfa6f24d4e078c2a",
"rev": "79baff8812a0d68e24a836df0a364c678089e2c7",
"type": "github"
},
"original": {
@ -315,11 +316,11 @@
]
},
"locked": {
"lastModified": 1709086241,
"narHash": "sha256-3QHK5zu/5XOa+ghBeKzvt+/BLdEPjw/xDNLcpDfbkmg=",
"lastModified": 1709345349,
"narHash": "sha256-E2tsnkM97cGuzHKOqdkUXfmI+K1wS4dNTJJu5QH2Vuk=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "5d56056fb905ff550ee61b6ebb6674d494f57a9e",
"rev": "6e6fde31711e699be2e7fb67aae1c7e23ef606e0",
"type": "github"
},
"original": {

View File

@ -35,7 +35,7 @@
};
# no inputs.nixpkgs.follows so i can use cachix
hyprland.url = "github:hyprwm/Hyprland";
hyprland.url = "github:hyprwm/Hyprland/4bc669f9331bb66ab30bd705d09f1239bc3e83ed";
hyprwm-contrib = {
url = "github:hyprwm/contrib";
@ -214,6 +214,14 @@
hostname = "nullbox";
stateVersion = "23.11";
};
nixos-wsl = mkWSLSystem {
nixpkgs = inputs.nixpkgs-unstable;
home-manager = inputs.home-manager-unstable;
system = "x86_64-linux";
stateVersion = "23.11";
hostname = "nixos-wsl";
};
}; # end nixosConfigurations
}; # end outputs
} # end flake

View File

@ -2,6 +2,7 @@
let
cfg = config.nixfiles.common.wm;
inherit (lib) mkDefault;
mkOverrideEach = pri: lib.mapAttrs (_:v: lib.mkOverride pri v);
in
{
options.nixfiles.common.wm = {
@ -47,6 +48,22 @@ in
package = pkgs.swaylock-effects;
};
};
# File associations
xdg.mimeApps = {
enable = true;
defaultApplications = let
defaultBrowser = [ "firefox.desktop" ];
in mkOverrideEach 50 {
"x-scheme-handler/https" = defaultBrowser;
"x-scheme-handler/http" = defaultBrowser;
"text/html" = defaultBrowser;
"application/xhtml+xml" = defaultBrowser;
"application/pdf" = defaultBrowser;
};
};
services = {
udiskie = {
enable = mkDefault true;

View File

@ -13,6 +13,11 @@ in
];
config = {};
options.nixfiles = {
options = lib.mkOption {
description = "home-manager options attrset for repl";
default = options;
readOnly = true;
};
meta.standalone = lib.mkOption {
default = isStandalone;
description = "Whether or not the home-manager installation is standalone (standalone installations don't have access to osConfig).";

View File

@ -3,6 +3,7 @@ let
cfg = config.nixfiles.packageSets.multimedia;
inherit (lib) optionals mkEnableOption mkIf;
default = osConfig ? nixfiles && osConfig.nixfiles.packageSets.multimedia.enable;
mkOverrideEach = pri: lib.mapAttrs (_:v: lib.mkOverride pri v);
in
{
options.nixfiles.packageSets.multimedia = {
@ -21,10 +22,29 @@ in
krita
inkscape
obs-studio
nomacs
audacity
] ++ [
yt-dlp
imagemagick
ffmpeg
];
xdg.mimeApps.defaultApplications = lib.mkMerge [
# project files
(mkOverrideEach 100 {
"image/x-xcf" = [ "gimp.desktop" ];
"image/x-compressed-xcf" = [ "gimp.desktop" ];
"image/x-krita" = [ "krita.desktop" ];
"application/x-audacity-project" = [ "audacity.desktop" ];
"application/x-audacity-project+sqlite3" = [ "audacity.desktop" ];
"image/svg+xml" = [ "org.inkscape.Inkscape.desktop" ];
"image/svg+xml-compressed" = [ "org.inkscape.Inkscape.desktop" ];
})
# general files
(with pkgs; mkOverrideEach 150 (config.lib.xdg.mimeAssociations [ nomacs mpv ]))
# rest of the files
(with pkgs; mkOverrideEach 200 (config.lib.xdg.mimeAssociations [ inkscape gimp audacity ]))
];
};
}

View File

@ -17,6 +17,9 @@ in
nixfiles.programs.comma.enable = true;
# TODO move this stuff to a zsh.nix or something; this is just a quick fix so home.sessionVariables works
home.shellAliases = {
v = "nvim";
};
programs.fzf.enable = true;
programs.fzf.enableZshIntegration = true;
programs.zsh = {

View File

@ -19,6 +19,7 @@ in
mopidy-bandcamp
mopidy-ytmusic
mopidy-soundcloud
mopidy-scrobbler
# outputs.packages.${pkgs.system}.mopidy-autoplay
];
};

View File

@ -19,7 +19,7 @@ let
lock-cmd = "${swaylock}";
# idle-cmd = "${swayidle} -w timeout 315 '${lock-cmd}' timeout 300 '${hyprctl} dispatch dpms off' resume '${hyprctl} dispatch dpms on' before-sleep '${lock-cmd}' lock '${lock-cmd}' unlock '${pkill} -USR1 -x swaylock'";
idle-cmd = "${pkgs.coreutils}/bin/true";
idle-cmd = "${swayidle} -w timeout 300 '${hyprctl} dispatch dpms off' resume '${hyprctl} dispatch dpms on'";
hypr-dispatcher-package = pkgs.callPackage ./dispatcher { hyprland = hyprland-pkg; };
hypr-dispatcher = "${hypr-dispatcher-package}/bin/hypr-dispatcher";

View File

@ -0,0 +1,23 @@
{ pkgs, config, lib, ... }:
{
config = {
networking.hostName = "nixos-wsl";
nixfiles.profile.base.enable = true;
programs.gnupg.agent = {
enable = true;
pinentryFlavor = "gnome3";
};
fonts.packages = with pkgs; [
(nerdfonts.override { fonts = [ "FiraCode" ]; })
noto-fonts
noto-fonts-cjk
];
fileSystems."/mnt/wsl/instances/NixOS" = {
device = "/";
options = [ "bind" ];
};
};
}

6
hosts/nixos-wsl/home.nix Normal file
View File

@ -0,0 +1,6 @@
{ pkgs, lib, config, osConfig ? {}, ... }:
{
config = {
nixfiles.profile.base.enable = true;
};
}

View File

@ -21,6 +21,7 @@
"/ntfs" = {
fsType = "ntfs-3g";
device = "/dev/disk/by-uuid/6AC23F0FC23EDF4F";
options = [ "auto_cache" ];
};
"/.btrfsroot" = {
options = [ "subvol=/" ];

View File

@ -31,6 +31,21 @@
../../system # nixfiles modules
./nvidia-optimus.nix
];
specialisation.plasma.configuration = {
system.nixos.tags = [ "Plasma" ];
nixfiles = {
sessions.hyprland.enable = false;
sessions.plasma.enable = true;
};
services.xserver.displayManager.sddm.enable = lib.mkForce true;
services.xserver.displayManager.startx.enable = lib.mkForce false;
};
# who needs a display manager?
services.xserver.displayManager.sddm.enable = false;
services.xserver.displayManager.startx.enable = true;
nixfiles = {
profile.pc.enable = true;
common.remoteAccess.enable = true;
@ -39,7 +54,7 @@
gaming.enable = true;
fun.enable = true;
};
sessions.hyprland.enable = true;
sessions.hyprland.enable = lib.mkDefault true;
sessions.hyprland.useFlake = true;
sessions.plasma.enable = lib.mkDefault false;
programs = {

View File

@ -36,6 +36,9 @@ in
wl-clipboard
];
# this solves some inconsistent behavior with xdg-open
xdg.portal.xdgOpenUsePortal = true;
# Enable flatpak
services.flatpak.enable = mkDefault true;

View File

@ -20,9 +20,10 @@ in
# locale settings
i18n = {
defaultLocale = lib.mkDefault "en_US.UTF-8";
defaultLocale = lib.mkDefault "en_US.utf8";
extraLocaleSettings = {
LC_ALL = lib.mkDefault "en_US.UTF-8";
LC_ALL = lib.mkDefault config.i18n.defaultLocale;
LC_CTYPE = lib.mkDefault config.i18n.defaultLocale;
};
};
@ -79,6 +80,7 @@ in
# nix utilities
nix-du
graphviz # for nix-du
nvd
# secrets
age

View File

@ -24,7 +24,7 @@ in
nixfiles.meta.wayland = true;
services.xserver.displayManager.sddm = {
enable = true;
enable = lib.mkDefault true;
wayland.enable = true;
};