Compare commits
2 Commits
608b2201a3
...
d250dc13ef
Author | SHA1 | Date | |
---|---|---|---|
d250dc13ef | |||
54dbf8f929 |
@ -1,6 +1,20 @@
|
|||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.grimmShared;
|
cfg = config.grimmShared;
|
||||||
|
sync_mod = with lib; types.submodule ({ config, ... }: {
|
||||||
|
options = {
|
||||||
|
remote = mkOption {
|
||||||
|
type = types.nonEmptyStr;
|
||||||
|
description = "path on the cloud server";
|
||||||
|
};
|
||||||
|
|
||||||
|
local = mkOption {
|
||||||
|
type = types.nonEmptyStr;
|
||||||
|
default = "$HOME/" + (lib.strings.concatStrings (builtins.match "/*(.+)" config.remote));
|
||||||
|
description = "local path to sync";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = with cfg; lib.mkIf (enable && cloudSync.enable) (
|
config = with cfg; lib.mkIf (enable && cloudSync.enable) (
|
||||||
@ -63,4 +77,36 @@ in
|
|||||||
config.users.users);
|
config.users.users);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
options.users.users = with lib; mkOption {
|
||||||
|
type = types.attrsOf (types.submodule {
|
||||||
|
options = {
|
||||||
|
syncPaths = mkOption {
|
||||||
|
type = types.listOf sync_mod;
|
||||||
|
default = [ ];
|
||||||
|
description = "paths to sync via nextcloud";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
options.grimmShared.cloudSync = with lib; {
|
||||||
|
enable = mkEnableOption "cloud_sync";
|
||||||
|
|
||||||
|
username = mkOption {
|
||||||
|
type = types.nonEmptyStr;
|
||||||
|
description = "username to use for cloud login";
|
||||||
|
};
|
||||||
|
|
||||||
|
server = mkOption {
|
||||||
|
type = types.nonEmptyStr;
|
||||||
|
description = "server url to use for cloud sync";
|
||||||
|
};
|
||||||
|
|
||||||
|
passwordFile = mkOption {
|
||||||
|
type = types.nonEmptyStr;
|
||||||
|
description = "password file to use for login";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -56,4 +56,20 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
options.grimmShared.firefox = with lib; {
|
||||||
|
enable = mkEnableOption "grimm-firefox";
|
||||||
|
|
||||||
|
plugins = mkOption {
|
||||||
|
type = types.attrsOf types.str;
|
||||||
|
default = { };
|
||||||
|
description = "set of plugins to install. Format: guid = short-id";
|
||||||
|
};
|
||||||
|
|
||||||
|
disableUserPlugins = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "disables user controlled plugins";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -46,4 +46,10 @@ in
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
options.grimmShared.gaming = with lib; mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "enables steam, heroic, prism and gamemoded";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -28,4 +28,10 @@ in
|
|||||||
variant = "";
|
variant = "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
options.grimmShared.locale = with lib; mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Sets german units but english language";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -23,4 +23,10 @@ in
|
|||||||
serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
|
serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
options.grimmShared.network = with lib; mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enables network manager, wifi and bluetooth";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,33 @@
|
|||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.grimmShared;
|
cfg = config.grimmShared;
|
||||||
|
screen = with lib; types.submodule {
|
||||||
|
options = {
|
||||||
|
fps = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 60;
|
||||||
|
description = "max framerate of screen";
|
||||||
|
};
|
||||||
|
|
||||||
|
mode = mkOption {
|
||||||
|
type = types.nonEmptyStr;
|
||||||
|
default = "1920x1080";
|
||||||
|
description = "pixel format of the screen";
|
||||||
|
};
|
||||||
|
|
||||||
|
id = mkOption {
|
||||||
|
type = types.nonEmptyStr;
|
||||||
|
description = "ID of the screen";
|
||||||
|
};
|
||||||
|
|
||||||
|
pos = mkOption {
|
||||||
|
type = types.nullOr types.nonEmptyStr;
|
||||||
|
default = null;
|
||||||
|
example = "0,0";
|
||||||
|
description = "position where to place the screen";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = with cfg; lib.mkIf (enable && graphical) {
|
config = with cfg; lib.mkIf (enable && graphical) {
|
||||||
@ -28,4 +55,19 @@ in
|
|||||||
glfw
|
glfw
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
options.grimmShared = with lib; {
|
||||||
|
graphical = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = cfg.screens != { };
|
||||||
|
description = "whether to force enable graphical components";
|
||||||
|
};
|
||||||
|
|
||||||
|
screens = mkOption {
|
||||||
|
type = types.attrsOf screen;
|
||||||
|
default = { };
|
||||||
|
description = "Screens to initialize, will activate graphical components";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -34,4 +34,10 @@ in
|
|||||||
|
|
||||||
fonts.fontDir.enable = true;
|
fonts.fontDir.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
options.grimmShared.portals = with lib; mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enables portals for wlr, gtk and kde as well as fixes fonts";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -19,4 +19,10 @@ in
|
|||||||
skanpage
|
skanpage
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
options.grimmShared.printing = with lib; mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enables print and scan related options";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -25,4 +25,10 @@ in
|
|||||||
pulseaudio
|
pulseaudio
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
options.grimmShared.sound = with lib; mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "whether to enable sound";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,39 @@
|
|||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.grimmShared;
|
cfg = config.grimmShared;
|
||||||
|
sway_conf = with lib; types.submodule ({ config, ... }: rec {
|
||||||
|
options = {
|
||||||
|
keybinds = mkOption {
|
||||||
|
type = types.attrsOf types.str;
|
||||||
|
default = { };
|
||||||
|
description = "set of keybinds assigning key combo to action";
|
||||||
|
};
|
||||||
|
|
||||||
|
autolaunch = mkOption {
|
||||||
|
type = types.listOf (types.either types.str types.package);
|
||||||
|
default = [ ];
|
||||||
|
description = "set of commands to be run at sway startup";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "";
|
||||||
|
description = "additional sway config to be included";
|
||||||
|
};
|
||||||
|
|
||||||
|
definitions = mkOption {
|
||||||
|
type = types.attrsOf types.str;
|
||||||
|
default = { };
|
||||||
|
description = "set of definitions assigning variable to value";
|
||||||
|
};
|
||||||
|
|
||||||
|
modes = mkOption {
|
||||||
|
type = types.attrsOf sway_conf;
|
||||||
|
default = { };
|
||||||
|
description = "possible modes to switch to, e.g. resize";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config =
|
config =
|
||||||
@ -17,24 +50,24 @@ in
|
|||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
build_conf = sway_conf:
|
build_conf = with lib; sway_conf:
|
||||||
let
|
let
|
||||||
build_definition_lines = lib.mapAttrsToList (name: value: "set \$${name} ${value}");
|
build_definition_lines = mapAttrsToList (name: value: "set \$${name} ${value}");
|
||||||
build_keybind_lines = lib.mapAttrsToList (key: value: "bindsym ${key} ${value}");
|
build_keybind_lines = mapAttrsToList (key: value: "bindsym ${key} ${value}");
|
||||||
build_exec_lines = map (item: "exec " + item);
|
build_exec_lines = map (item: "exec " + (if isString item then item else (getExe item)));
|
||||||
build_mode_lines = lib.mapAttrsToList (name: value: ''
|
build_mode_lines = mapAttrsToList (name: value: ''
|
||||||
mode "${name}" {
|
mode "${name}" {
|
||||||
${lib.strings.concatLines (map (item: " " + item ) (build_conf value))}}'');
|
${strings.concatLines (map (item: " " + item ) (build_conf value))}}'');
|
||||||
in
|
in
|
||||||
([ ]
|
([ ]
|
||||||
++ (build_definition_lines sway_conf.definitions)
|
++ (build_definition_lines sway_conf.definitions)
|
||||||
++ (build_keybind_lines sway_conf.keybinds)
|
++ (build_keybind_lines sway_conf.keybinds)
|
||||||
++ (build_exec_lines sway_conf.autolaunch)
|
++ (build_exec_lines sway_conf.autolaunch)
|
||||||
++ (build_mode_lines sway_conf.modes)
|
++ (build_mode_lines sway_conf.modes)
|
||||||
++ lib.optional (sway_conf.extraConfig != "") sway_conf.extraConfig
|
++ optional (sway_conf.extraConfig != "") sway_conf.extraConfig
|
||||||
);
|
);
|
||||||
|
|
||||||
text = lib.strings.concatLines (
|
text = lib.concatLines (
|
||||||
(build_conf cfg.sway.config)
|
(build_conf cfg.sway.config)
|
||||||
++ lib.optional cfg.sway.bar.enable bar_config
|
++ lib.optional cfg.sway.bar.enable bar_config
|
||||||
++ (lib.mapAttrsToList
|
++ (lib.mapAttrsToList
|
||||||
@ -115,4 +148,29 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
options.grimmShared.sway = with lib; {
|
||||||
|
enable = mkEnableOption "grimm-sway";
|
||||||
|
|
||||||
|
bar = {
|
||||||
|
enable = mkEnableOption "grimm-sway-bar";
|
||||||
|
|
||||||
|
style = mkOption {
|
||||||
|
type = types.nullOr types.path;
|
||||||
|
default = null;
|
||||||
|
description = "waybar style sheet to use";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkOption {
|
||||||
|
type = types.nullOr types.path;
|
||||||
|
default = null;
|
||||||
|
description = "waybar config to use";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkOption {
|
||||||
|
type = sway_conf;
|
||||||
|
description = "sway config to use";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -117,4 +117,26 @@ in
|
|||||||
programs.ssh.startAgent = true;
|
programs.ssh.startAgent = true;
|
||||||
programs.thefuck.enable = true;
|
programs.thefuck.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
options.grimmShared.tooling = with lib; {
|
||||||
|
enable = mkEnableOption "grimm-tooling";
|
||||||
|
|
||||||
|
pass = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Enables password-store, gnupg and such secret handling";
|
||||||
|
};
|
||||||
|
|
||||||
|
git_user = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "Grimmauld";
|
||||||
|
description = "Username for git to use";
|
||||||
|
};
|
||||||
|
|
||||||
|
git_email = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "${config.grimmShared.tooling.git_user}@grimmauld.de";
|
||||||
|
description = "Email for git to use";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -67,10 +67,21 @@
|
|||||||
|
|
||||||
qt = {
|
qt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
style = "breeze";
|
style = "kvantum";
|
||||||
platformTheme = "kde";
|
platformTheme = "qt5ct";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
libsForQt5.qtstyleplugin-kvantum
|
||||||
|
catppuccin-kvantum
|
||||||
|
catppuccin-sddm-corners
|
||||||
|
libsForQt5.qtgraphicaleffects
|
||||||
|
catppuccin-kvantum
|
||||||
|
qt6ct
|
||||||
|
];
|
||||||
|
|
||||||
|
# environment.etc."kvantum".source = "${pkgs.catppuccin-kvantum}/share/Kvantum";
|
||||||
|
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
NIXPKGS_ALLOW_UNFREE = "1";
|
NIXPKGS_ALLOW_UNFREE = "1";
|
||||||
MOZ_ENABLE_WAYLAND = "1";
|
MOZ_ENABLE_WAYLAND = "1";
|
||||||
|
55
flake.lock
55
flake.lock
@ -78,11 +78,11 @@
|
|||||||
"yafas": "yafas"
|
"yafas": "yafas"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713020398,
|
"lastModified": 1713212932,
|
||||||
"narHash": "sha256-fZ9snNCxKj5sJ/hymCW8aM8Lzlbzo/VYYfl/oNLh/jc=",
|
"narHash": "sha256-FnKDhx5w9KRUJR0ZEI4kpL+KtAv2utAs6+ovDz1SmHo=",
|
||||||
"owner": "chaotic-cx",
|
"owner": "chaotic-cx",
|
||||||
"repo": "nyx",
|
"repo": "nyx",
|
||||||
"rev": "f0e16565b38a473664977625680f08e7cc9dec50",
|
"rev": "a2f034e707ad9e2be09454f171acd805015ae245",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -138,11 +138,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712765734,
|
"lastModified": 1713180885,
|
||||||
"narHash": "sha256-HakehmZVdhbXHNaTzoSwIHdvy1A3A7XXEIUHV2cC7d8=",
|
"narHash": "sha256-G9yAD8l8XJr3AyTADtM6j4T+tEMwn9z3ojy1lFOki5U=",
|
||||||
"owner": "girlbossceo",
|
"owner": "girlbossceo",
|
||||||
"repo": "conduwuit",
|
"repo": "conduwuit",
|
||||||
"rev": "7d92cad55f58ef55d5c95ecf3753e0fa75ab11e1",
|
"rev": "6d47c20efa5b15a53b98d73ea72a759adaea00d1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -357,11 +357,11 @@
|
|||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712983637,
|
"lastModified": 1713128310,
|
||||||
"narHash": "sha256-PSoOKfevRvoVZdMqijl9VcaB5OqgCoAgQ8UpsEAdEDQ=",
|
"narHash": "sha256-a5u73dLvcgKlI5OOlF6iKhLgliLiF3EsBxIBhdJExSo=",
|
||||||
"owner": "martinvonz",
|
"owner": "martinvonz",
|
||||||
"repo": "jj",
|
"repo": "jj",
|
||||||
"rev": "82c85ba7542b0a5c938f53d71f9a481fc37eda1d",
|
"rev": "0ef25bb4b6a95d5437963302f22f2e0428f6862c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -394,11 +394,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712992043,
|
"lastModified": 1713090581,
|
||||||
"narHash": "sha256-xUbqDxGiDab1et16JupBHpliGNpRSUcKfm++7t0UgBo=",
|
"narHash": "sha256-1TZonJRiYAJSlwTIXahd+7Hmf/F0uDx70dd6/fNKrVM=",
|
||||||
"owner": "YaLTeR",
|
"owner": "YaLTeR",
|
||||||
"repo": "niri",
|
"repo": "niri",
|
||||||
"rev": "71be19b234d58f4ec447e921633506beb81a52c0",
|
"rev": "568fbe26fe58be7de34e46ddb980a26d12e85ac6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -430,11 +430,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712969975,
|
"lastModified": 1713173715,
|
||||||
"narHash": "sha256-QckL3hBXRRwapLNbPdjy7+5WQNl2n2o7onmQRpyHwYs=",
|
"narHash": "sha256-l2pXDP1VMx/Jy4/G09Gh6xKSJ+vAXnUKlBtFRN6NEZs=",
|
||||||
"owner": "fufexan",
|
"owner": "fufexan",
|
||||||
"repo": "nix-gaming",
|
"repo": "nix-gaming",
|
||||||
"rev": "52f21f01ecbcc48d25c94a8a1e5c98cebf519a78",
|
"rev": "32843d6cbb0dc010e077930b3b34ff7fd318be41",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -468,11 +468,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712791164,
|
"lastModified": 1712963716,
|
||||||
"narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=",
|
"narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5",
|
"rev": "cfd6b5fc90b15709b780a5a1619695a88505a176",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -516,12 +516,29 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-stable_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1713145326,
|
||||||
|
"narHash": "sha256-m7+IWM6mkWOg22EC5kRUFCycXsXLSU7hWmHdmBfmC3s=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "53a2c32bc66f5ae41a28d7a9a49d321172af621e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-23.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
"chaotic": "chaotic",
|
"chaotic": "chaotic",
|
||||||
"nix-gaming": "nix-gaming",
|
"nix-gaming": "nix-gaming",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-analyzer-src": {
|
"rust-analyzer-src": {
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
url = "github:NixOS/nixpkgs/nixos-unstable";
|
url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
};
|
};
|
||||||
|
nixpkgs-stable = {
|
||||||
|
url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||||
|
};
|
||||||
chaotic = {
|
chaotic = {
|
||||||
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@ -19,15 +22,16 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ { self, nix-gaming, agenix, nixpkgs, chaotic, ... }:
|
outputs = inputs @ { self, nix-gaming, agenix, nixpkgs, nixpkgs-stable, chaotic, ... }:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
stable = import nixpkgs-stable { inherit system; config.allowUnfree = true; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
grimmauld-nixos = nixpkgs.lib.nixosSystem {
|
grimmauld-nixos = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit inputs system; };
|
specialArgs = { inherit inputs system stable; };
|
||||||
modules = [
|
modules = [
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
chaotic.nixosModules.default
|
chaotic.nixosModules.default
|
||||||
@ -37,7 +41,6 @@
|
|||||||
|
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./modules/users.nix
|
./modules/users.nix
|
||||||
# ./modules/tlp.nix
|
|
||||||
./modules/spotify-tui.nix
|
./modules/spotify-tui.nix
|
||||||
./modules/xserver.nix
|
./modules/xserver.nix
|
||||||
./modules/system-packages.nix
|
./modules/system-packages.nix
|
||||||
|
221
load_common.nix
221
load_common.nix
@ -1,229 +1,8 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
|
||||||
cfg = config.grimmShared;
|
|
||||||
sync_mod = types.submodule ({ config, ... }: {
|
|
||||||
options = {
|
|
||||||
remote = mkOption {
|
|
||||||
type = types.nonEmptyStr;
|
|
||||||
description = "path on the cloud server";
|
|
||||||
};
|
|
||||||
|
|
||||||
local = mkOption {
|
|
||||||
type = types.nonEmptyStr;
|
|
||||||
default = "$HOME/" + (lib.strings.concatStrings (builtins.match "/*(.+)" config.remote));
|
|
||||||
description = "local path to sync";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
screen = types.submodule {
|
|
||||||
options = {
|
|
||||||
fps = mkOption {
|
|
||||||
type = types.int;
|
|
||||||
default = 60;
|
|
||||||
description = "max framerate of screen";
|
|
||||||
};
|
|
||||||
|
|
||||||
mode = mkOption {
|
|
||||||
type = types.nonEmptyStr;
|
|
||||||
default = "1920x1080";
|
|
||||||
description = "pixel format of the screen";
|
|
||||||
};
|
|
||||||
|
|
||||||
id = mkOption {
|
|
||||||
type = types.nonEmptyStr;
|
|
||||||
description = "ID of the screen";
|
|
||||||
};
|
|
||||||
|
|
||||||
pos = mkOption {
|
|
||||||
type = types.nullOr types.nonEmptyStr;
|
|
||||||
default = null;
|
|
||||||
example = "0,0";
|
|
||||||
description = "position where to place the screen";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
sway_conf = types.submodule ({ config, ... }: rec {
|
|
||||||
options = {
|
|
||||||
keybinds = mkOption {
|
|
||||||
type = types.attrsOf types.str;
|
|
||||||
default = { };
|
|
||||||
description = "set of keybinds assigning key combo to action";
|
|
||||||
};
|
|
||||||
|
|
||||||
autolaunch = mkOption {
|
|
||||||
type = types.listOf types.str;
|
|
||||||
default = [ ];
|
|
||||||
description = "set of commands to be run at sway startup";
|
|
||||||
};
|
|
||||||
|
|
||||||
extraConfig = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "";
|
|
||||||
description = "additional sway config to be included";
|
|
||||||
};
|
|
||||||
|
|
||||||
definitions = mkOption {
|
|
||||||
type = types.attrsOf types.str;
|
|
||||||
default = { };
|
|
||||||
description = "set of definitions assigning variable to value";
|
|
||||||
};
|
|
||||||
|
|
||||||
modes = mkOption {
|
|
||||||
type = types.attrsOf sway_conf;
|
|
||||||
default = { };
|
|
||||||
description = "possible modes to switch to, e.g. resize";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
});
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options.grimmShared = {
|
options.grimmShared = {
|
||||||
enable = mkEnableOption "grimm-shared-common";
|
enable = mkEnableOption "grimm-shared-common";
|
||||||
|
|
||||||
locale = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Sets german units but english language";
|
|
||||||
};
|
|
||||||
|
|
||||||
printing = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Enables print and scan related options";
|
|
||||||
};
|
|
||||||
|
|
||||||
portals = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Enables portals for wlr, gtk and kde as well as fixes fonts";
|
|
||||||
};
|
|
||||||
|
|
||||||
network = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Enables network manager, wifi and bluetooth";
|
|
||||||
};
|
|
||||||
|
|
||||||
tooling = {
|
|
||||||
enable = mkEnableOption "grimm-tooling";
|
|
||||||
|
|
||||||
pass = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Enables password-store, gnupg and such secret handling";
|
|
||||||
};
|
|
||||||
|
|
||||||
git_user = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "Grimmauld";
|
|
||||||
description = "Username for git to use";
|
|
||||||
};
|
|
||||||
|
|
||||||
git_email = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "${config.grimmShared.tooling.git_user}@grimmauld.de";
|
|
||||||
description = "Email for git to use";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
sound = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "whether to enable sound";
|
|
||||||
};
|
|
||||||
|
|
||||||
graphical = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "whether to enable graphical components";
|
|
||||||
};
|
|
||||||
|
|
||||||
gaming = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "enables steam, heroic, prism and gamemoded";
|
|
||||||
};
|
|
||||||
|
|
||||||
firefox = {
|
|
||||||
enable = mkEnableOption "grimm-firefox";
|
|
||||||
|
|
||||||
plugins = mkOption {
|
|
||||||
type = types.attrsOf types.str;
|
|
||||||
default = { };
|
|
||||||
description = "set of plugins to install. Format: guid = short-id";
|
|
||||||
};
|
|
||||||
|
|
||||||
disableUserPlugins = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "disables user controlled plugins";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
screens = mkOption {
|
|
||||||
type = types.attrsOf screen;
|
|
||||||
default = { };
|
|
||||||
description = "Screens to initialize";
|
|
||||||
};
|
|
||||||
|
|
||||||
sway = {
|
|
||||||
enable = mkEnableOption "grimm-sway";
|
|
||||||
|
|
||||||
bar = {
|
|
||||||
enable = mkEnableOption "grimm-sway-bar";
|
|
||||||
|
|
||||||
style = mkOption {
|
|
||||||
type = types.nullOr types.path;
|
|
||||||
default = null;
|
|
||||||
description = "waybar style sheet to use";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkOption {
|
|
||||||
type = types.nullOr types.path;
|
|
||||||
default = null;
|
|
||||||
description = "waybar config to use";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkOption {
|
|
||||||
type = sway_conf;
|
|
||||||
description = "sway config to use";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
cloudSync = {
|
|
||||||
enable = mkEnableOption "cloud_sync";
|
|
||||||
|
|
||||||
username = mkOption {
|
|
||||||
type = types.nonEmptyStr;
|
|
||||||
description = "username to use for cloud login";
|
|
||||||
};
|
|
||||||
|
|
||||||
server = mkOption {
|
|
||||||
type = types.nonEmptyStr;
|
|
||||||
description = "server url to use for cloud sync";
|
|
||||||
};
|
|
||||||
|
|
||||||
passwordFile = mkOption {
|
|
||||||
type = types.nonEmptyStr;
|
|
||||||
description = "password file to use for login";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
options.users.users = mkOption {
|
|
||||||
type = types.attrsOf (types.submodule {
|
|
||||||
options = {
|
|
||||||
syncPaths = mkOption {
|
|
||||||
type = types.listOf sync_mod;
|
|
||||||
default = [ ];
|
|
||||||
description = "paths to sync via nextcloud";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, config, pkgs, ... }: {
|
{ lib, config, pkgs, stable, ... }: {
|
||||||
users.users.grimmauld = {
|
users.users.grimmauld = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.xonsh;
|
shell = pkgs.xonsh;
|
||||||
@ -28,7 +28,7 @@
|
|||||||
freecad
|
freecad
|
||||||
openscad
|
openscad
|
||||||
vlc
|
vlc
|
||||||
jetbrains.clion
|
stable.jetbrains.clion
|
||||||
jetbrains.idea-community
|
jetbrains.idea-community
|
||||||
jetbrains.pycharm-community
|
jetbrains.pycharm-community
|
||||||
blender
|
blender
|
||||||
|
@ -3,12 +3,14 @@
|
|||||||
# lightdm.enable = true;
|
# lightdm.enable = true;
|
||||||
sddm = {
|
sddm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
theme = "catppuccin-sddm-corners";
|
||||||
wayland.enable = true;
|
wayland.enable = true;
|
||||||
|
wayland.compositor = "weston";
|
||||||
};
|
};
|
||||||
defaultSession = "sway";
|
defaultSession = "sway";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.desktopManager = {
|
services.desktopManager = {
|
||||||
plasma6.enable = true;
|
# plasma6.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
wl-clipboard
|
wl-clipboard
|
||||||
swaymux
|
swaymux
|
||||||
dunst
|
dunst
|
||||||
|
qt6ct
|
||||||
];
|
];
|
||||||
|
|
||||||
grimmShared.sway = {
|
grimmShared.sway = {
|
||||||
@ -138,12 +139,13 @@
|
|||||||
XF86MonBrightnessUp = "exec ${getExe pkgs.brightnessctl} s 10+%";
|
XF86MonBrightnessUp = "exec ${getExe pkgs.brightnessctl} s 10+%";
|
||||||
XF86MonBrightnessDown = "exec ${getExe pkgs.brightnessctl} s 10-%";
|
XF86MonBrightnessDown = "exec ${getExe pkgs.brightnessctl} s 10-%";
|
||||||
};
|
};
|
||||||
autolaunch = [
|
autolaunch = with pkgs; [
|
||||||
# fixme: absolute paths
|
# fixme: absolute paths
|
||||||
"blueman-applet"
|
"blueman-applet"
|
||||||
"lxqt-policykit-agent"
|
"lxqt-policykit-agent"
|
||||||
"otd-daemon"
|
"otd-daemon"
|
||||||
(getExe pkgs.dunst)
|
dunst
|
||||||
|
"rm -r $HOME/.cache/rmenu" # invalidate rmenu cache on sway restart
|
||||||
"systemctl --user import-environment XDG_SESSION_TYPE XDG_CURRENT_DESKTOP"
|
"systemctl --user import-environment XDG_SESSION_TYPE XDG_CURRENT_DESKTOP"
|
||||||
];
|
];
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user