mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 03:27:45 +00:00
Refactor everything to make usage easier with
mutiple systems, also merge all abstractions to avoid huge desctructions in the attrset input.
This commit is contained in:
parent
a0fa73b873
commit
ee2055928c
47 changed files with 343 additions and 279 deletions
60
.gitignore
vendored
60
.gitignore
vendored
|
@ -2,32 +2,40 @@
|
||||||
|
|
||||||
!derivations/
|
!derivations/
|
||||||
|
|
||||||
!machines/
|
!hosts/
|
||||||
!machines/enka/
|
|
||||||
!machines/enka/bat/
|
!modules/
|
||||||
!machines/enka/blueman/
|
!modules/bat/
|
||||||
!machines/enka/discord/
|
!modules/blueman/
|
||||||
!machines/enka/dunst/
|
!modules/boot/
|
||||||
!machines/enka/firefox/
|
!modules/discord/
|
||||||
!machines/enka/fuzzel/
|
!modules/dunst/
|
||||||
!machines/enka/ghostty/
|
!modules/firefox/
|
||||||
!machines/enka/git/
|
!modules/fonts/
|
||||||
!machines/enka/greetd/
|
!modules/fuzzel/
|
||||||
!machines/enka/gtk/
|
!modules/ghostty/
|
||||||
!machines/enka/helix/
|
!modules/git/
|
||||||
!machines/enka/hyprland/
|
!modules/greetd/
|
||||||
!machines/enka/kitty/
|
!modules/gtk/
|
||||||
!machines/enka/logind/
|
!modules/helix/
|
||||||
!machines/enka/networkmanager/
|
!modules/hyprland/
|
||||||
!machines/enka/nushell/
|
!modules/kitty/
|
||||||
!machines/enka/openttd/
|
!modules/localisation/
|
||||||
!machines/enka/pipewire/
|
!modules/logind/
|
||||||
!machines/enka/pueue/
|
!modules/networkmanager/
|
||||||
!machines/enka/python/
|
!modules/nix/
|
||||||
!machines/enka/qt/
|
!modules/nushell/
|
||||||
!machines/enka/steam/
|
!modules/openttd/
|
||||||
!machines/enka/steck/
|
!modules/pipewire/
|
||||||
!machines/enka/waybar/
|
!modules/pueue/
|
||||||
|
!modules/python/
|
||||||
|
!modules/qt/
|
||||||
|
!modules/rust/
|
||||||
|
!modules/steam/
|
||||||
|
!modules/steck/
|
||||||
|
!modules/waybar/
|
||||||
|
|
||||||
|
!lib/
|
||||||
|
|
||||||
!.gitignore
|
!.gitignore
|
||||||
!flake.lock
|
!flake.lock
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, pkgs, systemPackages, homePackages, ... }: lib.recursiveUpdate
|
{ ulib, pkgs, ... }: with ulib; merge
|
||||||
|
|
||||||
(with pkgs; systemPackages [
|
(systemPackages (with pkgs; [
|
||||||
asciinema
|
asciinema
|
||||||
fastfetch
|
fastfetch
|
||||||
fd
|
fd
|
||||||
|
@ -28,19 +28,17 @@
|
||||||
maven
|
maven
|
||||||
vlang
|
vlang
|
||||||
zig
|
zig
|
||||||
|
]))
|
||||||
|
|
||||||
(fenix.complete.withComponents [
|
<<<<<<< Updated upstream:enka/packages.nix
|
||||||
"cargo"
|
|
||||||
"clippy"
|
|
||||||
"rust-src"
|
|
||||||
"rustc"
|
|
||||||
"rustfmt"
|
|
||||||
])
|
|
||||||
])
|
])
|
||||||
|
|
||||||
(with pkgs; homePackages "nixos" [
|
(with pkgs; graphicalPackages [
|
||||||
jetbrains.idea-ultimate
|
jetbrains.idea-ultimate
|
||||||
|
|
||||||
|
=======
|
||||||
|
(graphicalPackages (with pkgs; [
|
||||||
|
>>>>>>> Stashed changes:modules/packages/default.nix
|
||||||
qbittorrent
|
qbittorrent
|
||||||
thunderbird
|
thunderbird
|
||||||
whatsapp-for-linux
|
whatsapp-for-linux
|
||||||
|
@ -52,4 +50,4 @@
|
||||||
libreoffice
|
libreoffice
|
||||||
hunspellDicts.en_US
|
hunspellDicts.en_US
|
||||||
hunspellDicts.en_GB-ize
|
hunspellDicts.en_GB-ize
|
||||||
])
|
]))
|
159
flake.nix
159
flake.nix
|
@ -18,14 +18,14 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs = {
|
|
||||||
url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
||||||
};
|
|
||||||
|
|
||||||
nixSuper = {
|
nixSuper = {
|
||||||
url = "github:privatevoid-net/nix-super";
|
url = "github:privatevoid-net/nix-super";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixpkgs = {
|
||||||
|
url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
homeManager = {
|
homeManager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -72,8 +72,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ {
|
outputs = {
|
||||||
self,
|
|
||||||
nixSuper,
|
nixSuper,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
homeManager,
|
homeManager,
|
||||||
|
@ -83,131 +82,63 @@
|
||||||
tools,
|
tools,
|
||||||
themes,
|
themes,
|
||||||
...
|
...
|
||||||
}: tools.eachDefaultLinuxArch (system: let
|
} @ inputs: let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
|
|
||||||
upkgs = tools.recursiveUpdateMap (name: {
|
|
||||||
${name} = inputs.${name}.packages.${system}.default;
|
|
||||||
}) [ "nixSuper" "hyprland" "hyprpicker" "ghostty" "zls" ];
|
|
||||||
|
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
|
|
||||||
ulib = {
|
ulib = import ./lib lib;
|
||||||
inherit (tools) recursiveUpdateMap;
|
|
||||||
inherit nuScripts;
|
|
||||||
|
|
||||||
recursiveUpdate3 = x: y: z: lib.recursiveUpdate x (lib.recursiveUpdate y z);
|
configuration = host: system: let
|
||||||
};
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
|
||||||
theme = themes.custom (themes.raw.gruvbox-dark-hard // {
|
upkgs = { inherit nuScripts; } // (lib.genAttrs
|
||||||
corner-radius = 0;
|
[ "nixSuper" "hyprland" "hyprpicker" "ghostty" "zls" ]
|
||||||
border-width = 1;
|
(name: inputs.${name}.packages.${system}.default));
|
||||||
|
|
||||||
margin = 0;
|
theme = themes.custom (themes.raw.gruvbox-dark-hard // {
|
||||||
padding = 8;
|
corner-radius = 0;
|
||||||
|
border-width = 1;
|
||||||
|
|
||||||
font.size.normal = 12;
|
margin = 0;
|
||||||
font.size.big = 18;
|
padding = 8;
|
||||||
|
|
||||||
font.sans.name = "Lexend";
|
font.size.normal = 12;
|
||||||
font.sans.package = pkgs.lexend;
|
font.size.big = 18;
|
||||||
|
|
||||||
font.mono.name = "RobotoMono Nerd Font";
|
font.sans.name = "Lexend";
|
||||||
font.mono.package = (pkgs.nerdfonts.override { fonts = [ "RobotoMono" ]; });
|
font.sans.package = pkgs.lexend;
|
||||||
|
|
||||||
icons.name = "Gruvbox-Plus-Dark";
|
font.mono.name = "RobotoMono Nerd Font";
|
||||||
icons.package = pkgs.callPackage (import ./derivations/gruvbox-icons.nix) {};
|
font.mono.package = (pkgs.nerdfonts.override { fonts = [ "RobotoMono" ]; });
|
||||||
});
|
|
||||||
|
|
||||||
abstractions = rec {
|
icons.name = "Gruvbox-Plus-Dark";
|
||||||
imports = paths: lib.genAttrs [ "imports" ] (_: paths);
|
icons.package = pkgs.callPackage (import ./derivations/gruvbox-icons.nix) {};
|
||||||
|
});
|
||||||
|
|
||||||
enabled = attributes: attributes // { enable = true; };
|
defaultConfiguration = {
|
||||||
|
environment.defaultPackages = [];
|
||||||
|
|
||||||
normalUser = attributes: attributes // { isNormalUser = true; };
|
home-manager.sharedModules = [ ghosttyModule.homeModules.default ];
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
|
||||||
systemConfiguration = attributes: attributes;
|
networking.hostName = host;
|
||||||
|
nixpkgs.hostPlatform = system;
|
||||||
systemPackages = packages: systemConfiguration {
|
|
||||||
environment.systemPackages = packages;
|
|
||||||
};
|
};
|
||||||
|
in lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
|
||||||
systemFonts = fonts: systemConfiguration {
|
specialArgs = { inherit inputs ulib upkgs theme; };
|
||||||
fonts.packages = fonts;
|
modules = [
|
||||||
};
|
homeManager.nixosModules.default
|
||||||
|
defaultConfiguration
|
||||||
homeConfiguration = user: attributes: systemConfiguration {
|
./hosts/${host}.nix
|
||||||
home-manager.users = tools.recursiveUpdateMap (user: {
|
|
||||||
${user} = attributes;
|
|
||||||
}) (if builtins.isList user then user else [ user ]);
|
|
||||||
};
|
|
||||||
|
|
||||||
homePackages = user: packages: homeConfiguration user {
|
|
||||||
home.packages = packages;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
defaultConfiguration = host: with abstractions; systemConfiguration {
|
|
||||||
boot.tmp.cleanOnBoot = true;
|
|
||||||
|
|
||||||
environment.defaultPackages = [];
|
|
||||||
|
|
||||||
home-manager.sharedModules = [ ghosttyModule.homeModules.default ];
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
|
|
||||||
networking.hostName = host;
|
|
||||||
|
|
||||||
nix.gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "daily";
|
|
||||||
options = "--delete-older-than 3d";
|
|
||||||
persistent = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
|
|
||||||
|
|
||||||
nix.optimise.automatic = true;
|
|
||||||
|
|
||||||
nix.package = upkgs.nixSuper;
|
|
||||||
|
|
||||||
nix.registry = {
|
|
||||||
nixpkgs.flake = nixpkgs;
|
|
||||||
default.flake = nixpkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.settings.experimental-features = [
|
|
||||||
"fetch-tree"
|
|
||||||
"flakes"
|
|
||||||
"nix-command"
|
|
||||||
"repl-flake"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings.trusted-users = [ "root" "@wheel" ];
|
|
||||||
nix.settings.warn-dirty = false;
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
nixpkgs.overlays = [ fenix.overlays.default ];
|
|
||||||
|
|
||||||
programs.nix-ld = enabled {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
specialArgs = abstractions // {
|
configurations = builtins.mapAttrs configuration;
|
||||||
inherit upkgs ulib theme;
|
in {
|
||||||
|
nixosConfigurations = configurations {
|
||||||
|
enka = "x86_64-linux";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
importConfigurations = tools.recursiveUpdateMap (host: {
|
|
||||||
nixosConfigurations.${host} = lib.nixosSystem {
|
|
||||||
inherit specialArgs;
|
|
||||||
|
|
||||||
modules = [
|
|
||||||
homeManager.nixosModules.default
|
|
||||||
(defaultConfiguration host)
|
|
||||||
./machines/${host}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
});
|
|
||||||
in importConfigurations [
|
|
||||||
"enka"
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
51
hosts/enka.nix
Normal file
51
hosts/enka.nix
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
{ ulib, ... }: with ulib; merge3
|
||||||
|
|
||||||
|
(systemConfiguration {
|
||||||
|
system.stateVersion = "23.05";
|
||||||
|
|
||||||
|
users.users.nixos = graphicalUser {
|
||||||
|
description = "NixOS";
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
|
(homeConfiguration {
|
||||||
|
home.stateVersion = "23.05";
|
||||||
|
})
|
||||||
|
|
||||||
|
(importModules [
|
||||||
|
"bat"
|
||||||
|
"blueman"
|
||||||
|
"boot"
|
||||||
|
"discord"
|
||||||
|
"dunst"
|
||||||
|
"firefox"
|
||||||
|
"fonts"
|
||||||
|
"fuzzel"
|
||||||
|
"ghostty"
|
||||||
|
"git"
|
||||||
|
"greetd"
|
||||||
|
"gtk"
|
||||||
|
"helix"
|
||||||
|
"hyprland"
|
||||||
|
"kitty"
|
||||||
|
"localisation"
|
||||||
|
"logind"
|
||||||
|
"networkmanager"
|
||||||
|
"nix"
|
||||||
|
"nushell"
|
||||||
|
"openttd"
|
||||||
|
"pipewire"
|
||||||
|
"pueue"
|
||||||
|
"python"
|
||||||
|
"qt"
|
||||||
|
"rust"
|
||||||
|
"steam"
|
||||||
|
"steck"
|
||||||
|
"waybar"
|
||||||
|
|
||||||
|
# TODO: Move this somewhere, IDK.
|
||||||
|
../enka/packages.nix
|
||||||
|
|
||||||
|
/etc/nixos/hardware-configuration.nix
|
||||||
|
])
|
29
lib/configuration.nix
Normal file
29
lib/configuration.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
rec {
|
||||||
|
systemConfiguration = configuration: configuration;
|
||||||
|
|
||||||
|
systemPackages = packages: systemConfiguration {
|
||||||
|
environment.systemPackages = packages;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemFonts = packages: systemConfiguration {
|
||||||
|
fonts.packages = packages;
|
||||||
|
};
|
||||||
|
|
||||||
|
userHomeConfiguration = users: configuration: {
|
||||||
|
home-manager.users = builtins.foldl' (final: user: final // {
|
||||||
|
${user} = configuration;
|
||||||
|
}) {} (if builtins.isList users then users else [ users ]);
|
||||||
|
};
|
||||||
|
|
||||||
|
# FIXME: Don't hardcode these.
|
||||||
|
graphicalConfiguration = userHomeConfiguration "nixos";
|
||||||
|
graphicalPackages = packages: graphicalConfiguration {
|
||||||
|
home.packages = packages;
|
||||||
|
};
|
||||||
|
|
||||||
|
# FIXME: Don't hardcode these.
|
||||||
|
homeConfiguration = userHomeConfiguration [ "nixos" "root" ];
|
||||||
|
homePackages = packages: homeConfiguration {
|
||||||
|
home.packages = packages;
|
||||||
|
};
|
||||||
|
}
|
9
lib/default.nix
Normal file
9
lib/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
lib:
|
||||||
|
|
||||||
|
(import ./configuration.nix)
|
||||||
|
//
|
||||||
|
(import ./merge.nix lib)
|
||||||
|
//
|
||||||
|
(import ./modules.nix)
|
||||||
|
//
|
||||||
|
(import ./values.nix)
|
8
lib/merge.nix
Normal file
8
lib/merge.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
lib:
|
||||||
|
|
||||||
|
rec {
|
||||||
|
merge = lib.recursiveUpdate;
|
||||||
|
merge3 = x: y: merge (merge x y);
|
||||||
|
merge4 = x: y: merge3 (merge x y);
|
||||||
|
merge5 = x: y: merge4 (merge x y);
|
||||||
|
}
|
8
lib/modules.nix
Normal file
8
lib/modules.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
importModules = modules: {
|
||||||
|
imports = builtins.map (module: if builtins.isPath module then
|
||||||
|
module
|
||||||
|
else
|
||||||
|
../modules/${module}) modules;
|
||||||
|
};
|
||||||
|
}
|
14
lib/values.nix
Normal file
14
lib/values.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
enabled = attributes: attributes // {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
normalUser = attributes: attributes // {
|
||||||
|
isNormalUser = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
graphicalUser = attributes: attributes // {
|
||||||
|
extraGroups = [ "graphical" ] ++ (attributes.extraGroups or []);
|
||||||
|
isNormalUser = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,49 +0,0 @@
|
||||||
{ pkgs, ulib, systemConfiguration, homeConfiguration, imports, ... }: ulib.recursiveUpdate3
|
|
||||||
|
|
||||||
(systemConfiguration {
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
boot.loader = {
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
systemd-boot.enable = true;
|
|
||||||
systemd-boot.editor = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
|
||||||
})
|
|
||||||
|
|
||||||
(homeConfiguration [ "nixos" "root" ] {
|
|
||||||
home.stateVersion = "23.05";
|
|
||||||
})
|
|
||||||
|
|
||||||
(imports [
|
|
||||||
./bat
|
|
||||||
./blueman
|
|
||||||
./discord
|
|
||||||
./dunst
|
|
||||||
./firefox
|
|
||||||
./fuzzel
|
|
||||||
./ghostty
|
|
||||||
./git
|
|
||||||
./greetd
|
|
||||||
./gtk
|
|
||||||
./helix
|
|
||||||
./hyprland
|
|
||||||
./kitty
|
|
||||||
./logind
|
|
||||||
./networkmanager
|
|
||||||
./nushell
|
|
||||||
./openttd
|
|
||||||
./pipewire
|
|
||||||
./pueue
|
|
||||||
./python
|
|
||||||
./steam
|
|
||||||
./steck
|
|
||||||
./waybar
|
|
||||||
|
|
||||||
./fonts.nix
|
|
||||||
./localisation.nix
|
|
||||||
./packages.nix
|
|
||||||
./users.nix
|
|
||||||
|
|
||||||
/etc/nixos/hardware-configuration.nix
|
|
||||||
])
|
|
|
@ -1,5 +0,0 @@
|
||||||
{ pkgs, homePackages, ... }:
|
|
||||||
|
|
||||||
with pkgs; homePackages "nixos" [
|
|
||||||
openttd
|
|
||||||
]
|
|
|
@ -1,9 +0,0 @@
|
||||||
{ lib, pkgs, systemPackages, homeConfiguration, ... }: lib.recursiveUpdate
|
|
||||||
|
|
||||||
(with pkgs; systemPackages [
|
|
||||||
steck
|
|
||||||
])
|
|
||||||
|
|
||||||
(homeConfiguration [ "nixos" "root" ] {
|
|
||||||
programs.nushell.shellAliases.share = "steck paste";
|
|
||||||
})
|
|
|
@ -1,8 +0,0 @@
|
||||||
{ systemConfiguration, normalUser, ... }:
|
|
||||||
|
|
||||||
systemConfiguration {
|
|
||||||
users.users.nixos = normalUser {
|
|
||||||
description = "NixOS";
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ theme, homeConfiguration, enabled, ... }:
|
{ ulib, theme, ... }: with ulib;
|
||||||
|
|
||||||
homeConfiguration [ "nixos" "root" ] {
|
homeConfiguration {
|
||||||
programs.nushell.environmentVariables = {
|
programs.nushell.environmentVariables = {
|
||||||
MANPAGER = ''"bat --plain --language man"'';
|
MANPAGER = ''"bat --plain --language man"'';
|
||||||
PAGER = ''"bat --plain"'';
|
PAGER = ''"bat --plain"'';
|
||||||
|
@ -12,7 +12,7 @@ homeConfiguration [ "nixos" "root" ] {
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.bat = enabled {
|
programs.bat = enabled {
|
||||||
config.theme = "default";
|
config.theme = "base16";
|
||||||
themes.default = theme.tmTheme;
|
themes.base16 = theme.tmTheme;
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
{ systemConfiguration, enabled, ... }:
|
{ ulib, ... }: with ulib;
|
||||||
|
|
||||||
systemConfiguration {
|
systemConfiguration {
|
||||||
services.blueman = enabled {};
|
services.blueman = enabled {};
|
13
modules/boot/default.nix
Normal file
13
modules/boot/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ ulib, pkgs, ... }: with ulib;
|
||||||
|
|
||||||
|
systemConfiguration {
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
boot.loader = {
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
systemd-boot.editor = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.tmp.cleanOnBoot = true;
|
||||||
|
}
|
|
@ -1,12 +1,12 @@
|
||||||
{ lib, pkgs, theme, homeConfiguration, homePackages, ... }: lib.recursiveUpdate
|
{ ulib, pkgs, theme, ... }: with ulib; merge
|
||||||
|
|
||||||
(homeConfiguration "nixos" {
|
(graphicalConfiguration {
|
||||||
xdg.configFile."Vencord/settings/quickCss.css".text = theme.discordCss;
|
xdg.configFile."Vencord/settings/quickCss.css".text = theme.discordCss;
|
||||||
})
|
})
|
||||||
|
|
||||||
(with pkgs; homePackages "nixos" [
|
(graphicalPackages (with pkgs; [
|
||||||
(discord.override {
|
(discord.override {
|
||||||
withOpenASAR = true;
|
withOpenASAR = true;
|
||||||
withVencord = true;
|
withVencord = true;
|
||||||
})
|
})
|
||||||
])
|
]))
|
|
@ -1,6 +1,6 @@
|
||||||
{ theme, homeConfiguration, enabled, ... }:
|
{ ulib, theme, ... }: with ulib;
|
||||||
|
|
||||||
homeConfiguration "nixos" {
|
graphicalConfiguration {
|
||||||
services.dunst = with theme.withHashtag; enabled {
|
services.dunst = with theme.withHashtag; enabled {
|
||||||
iconTheme = icons;
|
iconTheme = icons;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ homeConfiguration, enabled, ... }:
|
{ ulib, ... }: with ulib;
|
||||||
|
|
||||||
homeConfiguration "nixos" {
|
graphicalConfiguration {
|
||||||
programs.firefox = enabled {};
|
programs.firefox = enabled {};
|
||||||
|
|
||||||
programs.librewolf = enabled {};
|
programs.librewolf = enabled {};
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, pkgs, theme, systemConfiguration, systemFonts, ... }: lib.recursiveUpdate
|
{ ulib, pkgs, theme, ... }: with ulib; merge
|
||||||
|
|
||||||
(systemConfiguration {
|
(systemConfiguration {
|
||||||
console = {
|
console = {
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
(with pkgs; systemFonts [
|
(systemFonts (with pkgs; [
|
||||||
theme.font.sans.package
|
theme.font.sans.package
|
||||||
theme.font.mono.package
|
theme.font.mono.package
|
||||||
|
|
||||||
|
@ -18,4 +18,4 @@
|
||||||
noto-fonts-cjk-sans
|
noto-fonts-cjk-sans
|
||||||
noto-fonts-lgc-plus
|
noto-fonts-lgc-plus
|
||||||
noto-fonts-emoji
|
noto-fonts-emoji
|
||||||
])
|
]))
|
|
@ -1,6 +1,6 @@
|
||||||
{ theme, homeConfiguration, enabled, ... }:
|
{ ulib, theme, ... }: with ulib;
|
||||||
|
|
||||||
homeConfiguration "nixos" {
|
graphicalConfiguration {
|
||||||
programs.fuzzel = with theme; enabled {
|
programs.fuzzel = with theme; enabled {
|
||||||
settings.main = {
|
settings.main = {
|
||||||
dpi-aware = false;
|
dpi-aware = false;
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, upkgs, theme, homeConfiguration, enabled, ... }:
|
{ ulib, pkgs, upkgs, theme, ... }: with ulib;
|
||||||
|
|
||||||
homeConfiguration "nixos" {
|
graphicalConfiguration {
|
||||||
programs.nushell.environmentVariables.TERMINAL = "ghostty";
|
programs.nushell.environmentVariables.TERMINAL = "ghostty";
|
||||||
|
|
||||||
programs.ghostty = enabled {
|
programs.ghostty = enabled {
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, homeConfiguration, enabled, ... }:
|
{ ulib, pkgs, ... }: with ulib;
|
||||||
|
|
||||||
homeConfiguration [ "nixos" "root" ] {
|
homeConfiguration {
|
||||||
programs.nushell.shellAliases = {
|
programs.nushell.shellAliases = {
|
||||||
g = "git";
|
g = "git";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, systemConfiguration, enabled, ... }:
|
{ ulib, pkgs, ... }: with ulib;
|
||||||
|
|
||||||
systemConfiguration {
|
systemConfiguration {
|
||||||
services.greetd = enabled {
|
services.greetd = enabled {
|
|
@ -1,10 +1,10 @@
|
||||||
{ lib, pkgs, theme, systemConfiguration, homeConfiguration, enabled, ... }: lib.recursiveUpdate
|
{ ulib, pkgs, theme, ... }: with ulib; merge
|
||||||
|
|
||||||
(systemConfiguration {
|
(systemConfiguration {
|
||||||
programs.dconf = enabled {};
|
programs.dconf = enabled {};
|
||||||
})
|
})
|
||||||
|
|
||||||
(homeConfiguration "nixos" {
|
(graphicalConfiguration {
|
||||||
gtk = enabled {
|
gtk = enabled {
|
||||||
gtk3.extraCss = theme.adwaitaGtkCss;
|
gtk3.extraCss = theme.adwaitaGtkCss;
|
||||||
gtk4.extraCss = theme.adwaitaGtkCss;
|
gtk4.extraCss = theme.adwaitaGtkCss;
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, pkgs, upkgs, homeConfiguration, homePackages, enabled, ... }: lib.recursiveUpdate
|
{ ulib, lib, pkgs, upkgs, ... }: with ulib; merge
|
||||||
|
|
||||||
(homeConfiguration [ "nixos" "root" ] {
|
(homeConfiguration {
|
||||||
programs.nushell.environmentVariables.EDITOR = "hx";
|
programs.nushell.environmentVariables.EDITOR = "hx";
|
||||||
programs.nushell.shellAliases.x = "hx";
|
programs.nushell.shellAliases.x = "hx";
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
(with pkgs; homePackages "nixos" [
|
(homePackages (with pkgs; [
|
||||||
# CMAKE
|
# CMAKE
|
||||||
cmake-language-server
|
cmake-language-server
|
||||||
|
|
||||||
|
@ -76,4 +76,4 @@
|
||||||
|
|
||||||
# ZIG
|
# ZIG
|
||||||
upkgs.zls
|
upkgs.zls
|
||||||
])
|
]))
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, upkgs, ulib, theme, systemConfiguration, homeConfiguration, homePackages, enabled, ... }: ulib.recursiveUpdate3
|
{ ulib, pkgs, upkgs, theme, ... }: with ulib; merge3
|
||||||
|
|
||||||
(systemConfiguration {
|
(systemConfiguration {
|
||||||
hardware.opengl = enabled {};
|
hardware.opengl = enabled {};
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
(homeConfiguration "nixos" {
|
(graphicalConfiguration {
|
||||||
wayland.windowManager.hyprland = with theme; enabled {
|
wayland.windowManager.hyprland = with theme; enabled {
|
||||||
package = upkgs.hyprland;
|
package = upkgs.hyprland;
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
(with pkgs; homePackages "nixos" [
|
(homePackages (with pkgs; [
|
||||||
brightnessctl
|
brightnessctl
|
||||||
cliphist
|
cliphist
|
||||||
grim
|
grim
|
||||||
|
@ -224,4 +224,4 @@
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
xdg-utils
|
xdg-utils
|
||||||
xwaylandvideobridge
|
xwaylandvideobridge
|
||||||
])
|
]))
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
@ -1,6 +1,6 @@
|
||||||
{ theme, homeConfiguration, enabled, ... }:
|
{ ulib, theme, ... }: with ulib;
|
||||||
|
|
||||||
homeConfiguration "nixos" {
|
graphicalConfiguration {
|
||||||
programs.kitty = with theme.withHashtag; enabled {
|
programs.kitty = with theme.withHashtag; enabled {
|
||||||
font = with font; {
|
font = with font; {
|
||||||
inherit (mono) name package;
|
inherit (mono) name package;
|
|
@ -1,4 +1,4 @@
|
||||||
{ systemConfiguration, ... }:
|
{ ulib, ... }: with ulib;
|
||||||
|
|
||||||
systemConfiguration {
|
systemConfiguration {
|
||||||
console.keyMap = "trq";
|
console.keyMap = "trq";
|
|
@ -1,4 +1,4 @@
|
||||||
{ systemConfiguration, ... }:
|
{ ulib, ... }: with ulib;
|
||||||
|
|
||||||
systemConfiguration {
|
systemConfiguration {
|
||||||
services.logind.powerKey = "ignore";
|
services.logind.powerKey = "ignore";
|
|
@ -1,4 +1,4 @@
|
||||||
{ systemConfiguration, enabled, ... }:
|
{ ulib, ... }: with ulib;
|
||||||
|
|
||||||
systemConfiguration {
|
systemConfiguration {
|
||||||
networking.networkmanager = enabled {};
|
networking.networkmanager = enabled {};
|
35
modules/nix/default.nix
Normal file
35
modules/nix/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{ inputs, ulib, upkgs, ... }: with ulib;
|
||||||
|
|
||||||
|
systemConfiguration {
|
||||||
|
nix = {
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "daily";
|
||||||
|
options = "--delete-older-than 3d";
|
||||||
|
persistent = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||||
|
|
||||||
|
optimise.automatic = true;
|
||||||
|
|
||||||
|
package = upkgs.nixSuper;
|
||||||
|
|
||||||
|
registry = {
|
||||||
|
nixpkgs.flake = inputs.nixpkgs;
|
||||||
|
default.flake = inputs.nixpkgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
settings.experimental-features = [
|
||||||
|
"fetch-tree"
|
||||||
|
"flakes"
|
||||||
|
"nix-command"
|
||||||
|
"repl-flake"
|
||||||
|
];
|
||||||
|
|
||||||
|
settings.trusted-users = [ "root" "@wheel" ];
|
||||||
|
settings.warn-dirty = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.nix-ld = enabled {};
|
||||||
|
}
|
|
@ -1,16 +1,16 @@
|
||||||
{ config, pkgs, ulib, theme, systemConfiguration, homeConfiguration, homePackages, enabled, ... }: ulib.recursiveUpdate3
|
{ config, ulib, pkgs, upkgs, theme, ... }: with ulib; merge3
|
||||||
|
|
||||||
(systemConfiguration {
|
(systemConfiguration {
|
||||||
users.defaultUserShell = pkgs.nushell;
|
users.defaultUserShell = pkgs.nushell;
|
||||||
})
|
})
|
||||||
|
|
||||||
(homeConfiguration [ "nixos" "root" ] {
|
(homeConfiguration {
|
||||||
programs.starship = enabled {};
|
programs.starship = enabled {};
|
||||||
|
|
||||||
programs.nushell = enabled {
|
programs.nushell = enabled {
|
||||||
configFile.text = import ./configuration.nix.nu;
|
configFile.text = import ./configuration.nix.nu;
|
||||||
envFile.text = import ./environment.nix.nu {
|
envFile.text = import ./environment.nix.nu {
|
||||||
inherit (ulib) nuScripts;
|
inherit (upkgs) nuScripts;
|
||||||
inherit theme;
|
inherit theme;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -32,6 +32,6 @@
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
(with pkgs; homePackages "nixos" [
|
(homePackages (with pkgs; [
|
||||||
carapace
|
carapace
|
||||||
])
|
]))
|
5
modules/openttd/default.nix
Normal file
5
modules/openttd/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ ulib, pkgs, ... }: with ulib;
|
||||||
|
|
||||||
|
graphicalPackages (with pkgs; [
|
||||||
|
openttd
|
||||||
|
])
|
|
@ -1,4 +1,4 @@
|
||||||
{ systemConfiguration, enabled, ... }:
|
{ ulib, ... }: with ulib;
|
||||||
|
|
||||||
systemConfiguration {
|
systemConfiguration {
|
||||||
security.rtkit = enabled {};
|
security.rtkit = enabled {};
|
|
@ -1,6 +1,6 @@
|
||||||
{ homeConfiguration, enabled, ... }:
|
{ ulib, ... }: with ulib;
|
||||||
|
|
||||||
homeConfiguration "nixos" {
|
homeConfiguration {
|
||||||
services.pueue = enabled {
|
services.pueue = enabled {
|
||||||
settings = {
|
settings = {
|
||||||
shared = {
|
shared = {
|
|
@ -1,15 +1,15 @@
|
||||||
{ lib, pkgs, systemPackages, homeConfiguration, ... }: lib.recursiveUpdate
|
{ ulib, pkgs, ... }: with ulib; merge
|
||||||
|
|
||||||
(with pkgs; systemPackages [
|
(systemPackages (with pkgs; [
|
||||||
(python311.withPackages (pkgs: with pkgs; [
|
(python311.withPackages (pkgs: with pkgs; [
|
||||||
pip
|
pip
|
||||||
requests
|
requests
|
||||||
]))
|
]))
|
||||||
virtualenv
|
virtualenv
|
||||||
poetry
|
poetry
|
||||||
])
|
]))
|
||||||
|
|
||||||
(homeConfiguration [ "nixos" "root" ] {
|
(homeConfiguration {
|
||||||
programs.nushell.shellAliases = {
|
programs.nushell.shellAliases = {
|
||||||
venv = "virtualenv venv";
|
venv = "virtualenv venv";
|
||||||
};
|
};
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, homeConfiguration, enabled, ... }:
|
{ ulib, pkgs, ... }: with ulib;
|
||||||
|
|
||||||
homeConfiguration "nixos" {
|
graphicalConfiguration {
|
||||||
qt = enabled {
|
qt = enabled {
|
||||||
platformTheme = "gnome";
|
platformTheme = "gnome";
|
||||||
style.name = "adwaita-dark";
|
style.name = "adwaita-dark";
|
15
modules/rust/default.nix
Normal file
15
modules/rust/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ inputs, ulib, pkgs, ... }: with ulib; merge
|
||||||
|
|
||||||
|
(systemConfiguration {
|
||||||
|
nixpkgs.overlays = [ inputs.fenix.overlays.default ];
|
||||||
|
})
|
||||||
|
|
||||||
|
(systemPackages (with pkgs; [
|
||||||
|
(fenix.complete.withComponents [
|
||||||
|
"cargo"
|
||||||
|
"clippy"
|
||||||
|
"rust-src"
|
||||||
|
"rustc"
|
||||||
|
"rustfmt"
|
||||||
|
])
|
||||||
|
]))
|
|
@ -1,10 +1,12 @@
|
||||||
{ lib, pkgs, systemConfiguration, homePackages, ... }: lib.recursiveUpdate
|
{ ulib, pkgs, ... }: with ulib; merge
|
||||||
|
|
||||||
(systemConfiguration {
|
(systemConfiguration {
|
||||||
# Steam uses 32-bit drivers for some unholy fucking reason.
|
# Steam uses 32-bit drivers for some unholy fucking reason.
|
||||||
hardware.opengl.driSupport32Bit = true;
|
hardware.opengl.driSupport32Bit = true;
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
})
|
})
|
||||||
|
|
||||||
(with pkgs; homePackages "nixos" [
|
(graphicalPackages (with pkgs; [
|
||||||
steam
|
steam
|
||||||
])
|
]))
|
9
modules/steck/default.nix
Normal file
9
modules/steck/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ ulib, pkgs, ... }: with ulib; merge
|
||||||
|
|
||||||
|
(systemPackages (with pkgs; [
|
||||||
|
steck
|
||||||
|
]))
|
||||||
|
|
||||||
|
(homeConfiguration {
|
||||||
|
programs.nushell.shellAliases.share = "steck paste";
|
||||||
|
})
|
|
@ -1,6 +1,6 @@
|
||||||
{ theme, homeConfiguration, enabled, ... }:
|
{ ulib, theme, ... }: with ulib;
|
||||||
|
|
||||||
homeConfiguration "nixos" {
|
graphicalConfiguration {
|
||||||
programs.waybar = with theme.withHashtag; enabled {
|
programs.waybar = with theme.withHashtag; enabled {
|
||||||
systemd = enabled {};
|
systemd = enabled {};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue