Merge remote-tracking branch 'origin/main' into reduce-common
This commit is contained in:
commit
c3bf12b896
44 changed files with 911 additions and 600 deletions
99
flake.lock
99
flake.lock
|
@ -50,11 +50,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1699781810,
|
||||
"narHash": "sha256-LD+PIUbm1yQmQmGIbSsc/PB1dtJtGqXFgxRc1C7LlfQ=",
|
||||
"lastModified": 1704318910,
|
||||
"narHash": "sha256-wOIJwAsnZhM0NlFRwYJRgO4Lldh8j9viyzwQXtrbNtM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "2d7d77878c5d70f66f3d676ff66708d8d4f9d7df",
|
||||
"rev": "aef9a509db64a081186af2dc185654d78dc8e344",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -120,11 +120,11 @@
|
|||
},
|
||||
"hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1702453208,
|
||||
"narHash": "sha256-0wRi9SposfE2wHqjuKt8WO2izKB/ASDOV91URunIqgo=",
|
||||
"lastModified": 1704458188,
|
||||
"narHash": "sha256-f6BYEuIqnbrs6J/9m1/1VdkJ6d63hO9kUC09kTPuOqE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "7763c6fd1f299cb9361ff2abf755ed9619ef01d6",
|
||||
"rev": "172385318068519900a7d71c1024242fa6af75f0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -143,11 +143,11 @@
|
|||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701678371,
|
||||
"narHash": "sha256-0pVtmLgjWNiR2fFqUf/5nh9r2VDTJT49ktKCJrd7mo4=",
|
||||
"lastModified": 1704401390,
|
||||
"narHash": "sha256-01Tkq958K2O7H451x8JMEDSGh344iwvhkcYsGVii+8k=",
|
||||
"owner": "helix-editor",
|
||||
"repo": "helix",
|
||||
"rev": "fcd564fddfa9b8f3fd7d02686e1f8b8a97a9f92b",
|
||||
"rev": "7e389b67c24dfe4466112c988b240c807e7e2414",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -164,11 +164,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701676655,
|
||||
"narHash": "sha256-wP8i7hO2aLNJhYoTK3kqoymaCLgt4QcwWcO8d/A1CjQ=",
|
||||
"lastModified": 1704383912,
|
||||
"narHash": "sha256-Be7O73qoOj/z+4ZCgizdLlu+5BkVvO2KO299goZ9cW8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "948703f3e71f1332a0cb535ebaf5cb14946e3724",
|
||||
"rev": "26b8adb300e50efceb51fff6859a1a6ba1ade4f7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -189,11 +189,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1700592218,
|
||||
"narHash": "sha256-vHzDbBrZ5EsfVUMLgjuugf6OqB+iOLjKLO9O5n2occ4=",
|
||||
"lastModified": 1704455149,
|
||||
"narHash": "sha256-9CDCJx9ls1qQ1/uOSUzXgw0smiaEfXz/wnB40r7dYKk=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "472926528428cd714c90f157e639fc0466611c8b",
|
||||
"rev": "d8dbdc4a017e051b3dde2e93791e2495722bfa21",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -227,6 +227,24 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprlang": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1704287638,
|
||||
"narHash": "sha256-TuRXJGwtK440AXQNl5eiqmQqY4LZ/9+z/R7xC0ie3iA=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlang",
|
||||
"rev": "6624f2bb66d4d27975766e81f77174adbe58ec97",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlang",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lexical": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
|
@ -251,11 +269,27 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1701718080,
|
||||
"narHash": "sha256-6ovz0pG76dE0P170pmmZex1wWcQoeiomUZGggfH9XPs=",
|
||||
"lastModified": 1702645756,
|
||||
"narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2c7f3c0fb7c08a0814627611d9d7d45ab6d75335",
|
||||
"rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1704194953,
|
||||
"narHash": "sha256-RtDKd8Mynhe5CFnVT8s0/0yqtWFMM9LmCzXv/YKxnq4=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "bd645e8668ec6612439a9ee7e71f7eac4099d4f6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -273,7 +307,7 @@
|
|||
"helix": "helix",
|
||||
"home-manager": "home-manager",
|
||||
"hyprland": "hyprland",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"sops-nix": "sops-nix",
|
||||
"ssbm": "ssbm"
|
||||
}
|
||||
|
@ -329,11 +363,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1700362823,
|
||||
"narHash": "sha256-/H7XgvrYM0IbkpWkcdfkOH0XyBM5ewSWT1UtaLvOgKY=",
|
||||
"lastModified": 1703991717,
|
||||
"narHash": "sha256-XfBg2dmDJXPQEB8EdNBnzybvnhswaiAkUeeDj7fa/hQ=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "49a87c6c827ccd21c225531e30745a9a6464775c",
|
||||
"rev": "cfdbaf68d00bc2f9e071f17ae77be4b27ff72fa6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -350,11 +384,11 @@
|
|||
"slippi-desktop": "slippi-desktop"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1698158961,
|
||||
"narHash": "sha256-A5YMOQEckHL85Ja23YKh7mVf5M5conwIsP9HNilUuFs=",
|
||||
"lastModified": 1698159739,
|
||||
"narHash": "sha256-2oCLXsVQrrkIpp6QSq2uljJHVDkR7TJKTZLn/8uFQHU=",
|
||||
"owner": "lytedev",
|
||||
"repo": "ssbm-nix",
|
||||
"rev": "c363e7f901838ed10e8236ec908d321fb25e59d3",
|
||||
"rev": "764ed659a34df9696fa8bf413ae66a7f4ae3d9fb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -428,18 +462,18 @@
|
|||
"flake": false,
|
||||
"locked": {
|
||||
"host": "gitlab.freedesktop.org",
|
||||
"lastModified": 1699292815,
|
||||
"narHash": "sha256-HXu98PyBMKEWLqiTb8viuLDznud/SdkdJsx5A5CWx7I=",
|
||||
"lastModified": 1703963193,
|
||||
"narHash": "sha256-ke8drv6PTrdQDruWbajrRJffP9A9PU6FRyjJGNZRTs4=",
|
||||
"owner": "wlroots",
|
||||
"repo": "wlroots",
|
||||
"rev": "5de9e1a99d6642c2d09d589aa37ff0a8945dcee1",
|
||||
"rev": "f81c3d93cd6f61b20ae784297679283438def8df",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"host": "gitlab.freedesktop.org",
|
||||
"owner": "wlroots",
|
||||
"repo": "wlroots",
|
||||
"rev": "5de9e1a99d6642c2d09d589aa37ff0a8945dcee1",
|
||||
"rev": "f81c3d93cd6f61b20ae784297679283438def8df",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
|
@ -449,6 +483,7 @@
|
|||
"hyprland",
|
||||
"hyprland-protocols"
|
||||
],
|
||||
"hyprlang": "hyprlang",
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
|
@ -459,11 +494,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1697981233,
|
||||
"narHash": "sha256-y8q4XUwx+gVK7i2eLjfR32lVo7TYvEslyzrmzYEaPZU=",
|
||||
"lastModified": 1704400467,
|
||||
"narHash": "sha256-IsEAKBCorRlN53FwFAMbyGLRsPVu/ZrWEJtCwykPds8=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"rev": "22e7a65ff9633e1dedfa5317fdffc49f68de2ff2",
|
||||
"rev": "1c802128f6cc3db29a8ef01552b1a22f894eeefd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
132
flake.nix
132
flake.nix
|
@ -27,13 +27,8 @@
|
|||
ssbm.url = "github:lytedev/ssbm-nix/my-nixpkgs";
|
||||
ssbm.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# doesn't support the forge mod loader yet
|
||||
# TODO: doesn't support the forge mod loader yet
|
||||
# nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
||||
|
||||
# need to bump ishiiruka upstream I think
|
||||
# slippi-desktop.url = "github:project-slippi/slippi-desktop-app";
|
||||
# slippi-desktop.flake = false;
|
||||
# ssbm.inputs.slippi-desktop.follows = "slippi-desktop";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
|
@ -46,24 +41,19 @@
|
|||
|
||||
systems = [
|
||||
"aarch64-linux"
|
||||
# "i686-linux"
|
||||
"x86_64-linux"
|
||||
"aarch64-darwin"
|
||||
"x86_64-darwin"
|
||||
];
|
||||
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
|
||||
color-schemes = (import ./lib/colors.nix inputs).schemes;
|
||||
colors = color-schemes.catppuccin-mocha-sapphire;
|
||||
in {
|
||||
colors = (import ./lib/colors.nix inputs).schemes.catppuccin-mocha-sapphire;
|
||||
# colors = (import ./lib/colors.nix inputs).color-schemes.donokai;
|
||||
|
||||
font = {
|
||||
name = "IosevkaLyteTerm";
|
||||
size = 12;
|
||||
};
|
||||
in {
|
||||
colors = colors;
|
||||
font = font;
|
||||
|
||||
# Your custom packages
|
||||
# Acessible through 'nix build', 'nix shell', etc
|
||||
|
@ -86,95 +76,57 @@
|
|||
|
||||
# NixOS configuration entrypoint
|
||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||
nixosConfigurations = let
|
||||
mkNixosSystem = system: modules: homeManagerModules:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
system = system;
|
||||
specialArgs = {
|
||||
inherit inputs outputs system colors font;
|
||||
flake = self;
|
||||
};
|
||||
modules =
|
||||
[
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
self.nixosModules.common
|
||||
]
|
||||
++ modules
|
||||
++ [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
extraSpecialArgs = {inherit inputs outputs system colors font;};
|
||||
users.daniel = {
|
||||
imports = homeManagerModules;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
nixosConfigurations = builtins.mapAttrs (name: {
|
||||
system,
|
||||
modules,
|
||||
...
|
||||
}:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs outputs system;
|
||||
flake = self;
|
||||
};
|
||||
|
||||
base = mkNixosSystem "x86_64-linux" [./nixos/base] [outputs.homeManagerModules.base];
|
||||
in {
|
||||
base = base;
|
||||
nixos = base; # alias
|
||||
dragon = mkNixosSystem "x86_64-linux" [./nixos/dragon] (with outputs.homeManagerModules; [
|
||||
dragon
|
||||
]);
|
||||
thinker = mkNixosSystem "x86_64-linux" [./nixos/thinker] (with outputs.homeManagerModules; [
|
||||
thinker
|
||||
]);
|
||||
foxtrot = mkNixosSystem "x86_64-linux" [./nixos/foxtrot] (with outputs.homeManagerModules; [
|
||||
foxtrot
|
||||
]);
|
||||
beefcake =
|
||||
mkNixosSystem "x86_64-linux" [
|
||||
inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev
|
||||
./nixos/beefcake
|
||||
] (with outputs.homeManagerModules; [
|
||||
linux
|
||||
]);
|
||||
rascal = mkNixosSystem "x86_64-linux" [./nixos/rascal] (with outputs.homeManagerModules; [
|
||||
linux
|
||||
]);
|
||||
musicbox = mkNixosSystem "x86_64-linux" [./nixos/musicbox] (with outputs.homeManagerModules; [
|
||||
sway
|
||||
]);
|
||||
router = mkNixosSystem "x86_64-linux" [./nixos/router] (with outputs.homeManagerModules; [
|
||||
common
|
||||
]);
|
||||
};
|
||||
modules =
|
||||
[
|
||||
self.nixosModules.common
|
||||
]
|
||||
++ modules;
|
||||
}) (import ./nixos);
|
||||
|
||||
# Standalone home-manager configuration entrypoint
|
||||
# Available through 'home-manager --flake .#your-username@your-hostname'
|
||||
homeConfigurations = {
|
||||
# TODO: non-system-specific home configurations?
|
||||
"base-x86_64-linux" = let
|
||||
system = "x86_64-linux";
|
||||
in
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
extraSpecialArgs = {inherit inputs outputs system colors font;};
|
||||
modules = with outputs.homeManagerModules; [linux];
|
||||
};
|
||||
"base-aarch64-darwin" = let
|
||||
system = "aarch64-darwin";
|
||||
in
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
extraSpecialArgs = {inherit inputs outputs system colors font;};
|
||||
modules = with outputs.homeManagerModules; [macos];
|
||||
};
|
||||
# "base-x86_64-linux" = let
|
||||
# system = "x86_64-linux";
|
||||
# in
|
||||
# home-manager.lib.homeManagerConfiguration {
|
||||
# pkgs = nixpkgs.legacyPackages.${system};
|
||||
# extraSpecialArgs = {
|
||||
# inherit inputs outputs system;
|
||||
# };
|
||||
# modules = with outputs.homeManagerModules; [linux];
|
||||
# };
|
||||
# "base-aarch64-darwin" = let
|
||||
# system = "aarch64-darwin";
|
||||
# in
|
||||
# home-manager.lib.homeManagerConfiguration {
|
||||
# pkgs = nixpkgs.legacyPackages.${system};
|
||||
# extraSpecialArgs = {inherit inputs outputs system;};
|
||||
# modules = with outputs.homeManagerModules; [macos];
|
||||
# };
|
||||
};
|
||||
|
||||
# TODO: nix-on-droid for phone terminal usage?
|
||||
# TODO: nix-darwin for work?
|
||||
# TODO: nixos ISO?
|
||||
|
||||
# Disk partition schemes and functions
|
||||
diskoConfigurations = import ./disko;
|
||||
|
||||
# Flake templates for easily setting up Nix in a project using common patterns I like
|
||||
templates = import ./templates/all.nix;
|
||||
|
||||
# TODO: nix-on-droid for phone terminal usage?
|
||||
# TODO: nix-darwin for work?
|
||||
# TODO: nixos ISO?
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
pkgs,
|
||||
# pkgs,
|
||||
# colors,
|
||||
...
|
||||
}: {
|
||||
|
|
|
@ -15,26 +15,16 @@
|
|||
bat
|
||||
helix
|
||||
git
|
||||
iex
|
||||
zellij
|
||||
broot
|
||||
nnn
|
||||
htop
|
||||
cargo
|
||||
senpai
|
||||
tmux
|
||||
];
|
||||
|
||||
# TODO: specify an email?
|
||||
# accounts.email.accounts = {
|
||||
# primary = {
|
||||
# address = "daniel@lyte.dev";
|
||||
# };
|
||||
# };
|
||||
|
||||
home = {
|
||||
username = lib.mkDefault "daniel";
|
||||
homeDirectory = lib.mkDefault "/home/daniel/.home";
|
||||
username = lib.mkDefault "lytedev";
|
||||
homeDirectory = lib.mkDefault "/home/lytedev";
|
||||
stateVersion = lib.mkDefault "23.11";
|
||||
|
||||
sessionVariables = {
|
||||
|
@ -45,16 +35,11 @@
|
|||
};
|
||||
|
||||
packages = [
|
||||
# I use gawk for my fish prompt
|
||||
pkgs.gawk
|
||||
|
||||
# text editor
|
||||
inputs.helix.packages.${system}.helix
|
||||
|
||||
# tools I use when editing nix code
|
||||
pkgs.nil
|
||||
pkgs.alejandra
|
||||
|
||||
# common scripts
|
||||
(pkgs.buildEnv {
|
||||
name = "my-scripts-common";
|
||||
paths = [./scripts/common];
|
||||
|
|
|
@ -1,39 +1,35 @@
|
|||
# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
|
||||
# These should be stuff you would like to share with others, not your personal configurations.
|
||||
{
|
||||
# List your module files here
|
||||
# my-module = import ./my-module.nix;
|
||||
common = import ./common.nix;
|
||||
melee = import ./melee.nix;
|
||||
linux = import ./linux.nix;
|
||||
cargo = import ./cargo.nix;
|
||||
macos = import ./macos.nix;
|
||||
iex = import ./iex.nix;
|
||||
mako = import ./mako.nix;
|
||||
git = import ./git.nix;
|
||||
helix = import ./helix.nix;
|
||||
bat = import ./bat.nix;
|
||||
fish = import ./fish.nix;
|
||||
kitty = import ./kitty.nix;
|
||||
wezterm = import ./wezterm.nix;
|
||||
zellij = import ./zellij.nix;
|
||||
firefox = import ./firefox.nix;
|
||||
broot = import ./broot.nix;
|
||||
nnn = import ./nnn.nix;
|
||||
waybar = import ./waybar.nix;
|
||||
swaylock = import ./swaylock.nix;
|
||||
desktop = import ./desktop.nix;
|
||||
linux-desktop = import ./linux-desktop.nix;
|
||||
sway = import ./sway.nix;
|
||||
hyprland = import ./hyprland.nix;
|
||||
ewwbar = import ./ewwbar.nix;
|
||||
sway-laptop = import ./sway-laptop.nix;
|
||||
tmux = import ./tmux.nix;
|
||||
htop = import ./htop.nix;
|
||||
senpai = import ./senpai.nix;
|
||||
|
||||
base = import ./base.nix;
|
||||
dragon = import ./dragon.nix;
|
||||
thinker = import ./thinker.nix;
|
||||
foxtrot = import ./foxtrot.nix;
|
||||
}
|
||||
with builtins;
|
||||
listToAttrs (map (name: {
|
||||
name = name;
|
||||
value = import ./${name}.nix;
|
||||
}) [
|
||||
"bat"
|
||||
"broot"
|
||||
"cargo"
|
||||
"common"
|
||||
"desktop"
|
||||
"ewwbar"
|
||||
"firefox"
|
||||
"fish"
|
||||
"git"
|
||||
"helix"
|
||||
"htop"
|
||||
"hyprland"
|
||||
"iex"
|
||||
"kitty"
|
||||
"linux"
|
||||
"linux-desktop"
|
||||
"macos"
|
||||
"mako"
|
||||
"melee"
|
||||
"nnn"
|
||||
"pass"
|
||||
"senpai"
|
||||
"sway"
|
||||
"sway-laptop"
|
||||
"swaylock"
|
||||
"tmux"
|
||||
"waybar"
|
||||
"wezterm"
|
||||
"zellij"
|
||||
])
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{
|
||||
{pkgs, ...}: {
|
||||
home = {
|
||||
packages = [
|
||||
pkgs.gawk # used in prompt
|
||||
];
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
# I load long scripts from files for a better editing experience
|
||||
|
|
12
modules/home-manager/flanfam.nix
Normal file
12
modules/home-manager/flanfam.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{...}: {
|
||||
home-manager = {
|
||||
users.flanfam = {
|
||||
imports = [./common.nix];
|
||||
home = {
|
||||
username = "flanfam";
|
||||
homeDirectory = "/home/flanfam";
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
12
modules/home-manager/flanfamkiosk.nix
Normal file
12
modules/home-manager/flanfamkiosk.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{...}: {
|
||||
home-manager = {
|
||||
users.flanfamkiosk = {
|
||||
imports = [./common.nix];
|
||||
home = {
|
||||
username = "flanfamkiosk";
|
||||
homeDirectory = "/home/flanfamkiosk";
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
{outputs, ...}: let
|
||||
scale = 1.25;
|
||||
in {
|
||||
imports = with outputs.homeManagerModules; [
|
||||
sway
|
||||
sway-laptop
|
||||
hyprland
|
||||
];
|
||||
|
||||
home = {
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
monitor = [
|
||||
"eDP-1,2256x1504@60,0x0,${toString scale}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
config = {
|
||||
output = {
|
||||
"BOE 0x0BCA Unknown" = {
|
||||
mode = "2256x1504@60Hz";
|
||||
scale = toString scale;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -10,52 +10,53 @@
|
|||
enableFishIntegration = true;
|
||||
};
|
||||
settings = with colors.withHashPrefix; {
|
||||
"font_family" = font.name;
|
||||
"bold_font" = "${font.name} Heavy";
|
||||
"italic_font" = "${font.name} Italic";
|
||||
"bold_italic_font" = "${font.name} Heavy Italic";
|
||||
"font_size" = toString font.size;
|
||||
"inactive_text_alpha" = "0.5";
|
||||
"copy_on_select" = true;
|
||||
font_family = font.name;
|
||||
bold_font = "${font.name} Heavy";
|
||||
italic_font = "${font.name} Italic";
|
||||
bold_italic_font = "${font.name} Heavy Italic";
|
||||
font_size = toString font.size;
|
||||
inactive_text_alpha = "0.5";
|
||||
copy_on_select = true;
|
||||
hide_window_decorations = "yes";
|
||||
|
||||
"scrollback_lines" = 500000;
|
||||
scrollback_lines = 500000;
|
||||
|
||||
"symbol_map" = "U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono";
|
||||
symbol_map = "U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono";
|
||||
|
||||
# use `kitty + list-fonts --psnames` to get the font's PostScript name
|
||||
|
||||
"allow_remote_control" = true;
|
||||
"listen_on" = "unix:/tmp/kitty";
|
||||
"repaint_delay" = 3;
|
||||
"input_delay" = 3;
|
||||
"sync_to_monitor" = true;
|
||||
allow_remote_control = true;
|
||||
listen_on = "unix:/tmp/kitty";
|
||||
repaint_delay = 3;
|
||||
input_delay = 3;
|
||||
sync_to_monitor = true;
|
||||
|
||||
"adjust_line_height" = 0;
|
||||
"window_padding_width" = "10.0";
|
||||
"window_margin_width" = "0.0";
|
||||
adjust_line_height = 0;
|
||||
window_padding_width = "10.0";
|
||||
window_margin_width = "0.0";
|
||||
|
||||
"confirm_os_window_close" = 0;
|
||||
confirm_os_window_close = 0;
|
||||
|
||||
"enabled_layouts" = "splits:split_axis=vertical,stack";
|
||||
enabled_layouts = "splits:split_axis=vertical,stack";
|
||||
|
||||
"shell_integration" = "disabled";
|
||||
shell_integration = "disabled";
|
||||
|
||||
"enable_audio_bell" = true;
|
||||
"visual_bell_duration" = "0.25";
|
||||
"visual_bell_color" = bg3;
|
||||
enable_audio_bell = true;
|
||||
visual_bell_duration = "0.25";
|
||||
visual_bell_color = bg3;
|
||||
|
||||
"url_style" = "single";
|
||||
url_style = "single";
|
||||
|
||||
"strip_trailing_spaces" = "smart";
|
||||
strip_trailing_spaces = "smart";
|
||||
|
||||
# open_url_modifiers ctrl
|
||||
|
||||
"tab_bar_align" = "left";
|
||||
"tab_bar_style" = "separator";
|
||||
"tab_separator" = ''""'';
|
||||
"tab_bar_edge" = "top";
|
||||
"tab_title_template" = ''"{fmt.fg.tab}{fmt.bg.tab} {activity_symbol}{title} "'';
|
||||
"active_tab_font_style" = "normal";
|
||||
tab_bar_align = "left";
|
||||
tab_bar_style = "separator";
|
||||
tab_separator = ''""'';
|
||||
tab_bar_edge = "top";
|
||||
tab_title_template = ''"{fmt.fg.tab}{fmt.bg.tab} {activity_symbol}{title} "'';
|
||||
active_tab_font_style = "normal";
|
||||
|
||||
## name: Catppuccin Kitty Mocha
|
||||
## author: Catppuccin Org
|
||||
|
@ -64,75 +65,75 @@
|
|||
## blurb: Soothing pastel theme for the high-spirited!
|
||||
|
||||
# The basic colors
|
||||
"foreground" = text;
|
||||
"background" = bg;
|
||||
"selection_foreground" = bg;
|
||||
"selection_background" = text;
|
||||
foreground = text;
|
||||
background = bg;
|
||||
selection_foreground = bg;
|
||||
selection_background = text;
|
||||
|
||||
# Cursor colors
|
||||
"cursor" = text;
|
||||
"cursor_text_color" = bg;
|
||||
cursor = text;
|
||||
cursor_text_color = bg;
|
||||
|
||||
# URL underline color when hovering with mouse
|
||||
"url_color" = primary;
|
||||
url_color = primary;
|
||||
|
||||
# Kitty window border colors
|
||||
"active_border_color" = primary;
|
||||
"inactive_border_color" = bg3;
|
||||
"bell_border_color" = urgent;
|
||||
active_border_color = primary;
|
||||
inactive_border_color = bg3;
|
||||
bell_border_color = urgent;
|
||||
|
||||
# OS Window titlebar colors
|
||||
"wayland_titlebar_color" = "system";
|
||||
"macos_titlebar_color" = "system";
|
||||
wayland_titlebar_color = "system";
|
||||
macos_titlebar_color = "system";
|
||||
|
||||
# Tab bar colors
|
||||
"active_tab_foreground" = bg;
|
||||
"active_tab_background" = primary;
|
||||
"inactive_tab_foreground" = fgdim;
|
||||
"inactive_tab_background" = bg2;
|
||||
"tab_bar_background" = bg;
|
||||
active_tab_foreground = bg;
|
||||
active_tab_background = primary;
|
||||
inactive_tab_foreground = fgdim;
|
||||
inactive_tab_background = bg2;
|
||||
tab_bar_background = bg;
|
||||
|
||||
# Colors for marks (marked text in the terminal)
|
||||
"mark1_foreground" = bg;
|
||||
"mark1_background" = blue;
|
||||
"mark2_foreground" = bg;
|
||||
"mark2_background" = purple;
|
||||
"mark3_foreground" = bg;
|
||||
"mark3_background" = blue;
|
||||
mark1_foreground = bg;
|
||||
mark1_background = blue;
|
||||
mark2_foreground = bg;
|
||||
mark2_background = purple;
|
||||
mark3_foreground = bg;
|
||||
mark3_background = blue;
|
||||
|
||||
# The 16 terminal colors
|
||||
|
||||
# black
|
||||
"color0" = colors.withHashPrefix."0";
|
||||
"color8" = colors.withHashPrefix."8";
|
||||
color0 = colors.withHashPrefix."0";
|
||||
color8 = colors.withHashPrefix."8";
|
||||
|
||||
# red
|
||||
"color1" = colors.withHashPrefix."1";
|
||||
"color9" = colors.withHashPrefix."9";
|
||||
color1 = colors.withHashPrefix."1";
|
||||
color9 = colors.withHashPrefix."9";
|
||||
|
||||
# green
|
||||
"color2" = colors.withHashPrefix."2";
|
||||
"color10" = colors.withHashPrefix."10";
|
||||
color2 = colors.withHashPrefix."2";
|
||||
color10 = colors.withHashPrefix."10";
|
||||
|
||||
# yellow
|
||||
"color3" = colors.withHashPrefix."3";
|
||||
"color11" = colors.withHashPrefix."11";
|
||||
color3 = colors.withHashPrefix."3";
|
||||
color11 = colors.withHashPrefix."11";
|
||||
|
||||
# blue
|
||||
"color4" = colors.withHashPrefix."4";
|
||||
"color12" = colors.withHashPrefix."12";
|
||||
color4 = colors.withHashPrefix."4";
|
||||
color12 = colors.withHashPrefix."12";
|
||||
|
||||
# magenta
|
||||
"color5" = colors.withHashPrefix."5";
|
||||
"color13" = colors.withHashPrefix."13";
|
||||
color5 = colors.withHashPrefix."5";
|
||||
color13 = colors.withHashPrefix."13";
|
||||
|
||||
# cyan
|
||||
"color6" = colors.withHashPrefix."6";
|
||||
"color14" = colors.withHashPrefix."14";
|
||||
color6 = colors.withHashPrefix."6";
|
||||
color14 = colors.withHashPrefix."14";
|
||||
|
||||
# white
|
||||
"color7" = colors.withHashPrefix."7";
|
||||
"color15" = colors.withHashPrefix."15";
|
||||
color7 = colors.withHashPrefix."7";
|
||||
color15 = colors.withHashPrefix."15";
|
||||
};
|
||||
keybindings = {
|
||||
"ctrl+shift+1" = "change_font_size all 12.5";
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
...
|
||||
}: {
|
||||
imports = with outputs.homeManagerModules; [
|
||||
linux
|
||||
desktop
|
||||
firefox
|
||||
];
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
{
|
||||
outputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = with outputs.homeManagerModules; [
|
||||
common
|
||||
];
|
||||
|
||||
{pkgs, ...}: {
|
||||
home = {
|
||||
sessionVariables = {
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
|
@ -15,6 +7,7 @@
|
|||
|
||||
programs.fish = {
|
||||
shellAliases = {
|
||||
# TODO: these aren't working?
|
||||
sctl = "sudo systemctl";
|
||||
bt = "bluetoothctl";
|
||||
pa = "pulsemixer";
|
||||
|
|
6
modules/home-manager/pass.nix
Normal file
6
modules/home-manager/pass.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
|
||||
};
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
r="$(< "$HOME/.emoji.txt" sk --height 40%)"
|
||||
r="$(< "$HOME/.emoji.txt" fzf --height 40%)"
|
||||
echo "$r" | awk '$0=$1' | tr -d '\n' | clip
|
||||
echo "Copied $r emoji to your clipboard"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
...
|
||||
}: {
|
||||
imports = with outputs.homeManagerModules; [
|
||||
linux
|
||||
waybar
|
||||
mako
|
||||
swaylock
|
||||
|
|
9
modules/nixos/avahi.nix
Normal file
9
modules/nixos/avahi.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
# enable mDNS and discovery
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
reflector = true;
|
||||
openFirewall = true;
|
||||
nssmdns4 = true;
|
||||
};
|
||||
}
|
|
@ -2,17 +2,25 @@
|
|||
config,
|
||||
lib,
|
||||
inputs,
|
||||
colors,
|
||||
# outputs,
|
||||
outputs,
|
||||
system,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
networking.hostName = lib.mkDefault "nixoslyte";
|
||||
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
]
|
||||
++ (with outputs.nixosModules; [
|
||||
avahi
|
||||
daniel
|
||||
]);
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
|
@ -140,7 +148,7 @@
|
|||
useXkbConfig = true;
|
||||
earlySetup = true;
|
||||
|
||||
colors = with colors; [
|
||||
colors = with outputs.colors; [
|
||||
bg
|
||||
red
|
||||
green
|
||||
|
@ -177,44 +185,6 @@
|
|||
'';
|
||||
};
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
trusted-users = ["root" "daniel"];
|
||||
experimental-features = lib.mkDefault ["nix-command" "flakes"];
|
||||
substituters = [
|
||||
"https://cache.nixos.org/"
|
||||
"https://helix.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://nix.h.lyte.dev"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0="
|
||||
];
|
||||
};
|
||||
|
||||
registry = {
|
||||
self.flake = inputs.self;
|
||||
|
||||
nixpkgs = {
|
||||
from = {
|
||||
id = "nixpkgs";
|
||||
type = "indirect";
|
||||
};
|
||||
flake = inputs.nixpkgs;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
};
|
||||
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
|
@ -254,4 +224,71 @@
|
|||
# # ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", MODE="0664", GROUP="uucp"
|
||||
# # ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="uucp"'
|
||||
# '';
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
# This will add each flake input as a registry
|
||||
# To make nix3 commands consistent with your flake
|
||||
registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
|
||||
|
||||
# This will additionally add your inputs to the system's legacy channels
|
||||
# Making legacy nix commands consistent as well, awesome!
|
||||
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||
|
||||
settings = {
|
||||
trusted-users = ["root" "daniel"];
|
||||
experimental-features = lib.mkDefault ["nix-command" "flakes"];
|
||||
substituters = [
|
||||
"https://cache.nixos.org/"
|
||||
"https://helix.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://nix.h.lyte.dev"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0="
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
# registry = {
|
||||
# self.flake = inputs.self;
|
||||
|
||||
# nixpkgs = {
|
||||
# from = {
|
||||
# id = "nixpkgs";
|
||||
# type = "indirect";
|
||||
# };
|
||||
# flake = inputs.nixpkgs;
|
||||
# };
|
||||
# };
|
||||
};
|
||||
|
||||
system.stateVersion = lib.mkDefault "23.11";
|
||||
}
|
||||
|
|
44
modules/nixos/daniel.nix
Normal file
44
modules/nixos/daniel.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
inputs,
|
||||
system,
|
||||
outputs,
|
||||
...
|
||||
}: {
|
||||
home-manager = {
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs system;
|
||||
inherit (outputs) colors font;
|
||||
};
|
||||
users.daniel = {
|
||||
accounts.email.accounts = {
|
||||
primary = {
|
||||
primary = true;
|
||||
address = "daniel@lyte.dev";
|
||||
};
|
||||
legacy = {
|
||||
address = "wraithx2@gmail.com";
|
||||
};
|
||||
io = {
|
||||
# TODO: finalize deprecation
|
||||
address = "daniel@lytedev.io";
|
||||
};
|
||||
# TODO: may need to use a sops secret? put in another module?
|
||||
# work = {
|
||||
# address = "REDACTED";
|
||||
# };
|
||||
};
|
||||
|
||||
home = {
|
||||
username = "daniel";
|
||||
homeDirectory = "/home/daniel/.home";
|
||||
};
|
||||
|
||||
imports = with outputs.homeManagerModules; [
|
||||
common
|
||||
senpai
|
||||
iex
|
||||
cargo
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,18 +1,27 @@
|
|||
# Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
|
||||
# These should be stuff you would like to share with others, not your personal configurations.
|
||||
{
|
||||
common = import ./common.nix;
|
||||
melee = import ./melee.nix;
|
||||
ewwbar = import ./ewwbar.nix;
|
||||
desktop-usage = import ./desktop-usage.nix;
|
||||
intel = import ./intel.nix;
|
||||
pipewire = import ./pipewire.nix;
|
||||
pipewire-low-latency = import ./pipewire-low-latency.nix;
|
||||
podman = import ./podman.nix;
|
||||
postgres = import ./postgres.nix;
|
||||
sway = import ./sway.nix;
|
||||
hyprland = import ./hyprland.nix;
|
||||
user-installed-applications = import ./user-installed-applications.nix;
|
||||
wifi = import ./wifi.nix;
|
||||
kde-connect = import ./kde-connect.nix;
|
||||
}
|
||||
with builtins;
|
||||
listToAttrs (map (name: {
|
||||
name = name;
|
||||
value = import ./${name}.nix;
|
||||
}) [
|
||||
"common"
|
||||
"melee"
|
||||
"ewwbar"
|
||||
"desktop-usage"
|
||||
"intel"
|
||||
"pipewire"
|
||||
"pipewire"
|
||||
"podman"
|
||||
"postgres"
|
||||
"sway"
|
||||
"hyprland"
|
||||
"user-installed-applications"
|
||||
"wifi"
|
||||
"gnome"
|
||||
"kde-connect"
|
||||
"printing"
|
||||
"avahi"
|
||||
|
||||
"daniel"
|
||||
"flanfam"
|
||||
"flanfamkiosk"
|
||||
])
|
||||
|
|
17
modules/nixos/flanfam.nix
Normal file
17
modules/nixos/flanfam.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{...}: {
|
||||
users.groups.flanfam = {};
|
||||
|
||||
users.users = {
|
||||
flanfam = {
|
||||
isNormalUser = true;
|
||||
home = "/home/flanfam";
|
||||
createHome = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev"
|
||||
];
|
||||
group = "flanfam";
|
||||
extraGroups = ["users" "video"];
|
||||
packages = [];
|
||||
};
|
||||
};
|
||||
}
|
17
modules/nixos/flanfamkiosk.nix
Normal file
17
modules/nixos/flanfamkiosk.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{...}: {
|
||||
users.groups.flanfamkiosk = {};
|
||||
|
||||
users.users = {
|
||||
flanfamkiosk = {
|
||||
isNormalUser = true;
|
||||
home = "/home/flanfamkiosk";
|
||||
createHome = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev"
|
||||
];
|
||||
group = "flanfamkiosk";
|
||||
extraGroups = ["users" "video"];
|
||||
packages = [];
|
||||
};
|
||||
};
|
||||
}
|
74
modules/nixos/gnome.nix
Normal file
74
modules/nixos/gnome.nix
Normal file
|
@ -0,0 +1,74 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [./pipewire.nix];
|
||||
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.gdm = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
services.xserver.desktopManager.gnome = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryFlavor = "gnome3";
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.dbus.enable = true;
|
||||
|
||||
services.gvfs = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
environment = {
|
||||
variables = {
|
||||
GTK_THEME = "Catppuccin-Mocha-Compact-Sapphire-Dark";
|
||||
VISUAL = "hx";
|
||||
PAGER = "less";
|
||||
MANPAGER = "less";
|
||||
};
|
||||
|
||||
systemPackages = with pkgs; [
|
||||
brightnessctl
|
||||
feh
|
||||
# gimp
|
||||
grim
|
||||
# inkscape
|
||||
# krita
|
||||
libinput
|
||||
libinput-gestures
|
||||
libnotify
|
||||
# lutris
|
||||
# nil
|
||||
# nixpkgs-fmt
|
||||
noto-fonts
|
||||
pamixer
|
||||
# pavucontrol
|
||||
playerctl
|
||||
# pulseaudio
|
||||
pulsemixer
|
||||
# rclone
|
||||
# restic
|
||||
slurp
|
||||
# steam
|
||||
swaybg
|
||||
swayidle
|
||||
swaylock
|
||||
# vlc
|
||||
# vulkan-tools
|
||||
waybar
|
||||
# weechat
|
||||
# wine
|
||||
wl-clipboard
|
||||
zathura
|
||||
];
|
||||
};
|
||||
}
|
13
modules/nixos/printing.nix
Normal file
13
modules/nixos/printing.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{pkgs, ...}: {
|
||||
services.printing.enable = true;
|
||||
services.printing.browsing = true;
|
||||
services.printing.browsedConf = ''
|
||||
BrowseDNSSDSubTypes _cups,_print
|
||||
BrowseLocalProtocols all
|
||||
BrowseRemoteProtocols all
|
||||
CreateIPPPrinterQueues All
|
||||
|
||||
BrowseProtocols all
|
||||
'';
|
||||
services.printing.drivers = [pkgs.gutenprint];
|
||||
}
|
|
@ -1,5 +1,9 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [./pipewire.nix];
|
||||
{
|
||||
pkgs,
|
||||
outputs,
|
||||
...
|
||||
}: {
|
||||
imports = with outputs.nixosModules; [pipewire];
|
||||
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
|
@ -24,7 +28,6 @@
|
|||
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -50,34 +53,34 @@
|
|||
systemPackages = with pkgs; [
|
||||
brightnessctl
|
||||
feh
|
||||
gimp
|
||||
# gimp
|
||||
grim
|
||||
inkscape
|
||||
krita
|
||||
# inkscape
|
||||
# krita
|
||||
libinput
|
||||
libinput-gestures
|
||||
libnotify
|
||||
lutris
|
||||
nil
|
||||
nixpkgs-fmt
|
||||
# lutris
|
||||
# nil
|
||||
# nixpkgs-fmt
|
||||
noto-fonts
|
||||
pamixer
|
||||
pavucontrol
|
||||
# pavucontrol
|
||||
playerctl
|
||||
pulseaudio
|
||||
# pulseaudio
|
||||
pulsemixer
|
||||
rclone
|
||||
restic
|
||||
# rclone
|
||||
# restic
|
||||
slurp
|
||||
steam
|
||||
# steam
|
||||
swaybg
|
||||
swayidle
|
||||
swaylock
|
||||
vlc
|
||||
vulkan-tools
|
||||
# vlc
|
||||
# vulkan-tools
|
||||
waybar
|
||||
weechat
|
||||
wine
|
||||
# weechat
|
||||
# wine
|
||||
wl-clipboard
|
||||
zathura
|
||||
];
|
||||
|
|
16
nixos/base.nix
Normal file
16
nixos/base.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
outputs,
|
||||
flake,
|
||||
...
|
||||
}: {
|
||||
# a minimal, familiar setup that I can bootstrap atop
|
||||
imports = with outputs.nixosModules; [
|
||||
# may need to be tweaked based on the machine's paritioning scheme
|
||||
flake.diskoConfigurations.standard
|
||||
desktop-usage
|
||||
wifi
|
||||
];
|
||||
|
||||
# TODO: may not work for UEFI?
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
flake,
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
inputs.disko.nixosModules.disko
|
||||
flake.diskoConfigurations.standard
|
||||
]
|
||||
++ (with outputs.nixosModules; [
|
||||
desktop-usage
|
||||
wifi
|
||||
]);
|
||||
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
];
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
|
||||
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||
|
||||
settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
};
|
||||
|
||||
# not necessarily "base", but all my machines are UEFI so...
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowPing = true;
|
||||
allowedTCPPorts = [22];
|
||||
allowedUDPPorts = [];
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
|
@ -8,16 +8,16 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x01 0x00
|
|||
sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00
|
||||
*/
|
||||
{
|
||||
# inputs,
|
||||
inputs,
|
||||
outputs,
|
||||
modulesPath,
|
||||
config,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
outputs.nixosModules.intel
|
||||
inputs.api-lyte-dev.nixosModules.${system}.api-lyte-dev
|
||||
# inputs.nix-minecraft.nixosModules.minecraft-servers
|
||||
];
|
||||
|
||||
|
@ -67,7 +67,7 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00
|
|||
systemd.services.api-lyte-dev.environment.LOG_LEVEL = "debug";
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = ../../secrets/beefcake/secrets.yml;
|
||||
defaultSopsFile = ../secrets/beefcake/secrets.yml;
|
||||
age = {
|
||||
sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||
keyFile = "/var/lib/sops-nix/key.txt";
|
16
nixos/default.nix
Normal file
16
nixos/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
with builtins; (listToAttrs (map (name: {
|
||||
name = name;
|
||||
value = {
|
||||
system = "x86_64-linux";
|
||||
modules = [./${name}.nix];
|
||||
};
|
||||
}) [
|
||||
"base"
|
||||
"thablet"
|
||||
"thinker"
|
||||
"foxtrot"
|
||||
"beefcake"
|
||||
"rascal"
|
||||
"musicbox"
|
||||
"router"
|
||||
]))
|
73
nixos/dragon.nix
Normal file
73
nixos/dragon.nix
Normal file
|
@ -0,0 +1,73 @@
|
|||
{
|
||||
flake,
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
networking.hostName = "dragon";
|
||||
|
||||
# support interacting with the windows drive
|
||||
boot.supportedFilesystems = ["ntfs"];
|
||||
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
inputs.disko.nixosModules.disko
|
||||
flake.diskoConfigurations.standard
|
||||
inputs.hardware.nixosModules.common-cpu-amd
|
||||
inputs.hardware.nixosModules.common-pc-ssd
|
||||
outputs.nixosModules.pipewire-low-latency
|
||||
]
|
||||
++ (with outputs.nixosModules; [
|
||||
common
|
||||
melee
|
||||
desktop-usage
|
||||
podman
|
||||
postgres
|
||||
wifi
|
||||
hyprland
|
||||
printing
|
||||
ewwbar
|
||||
]);
|
||||
|
||||
services.printing.enable = true;
|
||||
|
||||
# TODO: https://nixos.wiki/wiki/Remote_LUKS_Unlocking
|
||||
|
||||
# hardware
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci"];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
radeontop
|
||||
];
|
||||
};
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowPing = true;
|
||||
allowedTCPPorts = [22 7777];
|
||||
allowedUDPPorts = [];
|
||||
};
|
||||
};
|
||||
|
||||
services.udev.packages = [
|
||||
pkgs.platformio
|
||||
pkgs.openocd
|
||||
];
|
||||
programs.adb.enable = true;
|
||||
users.users.daniel.extraGroups = ["adbusers"];
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
system.stateVersion = "23.11";
|
||||
}
|
|
@ -1,120 +0,0 @@
|
|||
{
|
||||
flake,
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
networking.hostName = "dragon";
|
||||
|
||||
boot.supportedFilesystems = ["ntfs"];
|
||||
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
inputs.disko.nixosModules.disko
|
||||
flake.diskoConfigurations.standard
|
||||
inputs.hardware.nixosModules.common-cpu-amd
|
||||
inputs.hardware.nixosModules.common-pc-ssd
|
||||
outputs.nixosModules.pipewire-low-latency
|
||||
]
|
||||
++ (with outputs.nixosModules; [
|
||||
melee
|
||||
desktop-usage
|
||||
podman
|
||||
postgres
|
||||
wifi
|
||||
hyprland
|
||||
ewwbar
|
||||
])
|
||||
++ [
|
||||
# Or modules from other flakes (such as nixos-hardware):
|
||||
# inputs.hardware.nixosModules.common-cpu-amd
|
||||
# inputs.hardware.nixosModules.common-ssd
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
# ./users.nix
|
||||
];
|
||||
|
||||
# TODO: https://nixos.wiki/wiki/Remote_LUKS_Unlocking
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
# This will add each flake input as a registry
|
||||
# To make nix3 commands consistent with your flake
|
||||
registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
|
||||
|
||||
# This will additionally add your inputs to the system's legacy channels
|
||||
# Making legacy nix commands consistent as well, awesome!
|
||||
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||
|
||||
settings = {
|
||||
# Enable flakes and new 'nix' command
|
||||
experimental-features = "nix-command flakes";
|
||||
# Deduplicate and optimize nix store
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
};
|
||||
|
||||
# hardware
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci"];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||
services.printing.enable = true;
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
radeontop
|
||||
];
|
||||
};
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowPing = true;
|
||||
allowedTCPPorts = [22 7777];
|
||||
allowedUDPPorts = [];
|
||||
};
|
||||
};
|
||||
|
||||
services.udev.packages = [
|
||||
pkgs.platformio
|
||||
pkgs.openocd
|
||||
];
|
||||
programs.adb.enable = true;
|
||||
users.users.daniel.extraGroups = ["adbusers"];
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
system.stateVersion = "23.11";
|
||||
}
|
|
@ -6,25 +6,57 @@
|
|||
# config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
scale = 1.25;
|
||||
in {
|
||||
networking.hostName = "foxtrot";
|
||||
|
||||
imports =
|
||||
[
|
||||
inputs.disko.nixosModules.disko
|
||||
flake.diskoConfigurations.standard
|
||||
inputs.hardware.nixosModules.framework-13-7040-amd
|
||||
]
|
||||
++ (with outputs.nixosModules; [
|
||||
desktop-usage
|
||||
podman
|
||||
postgres
|
||||
wifi
|
||||
hyprland
|
||||
])
|
||||
++ [
|
||||
inputs.hardware.nixosModules.framework-13-7040-amd
|
||||
# hyprland
|
||||
]);
|
||||
|
||||
home-manager.users.daniel = {
|
||||
imports = with outputs.homeManagerModules; [
|
||||
sway
|
||||
pass
|
||||
# sway-laptop
|
||||
# hyprland
|
||||
];
|
||||
|
||||
home = {
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
monitor = [
|
||||
"eDP-1,2256x1504@60,0x0,${toString scale}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
config = {
|
||||
output = {
|
||||
"BOE 0x0BCA Unknown" = {
|
||||
mode = "2256x1504@60Hz";
|
||||
scale = toString scale;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# use updated ppd for framework 13:
|
||||
# source: https://community.frame.work/t/tracking-ppd-v-tlp-for-amd-ryzen-7040/39423/137?u=lytedev
|
||||
nixpkgs.overlays = [
|
||||
|
@ -103,7 +135,7 @@
|
|||
hardware.framework.amd-7040.preventWakeOnAC = true;
|
||||
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest; # seeing if using the stable kernel makes wow work
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
|
@ -132,35 +164,23 @@
|
|||
};
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
# TODO: when resuming from hibernation, it would be nice if this would
|
||||
# simply resume the power state at the time of hibernation
|
||||
powerOnBoot = false;
|
||||
};
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||
services.printing.enable = true;
|
||||
services.printing.browsing = true;
|
||||
services.printing.browsedConf = ''
|
||||
BrowseDNSSDSubTypes _cups,_print
|
||||
BrowseLocalProtocols all
|
||||
BrowseRemoteProtocols all
|
||||
CreateIPPPrinterQueues All
|
||||
|
||||
BrowseProtocols all
|
||||
'';
|
||||
services.printing.drivers = [pkgs.gutenprint];
|
||||
services.avahi = {
|
||||
services.power-profiles-daemon = {
|
||||
enable = true;
|
||||
reflector = true;
|
||||
openFirewall = true;
|
||||
nssmdns = true;
|
||||
};
|
||||
powerManagement.powertop.enable = true;
|
||||
|
||||
# disabled stuff here for posterity
|
||||
services.fprintd = {
|
||||
enable = false;
|
||||
# tod.enable = true;
|
||||
# tod.driver = pkgs.libfprint-2-tod1-goodix;
|
||||
};
|
||||
services.power-profiles-daemon = {
|
||||
enable = true;
|
||||
};
|
||||
services.tlp = {
|
||||
enable = false;
|
||||
settings = {
|
||||
|
@ -175,16 +195,6 @@
|
|||
CPU_MAX_PERF_ON_AC = 100;
|
||||
};
|
||||
};
|
||||
powerManagement.powertop.enable = true;
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowPing = true;
|
||||
allowedTCPPorts = [22];
|
||||
allowedUDPPorts = [];
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
flake,
|
||||
inputs,
|
||||
outputs,
|
||||
# lib,
|
||||
# config,
|
||||
|
@ -11,7 +10,6 @@
|
|||
|
||||
imports =
|
||||
[
|
||||
inputs.disko.nixosModules.disko
|
||||
flake.diskoConfigurations.unencrypted
|
||||
]
|
||||
++ (with outputs.nixosModules; [
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
flake,
|
||||
inputs,
|
||||
lib,
|
||||
# outputs,
|
||||
# config,
|
||||
|
@ -36,7 +35,6 @@ in {
|
|||
networking.useDHCP = false;
|
||||
|
||||
imports = [
|
||||
inputs.disko.nixosModules.disko
|
||||
flake.diskoConfigurations.unencrypted
|
||||
];
|
||||
|
97
nixos/thablet.nix
Normal file
97
nixos/thablet.nix
Normal file
|
@ -0,0 +1,97 @@
|
|||
{
|
||||
flake,
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
networking.hostName = "thablet";
|
||||
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
flake.diskoConfigurations.standard
|
||||
inputs.hardware.nixosModules.lenovo-thinkpad-x1-yoga
|
||||
]
|
||||
++ (with outputs.nixosModules; [
|
||||
desktop-usage
|
||||
gnome
|
||||
wifi
|
||||
flanfam
|
||||
flanfamkiosk
|
||||
]);
|
||||
|
||||
home-manager.users.daniel = {
|
||||
imports = with outputs.homeManagerModules; [
|
||||
sway
|
||||
];
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
];
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
|
||||
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||
|
||||
settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
services.fprintd = {
|
||||
# TODO: am I missing a driver? see arch wiki for this h/w
|
||||
enable = true;
|
||||
# tod.enable = true;
|
||||
# tod.driver = pkgs.libfprint-2-tod1-goodix;
|
||||
};
|
||||
|
||||
environment.systemPackages =
|
||||
#with pkgs;
|
||||
[];
|
||||
|
||||
programs.steam.enable = true;
|
||||
programs.steam.remotePlay.openFirewall = true;
|
||||
|
||||
# https://wiki.archlinux.org/title/Lenovo_ThinkPad_X1_Yoga_(Gen_3)#Using_acpi_call
|
||||
systemd.services.activate-touch-hack = {
|
||||
enable = true;
|
||||
description = "Touch wake Thinkpad X1 Yoga 3rd gen hack";
|
||||
|
||||
unitConfig = {
|
||||
After = ["suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target"];
|
||||
};
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
/bin/sh -c "echo '\\_SB.PCI0.LPCB.EC._Q2A' > /proc/acpi/call"
|
||||
'';
|
||||
};
|
||||
|
||||
wantedBy = ["suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target"];
|
||||
};
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel" "acpi_call"];
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [acpi_call];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
|
@ -32,20 +32,16 @@
|
|||
|
||||
imports =
|
||||
[
|
||||
inputs.disko.nixosModules.disko
|
||||
flake.diskoConfigurations.thinker
|
||||
inputs.hardware.nixosModules.lenovo-thinkpad-t480
|
||||
inputs.hardware.nixosModules.common-pc-laptop-ssd
|
||||
]
|
||||
++ (with outputs.nixosModules; [
|
||||
desktop-usage
|
||||
podman
|
||||
postgres
|
||||
wifi
|
||||
])
|
||||
++ [
|
||||
inputs.hardware.nixosModules.lenovo-thinkpad-t480
|
||||
inputs.hardware.nixosModules.common-pc-laptop-ssd
|
||||
# ./relative-module.nix
|
||||
];
|
||||
]);
|
||||
|
||||
boot = {
|
||||
loader = {
|
|
@ -3,4 +3,8 @@
|
|||
path = ./rust;
|
||||
description = "A template for working on a Rust project";
|
||||
};
|
||||
deno = {
|
||||
path = ./deno;
|
||||
description = "A template for working on a TypeScript and Deno project";
|
||||
};
|
||||
}
|
||||
|
|
1
templates/deno/.envrc
Normal file
1
templates/deno/.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake
|
2
templates/deno/.gitignore
vendored
Normal file
2
templates/deno/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
/target
|
||||
/.direnv
|
49
templates/deno/.helix/languages.toml
Normal file
49
templates/deno/.helix/languages.toml
Normal file
|
@ -0,0 +1,49 @@
|
|||
[language-server.deno]
|
||||
command = "deno"
|
||||
args = ["lsp"]
|
||||
config.hostInfo = "helix"
|
||||
|
||||
[[language]]
|
||||
name = "javascript"
|
||||
scope = "source.js"
|
||||
injection-regex = "(js|javascript)"
|
||||
language-id = "javascript"
|
||||
file-types = ["js", "mjs", "cjs", "rules", "es6", "pac", "jakefile"]
|
||||
shebangs = ["node"]
|
||||
comment-token = "//"
|
||||
language-servers = [ "deno" ]
|
||||
indent = { tab-width = 2, unit = "\t" }
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "jsx"
|
||||
scope = "source.jsx"
|
||||
injection-regex = "jsx"
|
||||
language-id = "javascriptreact"
|
||||
file-types = ["jsx"]
|
||||
comment-token = "//"
|
||||
language-servers = [ "deno" ]
|
||||
indent = { tab-width = 2, unit = "\t" }
|
||||
grammar = "javascript"
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "typescript"
|
||||
scope = "source.ts"
|
||||
injection-regex = "(ts|typescript)"
|
||||
file-types = ["ts", "mts", "cts"]
|
||||
language-id = "typescript"
|
||||
shebangs = ["deno", "ts-node"]
|
||||
language-servers = [ "deno" ]
|
||||
indent = { tab-width = 2, unit = "\t" }
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "tsx"
|
||||
scope = "source.tsx"
|
||||
injection-regex = "(tsx)"
|
||||
language-id = "typescriptreact"
|
||||
file-types = ["tsx"]
|
||||
language-servers = [ "deno" ]
|
||||
indent = { tab-width = 2, unit = "\t" }
|
||||
auto-format = true
|
10
templates/deno/deno.jsonc
Normal file
10
templates/deno/deno.jsonc
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"tasks": {
|
||||
"dev": "deno run -A --watch=src src/mod.ts",
|
||||
},
|
||||
"fmt": {
|
||||
"useTabs": true,
|
||||
"semiColons": false,
|
||||
"singleQuote": true,
|
||||
},
|
||||
}
|
23
templates/deno/flake.nix
Normal file
23
templates/deno/flake.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs?rev=bd645e8668ec6612439a9ee7e71f7eac4099d4f6";
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
}: let
|
||||
inherit (self) outputs;
|
||||
supportedSystems = ["x86_64-linux"];
|
||||
forEachSupportedSystem = nixpkgs.lib.genAttrs supportedSystems;
|
||||
in {
|
||||
devShells = forEachSupportedSystem (system: let
|
||||
pkgs = import nixpkgs {inherit system;};
|
||||
in {
|
||||
deno-dev = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
deno
|
||||
];
|
||||
};
|
||||
|
||||
default = outputs.devShells.${system}.deno-dev;
|
||||
});
|
||||
};
|
||||
}
|
5
templates/deno/src/mod.ts
Normal file
5
templates/deno/src/mod.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
console.log("Hello, world!")
|
||||
|
||||
if (true) {
|
||||
console.log("Truth!")
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs?rev=2c7f3c0fb7c08a0814627611d9d7d45ab6d75335";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs?rev=bd645e8668ec6612439a9ee7e71f7eac4099d4f6";
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
|
|
Loading…
Reference in a new issue