···11+## Custom library built on top of nix lib
22+{ self, inputs, ... }:
33+{
44+ forAllSystems = inputs.nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ];
55+ fs = import ./fs.nix { inherit self inputs; };
66+}
+30
lib/fs.nix
···11+## FileSystem
22+## Help manage file and access to it
33+{ self, inputs, ... }:
44+55+let inherit (inputs.nixpkgs) lib; in
66+77+rec {
88+ ## Match if type is a directory
99+ #@ String -> Boolean
1010+ isDirectory = type: type == "directory";
1111+1212+ ## Match if type is a file
1313+ #@ String -> Boolean
1414+ isFile = type: type == "regular";
1515+1616+ ## Get files in all folders at a giver path
1717+ #@ Path -> []Path
1818+ getFilesRecursively = path: let
1919+ entries = builtins.readDir path |> lib.filterAttrs (name: type: (type |> isDirectory) || (type |> isFile));
2020+ mapFile = name: type: let
2121+ path' = "${path}/${name}";
2222+ in
2323+ if type |> isDirectory
2424+ then getFilesRecursively path'
2525+ else if name |> lib.hasSuffix ".nix"
2626+ then path'
2727+ else [];
2828+ files = lib.flatten (lib.mapAttrsToList mapFile entries);
2929+ in files;
3030+}
+6-12
machines/darwin/njord/default.nix
···17171818 # System wide packages
1919 environment.systemPackages = with pkgs; [
2020- librewolf # web browser
2121- firefox # to delete -> will be replace by librewolf with custom css and extensions
2222- spotify # music
2323- stats # System monitoring displayed in macos top bar - will be replaced by custom script with sketchybar
2424- raycast # replacement for spotlight
2525- alt-tab-macos # alt tab like windows on macos
2626- utm # VM emulator for macos/ios
2727- cocoapods # used for swift development
2828- obsidian # Markdown note taking app
2929- zed-editor # code editor
3030- # desmume # Nintendo DS emulator - not working on aarch64-darwin because required alsa audio for build
2020+ stats # System monitoring displayed in macos top bar - will be replaced by custom script with sketchybar
2121+ raycast # replacement for spotlight
2222+ alt-tab-macos # alt tab like windows on macos
3123 ];
32243333- programs._1password.enable = true; # Password manager (come from nix-darwin modules)
2525+ programs._1password.enable = true; # Password manager
34262727+ # Complete suite for a specific purpose reused by multiple machines/users
2828+ asgard.suites.base.enable = true;
3529 asgard.suites.development.enable = true;
36303731 # Linux builder
+3-6
machines/darwin/njord/homebrew/casks.nix
···11{
22+ # If something is here, it's either not available in nixpkgs or broken
23 homebrew.casks = [
33- "orbstack" # Replace docker desktop -> will be replace with podman?
44 "figma" # ux/ui
55- "amethyst" # Window manager (to package)
66- "font-hack-nerd-font" # move this to nix installation
77- "discord" # use this one since nixpkgs doesn't have krisp
88- # "logitech-g-hub" # Error when trying to install it
99- "ghostty" # terminal emulator
55+ "amethyst" # Window manager (to package for nix)
66+ # "logitech-g-hub" #! Error when trying to install it
107 "balenaetcher" # image flasher
118 "desmume" # Nintendo DS emulator
129 ];
+1-1
machines/nixos/loki/default.nix
···4848 services.xserver.displayManager.lightdm.enable = true;
4949 services.displayManager.defaultSession = "budgie-desktop";
5050 environment.budgie.excludePackages = with pkgs; [
5151- mate.mate-terminal # don't need since we have kitty installed
5151+ mate.mate-terminal # don't need since we have ghostty installed
5252 ];
53535454 # Global packages
+22-6
modules/common/suites/base.nix
···77 enable = lib.mkEnableOption "Enable the base suite.";
88 };
991010+ # collection of opiniated package to use as a base
1011 config = lib.mkIf cfg.enable ({
1111- # collection of opiniated package for a workstation
1212+ # ┌───────────────────────────────┐
1313+ # │ Global |
1414+ # └───────────────────────────────┘
1215 environment.systemPackages = with pkgs; [
1313- librewolf # web browser
1414- obsidian # markdown note taking app
1515- discord # chat app
1616- ghostty # terminal emulator
1717- spotify # music library
1616+ librewolf # web browser
1717+ obsidian # markdown note taking app
1818+ spotify # music library
1919+ ]
2020+ # ┌───────────────────────────────┐
2121+ # │ Linux Only |
2222+ # └───────────────────────────────┘
2323+ ++ lib.optionals (pkgs.stdenv.isLinux) [
2424+ discord # chat app | not use this one for darwin because it's not containing Krisp
2525+ ghostty # terminal emulator | marked as broken for darwin
2626+ ];
2727+ # ┌───────────────────────────────┐
2828+ # │ Darwin Only |
2929+ # └───────────────────────────────┘
3030+ } // lib.mkIf pkgs.stdenv.isDarwin {
3131+ homebrew.casks = [
3232+ "discord"
3333+ "ghostty"
1834 ];
1935 });
2036}