working towards selectable wm
This commit is contained in:
parent
aa246ebde3
commit
1e8a45546a
5 changed files with 67 additions and 18 deletions
|
@ -1,8 +1,13 @@
|
|||
{ wm ? null, ...}:
|
||||
with builtins;
|
||||
{
|
||||
wm = "plasma";
|
||||
rec {
|
||||
wm = wm;
|
||||
|
||||
x11-wms = ["plasma" "xmonad" "i3"];
|
||||
wayland-wms = ["hyprland" "sway"];
|
||||
wms = x11-wms ++ wayland-wms;
|
||||
|
||||
# very, very non-exhaustive of course
|
||||
is-x11 = wm: elem wm ["plasma" "xmonad" "i3"];
|
||||
is-wayland = wm: elem wm ["hyprland" "sway"];
|
||||
is-x11 = wm: elem wm x11-wms;
|
||||
is-wayland = wm: elem wm wayland-wms;
|
||||
}
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
build-conf:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
conf = import ./build.conf.nix;
|
||||
conf = build-conf;
|
||||
x11 = conf.is-x11 conf.wm;
|
||||
in
|
||||
{
|
||||
|
|
40
flake.lock
40
flake.lock
|
@ -1,5 +1,23 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689068808,
|
||||
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -7,11 +25,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1692081771,
|
||||
"narHash": "sha256-LWhyDz3gi1RzTcW6e6iwfs4VuDWFajOexBKygNIqvQM=",
|
||||
"lastModified": 1692131549,
|
||||
"narHash": "sha256-MFjI8NL63/6HjMZpvJgnB/Pgg2dht22t45jOYtipZig=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "18791781ea86cbec6bce8bcb847444b9c73b8b3b",
|
||||
"rev": "75cfe974e2ca05a61b66768674032b4c079e55d4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -38,9 +56,25 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
20
flake.nix
20
flake.nix
|
@ -4,21 +4,31 @@
|
|||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
inputs.home-manager.url = "github:nix-community/home-manager";
|
||||
inputs.home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, home-manager, ... }: {
|
||||
nixosConfigurations = {
|
||||
outputs = inputs@{ self, nixpkgs, home-manager, flake-utils, ... }:
|
||||
let
|
||||
conf = (import ./build.conf.nix) {};
|
||||
in
|
||||
{
|
||||
nixosConfigurations =
|
||||
flake-utils.lib.eachSystem conf.wms (wm:
|
||||
let
|
||||
conf = import (./build.conf.nix) { wm = wm; };
|
||||
in
|
||||
{
|
||||
nix = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
(./configuration.nix conf)
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.mbk = import ./home.nix;
|
||||
home-manager.users.mbk = (import ./home.nix) conf;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
9
home.nix
9
home.nix
|
@ -1,6 +1,7 @@
|
|||
build-conf:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
conf = import ./build.conf.nix;
|
||||
conf = build-conf;
|
||||
wm = conf.wm;
|
||||
in
|
||||
{
|
||||
|
@ -131,10 +132,8 @@ in
|
|||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
userName = "mehbark";
|
||||
userEmail = "terezi@pyrope.net";
|
||||
};
|
||||
userName = "mehbark";
|
||||
userEmail = "terezi@pyrope.net";
|
||||
};
|
||||
|
||||
programs.git.difftastic = {
|
||||
|
|
Loading…
Reference in a new issue