chore: flake update 04-07-2026
This commit is contained in:
@@ -1 +1 @@
|
|||||||
; registry=https://npm.dogar.dev
|
registry=https://npm.dogar.dev
|
||||||
|
|||||||
@@ -10,17 +10,21 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs =
|
||||||
|
{
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
flake-utils,
|
flake-utils,
|
||||||
fenix,
|
fenix,
|
||||||
}:
|
}:
|
||||||
flake-utils.lib.eachDefaultSystem (system: let
|
flake-utils.lib.eachDefaultSystem (
|
||||||
|
system:
|
||||||
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
fenixLib = fenix.packages.${system};
|
fenixLib = fenix.packages.${system};
|
||||||
rustToolchain = fenixLib.stable.toolchain;
|
rustToolchain = fenixLib.stable.toolchain;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
lua-language-server
|
lua-language-server
|
||||||
@@ -39,5 +43,6 @@
|
|||||||
echo "nvim is configured with your local config"
|
echo "nvim is configured with your local config"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
36
flake.lock
generated
36
flake.lock
generated
@@ -55,11 +55,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773025010,
|
"lastModified": 1773889306,
|
||||||
"narHash": "sha256-khlHllTsovXgT2GZ0WxT4+RvuMjNeR5OW0UYeEHPYQo=",
|
"narHash": "sha256-PAqwnsBSI9SVC2QugvQ3xeYCB0otOwCacB1ueQj2tgw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "7b9f7f88ab3b339f8142dc246445abb3c370d3d3",
|
"rev": "5ad85c82cc52264f4beddc934ba57f3789f28347",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -172,11 +172,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772985285,
|
"lastModified": 1775544097,
|
||||||
"narHash": "sha256-wEEmvfqJcl9J0wyMgMrj1TixOgInBW/6tLPhWGoZE3s=",
|
"narHash": "sha256-fwI8PbrUT4W+z+J4TAS/D69So/MLan1WZjUsYQpoSvI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "5be5d8245cbc7bc0c09fbb5f38f23f223c543f85",
|
"rev": "2bd16b16a77d68a1e14c1b4da725a6590181a706",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -260,11 +260,11 @@
|
|||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1774354685,
|
"lastModified": 1775416789,
|
||||||
"narHash": "sha256-GGo4zr9oLGtuZ73He9dlTuODAk2Qv0XOblkdlxBvh9I=",
|
"narHash": "sha256-0IELkB6YXCZGqZqLdmOcTw8mki6NNhDmG47y7Qynuj8=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "bbf6718c4fc55867be0db8946918ce03d3879f64",
|
"rev": "aaa2fc342f002bf4acd965f1ad2ead3796347e35",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -550,11 +550,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772972630,
|
"lastModified": 1775490113,
|
||||||
"narHash": "sha256-mUJxsNOrBMNOUJzN0pfdVJ1r2pxeqm9gI/yIKXzVVbk=",
|
"narHash": "sha256-2ZBhDNZZwYkRmefK5XLOusCJHnoeKkoN95hoSGgMxWM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "3966ce987e1a9a164205ac8259a5fe8a64528f72",
|
"rev": "c775c2772ba56e906cbeb4e0b2db19079ef11ff7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -597,11 +597,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772963539,
|
"lastModified": 1775423009,
|
||||||
"narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=",
|
"narHash": "sha256-vPKLpjhIVWdDrfiUM8atW6YkIggCEKdSAlJPzzhkQlw=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9dcb002ca1690658be4a04645215baea8b95f31d",
|
"rev": "68d8aa3d661f0e6bd5862291b5bb263b2a6595c9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -701,11 +701,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772944399,
|
"lastModified": 1775365543,
|
||||||
"narHash": "sha256-xTzsSd3r5HBeufSZ3fszAn0ldfKctvsYG7tT2YJg5gY=",
|
"narHash": "sha256-f50qrK0WwZ9z5EdaMGWOTtALgSF7yb7XwuE7LjCuDmw=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "c8e69670b316d6788e435a3aa0bda74eb1b82cc0",
|
"rev": "a4ee2de76efb759fe8d4868c33dec9937897916f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
31
flake.nix
31
flake.nix
@@ -40,7 +40,9 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {nixpkgs, ...} @ inputs: let
|
outputs =
|
||||||
|
{ nixpkgs, ... }@inputs:
|
||||||
|
let
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
mkHost = host: {
|
mkHost = host: {
|
||||||
${host} = nixpkgs.lib.nixosSystem {
|
${host} = nixpkgs.lib.nixosSystem {
|
||||||
@@ -48,26 +50,33 @@
|
|||||||
inherit inputs;
|
inherit inputs;
|
||||||
|
|
||||||
# Extend lib with lib.custom
|
# Extend lib with lib.custom
|
||||||
lib = nixpkgs.lib.extend (self: super: {
|
lib = nixpkgs.lib.extend (
|
||||||
custom = import ./lib {inherit (nixpkgs) lib;};
|
self: super: {
|
||||||
});
|
custom = import ./lib { inherit (nixpkgs) lib; };
|
||||||
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
modules = [./hosts/nixos/${host}];
|
modules = [ ./hosts/nixos/${host} ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
mkHostConfigs = hosts:
|
mkHostConfigs = hosts: lib.foldl (acc: set: acc // set) { } (lib.map (host: mkHost host) hosts);
|
||||||
lib.foldl (acc: set: acc // set) {}
|
|
||||||
(lib.map (host: mkHost host) hosts);
|
|
||||||
readHosts = folder: lib.attrNames (builtins.readDir ./hosts/${folder});
|
readHosts = folder: lib.attrNames (builtins.readDir ./hosts/${folder});
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
nixosConfigurations = mkHostConfigs (readHosts "nixos");
|
nixosConfigurations = mkHostConfigs (readHosts "nixos");
|
||||||
|
|
||||||
devShells.x86_64-linux.default = let
|
devShells.x86_64-linux.default =
|
||||||
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
in
|
in
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [nil lua-language-server kubernetes-helm kubectl];
|
buildInputs = with pkgs; [
|
||||||
|
nil
|
||||||
|
lua-language-server
|
||||||
|
kubernetes-helm
|
||||||
|
kubectl
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{config, lib, ...}: {
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
#
|
#
|
||||||
# ========== Required Configs ==========
|
# ========== Required Configs ==========
|
||||||
@@ -35,9 +36,9 @@
|
|||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
GOPROXY="https://go.dogar.dev,direct";
|
GOPROXY = "https://go.dogar.dev,direct";
|
||||||
};
|
};
|
||||||
file.".npmrc".source = config.lib.file.mkOutOfStoreSymlink
|
file.".npmrc".source =
|
||||||
"${config.home.homeDirectory}/git/nix-config/dotfiles/npm/.npmrc";
|
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/git/nix-config/dotfiles/npm/.npmrc";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,13 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
hostSpec,
|
hostSpec,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
(map lib.custom.relativeToRoot ["modules/common" "modules/home-manager"])
|
(map lib.custom.relativeToRoot [
|
||||||
|
"modules/common"
|
||||||
|
"modules/home-manager"
|
||||||
|
])
|
||||||
];
|
];
|
||||||
|
|
||||||
inherit hostSpec;
|
inherit hostSpec;
|
||||||
@@ -15,7 +19,7 @@
|
|||||||
username = lib.mkDefault config.hostSpec.username;
|
username = lib.mkDefault config.hostSpec.username;
|
||||||
homeDirectory = lib.mkDefault config.hostSpec.home;
|
homeDirectory = lib.mkDefault config.hostSpec.home;
|
||||||
stateVersion = lib.mkDefault "25.05";
|
stateVersion = lib.mkDefault "25.05";
|
||||||
sessionPath = ["$HOME/.local/bin"];
|
sessionPath = [ "$HOME/.local/bin" ];
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
FLAKE = "$HOME/src/nix/nix-config";
|
FLAKE = "$HOME/src/nix/nix-config";
|
||||||
SHELL = "zsh";
|
SHELL = "zsh";
|
||||||
@@ -27,7 +31,10 @@
|
|||||||
nix = {
|
nix = {
|
||||||
package = lib.mkDefault pkgs.nix;
|
package = lib.mkDefault pkgs.nix;
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
warn-dirty = false;
|
warn-dirty = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
programs.btop = {enable = true;};
|
{
|
||||||
|
programs.btop = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.firefox.override {
|
package = pkgs.firefox.override {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
home.packages = with pkgs; [nerd-fonts.jetbrains-mono];
|
home.packages = with pkgs; [ nerd-fonts.jetbrains-mono ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
programs.ghostty = {
|
programs.ghostty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
@@ -16,15 +17,27 @@
|
|||||||
name = config.hostSpec.userFullName;
|
name = config.hostSpec.userFullName;
|
||||||
email = config.hostSpec.email.user;
|
email = config.hostSpec.email.user;
|
||||||
};
|
};
|
||||||
gpg = {format = "ssh";};
|
gpg = {
|
||||||
|
format = "ssh";
|
||||||
|
};
|
||||||
"gpg \"ssh\"" = {
|
"gpg \"ssh\"" = {
|
||||||
program = "${lib.getExe' pkgs._1password-gui "op-ssh-sign"}";
|
program = "${lib.getExe' pkgs._1password-gui "op-ssh-sign"}";
|
||||||
};
|
};
|
||||||
commit = {gpgsign = true;};
|
commit = {
|
||||||
user = {signingKey = "~/.ssh/id_ed25519.pub";};
|
gpgsign = true;
|
||||||
pull = {rebase = true;};
|
};
|
||||||
init = {defaultBranch = "main";};
|
user = {
|
||||||
lfs = {locksverify = true;};
|
signingKey = "~/.ssh/id_ed25519.pub";
|
||||||
|
};
|
||||||
|
pull = {
|
||||||
|
rebase = true;
|
||||||
|
};
|
||||||
|
init = {
|
||||||
|
defaultBranch = "main";
|
||||||
|
};
|
||||||
|
lfs = {
|
||||||
|
locksverify = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
home = {
|
home = {
|
||||||
file = {
|
file = {
|
||||||
"${config.xdg.configHome}/hypr/hyprland.conf".source =
|
"${config.xdg.configHome}/hypr/hyprland.conf".source =
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
awscli2
|
awscli2
|
||||||
btop
|
btop
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
@@ -8,6 +9,5 @@
|
|||||||
|
|
||||||
# Create a symlink from ~/.config/nvim to the dotfiles directory
|
# Create a symlink from ~/.config/nvim to the dotfiles directory
|
||||||
home.file.".config/nvim".source =
|
home.file.".config/nvim".source =
|
||||||
config.lib.file.mkOutOfStoreSymlink
|
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/git/nix-config/dotfiles/nvim";
|
||||||
"${config.home.homeDirectory}/git/nix-config/dotfiles/nvim";
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
{...}: let
|
{ ... }:
|
||||||
|
let
|
||||||
onePassPath = "~/.1password/agent.sock";
|
onePassPath = "~/.1password/agent.sock";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableDefaultConfig = false;
|
enableDefaultConfig = false;
|
||||||
extraConfig = "IdentityAgent ${onePassPath}";
|
extraConfig = "IdentityAgent ${onePassPath}";
|
||||||
matchBlocks."*" = {};
|
matchBlocks."*" = { };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,4 @@
|
|||||||
{...}: {programs.starship.enable = true;}
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.starship.enable = true;
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
home = {
|
home = {
|
||||||
file = {
|
file = {
|
||||||
"${config.xdg.configHome}/tmux".source =
|
"${config.xdg.configHome}/tmux".source = lib.custom.relativeToRoot "dotfiles/tmux";
|
||||||
lib.custom.relativeToRoot "dotfiles/tmux";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = with pkgs; [tmux];
|
packages = with pkgs; [ tmux ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
programs.uv = {
|
programs.uv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
eza
|
eza
|
||||||
ripgrep
|
ripgrep
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{lib, ...}: {
|
{ lib, ... }:
|
||||||
|
{
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
#
|
#
|
||||||
# ========== Required Configs ==========
|
# ========== Required Configs ==========
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{lib, ...}: {
|
{ lib, ... }:
|
||||||
|
{
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
#
|
#
|
||||||
# ========== Required Configs ==========
|
# ========== Required Configs ==========
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{lib, ...}: {
|
{ lib, ... }:
|
||||||
|
{
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
#
|
#
|
||||||
# ========== Required Configs ==========
|
# ========== Required Configs ==========
|
||||||
|
|||||||
@@ -4,9 +4,13 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
hostSpec,
|
hostSpec,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
(map lib.custom.relativeToRoot ["modules/common" "modules/home-manager"])
|
(map lib.custom.relativeToRoot [
|
||||||
|
"modules/common"
|
||||||
|
"modules/home-manager"
|
||||||
|
])
|
||||||
];
|
];
|
||||||
|
|
||||||
inherit hostSpec;
|
inherit hostSpec;
|
||||||
@@ -15,7 +19,7 @@
|
|||||||
username = lib.mkDefault config.hostSpec.username;
|
username = lib.mkDefault config.hostSpec.username;
|
||||||
homeDirectory = lib.mkDefault config.hostSpec.home;
|
homeDirectory = lib.mkDefault config.hostSpec.home;
|
||||||
stateVersion = lib.mkDefault "25.05";
|
stateVersion = lib.mkDefault "25.05";
|
||||||
sessionPath = ["$HOME/.local/bin"];
|
sessionPath = [ "$HOME/.local/bin" ];
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
FLAKE = "$HOME/src/nix/nix-config";
|
FLAKE = "$HOME/src/nix/nix-config";
|
||||||
SHELL = "zsh";
|
SHELL = "zsh";
|
||||||
@@ -27,7 +31,10 @@
|
|||||||
nix = {
|
nix = {
|
||||||
package = lib.mkDefault pkgs.nix;
|
package = lib.mkDefault pkgs.nix;
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
warn-dirty = false;
|
warn-dirty = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
programs.btop = {enable = true;};
|
{
|
||||||
|
programs.btop = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.firefox.override {
|
package = pkgs.firefox.override {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
home.packages = with pkgs; [nerd-fonts.jetbrains-mono];
|
home.packages = with pkgs; [ nerd-fonts.jetbrains-mono ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
programs.ghostty = {
|
programs.ghostty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
@@ -13,15 +14,27 @@
|
|||||||
name = config.hostSpec.userFullName;
|
name = config.hostSpec.userFullName;
|
||||||
email = config.hostSpec.email.user;
|
email = config.hostSpec.email.user;
|
||||||
};
|
};
|
||||||
gpg = {format = "ssh";};
|
gpg = {
|
||||||
|
format = "ssh";
|
||||||
|
};
|
||||||
"gpg \"ssh\"" = {
|
"gpg \"ssh\"" = {
|
||||||
program = "${lib.getExe' pkgs._1password-gui "op-ssh-sign"}";
|
program = "${lib.getExe' pkgs._1password-gui "op-ssh-sign"}";
|
||||||
};
|
};
|
||||||
commit = {gpgsign = true;};
|
commit = {
|
||||||
user = {signingKey = "~/.ssh/id_rihla.pub";};
|
gpgsign = true;
|
||||||
pull = {rebase = true;};
|
};
|
||||||
init = {defaultBranch = "main";};
|
user = {
|
||||||
lfs = {locksverify = true;};
|
signingKey = "~/.ssh/id_rihla.pub";
|
||||||
|
};
|
||||||
|
pull = {
|
||||||
|
rebase = true;
|
||||||
|
};
|
||||||
|
init = {
|
||||||
|
defaultBranch = "main";
|
||||||
|
};
|
||||||
|
lfs = {
|
||||||
|
locksverify = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
home = {
|
home = {
|
||||||
file = {
|
file = {
|
||||||
"${config.xdg.configHome}/hypr/hyprland.conf".source =
|
"${config.xdg.configHome}/hypr/hyprland.conf".source =
|
||||||
@@ -26,5 +27,5 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.swww.enable = true;
|
services.awww.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
btop
|
btop
|
||||||
discord
|
discord
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
@@ -8,6 +9,5 @@
|
|||||||
|
|
||||||
# Create a symlink from ~/.config/nvim to the dotfiles directory
|
# Create a symlink from ~/.config/nvim to the dotfiles directory
|
||||||
home.file."${config.xdg.configHome}/nvim".source =
|
home.file."${config.xdg.configHome}/nvim".source =
|
||||||
config.lib.file.mkOutOfStoreSymlink
|
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/git/nix-config/dotfiles/nvim";
|
||||||
"${config.home.homeDirectory}/git/nix-config/dotfiles/nvim";
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
{...}: let
|
{ ... }:
|
||||||
|
let
|
||||||
onePassPath = "~/.1password/agent.sock";
|
onePassPath = "~/.1password/agent.sock";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableDefaultConfig = false;
|
enableDefaultConfig = false;
|
||||||
extraConfig = "IdentityAgent ${onePassPath}";
|
extraConfig = "IdentityAgent ${onePassPath}";
|
||||||
matchBlocks."*" = {};
|
matchBlocks."*" = { };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,4 @@
|
|||||||
{...}: {programs.starship.enable = true;}
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.starship.enable = true;
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
home = {
|
home = {
|
||||||
file = {
|
file = {
|
||||||
"${config.xdg.configHome}/tmux".source =
|
"${config.xdg.configHome}/tmux".source = lib.custom.relativeToRoot "dotfiles/tmux";
|
||||||
lib.custom.relativeToRoot "dotfiles/tmux";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = with pkgs; [tmux];
|
packages = with pkgs; [ tmux ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
programs.uv = {
|
programs.uv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
eza
|
eza
|
||||||
ripgrep
|
ripgrep
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{config, lib, ...}: {
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
#
|
#
|
||||||
# ========== Required Configs ==========
|
# ========== Required Configs ==========
|
||||||
@@ -35,9 +36,9 @@
|
|||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
GOPROXY="https://go.dogar.dev,direct";
|
GOPROXY = "https://go.dogar.dev,direct";
|
||||||
};
|
};
|
||||||
file.".npmrc".source = config.lib.file.mkOutOfStoreSymlink
|
file.".npmrc".source =
|
||||||
"${config.home.homeDirectory}/git/nix-config/dotfiles/npm/.npmrc";
|
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/git/nix-config/dotfiles/npm/.npmrc";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
prismlauncher
|
prismlauncher
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
@@ -50,14 +51,20 @@
|
|||||||
|
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
warn-dirty = false;
|
warn-dirty = false;
|
||||||
trusted-users = ["@wheel"];
|
trusted-users = [ "@wheel" ];
|
||||||
|
|
||||||
substituters = ["https://hyprland.cachix.org" "https://nix.dogar.dev"];
|
substituters = [
|
||||||
trusted-substituters = ["https://hyprland.cachix.org"];
|
"https://hyprland.cachix.org"
|
||||||
|
"https://nix.dogar.dev"
|
||||||
|
];
|
||||||
|
trusted-substituters = [ "https://hyprland.cachix.org" ];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
];
|
];
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -71,7 +78,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# ========= Sops =========
|
# ========= Sops =========
|
||||||
environment.systemPackages = with pkgs; [sops];
|
environment.systemPackages = with pkgs; [ sops ];
|
||||||
|
|
||||||
#
|
#
|
||||||
# ========== Localization ==========
|
# ========== Localization ==========
|
||||||
|
|||||||
@@ -27,7 +27,10 @@
|
|||||||
passwordFile = "/tmp/secret.key";
|
passwordFile = "/tmp/secret.key";
|
||||||
settings = {
|
settings = {
|
||||||
allowDiscards = true;
|
allowDiscards = true;
|
||||||
crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10"];
|
crypttabExtraOpts = [
|
||||||
|
"fido2-device=auto"
|
||||||
|
"token-timeout=10"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
swapSize,
|
swapSize,
|
||||||
label,
|
label,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
disko = {
|
disko = {
|
||||||
devices = {
|
devices = {
|
||||||
disk = {
|
disk = {
|
||||||
@@ -40,7 +41,10 @@
|
|||||||
passwordFile = "/tmp/secret.key";
|
passwordFile = "/tmp/secret.key";
|
||||||
settings = {
|
settings = {
|
||||||
allowDiscards = true;
|
allowDiscards = true;
|
||||||
crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10"];
|
crypttabExtraOpts = [
|
||||||
|
"fido2-device=auto"
|
||||||
|
"token-timeout=10"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
content = {
|
content = {
|
||||||
type = "lvm_pv";
|
type = "lvm_pv";
|
||||||
@@ -66,15 +70,22 @@
|
|||||||
passwordFile = "/tmp/secret.key";
|
passwordFile = "/tmp/secret.key";
|
||||||
settings = {
|
settings = {
|
||||||
allowDiscards = true;
|
allowDiscards = true;
|
||||||
crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10"];
|
crypttabExtraOpts = [
|
||||||
|
"fido2-device=auto"
|
||||||
|
"token-timeout=10"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
extraArgs = ["-L nix -f"];
|
extraArgs = [ "-L nix -f" ];
|
||||||
subvolumes = {
|
subvolumes = {
|
||||||
"@nix" = {
|
"@nix" = {
|
||||||
mountpoint = "/nix";
|
mountpoint = "/nix";
|
||||||
mountOptions = ["subvol=nix" "compress=zstd" "noatime"];
|
mountOptions = [
|
||||||
|
"subvol=nix"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -99,11 +110,19 @@
|
|||||||
size = "100%";
|
size = "100%";
|
||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
extraArgs = ["-L" label "-f"];
|
extraArgs = [
|
||||||
|
"-L"
|
||||||
|
label
|
||||||
|
"-f"
|
||||||
|
];
|
||||||
subvolumes = {
|
subvolumes = {
|
||||||
"@root" = {
|
"@root" = {
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
mountOptions = ["subvol=root" "compress=zstd" "noatime"];
|
mountOptions = [
|
||||||
|
"subvol=root"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
swapSize,
|
swapSize,
|
||||||
label,
|
label,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
disko = {
|
disko = {
|
||||||
devices = {
|
devices = {
|
||||||
disk = {
|
disk = {
|
||||||
@@ -40,7 +41,10 @@
|
|||||||
passwordFile = "/tmp/secret.key";
|
passwordFile = "/tmp/secret.key";
|
||||||
settings = {
|
settings = {
|
||||||
allowDiscards = true;
|
allowDiscards = true;
|
||||||
crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10"];
|
crypttabExtraOpts = [
|
||||||
|
"fido2-device=auto"
|
||||||
|
"token-timeout=10"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
content = {
|
content = {
|
||||||
type = "lvm_pv";
|
type = "lvm_pv";
|
||||||
@@ -67,19 +71,35 @@
|
|||||||
size = "100%";
|
size = "100%";
|
||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
extraArgs = ["-L" label "-f"];
|
extraArgs = [
|
||||||
|
"-L"
|
||||||
|
label
|
||||||
|
"-f"
|
||||||
|
];
|
||||||
subvolumes = {
|
subvolumes = {
|
||||||
"@root" = {
|
"@root" = {
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
mountOptions = ["subvol=root" "compress=zstd" "noatime"];
|
mountOptions = [
|
||||||
|
"subvol=root"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
"@persist" = {
|
"@persist" = {
|
||||||
mountpoint = config.hostSpec.persist;
|
mountpoint = config.hostSpec.persist;
|
||||||
mountOptions = ["subvol=persist" "compress=zstd" "noatime"];
|
mountOptions = [
|
||||||
|
"subvol=persist"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
"@nix" = {
|
"@nix" = {
|
||||||
mountpoint = "/nix";
|
mountpoint = "/nix";
|
||||||
mountOptions = ["subvol=nix" "compress=zstd" "noatime"];
|
mountOptions = [
|
||||||
|
"subvol=nix"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
programs = {
|
programs = {
|
||||||
_1password.enable = true;
|
_1password.enable = true;
|
||||||
_1password-gui = {
|
_1password-gui = {
|
||||||
enable = true;
|
enable = true;
|
||||||
polkitPolicyOwners = [config.hostSpec.username];
|
polkitPolicyOwners = [ config.hostSpec.username ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
environment.systemPackages = with pkgs; [claude-code];
|
{
|
||||||
|
environment.systemPackages = with pkgs; [ claude-code ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
docker = {
|
docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -11,7 +12,11 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
containers = {registries = {search = ["docker.io"];};};
|
containers = {
|
||||||
|
registries = {
|
||||||
|
search = [ "docker.io" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
libvirtd = {
|
libvirtd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
environment.systemPackages = with pkgs; [hoppscotch];
|
{
|
||||||
|
environment.systemPackages = with pkgs; [ hoppscotch ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,14 +2,16 @@
|
|||||||
inputs,
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
programs = {
|
programs = {
|
||||||
hyprland = {
|
hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
systemd.setPath.enable = true;
|
systemd.setPath.enable = true;
|
||||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||||
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
portalPackage =
|
||||||
|
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprlock.enable = true;
|
hyprlock.enable = true;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
environment.systemPackages = with pkgs; [sbctl];
|
{
|
||||||
|
environment.systemPackages = with pkgs; [ sbctl ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
services = {
|
services = {
|
||||||
# Enable sound with pipewire.
|
# Enable sound with pipewire.
|
||||||
pulseaudio.enable = false;
|
pulseaudio.enable = false;
|
||||||
@@ -12,6 +13,5 @@
|
|||||||
};
|
};
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
environment.systemPackages =
|
environment.systemPackages = builtins.attrValues { inherit (pkgs) pavucontrol; };
|
||||||
builtins.attrValues {inherit (pkgs) pavucontrol;};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
hardware = {
|
hardware = {
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
services.fwupd.enable = true;
|
services.fwupd.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
k3s_1_35
|
k3s_1_35
|
||||||
cifs-utils
|
cifs-utils
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{config, ...}: let
|
{ config, ... }:
|
||||||
|
let
|
||||||
hostName = config.hostSpec.hostName;
|
hostName = config.hostSpec.hostName;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
services.openiscsi = {
|
services.openiscsi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
name = "iqn.2016-04.com.open-iscsi:${hostName}";
|
name = "iqn.2016-04.com.open-iscsi:${hostName}";
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
{config, ...}: let
|
{ config, ... }:
|
||||||
|
let
|
||||||
sshPort = config.hostSpec.networking.ports.tcp.ssh;
|
sshPort = config.hostSpec.networking.ports.tcp.ssh;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ports = [sshPort];
|
ports = [ sshPort ];
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
PermitRootLogin = "no";
|
PermitRootLogin = "no";
|
||||||
@@ -14,5 +16,5 @@ in {
|
|||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [sshPort];
|
networking.firewall.allowedTCPPorts = [ sshPort ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# Reminder that CUPS cpanel defaults to localhost:631
|
# Reminder that CUPS cpanel defaults to localhost:631
|
||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
services.pcscd.enable = true;
|
services.pcscd.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{ pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
services.netbird.enable = true;
|
services.netbird.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ netbird-ui ];
|
environment.systemPackages = with pkgs; [ netbird-ui ];
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
slack
|
slack
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.thunderbird = {
|
programs.thunderbird = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
# yubikey login / sudo
|
# yubikey login / sudo
|
||||||
security.pam = {
|
security.pam = {
|
||||||
u2f = {
|
u2f = {
|
||||||
@@ -11,5 +12,5 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [yubikey-manager];
|
environment.systemPackages = with pkgs; [ yubikey-manager ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
zoom-us
|
zoom-us
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -3,9 +3,11 @@
|
|||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
hostSpec = config.hostSpec;
|
hostSpec = config.hostSpec;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
specialisation.gaming.configuration = {
|
specialisation.gaming.configuration = {
|
||||||
programs = {
|
programs = {
|
||||||
steam = {
|
steam = {
|
||||||
@@ -19,15 +21,19 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users."${hostSpec.username}".imports = lib.flatten [
|
home-manager.users."${hostSpec.username}".imports = lib.flatten [
|
||||||
({config, ...}:
|
(
|
||||||
import (lib.custom.relativeToRoot
|
{ config, ... }:
|
||||||
"home/${hostSpec.username}/specialisations/gaming.nix") {
|
import (lib.custom.relativeToRoot "home/${hostSpec.username}/specialisations/gaming.nix") {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
})
|
}
|
||||||
|
)
|
||||||
];
|
];
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = "performance";
|
powerManagement.cpuFreqGovernor = "performance";
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [mangohud protonup-qt];
|
environment.systemPackages = with pkgs; [
|
||||||
|
mangohud
|
||||||
|
protonup-qt
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,12 @@
|
|||||||
lib,
|
lib,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
hostSpec = config.hostSpec;
|
hostSpec = config.hostSpec;
|
||||||
pubKeys = lib.filesystem.listFilesRecursive ./keys;
|
pubKeys = lib.filesystem.listFilesRecursive ./keys;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
users = {
|
users = {
|
||||||
mutableUsers = false;
|
mutableUsers = false;
|
||||||
users.${hostSpec.username} = {
|
users.${hostSpec.username} = {
|
||||||
@@ -19,13 +21,18 @@ in {
|
|||||||
home = hostSpec.home;
|
home = hostSpec.home;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
hashedPassword = "$y$j9T$pvjyL7hL5x2VBarGNTnMl1$mLA2UsWTbfp8Hgp/ug5l8224thi..Mo8.p7ME.tDZ.4";
|
hashedPassword = "$y$j9T$pvjyL7hL5x2VBarGNTnMl1$mLA2UsWTbfp8Hgp/ug5l8224thi..Mo8.p7ME.tDZ.4";
|
||||||
extraGroups = ["networkmanager" "wheel" "input" "libvirtd" "docker"];
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
"input"
|
||||||
|
"libvirtd"
|
||||||
|
"docker"
|
||||||
|
];
|
||||||
|
|
||||||
# Read all keys in ./keys and add them to authorizedKeys.
|
# Read all keys in ./keys and add them to authorizedKeys.
|
||||||
openssh.authorizedKeys.keys =
|
openssh.authorizedKeys.keys = lib.lists.forEach pubKeys (key: builtins.readFile key);
|
||||||
lib.lists.forEach pubKeys (key: builtins.readFile key);
|
|
||||||
|
|
||||||
packages = with pkgs; [libnotify];
|
packages = with pkgs; [ libnotify ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -35,11 +42,18 @@ in {
|
|||||||
hostSpec = config.hostSpec;
|
hostSpec = config.hostSpec;
|
||||||
};
|
};
|
||||||
users.${hostSpec.username}.imports = lib.flatten [
|
users.${hostSpec.username}.imports = lib.flatten [
|
||||||
({config, ...}:
|
(
|
||||||
import (lib.custom.relativeToRoot
|
{ config, ... }:
|
||||||
"home/${hostSpec.username}/${hostSpec.hostName}.nix") {
|
import (lib.custom.relativeToRoot "home/${hostSpec.username}/${hostSpec.hostName}.nix") {
|
||||||
inherit pkgs inputs config lib hostSpec;
|
inherit
|
||||||
})
|
pkgs
|
||||||
|
inputs
|
||||||
|
config
|
||||||
|
lib
|
||||||
|
hostSpec
|
||||||
|
;
|
||||||
|
}
|
||||||
|
)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,11 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
hostName = "aamil-1";
|
hostName = "aamil-1";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
#
|
#
|
||||||
# ========= Hardware =========
|
# ========= Hardware =========
|
||||||
@@ -21,13 +23,12 @@ in {
|
|||||||
#
|
#
|
||||||
# ========= Required Configs =========
|
# ========= Required Configs =========
|
||||||
#
|
#
|
||||||
(map lib.custom.relativeToRoot ["hosts/common/core"])
|
(map lib.custom.relativeToRoot [ "hosts/common/core" ])
|
||||||
|
|
||||||
#
|
#
|
||||||
# ========= Services =========
|
# ========= Services =========
|
||||||
#
|
#
|
||||||
(map
|
(map (s: lib.custom.relativeToRoot "hosts/common/optional/services/${s}.nix") [
|
||||||
(s: lib.custom.relativeToRoot "hosts/common/optional/services/${s}.nix") [
|
|
||||||
"k3s"
|
"k3s"
|
||||||
"openiscsi"
|
"openiscsi"
|
||||||
"openssh"
|
"openssh"
|
||||||
@@ -52,7 +53,10 @@ in {
|
|||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
require-sigs = false;
|
require-sigs = false;
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -74,11 +78,11 @@ in {
|
|||||||
|
|
||||||
security.sudo.extraRules = [
|
security.sudo.extraRules = [
|
||||||
{
|
{
|
||||||
users = ["shahab"];
|
users = [ "shahab" ];
|
||||||
commands = [
|
commands = [
|
||||||
{
|
{
|
||||||
command = "ALL";
|
command = "ALL";
|
||||||
options = ["NOPASSWD"];
|
options = [ "NOPASSWD" ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
{
|
||||||
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader = {
|
loader = {
|
||||||
@@ -19,11 +20,17 @@
|
|||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
initrd = {
|
initrd = {
|
||||||
availableKernelModules = ["ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod"];
|
availableKernelModules = [
|
||||||
kernelModules = [];
|
"ahci"
|
||||||
|
"xhci_pci"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
kernelModules = [ ];
|
||||||
};
|
};
|
||||||
kernelModules = ["kvm-amd"];
|
kernelModules = [ "kvm-amd" ];
|
||||||
extraModulePackages = [];
|
extraModulePackages = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
|||||||
@@ -3,9 +3,11 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
hostName = "aamil-2";
|
hostName = "aamil-2";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
#
|
#
|
||||||
# ========= Hardware =========
|
# ========= Hardware =========
|
||||||
@@ -21,13 +23,12 @@ in {
|
|||||||
#
|
#
|
||||||
# ========= Required Configs =========
|
# ========= Required Configs =========
|
||||||
#
|
#
|
||||||
(map lib.custom.relativeToRoot ["hosts/common/core"])
|
(map lib.custom.relativeToRoot [ "hosts/common/core" ])
|
||||||
|
|
||||||
#
|
#
|
||||||
# ========= Services =========
|
# ========= Services =========
|
||||||
#
|
#
|
||||||
(map
|
(map (s: lib.custom.relativeToRoot "hosts/common/optional/services/${s}.nix") [
|
||||||
(s: lib.custom.relativeToRoot "hosts/common/optional/services/${s}.nix") [
|
|
||||||
"k3s"
|
"k3s"
|
||||||
"openiscsi"
|
"openiscsi"
|
||||||
"openssh"
|
"openssh"
|
||||||
@@ -52,7 +53,10 @@ in {
|
|||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
require-sigs = false;
|
require-sigs = false;
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -74,11 +78,11 @@ in {
|
|||||||
|
|
||||||
security.sudo.extraRules = [
|
security.sudo.extraRules = [
|
||||||
{
|
{
|
||||||
users = ["shahab"];
|
users = [ "shahab" ];
|
||||||
commands = [
|
commands = [
|
||||||
{
|
{
|
||||||
command = "ALL";
|
command = "ALL";
|
||||||
options = ["NOPASSWD"];
|
options = [ "NOPASSWD" ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
{
|
||||||
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader = {
|
loader = {
|
||||||
@@ -19,11 +20,17 @@
|
|||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
initrd = {
|
initrd = {
|
||||||
availableKernelModules = ["nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod"];
|
availableKernelModules = [
|
||||||
kernelModules = [];
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
kernelModules = [ ];
|
||||||
};
|
};
|
||||||
kernelModules = ["kvm-amd"];
|
kernelModules = [ "kvm-amd" ];
|
||||||
extraModulePackages = [];
|
extraModulePackages = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
|||||||
@@ -3,9 +3,11 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
hostName = "aamil-3";
|
hostName = "aamil-3";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
#
|
#
|
||||||
# ========= Hardware =========
|
# ========= Hardware =========
|
||||||
@@ -21,13 +23,12 @@ in {
|
|||||||
#
|
#
|
||||||
# ========= Required Configs =========
|
# ========= Required Configs =========
|
||||||
#
|
#
|
||||||
(map lib.custom.relativeToRoot ["hosts/common/core"])
|
(map lib.custom.relativeToRoot [ "hosts/common/core" ])
|
||||||
|
|
||||||
#
|
#
|
||||||
# ========= Services =========
|
# ========= Services =========
|
||||||
#
|
#
|
||||||
(map
|
(map (s: lib.custom.relativeToRoot "hosts/common/optional/services/${s}.nix") [
|
||||||
(s: lib.custom.relativeToRoot "hosts/common/optional/services/${s}.nix") [
|
|
||||||
"k3s"
|
"k3s"
|
||||||
"openiscsi"
|
"openiscsi"
|
||||||
"openssh"
|
"openssh"
|
||||||
@@ -52,7 +53,10 @@ in {
|
|||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
require-sigs = false;
|
require-sigs = false;
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -74,11 +78,11 @@ in {
|
|||||||
|
|
||||||
security.sudo.extraRules = [
|
security.sudo.extraRules = [
|
||||||
{
|
{
|
||||||
users = ["shahab"];
|
users = [ "shahab" ];
|
||||||
commands = [
|
commands = [
|
||||||
{
|
{
|
||||||
command = "ALL";
|
command = "ALL";
|
||||||
options = ["NOPASSWD"];
|
options = [ "NOPASSWD" ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
{
|
||||||
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader = {
|
loader = {
|
||||||
@@ -19,11 +20,17 @@
|
|||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
initrd = {
|
initrd = {
|
||||||
availableKernelModules = ["nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod"];
|
availableKernelModules = [
|
||||||
kernelModules = [];
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
kernelModules = [ ];
|
||||||
};
|
};
|
||||||
kernelModules = ["kvm-amd"];
|
kernelModules = [ "kvm-amd" ];
|
||||||
extraModulePackages = [];
|
extraModulePackages = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
#
|
#
|
||||||
# ========= Hardware =========
|
# ========= Hardware =========
|
||||||
@@ -32,7 +33,7 @@
|
|||||||
#
|
#
|
||||||
# ========= Required Configs =========
|
# ========= Required Configs =========
|
||||||
#
|
#
|
||||||
(map lib.custom.relativeToRoot ["hosts/common/core"])
|
(map lib.custom.relativeToRoot [ "hosts/common/core" ])
|
||||||
|
|
||||||
#
|
#
|
||||||
# ========= Optional Configs =========
|
# ========= Optional Configs =========
|
||||||
@@ -54,8 +55,7 @@
|
|||||||
#
|
#
|
||||||
# ========= Optional Services =========
|
# ========= Optional Services =========
|
||||||
#
|
#
|
||||||
(map
|
(map (s: lib.custom.relativeToRoot "hosts/common/optional/services/${s}.nix") [
|
||||||
(s: lib.custom.relativeToRoot "hosts/common/optional/services/${s}.nix") [
|
|
||||||
"audio"
|
"audio"
|
||||||
"bluetooth"
|
"bluetooth"
|
||||||
"firmware"
|
"firmware"
|
||||||
@@ -74,7 +74,9 @@
|
|||||||
hostName = "blueocean";
|
hostName = "blueocean";
|
||||||
username = "dogar";
|
username = "dogar";
|
||||||
handle = "shadogar";
|
handle = "shadogar";
|
||||||
email = {user = "shahab.dogar@blueocean.ai";};
|
email = {
|
||||||
|
user = "shahab.dogar@blueocean.ai";
|
||||||
|
};
|
||||||
useYubikey = lib.mkForce true;
|
useYubikey = lib.mkForce true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
{
|
||||||
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd = {
|
initrd = {
|
||||||
@@ -20,12 +21,12 @@
|
|||||||
"usb_storage"
|
"usb_storage"
|
||||||
"sd_mod"
|
"sd_mod"
|
||||||
];
|
];
|
||||||
kernelModules = [];
|
kernelModules = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
kernelModules = ["kvm-amd"];
|
kernelModules = [ "kvm-amd" ];
|
||||||
extraModulePackages = [];
|
extraModulePackages = [ ];
|
||||||
binfmt.emulatedSystems = ["aarch64-linux"]; # Add other target architectures as needed
|
binfmt.emulatedSystems = [ "aarch64-linux" ]; # Add other target architectures as needed
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
@@ -38,8 +39,7 @@
|
|||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware = {
|
hardware = {
|
||||||
cpu.amd.updateMicrocode =
|
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
graphics = {
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
#
|
#
|
||||||
# ========= Hardware =========
|
# ========= Hardware =========
|
||||||
@@ -37,7 +38,7 @@
|
|||||||
#
|
#
|
||||||
# ========= Required Configs =========
|
# ========= Required Configs =========
|
||||||
#
|
#
|
||||||
(map lib.custom.relativeToRoot ["hosts/common/core"])
|
(map lib.custom.relativeToRoot [ "hosts/common/core" ])
|
||||||
|
|
||||||
#
|
#
|
||||||
# ========= Optional Configs =========
|
# ========= Optional Configs =========
|
||||||
@@ -58,8 +59,7 @@
|
|||||||
#
|
#
|
||||||
# ========= Optional Services =========
|
# ========= Optional Services =========
|
||||||
#
|
#
|
||||||
(map
|
(map (s: lib.custom.relativeToRoot "hosts/common/optional/services/${s}.nix") [
|
||||||
(s: lib.custom.relativeToRoot "hosts/common/optional/services/${s}.nix") [
|
|
||||||
"audio"
|
"audio"
|
||||||
"bluetooth"
|
"bluetooth"
|
||||||
"firmware"
|
"firmware"
|
||||||
@@ -90,7 +90,9 @@
|
|||||||
impermanance = false;
|
impermanance = false;
|
||||||
username = "shahab";
|
username = "shahab";
|
||||||
handle = "shahab96";
|
handle = "shahab96";
|
||||||
email = {user = "shahab@dogar.dev";};
|
email = {
|
||||||
|
user = "shahab@dogar.dev";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
@@ -108,9 +110,8 @@
|
|||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
initrd.postResumeCommands =
|
initrd.postResumeCommands = lib.mkIf config.hostSpec.impermanance (
|
||||||
lib.mkIf config.hostSpec.impermanance
|
lib.mkAfter ''
|
||||||
(lib.mkAfter ''
|
|
||||||
mkdir /btrfs_tmp
|
mkdir /btrfs_tmp
|
||||||
mount /dev/crypt_vg/root /btrfs_tmp
|
mount /dev/crypt_vg/root /btrfs_tmp
|
||||||
if [[ -e /btrfs_tmp/root ]]; then
|
if [[ -e /btrfs_tmp/root ]]; then
|
||||||
@@ -133,7 +134,8 @@
|
|||||||
|
|
||||||
btrfs subvolume create /btrfs_tmp/root
|
btrfs subvolume create /btrfs_tmp/root
|
||||||
umount /btrfs_tmp
|
umount /btrfs_tmp
|
||||||
'');
|
''
|
||||||
|
);
|
||||||
|
|
||||||
lanzaboote = {
|
lanzaboote = {
|
||||||
enable = config.hostSpec.secureBoot;
|
enable = config.hostSpec.secureBoot;
|
||||||
@@ -143,7 +145,10 @@
|
|||||||
|
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [pciutils bc];
|
environment.systemPackages = with pkgs; [
|
||||||
|
pciutils
|
||||||
|
bc
|
||||||
|
];
|
||||||
|
|
||||||
system.stateVersion = "25.05";
|
system.stateVersion = "25.05";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,9 @@
|
|||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
{
|
||||||
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd = {
|
initrd = {
|
||||||
@@ -19,12 +20,12 @@
|
|||||||
"usb_storage"
|
"usb_storage"
|
||||||
"sd_mod"
|
"sd_mod"
|
||||||
];
|
];
|
||||||
kernelModules = [];
|
kernelModules = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
kernelModules = ["kvm-amd"];
|
kernelModules = [ "kvm-amd" ];
|
||||||
extraModulePackages = [];
|
extraModulePackages = [ ];
|
||||||
binfmt.emulatedSystems = ["aarch64-linux"]; # Add other target architectures as needed
|
binfmt.emulatedSystems = [ "aarch64-linux" ]; # Add other target architectures as needed
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
{lib, ...}: {
|
{ lib, ... }:
|
||||||
|
{
|
||||||
relativeToRoot = lib.path.append ../.;
|
relativeToRoot = lib.path.append ../.;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
imports = [./host-spec.nix];
|
{
|
||||||
|
imports = [ ./host-spec.nix ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
options.hostSpec = {
|
options.hostSpec = {
|
||||||
username = lib.mkOption {
|
username = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
@@ -18,7 +19,7 @@
|
|||||||
description = "The email of the user";
|
description = "The email of the user";
|
||||||
};
|
};
|
||||||
networking = lib.mkOption {
|
networking = lib.mkOption {
|
||||||
default = {};
|
default = { };
|
||||||
type = lib.types.attrsOf lib.types.anything;
|
type = lib.types.attrsOf lib.types.anything;
|
||||||
description = "An attribute set of networking information";
|
description = "An attribute set of networking information";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
imports = [./yubikey-touch-detector.nix];
|
{
|
||||||
|
imports = [ ./yubikey-touch-detector.nix ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib;
|
||||||
|
let
|
||||||
cfg = config.services.yubikey-touch-detector;
|
cfg = config.services.yubikey-touch-detector;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.services.yubikey-touch-detector = {
|
options.services.yubikey-touch-detector = {
|
||||||
enable =
|
enable = mkEnableOption "a tool to detect when your YubiKey is waiting for a touch";
|
||||||
mkEnableOption
|
|
||||||
"a tool to detect when your YubiKey is waiting for a touch";
|
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
@@ -21,12 +21,11 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
socket.enable =
|
socket.enable = mkEnableOption "starting the process only when the socket is used";
|
||||||
mkEnableOption "starting the process only when the socket is used";
|
|
||||||
|
|
||||||
extraArgs = mkOption {
|
extraArgs = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = ["--libnotify"];
|
default = [ "--libnotify" ];
|
||||||
defaultText = literalExpression ''[ "--libnotify" ]'';
|
defaultText = literalExpression ''[ "--libnotify" ]'';
|
||||||
description = ''
|
description = ''
|
||||||
Extra arguments to pass to the tool. The arguments are not escaped.
|
Extra arguments to pass to the tool. The arguments are not escaped.
|
||||||
@@ -35,7 +34,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [cfg.package];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
# Service description licensed under ISC
|
# Service description licensed under ISC
|
||||||
# See https://github.com/maximbaz/yubikey-touch-detector/blob/c9fdff7163361d6323e2de0449026710cacbc08a/LICENSE
|
# See https://github.com/maximbaz/yubikey-touch-detector/blob/c9fdff7163361d6323e2de0449026710cacbc08a/LICENSE
|
||||||
@@ -47,27 +46,23 @@ in {
|
|||||||
RemoveOnStop = true;
|
RemoveOnStop = true;
|
||||||
SocketMode = "0660";
|
SocketMode = "0660";
|
||||||
};
|
};
|
||||||
Install.WantedBy = ["sockets.target"];
|
Install.WantedBy = [ "sockets.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Same license thing for the description here
|
# Same license thing for the description here
|
||||||
systemd.user.services.yubikey-touch-detector = {
|
systemd.user.services.yubikey-touch-detector = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Detects when your YubiKey is waiting for a touch";
|
Description = "Detects when your YubiKey is waiting for a touch";
|
||||||
Requires =
|
Requires = optionals cfg.socket.enable [ "yubikey-touch-detector.socket" ];
|
||||||
optionals cfg.socket.enable ["yubikey-touch-detector.socket"];
|
|
||||||
};
|
};
|
||||||
Service = {
|
Service = {
|
||||||
ExecStart = "${cfg.package}/bin/yubikey-touch-detector ${
|
ExecStart = "${cfg.package}/bin/yubikey-touch-detector ${concatStringsSep " " cfg.extraArgs}";
|
||||||
concatStringsSep " " cfg.extraArgs
|
Environment = [ "PATH=${lib.makeBinPath [ pkgs.gnupg ]}" ];
|
||||||
}";
|
|
||||||
Environment = ["PATH=${lib.makeBinPath [pkgs.gnupg]}"];
|
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = "1sec";
|
RestartSec = "1sec";
|
||||||
};
|
};
|
||||||
Install.Also =
|
Install.Also = optionals cfg.socket.enable [ "yubikey-touch-detector.socket" ];
|
||||||
optionals cfg.socket.enable ["yubikey-touch-detector.socket"];
|
Install.WantedBy = [ "default.target" ];
|
||||||
Install.WantedBy = ["default.target"];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user