Compare commits

...

20 Commits

Author SHA1 Message Date
53768f944e chore(users/transcaffeine): use xdg folders (xdg.enable = true) 2025-10-14 18:48:40 +02:00
463ae390de chore(affogato): extra partitions for /home and /nix/store 2025-10-14 18:48:01 +02:00
bbb1edf8c3 update(flake/dotfiles): use newest version which includes kde-theme-switching 2025-10-14 18:47:12 +02:00
6bd40ea2f8 update(flake): switch nixpkgs-unstable input to flake-compatible channel tarballs 2025-10-12 11:45:07 +02:00
002a3da231 update(flake): nixpkgs-25.05, switch to flake-compatible channel tarballs 2025-10-12 11:43:33 +02:00
fc25c630dd chore(flake): remove unlocked input 'dotfiles-local' preventing flake locking 2025-10-12 11:41:56 +02:00
62b5c50bfb feat(users/transcaffeine): configure darkman using home-manager from dotfiles 2025-09-07 15:08:40 +02:00
6726127aed chore(users/transcaffeine): replace impure fetchgit with raw flake input 2025-09-07 13:45:30 +02:00
3571635616 feat(profiles/home-manager): supply special arg 'inputs' to home-manager 2025-09-07 13:34:25 +02:00
c2afc4d5ac update(flake): add dotfiles repo as raw input 2025-09-07 13:33:43 +02:00
9abb5ea152 update(flake): nixpkgs inputs (local, fork, unstable) 2025-09-07 11:15:17 +02:00
c8641c369b update: flake inputs 2025-09-06 17:28:40 +02:00
f202924393 chore(profiles/base): replace default bash prompt (PS1) to not contain a newline 2025-09-06 17:12:26 +02:00
a8dcdeef92 update: flake inputs, no longer pin kernel version for affogato 2025-08-15 17:26:54 +02:00
2f806f21e5 feat(nixos-unstable): create build user 'bob' 2025-08-08 20:36:18 +02:00
be1f305207 feat: add host 'nixos-unstable' as a testing VM 2025-07-05 12:39:50 +02:00
a24605849a feat: add nixpkgs-unstable flake input 2025-07-05 12:39:25 +02:00
a3f1352aeb chore: do not populate nix.registry.<name>.flake directly, use nixpkgs.flake.setFlakeRegistry instead 2025-07-05 12:38:29 +02:00
6fb95c5a84 refactor: move nixpkgs overlay out of profiles/base and apply to desired hosts 2025-07-05 12:37:03 +02:00
10c5f79fab chore: move user-specific aliases and packages out of profiles/base 2025-07-05 12:35:56 +02:00
13 changed files with 278 additions and 63 deletions

98
flake.lock generated
View File

@@ -1,15 +1,34 @@
{
"nodes": {
"dotfiles": {
"flake": false,
"locked": {
"lastModified": 1757262504,
"narHash": "sha256-8Hxs9m+vu/DwZtorQOFCGTld0Wlz+QKLFPjLX7J/JDU=",
"ref": "main",
"rev": "7c9567c880f414054fc427d8a2bb0c3a048104ee",
"revCount": 14,
"type": "git",
"url": "https://git.finally.coffee/transcaffeine/dotfiles.git"
},
"original": {
"ref": "main",
"type": "git",
"url": "https://git.finally.coffee/transcaffeine/dotfiles.git"
}
},
"home-manager": {
"inputs": {
"nixpkgs": "nixpkgs"
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1749154018,
"narHash": "sha256-gjN3j7joRvT3a8Zgcylnd4NFsnXeDBumqiu4HmY1RIg=",
"lastModified": 1756679287,
"narHash": "sha256-Xd1vOeY9ccDf5VtVK12yM0FS6qqvfUop8UQlxEB+gTQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "7aae0ee71a17b19708b93b3ed448a1a0952bf111",
"rev": "07fc025fe10487dd80f2ec694f1cd790e752d0e8",
"type": "github"
},
"original": {
@@ -21,11 +40,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1750431636,
"narHash": "sha256-vnzzBDbCGvInmfn2ijC4HsIY/3W1CWbwS/YQoFgdgPg=",
"lastModified": 1757103352,
"narHash": "sha256-PtT7ix43ss8PONJ1VJw3f6t2yAoGH+q462Sn8lrmWmk=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "1552a9f4513f3f0ceedcf90320e48d3d47165712",
"rev": "11b2a10c7be726321bb854403fdeec391e798bf0",
"type": "github"
},
"original": {
@@ -36,41 +55,70 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1749024892,
"narHash": "sha256-OGcDEz60TXQC+gVz5sdtgGJdKVYr6rwdzQKuZAJQpCA=",
"owner": "NixOS",
"lastModified": 1760105160,
"narHash": "sha256-oYYalpFIVeDolg/zpkPkKk8mBuvnj/lUE3/K7OuTOwk=",
"rev": "5da4a26309e796daa7ffca72df93dbe53b8164c7",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/25.05/nixos-25.05.810995.5da4a26309e7/nixexprs.tar.xz"
},
"original": {
"type": "tarball",
"url": "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz"
}
},
"nixpkgs-forked": {
"locked": {
"lastModified": 1751998018,
"narHash": "sha256-JHVI60B3/cN3a0JDfslramsO056ig5wMQTGmgO9eLWQ=",
"owner": "transcaffeine",
"repo": "nixpkgs",
"rev": "8f1b52b04f2cb6e5ead50bd28d76528a2f0380ef",
"rev": "5d91ff97e777cd2bfb8cb108907e49abcea939f4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"owner": "transcaffeine",
"ref": "nexus/3.81.1",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"nixpkgs-local": {
"locked": {
"lastModified": 1750259320,
"narHash": "sha256-H8J4H2XCIMEJ5g6fZ179QfQvsc2dUqhqfBjC8RAHNRY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9ba04bda9249d5d5e5238303c9755de5a49a79c5",
"type": "github"
"lastModified": 1757168979,
"narHash": "sha256-abp5DZtyu8idvMbPbEpBfdsxmhnNo/ud8hZ0KsbvAqs=",
"ref": "refs/heads/cinny/4.9.1",
"rev": "fc2627665df4f815f2409effcaf7bb0f427e303c",
"revCount": 855244,
"type": "git",
"url": "file:/home/transcaffeine/git/transcaffeine/nixpkgs"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
"type": "git",
"url": "file:/home/transcaffeine/git/transcaffeine/nixpkgs"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1760252326,
"narHash": "sha256-5v32B25kSE++E+KtP4DO687r/AlWL9qOlOjtYyfcDSw=",
"rev": "66e5020bfe0af40ffa127426f8405edbdadbb40b",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/unstable-small/nixos-25.11pre876242.66e5020bfe0a/nixexprs.tar.xz"
},
"original": {
"type": "tarball",
"url": "https://channels.nixos.org/nixos-unstable-small/nixexprs.tar.xz"
}
},
"root": {
"inputs": {
"dotfiles": "dotfiles",
"home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs",
"nixpkgs-forked": "nixpkgs-forked",
"nixpkgs-local": "nixpkgs-local",
"nixpkgs-unstable": "nixpkgs-unstable"
}
}
},

View File

@@ -1,11 +1,23 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
home-manager.url = "github:nix-community/home-manager/release-25.05";
nixpkgs.url = "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz";
nixpkgs-unstable.url = "https://channels.nixos.org/nixos-unstable-small/nixexprs.tar.xz";
nixpkgs-forked.url = "github:transcaffeine/nixpkgs/nexus/3.81.1";
nixpkgs-local = {
url = "git+file:/home/transcaffeine/git/transcaffeine/nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware";
dotfiles = {
url = "git+https://git.finally.coffee/transcaffeine/dotfiles.git?ref=main";
flake = false;
};
};
outputs = inputs @ { self, nixpkgs, ... }: {
outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, ... }: {
nixosConfigurations.affogato = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
@@ -13,5 +25,10 @@
];
specialArgs = { inherit inputs; };
};
nixosConfigurations.nixos-unstable = nixpkgs-unstable.lib.nixosSystem {
modules = [
./hosts/nixos-unstable
];
};
};
}

View File

@@ -11,11 +11,15 @@
../../users/leona
];
# add nixpkgs overlay
nixpkgs.overlays = [
(import ../../pkgs)
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_6_13;
boot.kernelParams = [
# disable panel self refresh for i915
#"i915.enable_psr=0"

View File

@@ -13,19 +13,30 @@
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/34d0b26e-8d69-4388-bf94-67e44669cdd8";
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/34d0b26e-8d69-4388-bf94-67e44669cdd8";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/3B4B-0489";
"/boot" = {
device = "/dev/disk/by-uuid/3B4B-0489";
fsType = "vfat";
};
"/home" = {
device = "/dev/disk/by-uuid/a836d70d-ee4d-4973-b3c0-2888d0a60095";
fsType = "btrfs";
};
"/nix/store" = {
device = "/dev/disk/by-uuid/720dd78e-7070-4d5f-a550-cd03bdde93bd";
fsType = "xfs";
};
};
swapDevices =
[ { device = "/dev/disk/by-uuid/22e2d822-7f26-4246-a28e-b10a116f2818"; }
];
swapDevices = [
{
device = "/dev/disk/by-uuid/22e2d822-7f26-4246-a28e-b10a116f2818";
}
];
boot.initrd.luks.devices."coffee".device = "/dev/disk/by-uuid/e24d653d-df2d-472b-97c3-653ee3169b1c";

View File

@@ -0,0 +1,57 @@
{ config, lib, pkgs, ... }:
{
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = "nixos-unstable"; # Define your hostname.
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
# Define a user account. Don't forget to set a password with passwd.
users.mutableUsers = false;
users.users.root.hashedPassword = "$y$j9T$i4Yx7PqpLH9bPaNb4SVLm/$dv2gVHCHiRZv.Y00rbNx4QeIExunnfHp57WEnh8qLF1";
users.users.alice = {
isNormalUser = true;
hashedPassword = "";
extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [
tree
];
};
users.users.bob = {
isNormalUser = true;
createHome = false;
group = "builders";
description = "Bob the builder";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPMChr3iWCl4ahoVsm/UyUQut9p0QIfqTsncsDkgBoRU carbon"
];
};
users.groups.builders = {};
nix.settings.trusted-users = [ "remotebuild" ];
services.nscd = {
enableNsncd = true;
workerThreads = 2;
};
environment.systemPackages = with pkgs; [
];
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
system.stateVersion = "25.05"; # Did you read the comment?
}

View File

@@ -0,0 +1,7 @@
{ inputs, pkgs, ...}: {
imports = [
./hardware-configuration.nix
./configuration.nix
../../profiles/base
];
}

View File

@@ -0,0 +1,35 @@
{ 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.initrd.systemd.enable = true;
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d696e6e0-64f1-4cb5-9ac6-57a3fd4634cc";
fsType = "btrfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/FA31-9186";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
# 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
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View File

@@ -1,10 +1,7 @@
{ inputs, pkgs, ...}: {
nixpkgs.overlays = [
(import ../../pkgs)
];
nixpkgs.config.allowUnfree = true;
nixpkgs.flake.setFlakeRegistry = true;
nix.settings.trusted-users = [ "root" "@wheel" ];
nix.registry.nixpkgs.flake = inputs.nixpkgs;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
@@ -23,8 +20,7 @@
};
};
environment.shellAliases = {
"nixos-switch" = "sudo nixos-rebuild switch --impure --flake .#";
"nom-affogato" = "nom build .#nixosConfigurations.affogato.config.system.build.toplevel --impure";
"lah" = "ls --color=auto -lah";
};
environment.variables = {
EDITOR = "vim";
@@ -41,9 +37,26 @@
bind.dnsutils
openssl
curl
wget
htop
pinentry
gnupg
sequoia
usbutils
pciutils
];
programs.bash.promptInit = ''
# Provide a nice prompt if the terminal supports it.
if [ "$TERM" != "dumb" ] || [ -n "$INSIDE_EMACS" ]; then
PROMPT_COLOR="38;5;253m"
PATH_PROMPT_COLOR="38;5;199m"
((UID)) && PROMPT_COLOR="1;32m"
if [ -n "$INSIDE_EMACS" ]; then
# Emacs term mode doesn't support xterm title escape sequence (\e]0;)
PS1="[\[\033[$PROMPT_COLOR\]\u\033[0m@\H:\033[1m\033[$PATH_PROMPT_COLOR\w\a\]\[\033[0m\]]\$ "
else
PS1="[\[\033[$PROMPT_COLOR\]\u\033[0m@\H:\033[1m\033[$PATH_PROMPT_COLOR\w\a\]\[\033[0m\]]\$ "
fi
if test "$TERM" = "xterm"; then
PS1="\[\033]2;\h:\u:\w\007\]$PS1"
fi
fi
'';
}

View File

@@ -2,4 +2,5 @@
imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
}

View File

@@ -1,4 +1,8 @@
{ pkgs, ... }: {
environment.shellAliases = {
"nixos-switch" = "sudo nixos-rebuild switch --impure --flake .#";
"nom-affogato" = "nom build .#nixosConfigurations.affogato.config.system.build.toplevel --impure";
};
users.users.transcaffeine = {
isNormalUser = true;
extraGroups = [ "wheel" ];
@@ -6,6 +10,9 @@
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCnjrKWYc0bcIsTkdpyC+yAsxSeY9M1WxVDNm3I/R3BYqyvfFuzJMQyh5APhM52yKGMN9UOuJPNPz0C4P6EY3iC3ZqUHFJ6ILrZZxdLZBVxdy2F19Xv6XcZkZxLpRKWapVFECF5z/Bi0rg1uzNRyrHjfZWcHfHIvlqxUYiitvvTbbSMQKqEV8wlnshSzBoYzaKtV1+crwlgz6wCnXq8HIupEeWfUc9kc+zunpYnuHnU5Z3HhzQGBuIiPoVritDjOo7qYREftV4qQ15xFWdezsMZlR15edwZeyNdAEx044QgaGddC8uEMoi5cp4APIqH1cEkIvSU6Y+esdgZ4CHU6M5G5ub5PTT2TaKoUMLLFtpW6QImjVApixFTHWR7tUhqInplWWLqvviS4MoI1ppxgcDUg/bgPdeDBsoRkbESr2uT8ResNi9DlPlN2rlUjlb28awzHm7agFhwfPQZ1afnFSUh0tTFz1WeR7xIGhxR1xXc8sapJhgLnYYWpR2NaJzbYYdk7CWW/3rgEsJem7Kvll6HevnFgRP/uVhEyGZl9hw+tECzvwB/LEmQ/4raDMxqOB9XO9kusJX/jTnQIObrFubfKn3ToXlYbQxZX9+QobANvQ8huILz1bBeH8aKjf9RXu+j4VNyoCKhzU/v0MIdRCsgVWgjuYXMGRo0MFMFyMqQiw== transcaffeine-openpgp:0x353A3E5B"
];
packages = with pkgs; [
pinentry
gnupg
sequoia
pass
spotify
gimp-with-plugins

View File

@@ -0,0 +1,26 @@
{
inputs,
lib,
...
}:
let
genAttrs' = xs: f: lib.listToAttrs(lib.map f xs);
in {
services.darkman = {
enable = true;
settings = {
lat = 49.0800;
lng = 8.23300;
portal = true;
dbusserver = true;
};
};
home.file = genAttrs' [ "local/share/light-mode.d" "local/share/dark-mode.d" ] (
path:
lib.nameValuePair (".${path}") {
source = lib.concatStringsSep "/" [ inputs.dotfiles path ];
target = ".${path}";
}
);
}

View File

@@ -1,19 +1,12 @@
{ lib, pkgs, ... }: {
imports = [
./darkman.nix
./git.nix
./gnupg.nix
];
home.stateVersion = "24.11";
services.darkman = {
enable = true;
settings = {
lat = 49.0800;
lng = 8.23300;
portal = true;
dbusserver = true;
};
};
xdg.enable = true;
home.preferXdgDirectories = true;
programs.firefox = import ./firefox.nix { inherit lib; };
}

View File

@@ -1,11 +1,7 @@
{ lib, config, ... }:
{ inputs, lib, config, ... }:
let
repo = (builtins.fetchGit {
url = "https://git.finally.coffee/transcaffeine/dotfiles.git";
ref = "main";
shallow = true;
});
dotfileRepo = inputs.dotfiles;
utils = import ../../../utils { inherit lib; };
in {
programs.gpg = let
@@ -16,7 +12,7 @@ in {
}) (
builtins.filter (value: value != "") (
lib.splitString "\n" (
lib.readFile (repo.outPath + "/config/gnupg/gpg.conf")
lib.readFile (dotfileRepo + "/config/gnupg/gpg.conf")
)
)
)
@@ -36,7 +32,7 @@ in {
}) (
builtins.filter (v: v != "") (
lib.splitString "\n" (
lib.readFile (repo.outPath + "/config/gnupg/gpg-agent.conf")
lib.readFile (dotfileRepo.outPath + "/config/gnupg/gpg-agent.conf")
)
)
)