Compare commits
21 Commits
c0473fd0d9
...
6a91003232
Author | SHA1 | Date | |
---|---|---|---|
6a91003232 | |||
3196121e24 | |||
ef09347fa9 | |||
0f3b7bcba0 | |||
6ff3a964d5 | |||
22706d1b9b | |||
c2555ca051 | |||
f96c40cbfa | |||
6d10ad9fcd | |||
2cd892474b | |||
803f5e782f | |||
8473a6ee8e | |||
fbc7c9dfab | |||
c3d5e65527 | |||
aa8d413300 | |||
9f48d6b9d9 | |||
835136165b | |||
aa44ca5119 | |||
bbed0aceb7 | |||
bd15f3a96e | |||
59134e6276 |
37
flake.lock
generated
37
flake.lock
generated
@ -80,11 +80,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708988456,
|
"lastModified": 1709204054,
|
||||||
"narHash": "sha256-RCz7Xe64tN2zgWk+MVHkzg224znwqknJ1RnB7rVqUWw=",
|
"narHash": "sha256-U1idK0JHs1XOfSI1APYuXi4AEADf+B+ZU4Wifc0pBHk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "1d085ea4444d26aa52297758b333b449b2aa6fca",
|
"rev": "2f3367769a93b226c467551315e9e270c3f78b15",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -113,6 +113,7 @@
|
|||||||
"original": {
|
"original": {
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
|
"rev": "4bc669f9331bb66ab30bd705d09f1239bc3e83ed",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -173,11 +174,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1706198673,
|
"lastModified": 1709391291,
|
||||||
"narHash": "sha256-bHlxFd+3QHy6eXtTzzhwVNcyxBSOxTvBuJGNUzI4C4M=",
|
"narHash": "sha256-NJwAgXRKLVuO3YLkGxXIanLvTKN+cJsYwbLoWOa7ODk=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "contrib",
|
"repo": "contrib",
|
||||||
"rev": "16884001b26e6955ff4b88b4dfe4c8986e20f153",
|
"rev": "2d4ece4a008feefddc194bde785b1d39f987b5a7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -215,11 +216,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708788887,
|
"lastModified": 1709211223,
|
||||||
"narHash": "sha256-4HprTKLKiY8rXmthsuRAwXHW7hGaXsSlzmbXSWdOa7g=",
|
"narHash": "sha256-1cjd+yXbTlnCwNwEDjn289rJ2f0er5M8pOig4PxniEM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "7e3fc6a99a2c9e6701e2e0d37f1755e29a798b91",
|
"rev": "3257ad7f173b0314c8a42fec450fa6556495b97c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -246,11 +247,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709101946,
|
"lastModified": 1709356872,
|
||||||
"narHash": "sha256-TsySgcWm/GlbYdL3AEva49ceeI2BdPQ7muwfYNr1fwo=",
|
"narHash": "sha256-mvxCirJbtkP0cZ6ABdwcgTk0u3bgLoIoEFIoYBvD6+4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d53c2037394da6fe98decca417fc8fda64bf2443",
|
"rev": "458b097d81f90275b3fdf03796f0563844926708",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -262,11 +263,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708979614,
|
"lastModified": 1709309926,
|
||||||
"narHash": "sha256-FWLWmYojIg6TeqxSnHkKpHu5SGnFP5um1uUjH+wRV6g=",
|
"narHash": "sha256-VZFBtXGVD9LWTecGi6eXrE0hJ/mVB3zGUlHImUs2Qak=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b7ee09cf5614b02d289cd86fcfa6f24d4e078c2a",
|
"rev": "79baff8812a0d68e24a836df0a364c678089e2c7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -315,11 +316,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709086241,
|
"lastModified": 1709345349,
|
||||||
"narHash": "sha256-3QHK5zu/5XOa+ghBeKzvt+/BLdEPjw/xDNLcpDfbkmg=",
|
"narHash": "sha256-E2tsnkM97cGuzHKOqdkUXfmI+K1wS4dNTJJu5QH2Vuk=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "5d56056fb905ff550ee61b6ebb6674d494f57a9e",
|
"rev": "6e6fde31711e699be2e7fb67aae1c7e23ef606e0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
10
flake.nix
10
flake.nix
@ -35,7 +35,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# no inputs.nixpkgs.follows so i can use cachix
|
# no inputs.nixpkgs.follows so i can use cachix
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
hyprland.url = "github:hyprwm/Hyprland/4bc669f9331bb66ab30bd705d09f1239bc3e83ed";
|
||||||
|
|
||||||
hyprwm-contrib = {
|
hyprwm-contrib = {
|
||||||
url = "github:hyprwm/contrib";
|
url = "github:hyprwm/contrib";
|
||||||
@ -214,6 +214,14 @@
|
|||||||
hostname = "nullbox";
|
hostname = "nullbox";
|
||||||
stateVersion = "23.11";
|
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 nixosConfigurations
|
||||||
}; # end outputs
|
}; # end outputs
|
||||||
} # end flake
|
} # end flake
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
let
|
let
|
||||||
cfg = config.nixfiles.common.wm;
|
cfg = config.nixfiles.common.wm;
|
||||||
inherit (lib) mkDefault;
|
inherit (lib) mkDefault;
|
||||||
|
mkOverrideEach = pri: lib.mapAttrs (_:v: lib.mkOverride pri v);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.nixfiles.common.wm = {
|
options.nixfiles.common.wm = {
|
||||||
@ -47,6 +48,22 @@ in
|
|||||||
package = pkgs.swaylock-effects;
|
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 = {
|
services = {
|
||||||
udiskie = {
|
udiskie = {
|
||||||
enable = mkDefault true;
|
enable = mkDefault true;
|
||||||
|
@ -13,6 +13,11 @@ in
|
|||||||
];
|
];
|
||||||
config = {};
|
config = {};
|
||||||
options.nixfiles = {
|
options.nixfiles = {
|
||||||
|
options = lib.mkOption {
|
||||||
|
description = "home-manager options attrset for repl";
|
||||||
|
default = options;
|
||||||
|
readOnly = true;
|
||||||
|
};
|
||||||
meta.standalone = lib.mkOption {
|
meta.standalone = lib.mkOption {
|
||||||
default = isStandalone;
|
default = isStandalone;
|
||||||
description = "Whether or not the home-manager installation is standalone (standalone installations don't have access to osConfig).";
|
description = "Whether or not the home-manager installation is standalone (standalone installations don't have access to osConfig).";
|
||||||
|
@ -3,6 +3,7 @@ let
|
|||||||
cfg = config.nixfiles.packageSets.multimedia;
|
cfg = config.nixfiles.packageSets.multimedia;
|
||||||
inherit (lib) optionals mkEnableOption mkIf;
|
inherit (lib) optionals mkEnableOption mkIf;
|
||||||
default = osConfig ? nixfiles && osConfig.nixfiles.packageSets.multimedia.enable;
|
default = osConfig ? nixfiles && osConfig.nixfiles.packageSets.multimedia.enable;
|
||||||
|
mkOverrideEach = pri: lib.mapAttrs (_:v: lib.mkOverride pri v);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.nixfiles.packageSets.multimedia = {
|
options.nixfiles.packageSets.multimedia = {
|
||||||
@ -21,10 +22,29 @@ in
|
|||||||
krita
|
krita
|
||||||
inkscape
|
inkscape
|
||||||
obs-studio
|
obs-studio
|
||||||
|
nomacs
|
||||||
|
audacity
|
||||||
] ++ [
|
] ++ [
|
||||||
yt-dlp
|
yt-dlp
|
||||||
imagemagick
|
imagemagick
|
||||||
ffmpeg
|
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 ]))
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,9 @@ in
|
|||||||
nixfiles.programs.comma.enable = true;
|
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
|
# 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.enable = true;
|
||||||
programs.fzf.enableZshIntegration = true;
|
programs.fzf.enableZshIntegration = true;
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
|
@ -19,6 +19,7 @@ in
|
|||||||
mopidy-bandcamp
|
mopidy-bandcamp
|
||||||
mopidy-ytmusic
|
mopidy-ytmusic
|
||||||
mopidy-soundcloud
|
mopidy-soundcloud
|
||||||
|
mopidy-scrobbler
|
||||||
# outputs.packages.${pkgs.system}.mopidy-autoplay
|
# outputs.packages.${pkgs.system}.mopidy-autoplay
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -19,7 +19,7 @@ let
|
|||||||
|
|
||||||
lock-cmd = "${swaylock}";
|
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 = "${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-package = pkgs.callPackage ./dispatcher { hyprland = hyprland-pkg; };
|
||||||
hypr-dispatcher = "${hypr-dispatcher-package}/bin/hypr-dispatcher";
|
hypr-dispatcher = "${hypr-dispatcher-package}/bin/hypr-dispatcher";
|
||||||
|
23
hosts/nixos-wsl/configuration.nix
Normal file
23
hosts/nixos-wsl/configuration.nix
Normal 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" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
9
hosts/nixos-wsl/home.nix
Normal file
9
hosts/nixos-wsl/home.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{ pkgs, lib, config, osConfig ? {}, ... }:
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
nixfiles = {
|
||||||
|
profile.base.enable = true;
|
||||||
|
packageSets.dev.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -21,6 +21,7 @@
|
|||||||
"/ntfs" = {
|
"/ntfs" = {
|
||||||
fsType = "ntfs-3g";
|
fsType = "ntfs-3g";
|
||||||
device = "/dev/disk/by-uuid/6AC23F0FC23EDF4F";
|
device = "/dev/disk/by-uuid/6AC23F0FC23EDF4F";
|
||||||
|
options = [ "auto_cache" ];
|
||||||
};
|
};
|
||||||
"/.btrfsroot" = {
|
"/.btrfsroot" = {
|
||||||
options = [ "subvol=/" ];
|
options = [ "subvol=/" ];
|
||||||
|
@ -31,6 +31,21 @@
|
|||||||
../../system # nixfiles modules
|
../../system # nixfiles modules
|
||||||
./nvidia-optimus.nix
|
./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 = {
|
nixfiles = {
|
||||||
profile.pc.enable = true;
|
profile.pc.enable = true;
|
||||||
common.remoteAccess.enable = true;
|
common.remoteAccess.enable = true;
|
||||||
@ -39,7 +54,7 @@
|
|||||||
gaming.enable = true;
|
gaming.enable = true;
|
||||||
fun.enable = true;
|
fun.enable = true;
|
||||||
};
|
};
|
||||||
sessions.hyprland.enable = true;
|
sessions.hyprland.enable = lib.mkDefault true;
|
||||||
sessions.hyprland.useFlake = true;
|
sessions.hyprland.useFlake = true;
|
||||||
sessions.plasma.enable = lib.mkDefault false;
|
sessions.plasma.enable = lib.mkDefault false;
|
||||||
programs = {
|
programs = {
|
||||||
|
@ -36,6 +36,9 @@ in
|
|||||||
wl-clipboard
|
wl-clipboard
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# this solves some inconsistent behavior with xdg-open
|
||||||
|
xdg.portal.xdgOpenUsePortal = true;
|
||||||
|
|
||||||
# Enable flatpak
|
# Enable flatpak
|
||||||
services.flatpak.enable = mkDefault true;
|
services.flatpak.enable = mkDefault true;
|
||||||
|
|
||||||
|
@ -20,9 +20,10 @@ in
|
|||||||
|
|
||||||
# locale settings
|
# locale settings
|
||||||
i18n = {
|
i18n = {
|
||||||
defaultLocale = lib.mkDefault "en_US.UTF-8";
|
defaultLocale = lib.mkDefault "en_US.utf8";
|
||||||
extraLocaleSettings = {
|
extraLocaleSettings = {
|
||||||
LC_ALL = lib.mkDefault "en_US.UTF-8";
|
LC_ALL = lib.mkDefault config.i18n.defaultLocale;
|
||||||
|
LC_CTYPE = lib.mkDefault config.i18n.defaultLocale;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -32,6 +33,9 @@ in
|
|||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# this allows non-NixOS binaries to run on NixOS.
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
|
|
||||||
# networking.hostName = "nixos"; # Define your hostname.
|
# networking.hostName = "nixos"; # Define your hostname.
|
||||||
# Pick only one of the below networking options.
|
# Pick only one of the below networking options.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
@ -54,6 +58,7 @@ in
|
|||||||
file
|
file
|
||||||
tree
|
tree
|
||||||
moreutils
|
moreutils
|
||||||
|
bsdtar
|
||||||
|
|
||||||
fd
|
fd
|
||||||
ripgrep
|
ripgrep
|
||||||
@ -79,6 +84,7 @@ in
|
|||||||
# nix utilities
|
# nix utilities
|
||||||
nix-du
|
nix-du
|
||||||
graphviz # for nix-du
|
graphviz # for nix-du
|
||||||
|
nvd
|
||||||
|
|
||||||
# secrets
|
# secrets
|
||||||
age
|
age
|
||||||
|
@ -24,7 +24,7 @@ in
|
|||||||
nixfiles.meta.wayland = true;
|
nixfiles.meta.wayland = true;
|
||||||
|
|
||||||
services.xserver.displayManager.sddm = {
|
services.xserver.displayManager.sddm = {
|
||||||
enable = true;
|
enable = lib.mkDefault true;
|
||||||
wayland.enable = true;
|
wayland.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user