Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
4861ba8d56 | |||
6a0334cd38 | |||
aa7dcee696 |
38
flake.lock
generated
38
flake.lock
generated
@ -1,5 +1,41 @@
|
||||
{
|
||||
"nodes": {
|
||||
"disko": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726524467,
|
||||
"narHash": "sha256-xkPPPvfHhHK7BNX5ZrQ9N6AIEixCmFzRZHduDf0zv30=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "22ee467a54a3ab7fa9d637ccad5330c6c087e9dc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"dotfiles": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1725956275,
|
||||
"narHash": "sha256-4tHKP+PLpJKnFfOT6MY3p/NDBr/3NDyWljB8/iELVZs=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "b1393f4b54b8e908b770450ccc49400713d8e457",
|
||||
"revCount": 1,
|
||||
"type": "git",
|
||||
"url": "https://code.m3tam3re.com/m3tam3re/dotfiles-flake-demo.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://code.m3tam3re.com/m3tam3re/dotfiles-flake-demo.git"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@ -54,6 +90,8 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"disko": "disko",
|
||||
"dotfiles": "dotfiles",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
|
19
flake.nix
19
flake.nix
@ -17,10 +17,22 @@
|
||||
};
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
dotfiles = {
|
||||
url = "git+https://code.m3tam3re.com/m3tam3re/dotfiles-flake-demo.git";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
disko,
|
||||
dotfiles,
|
||||
home-manager,
|
||||
nixpkgs,
|
||||
...
|
||||
@ -41,14 +53,17 @@
|
||||
nixosConfigurations = {
|
||||
m3-kratos-vm = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [./hosts/m3-kratos];
|
||||
modules = [
|
||||
./hosts/m3-kratos
|
||||
inputs.disko.nixosModules.disko
|
||||
];
|
||||
};
|
||||
};
|
||||
homeConfigurations = {
|
||||
"m3tam3re@m3-kratos-vm" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
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 = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
@ -29,7 +35,7 @@
|
||||
nix = {
|
||||
package = lib.mkDefault pkgs.nix;
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
warn-dirty = false;
|
||||
};
|
||||
};
|
||||
|
@ -1,5 +1,6 @@
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./fonts.nix
|
||||
./hyprland.nix
|
||||
./wayland.nix
|
||||
];
|
||||
|
23
home/features/desktop/fonts.nix
Normal file
23
home/features/desktop/fonts.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.features.desktop.fonts;
|
||||
in {
|
||||
options.features.desktop.fonts.enable =
|
||||
mkEnableOption "install additional fonts for desktop apps";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
fira-code-nerdfont
|
||||
font-manager
|
||||
font-awesome_5
|
||||
noto-fonts
|
||||
];
|
||||
};
|
||||
}
|
8
home/m3tam3re/dotfiles/bat.nix
Normal file
8
home/m3tam3re/dotfiles/bat.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
home.file.".config/bat/config".text = ''
|
||||
--theme="Dracula"
|
||||
|
||||
# Show line numbers, Git modifications and file header (but no grid)
|
||||
--style="numbers,changes,header"
|
||||
'';
|
||||
}
|
10
home/m3tam3re/dotfiles/default.nix
Normal file
10
home/m3tam3re/dotfiles/default.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{inputs, ...}: {
|
||||
imports = [
|
||||
./bat.nix
|
||||
];
|
||||
|
||||
home.file.".config/nvim" = {
|
||||
source = "${inputs.dotfiles}/nvim";
|
||||
recursive = true;
|
||||
};
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
imports = [
|
||||
../common
|
||||
./dotfiles
|
||||
../features/cli
|
||||
../features/desktop
|
||||
./home.nix
|
||||
@ -13,6 +14,7 @@
|
||||
neofetch.enable = true;
|
||||
};
|
||||
desktop = {
|
||||
fonts.enable = true;
|
||||
hyprland.enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
|
@ -1 +0,0 @@
|
||||
../../../home/m3tam3re
|
@ -26,5 +26,5 @@
|
||||
packages = [inputs.home-manager.packages.${pkgs.system}.default];
|
||||
};
|
||||
home-manager.users.m3tam3re =
|
||||
import m3tam3re/${config.networking.hostName}.nix;
|
||||
import ../../../home/m3tam3re/${config.networking.hostName}.nix;
|
||||
}
|
||||
|
@ -4,13 +4,13 @@
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./disko-config.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/vda";
|
||||
boot.loader.grub.useOSProber = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "m3-kratos"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
36
hosts/m3-kratos/disko-config.nix
Normal file
36
hosts/m3-kratos/disko-config.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
nixos = {
|
||||
type = "disk";
|
||||
device = "/dev/vda";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
size = "1M";
|
||||
type = "EF02"; # for grub MBR
|
||||
};
|
||||
ESP = {
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,24 +1,21 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/b3fbba01-1206-44d9-9b15-72e6313b4f72";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
@ -29,4 +26,3 @@
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user