added xcursor-plan9
minor cleanup: moved package declarations out of `system-packages` into dedicated modules, `alejandra` gets configured as `nix fmt` command, removed `racket`
This commit is contained in:
parent
45b63706a4
commit
e66c8d337a
15 changed files with 124 additions and 46 deletions
19
flake.lock
generated
19
flake.lock
generated
|
|
@ -173,7 +173,24 @@
|
|||
"nixpkgs-unstable"
|
||||
],
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"nvf": "nvf"
|
||||
"nvf": "nvf",
|
||||
"xcursor-plan9": "xcursor-plan9"
|
||||
}
|
||||
},
|
||||
"xcursor-plan9": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1714831058,
|
||||
"narHash": "sha256-74ykNDuknGdP6j+cS4ePtGTkGGLqQdpu54TuG7262QI=",
|
||||
"owner": "wintermute-cell",
|
||||
"repo": "xcursor-plan9",
|
||||
"rev": "e0a605c16aff63f8eb958a8415441bf82de09245",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "wintermute-cell",
|
||||
"repo": "xcursor-plan9",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -18,5 +18,9 @@
|
|||
url = "github:NotAShelf/nvf";
|
||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
};
|
||||
xcursor-plan9 = {
|
||||
url = "github:wintermute-cell/xcursor-plan9";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
{inputs, ...}: {
|
||||
{
|
||||
inputs,
|
||||
systemConstants,
|
||||
...
|
||||
}: {
|
||||
flake-file.inputs = {
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
};
|
||||
|
|
@ -8,5 +12,5 @@
|
|||
inputs.flake-parts.flakeModules.easyOverlay
|
||||
];
|
||||
|
||||
systems = ["x86_64-linux"];
|
||||
systems = systemConstants.infraSystems;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
(bottles.override {removeWarningPopup = true;})
|
||||
# development
|
||||
emacs
|
||||
unstable.racket
|
||||
unstable.guile
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
visuals = {
|
||||
rainbow-delimiters.enable = true;
|
||||
};
|
||||
|
||||
clipboard = {
|
||||
enable = true;
|
||||
registers = "unnamedplus";
|
||||
|
|
@ -104,7 +108,7 @@
|
|||
mode = "i";
|
||||
key = "<C-l>";
|
||||
action = "λ";
|
||||
desc = "inserts lambda";
|
||||
desc = "inserts lowercase lambda";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
flake.modules.nixos.sddm = {
|
||||
services.displayManager.sddm.settings.Theme.CursorSize = 18;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +1,10 @@
|
|||
{inputs, ...}: {
|
||||
{
|
||||
inputs,
|
||||
systemConstants,
|
||||
...
|
||||
}: {
|
||||
flake-file.inputs.home-manager = {
|
||||
url = "github:nix-community/home-manager/release-26.05";
|
||||
url = "github:nix-community/home-manager/release-${systemConstants.homeManagerStateVersion}";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
|
|
|||
5
modules/nixos/programs/nh.nix
Normal file
5
modules/nixos/programs/nh.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
flake.modules.nixos.base = {
|
||||
programs.nh.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,9 +1,6 @@
|
|||
{
|
||||
flake.modules.nixos.base = {pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
nh
|
||||
alejandra
|
||||
git
|
||||
python315
|
||||
# system utils
|
||||
file
|
||||
|
|
|
|||
|
|
@ -12,11 +12,7 @@ in {
|
|||
nixpkgs-lib.follows = "nixpkgs-unstable";
|
||||
};
|
||||
|
||||
perSystem = {
|
||||
final,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
perSystem = {system, ...}: {
|
||||
_module.args.pkgs = import inputs.nixpkgs {inherit system overlays config;};
|
||||
overlayAttrs.unstable = import inputs.nixpkgs-unstable {inherit system config;};
|
||||
};
|
||||
|
|
|
|||
37
modules/packages/xcursor-plan9.nix
Normal file
37
modules/packages/xcursor-plan9.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{inputs, ...}: {
|
||||
flake-file.inputs = {
|
||||
xcursor-plan9 = {
|
||||
url = "github:wintermute-cell/xcursor-plan9";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
perSystem = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
packages.xcursor-plan9 =
|
||||
(pkgs.callPackage (inputs.xcursor-plan9 + "/default.nix") {})
|
||||
.overrideAttrs (_: {src = inputs.xcursor-plan9;});
|
||||
|
||||
overlayAttrs = {inherit (config.packages) xcursor-plan9;};
|
||||
};
|
||||
|
||||
flake.modules.nixos = rec {
|
||||
base = {pkgs, ...}: {
|
||||
environment.systemPackages = [pkgs.xcursor-plan9];
|
||||
environment.variables = {
|
||||
XCURSOR_THEME = "plan9";
|
||||
XCURSOR_SIZE = "16";
|
||||
};
|
||||
};
|
||||
|
||||
sddm = {
|
||||
services.displayManager.sddm.settings.Theme = {
|
||||
CursorTheme = base.environment.variables.XCURSOR_THEME;
|
||||
CursorSize = base.environment.variables.XCURSOR_SIZE;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
5
modules/repository/fmt.nix
Normal file
5
modules/repository/fmt.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
perSystem = {pkgs, ...}: {
|
||||
formatter = pkgs.alejandra;
|
||||
};
|
||||
}
|
||||
8
modules/shells/direnv.nix
Normal file
8
modules/shells/direnv.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
flake.modules.nixos.base = {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
|
|
@ -12,26 +11,27 @@
|
|||
|
||||
config.systemConstants = rec {
|
||||
infraName = "chitin";
|
||||
infraSystems = ["x86_64-linux"];
|
||||
|
||||
repositoryOwnerUsername = "asnev";
|
||||
repositoryOwnerEmail = "notasnev@proton.me";
|
||||
|
||||
nixpkgsStableVersion = "26.05"; # did you read the "did you read the comment?" comment?
|
||||
nixpkgsStableVersion = "26.05";
|
||||
nixpkgsAllowUnfree = true;
|
||||
nixpkgsOverlays = [self.overlays.default];
|
||||
|
||||
phostronHostname = "phostron";
|
||||
phostronHostPlatform = "x86_64-linux";
|
||||
phostronHostPlatform = lib.elemAt infraSystems 0;
|
||||
phostronStateVersion = nixpkgsStableVersion;
|
||||
|
||||
homeManagerStateVersion = nixpkgsStableVersion;
|
||||
|
||||
primaryUserUsername = "coyote";
|
||||
primaryUserHomeDirectory =
|
||||
if pkgs.stdenv.hostPlatform.isLinux
|
||||
if lib.hasSuffix "linux" phostronHostPlatform
|
||||
then "/home/${primaryUserUsername}"
|
||||
else throw "Unsupported platform: ${pkgs.stdenv.hostPlatform.system}";
|
||||
primaryUserInfraDirectory = "${primaryUserHomeDirectory}/${infraName}";
|
||||
else throw "Unsupported platform. See `modules/system-constants.nix`.";
|
||||
primaryUserInfraDirectory = "${primaryUserHomeDirectory}/code/${infraName}";
|
||||
primaryUserId = 1000;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
systemConstants,
|
||||
...
|
||||
}: {
|
||||
flake.modules.nixos.primaryUser = {
|
||||
flake.modules.nixos = {
|
||||
primaryUser = {
|
||||
users.users.${systemConstants.primaryUserUsername} = {
|
||||
isNormalUser = true;
|
||||
description = systemConstants.primaryUserUsername;
|
||||
|
|
@ -23,9 +24,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
flake.modules.nixos.homeManagerModule = {
|
||||
homeManagerModule = {
|
||||
home-manager.users.${systemConstants.primaryUserUsername} = self.modules.homeManager.primaryUser;
|
||||
};
|
||||
};
|
||||
|
||||
flake.modules.homeManager.primaryUser = {
|
||||
home = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue