Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
be308cb16a | ||
![]() |
1f6e2b3a64 | ||
![]() |
d20945d5f3 | ||
![]() |
6a18670749 |
8
flake.lock
generated
8
flake.lock
generated
@ -38,16 +38,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1711668574,
|
"lastModified": 1724531977,
|
||||||
"narHash": "sha256-u1dfs0ASQIEr1icTVrsKwg2xToIpn7ZXxW3RHfHxshg=",
|
"narHash": "sha256-XROVLf9ti4rrNCFLr+DmXRZtPjCQTW4cYy59owTEmxk=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "219951b495fc2eac67b1456824cc1ec1fd2ee659",
|
"rev": "2527da1ef492c495d5391f3bcf9c1dd9f4514e32",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-23.11",
|
"ref": "nixos-24.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -39,16 +39,16 @@
|
|||||||
forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||||
overlays = import ./overlays {inherit inputs;};
|
overlays = import ./overlays {inherit inputs;};
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
m3-kratos = nixpkgs.lib.nixosSystem {
|
m3-kratos-vm = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs outputs;};
|
specialArgs = {inherit inputs outputs;};
|
||||||
modules = [./hosts/m3-kratos];
|
modules = [./hosts/m3-kratos];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
"m3tam3re@m3tam3re" = home-manager.lib.homeManagerConfiguration {
|
"m3tam3re@m3-kratos-vm" = home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||||
extraSpecialArgs = {inherit inputs outputs;};
|
extraSpecialArgs = {inherit inputs outputs;};
|
||||||
modules = [./home/m3tam3re/m3tam3re.nix];
|
modules = [./home/m3tam3re/m3-kratos.nix];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
{ config, lib, outputs, pkgs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
outputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
# You can add overlays here
|
# You can add overlays here
|
||||||
overlays = [
|
overlays = [
|
||||||
@ -29,7 +35,7 @@
|
|||||||
nix = {
|
nix = {
|
||||||
package = lib.mkDefault pkgs.nix;
|
package = lib.mkDefault pkgs.nix;
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
|
experimental-features = ["nix-command" "flakes"];
|
||||||
warn-dirty = false;
|
warn-dirty = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
31
home/features/cli/default.nix
Normal file
31
home/features/cli/default.nix
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./fish.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.eza = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
extraOptions = ["-l" "--icons" "--git" "-a"];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.bat = {enable = true;};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
coreutils
|
||||||
|
fd
|
||||||
|
htop
|
||||||
|
httpie
|
||||||
|
jq
|
||||||
|
procs
|
||||||
|
ripgrep
|
||||||
|
tldr
|
||||||
|
zip
|
||||||
|
];
|
||||||
|
}
|
32
home/features/cli/fish.nix
Normal file
32
home/features/cli/fish.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.features.cli.fish;
|
||||||
|
in {
|
||||||
|
options.features.cli.fish.enable = mkEnableOption "enable extended fish configuration";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
loginShellInit = ''
|
||||||
|
set -x NIX_PATH nixpkgs=channel:nixos-unstable
|
||||||
|
set -x NIX_LOG info
|
||||||
|
set -x TERMINAL kitty
|
||||||
|
|
||||||
|
if test (tty) = "/dev/tty1"
|
||||||
|
exec Hyprland &> /dev/null
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
shellAbbrs = {
|
||||||
|
".." = "cd ..";
|
||||||
|
"..." = "cd ../..";
|
||||||
|
ls = "eza";
|
||||||
|
grep = "rg";
|
||||||
|
ps = "procs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -1,10 +1,12 @@
|
|||||||
# This is a default home.nix generated by the follwing hone-manager command
|
# This is a default home.nix generated by the follwing hone-manager command
|
||||||
#
|
#
|
||||||
# home-manager init ./
|
# home-manager init ./
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
# Home Manager needs a bit of information about you and the paths it should
|
# Home Manager needs a bit of information about you and the paths it should
|
||||||
# manage.
|
# manage.
|
||||||
home.username = lib.mkDefault "your-name";
|
home.username = lib.mkDefault "your-name";
|
||||||
@ -21,7 +23,9 @@
|
|||||||
|
|
||||||
# The home.packages option allows you to install Nix packages into your
|
# The home.packages option allows you to install Nix packages into your
|
||||||
# environment.
|
# environment.
|
||||||
home.packages = [
|
home.packages = with pkgs; [
|
||||||
|
kitty
|
||||||
|
wofi
|
||||||
# # Adds the 'hello' command to your environment. It prints a friendly
|
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||||
# # "Hello, world!" when run.
|
# # "Hello, world!" when run.
|
||||||
# pkgs.hello
|
# pkgs.hello
|
||||||
|
@ -1 +1,13 @@
|
|||||||
{ config, ... }: { imports = [ ./home.nix ../common ]; }
|
{config, ...}: {
|
||||||
|
imports = [
|
||||||
|
../common
|
||||||
|
../features/cli
|
||||||
|
./home.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
features = {
|
||||||
|
cli = {
|
||||||
|
fish.enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
# Common configuration for all hosts
|
# Common configuration for all hosts
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
inputs,
|
inputs,
|
||||||
outputs,
|
outputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
imports = [
|
||||||
|
./users
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
];
|
||||||
|
home-manager = {
|
||||||
|
useUserPackages = true;
|
||||||
|
extraSpecialArgs = {inherit inputs outputs;};
|
||||||
|
};
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
# You can add overlays here
|
# You can add overlays here
|
||||||
overlays = [
|
overlays = [
|
||||||
@ -48,4 +57,5 @@
|
|||||||
((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
||||||
nixPath = ["/etc/nix/path"];
|
nixPath = ["/etc/nix/path"];
|
||||||
};
|
};
|
||||||
|
users.defaultUserShell = pkgs.fish;
|
||||||
}
|
}
|
||||||
|
3
hosts/common/users/default.nix
Normal file
3
hosts/common/users/default.nix
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
imports = [./m3tam3re.nix];
|
||||||
|
}
|
1
hosts/common/users/m3tam3re
Symbolic link
1
hosts/common/users/m3tam3re
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../home/m3tam3re
|
30
hosts/common/users/m3tam3re.nix
Normal file
30
hosts/common/users/m3tam3re.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
users.users.m3tam3re = {
|
||||||
|
initialHashedPassword = "$y$j9T$IoChbWGYRh.rKfmm0G86X0$bYgsWqDRkvX.EBzJTX.Z0RsTlwspADpvEF3QErNyCMC";
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "m3tam3re";
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"networkmanager"
|
||||||
|
"libvirtd"
|
||||||
|
"flatpak"
|
||||||
|
"audio"
|
||||||
|
"video"
|
||||||
|
"plugdev"
|
||||||
|
"input"
|
||||||
|
"kvm"
|
||||||
|
"qemu-libvirtd"
|
||||||
|
];
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC3YEmpYbM+cpmyD10tzNRHEn526Z3LJOzYpWEKdJg8DaYyPbDn9iyVX30Nja2SrW4Wadws0Y8DW+Urs25/wVB6mKl7jgPJVkMi5hfobu3XAz8gwSdjDzRSWJrhjynuaXiTtRYED2INbvjLuxx3X8coNwMw58OuUuw5kNJp5aS2qFmHEYQErQsGT4MNqESe3jvTP27Z5pSneBj45LmGK+RcaSnJe7hG+KRtjuhjI7RdzMeDCX73SfUsal+rHeuEw/mmjYmiIItXhFTDn8ZvVwpBKv7xsJG90DkaX2vaTk0wgJdMnpVIuIRBa4EkmMWOQ3bMLGkLQeK/4FUkNcvQ/4+zcZsg4cY9Q7Fj55DD41hAUdF6SYODtn5qMPsTCnJz44glHt/oseKXMSd556NIw2HOvihbJW7Rwl4OEjGaO/dF4nUw4c9tHWmMn9dLslAVpUuZOb7ykgP0jk79ldT3Dv+2Hj0CdAWT2cJAdFX58KQ9jUPT3tBnObSF1lGMI7t77VU= m3tam3re@m3-nix"
|
||||||
|
];
|
||||||
|
packages = [inputs.home-manager.packages.${pkgs.system}.default];
|
||||||
|
};
|
||||||
|
home-manager.users.m3tam3re =
|
||||||
|
import ../../../home/m3tam3re/${config.networking.hostName}.nix;
|
||||||
|
}
|
@ -46,14 +46,6 @@
|
|||||||
variant = "";
|
variant = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.m3tam3re = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "m3tam3re";
|
|
||||||
extraGroups = ["networkmanager" "wheel"];
|
|
||||||
packages = with pkgs; [];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
@ -87,6 +79,9 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.fish.enable = true;
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user