initial commit
This commit is contained in:
commit
ddd861496e
16 changed files with 361 additions and 0 deletions
8
all.nix
Normal file
8
all.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./users/all.nix
|
||||
./programs/all.nix
|
||||
];
|
||||
}
|
||||
96
flake.lock
generated
Normal file
96
flake.lock
generated
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
{
|
||||
"nodes": {
|
||||
"haumea": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1708375098,
|
||||
"narHash": "sha256-DaFJp3wDHgOqx98U0SF57bXaH2Orp106c+jSdPCVu1E=",
|
||||
"owner": "nix-community",
|
||||
"repo": "haumea",
|
||||
"rev": "ec6350fd9353e7f27ce0e85d31f82e3ed73e4d70",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "haumea",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1765860045,
|
||||
"narHash": "sha256-7Lxp/PfOy4h3QIDtmWG/EgycaswqRSkDX4DGtet14NE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "09de9577d47d8bffb11c449b6a3d24e32ac16c99",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1681001314,
|
||||
"narHash": "sha256-5sDnCLdrKZqxLPK4KA8+f4A3YKO/u6ElpMILvX0g72c=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "367c0e1086a4eb4502b24d872cea2c7acdd557f4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1765472234,
|
||||
"narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1764983851,
|
||||
"narHash": "sha256-y7RPKl/jJ/KAP/VKLMghMgXTlvNIJMHKskl8/Uuar7o=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d9bc5c7dceb30d8d6fafa10aeb6aa8a48c218454",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"haumea": "haumea",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
27
flake.nix
Normal file
27
flake.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
inputs = {
|
||||
# This is pointing to an unstable release.
|
||||
# If you prefer a stable release instead, you can this to the latest number shown here: https://nixos.org/download
|
||||
# i.e. nixos-24.11
|
||||
# Use `nix flake update` to update the flake to the latest revision of the chosen release channel.
|
||||
haumea.url = "github:nix-community/haumea";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
};
|
||||
outputs = inputs@{ self, nixpkgs, home-manager, ... }: {
|
||||
# NOTE: 'nixos' is the default hostname
|
||||
nixosConfigurations = {
|
||||
galen = nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
}
|
||||
./systems/galen/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
10
programs/all.nix
Normal file
10
programs/all.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./default.nix
|
||||
./git.nix
|
||||
./home-manager.nix
|
||||
./lix.nix
|
||||
];
|
||||
}
|
||||
5
programs/default.nix
Normal file
5
programs/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.git.enable = true;
|
||||
}
|
||||
10
programs/git.nix
Normal file
10
programs/git.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = [{
|
||||
init.defaultBranch = "main";
|
||||
}];
|
||||
};
|
||||
}
|
||||
5
programs/home-manager.nix
Normal file
5
programs/home-manager.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ home-manager, ... }:
|
||||
|
||||
{
|
||||
home-manager.backupFileExtension = "backup";
|
||||
}
|
||||
13
programs/lix.nix
Normal file
13
programs/lix.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.overlays = [ (final: prev: {
|
||||
inherit (prev.lixPackageSets.stable)
|
||||
nixpkgs-review
|
||||
nix-eval-jobs
|
||||
nix-fast-build
|
||||
colmena;
|
||||
}) ];
|
||||
|
||||
nix.package = pkgs.lixPackageSets.stable.lix;
|
||||
}
|
||||
32
systems/galen/configuration.nix
Normal file
32
systems/galen/configuration.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../all.nix
|
||||
];
|
||||
|
||||
users.mara.enable = true;
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
networking.hostName = "galen";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
i18n.defaultLocale = "en_IE.UTF-8";
|
||||
console = {
|
||||
keyMap = "de";
|
||||
};
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
32
systems/galen/hardware-configuration.nix
Normal file
32
systems/galen/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# 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")
|
||||
];
|
||||
|
||||
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/637c5040-7824-4308-bb4b-32b486cb326d";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/1A25-9FA7";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/b89cb4bb-b75e-4479-9023-cc338835bb74"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
7
users/all.nix
Normal file
7
users/all.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./mara/config.nix
|
||||
];
|
||||
}
|
||||
11
users/home-default.nix
Normal file
11
users/home-default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ osConfig, ... }:
|
||||
|
||||
{
|
||||
programs.home-manager.enable = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home = {
|
||||
stateVersion = osConfig.system.stateVersion;
|
||||
enableNixpkgsReleaseCheck = false;
|
||||
};
|
||||
}
|
||||
41
users/mara/config.nix
Normal file
41
users/mara/config.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ config, lib, pkgs, home-manager, ... }:
|
||||
|
||||
let
|
||||
cfg = config.users.mara;
|
||||
in
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
options.users.mara.enable = mkEnableOption "Enable the user Mara";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.mara = { config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../home-default.nix
|
||||
./config/all.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
username = "mara";
|
||||
homeDirectory = "/home/mara";
|
||||
};
|
||||
};
|
||||
|
||||
programs.fish.enable = true;
|
||||
|
||||
users.users.mara = {
|
||||
isNormalUser = true;
|
||||
description = "Mara";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"docker"
|
||||
"adbusers"
|
||||
];
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
};
|
||||
}
|
||||
8
users/mara/config/all.nix
Normal file
8
users/mara/config/all.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./fish.nix
|
||||
./helix.nix
|
||||
];
|
||||
}
|
||||
24
users/mara/config/fish.nix
Normal file
24
users/mara/config/fish.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
||||
interactiveShellInit = ''
|
||||
set fish_greeting
|
||||
'';
|
||||
|
||||
functions = {
|
||||
fish_prompt.body = ''
|
||||
printf '%s %s > ' (set_color purple)(whoami)@(prompt_hostname) (set_color blue)(prompt_pwd)(set_color normal)
|
||||
'';
|
||||
|
||||
fish_right_prompt.body = ''
|
||||
set stat $status
|
||||
set -g __fish_git_prompt_showupstream verbose
|
||||
set -g __fish_git_prompt_showcolorhints 1
|
||||
printf '%s %s' (fish_vcs_prompt) [(set_color red)$stat(set_color normal)]
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
32
users/mara/config/helix.nix
Normal file
32
users/mara/config/helix.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
settings = {
|
||||
theme = "catppuccin_macchiato";
|
||||
editor = {
|
||||
cursorline = true;
|
||||
color-modes = true;
|
||||
true-color = true;
|
||||
cursor-shape.insert = "bar";
|
||||
indent-guides.render = true;
|
||||
};
|
||||
};
|
||||
|
||||
languages.language = [
|
||||
{
|
||||
name = "nix";
|
||||
auto-format = true;
|
||||
formatter.command = "${pkgs.nixfmt}/bin/nixfmt";
|
||||
}
|
||||
];
|
||||
|
||||
themes.catppuccin_macchiato = {
|
||||
inherits = "catppuccin_macchiato";
|
||||
"ui.background" = { };
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue