tidying and such

This commit is contained in:
serenity-F 2026-08-30 23:03:47 +10:00
parent 0324cf1994
commit 42e502ec78
No known key found for this signature in database
13 changed files with 132 additions and 40 deletions

View file

@ -1,41 +1,68 @@
{ self, inputs, ... }: {
# module declaration
flake.nixosModules.niri = { pkgs, lib, ... }: {
programs.niri = {
# enables niri
enable = true;
# use a custom niri package
package = self.packages.${pkgs.stdenv.hostPlatform.system}.myNiri;
};
};
perSystem = { pkgs, lib, self',... }: {
packages.myNiri = inputs.wrapper-modules.wrappers.niri.wrap {
inherit pkgs;
settings = {
# defines a custom niri package
perSystem =
{
pkgs,
lib,
self',
...
}:
{
xwayland-satellite.path = lib.getExe pkgs.xwayland-satellite;
packages.myNiri = inputs.wrapper-modules.wrappers.niri.wrap {
spawn-at-startup = [
# Makes our custom noctalia a dependency and spawns it at startup
(lib.getExe self'.packages.myNoctalia)
];
# follow global packages
inherit pkgs;
input.keyboard.xkb.layout = "us";
# customised niri settings
settings = {
# xwayland-satellite package to use
xwayland-satellite.path = lib.getExe pkgs.xwayland-satellite;
# makes our custom noctalia a dependency and spawns it at startup
spawn-at-startup = [
(lib.getExe self'.packages.myNoctalia)
];
# keyboard layout and binds
input.keyboard.xkb.layout = "us";
binds = {
# terminal and launcher binds
"Mod+Return".spawn-sh = lib.getExe self'.packages.myKitty;
"Mod+Tab".spawn-sh = "${lib.getExe self.packages.myNoctalia} ipc call launcher toggle";
# window control binds
"Mod+Q".close-window = null;
};
# layout and visual settings
layout = {
gaps = 5;
};
binds = {
# Terminal bind
"Mod+Return".spawn-sh = lib.getExe self'.packages.myKitty;
# Launcher bind
"Mod+Tab".spawn-sh = "${lib.getExe self.packages.myNoctalia} ipc call launcher toggle";
# Window control binds
"Mod+Q".close-window = null;
};
layout = {
gaps = 5;
};
};
};
};
}

View file

@ -1,11 +1,17 @@
{ self, inputs, ... }: {
perSystem = { pkgs, ... }: {
# defines a custom noctalia package
packages.myNoctalia = inputs.wrapper-modules.wrappers.noctalia-shell.wrap {
# use global packages
inherit pkgs;
settings = (builtins.fromJSON (builtins.readFile
./noctalia.json
)).settings;
# use a separate json file to configure
# nixify this.
settings = (builtins.fromJSON (builtins.readFile ./noctalia.json)).settings;
};
};

View file

@ -1,18 +1,27 @@
{ config, ... }:
# let bindings
let
# xdg variables
data = config.xdg.dataHome;
conf = config.xdg.configHome;
cache = config.xdg.cacheHome;
in
{
# list of modules to include
imports = [
./programs
./kitty.nix
./fish.nix
];
# add environment variables
# environment variables
home.sessionVariables = {
# clean up ~
LESSHISTFILE = "${cache}/less/history";
LESSKEY = "${conf}/less/lesskey";
@ -20,7 +29,7 @@ in
WINEPREFIX = "${data}/wine";
XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority";
EDITOR = "nvim";
EDITOR = "helix";
DIRENV_LOG_FORMAT = "";
# auto-run programs using nix-index-database

View file

@ -2,10 +2,13 @@
perSystem = { pkgs, ... }: {
packages.myYazi = inputs.wrapper-modules.wrappers.yazi.wrap {
# defines a custom fish package
packages.myFish = inputs.wrapper-modules.wrappers.fish.wrap {
settings = {
foo = bar;
};
};
};

View file

@ -2,10 +2,13 @@
perSystem = { pkgs, ... }: {
packages.myYazi = inputs.wrapper-modules.wrappers.yazi.wrap {
# defines a custom git package
packages.myGit = inputs.wrapper-modules.wrappers.git.wrap {
settings = {
foo = bar;
};
};
};

View file

@ -1,17 +1,25 @@
{ pkgs, lib, self, ... }: {
{
pkgs,
lib,
self,
...
}:
{
# module paths to import
imports = [
./hardware
./network
./network
./radeon
];
# select kernel to use
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
# Set hostname
# set hostname
networking.hostName = "hades";
# For SSD/NVME
# for ssd
services.fstrim.enable = true;
}

View file

@ -1,6 +1,7 @@
{ inputs, ... }:
{
# loads home manager modules
imports = [
inputs.home-manager.flakeModules.home-manager

View file

@ -1,41 +1,76 @@
{ self, inputs, ... }:
# let bindings
let
# set your username here
name = "serenity";
# qol variable to make paths shorter
home = "/home/${name}";
in
{
# user module declaration
flake.nixosModules.u-serenity =
{ pkgs, ... }:
{
# modules to include
modules = [
self.foo.bar
# home-manager module
inputs.home-manager.nixosModules.home-manager
{
home-manager = {
verbose = true;
useUserPackages = true;
useGlobalPkgs = true;
# home-manager settings
backupFileExtension = "backup";
overwriteBackup = true;
verbose = true;
# set home-manager packages to follow system
useUserPackages = true;
useGlobalPkgs = true;
# hm user declaration
users.${name} = {
# user specific modules to import
imports = [
self.flake.homeModules.baseHome
];
};
};
}
];
# user declaration
users.users.${name} = {
isNormalUser = true;
# remember to change this
initialPassword = "password";
inherit home;
isNormalUser = true;
# groups to include user in
extraGroups = [
"wheel"
"networkmanager"
];
shell = pkgs.fish; # TODO: Don't hardcode this.
# dont hardcode this
shell = pkgs.fish;
};
};
}