Compare commits

..

No commits in common. "76455d508557936405df1c29672e97e8d2e6565e" and "a311a16c78e550056d20ad64fc9e66e588ef6689" have entirely different histories.

22 changed files with 73 additions and 66 deletions

View file

@ -134,13 +134,10 @@ nixos-install --no-root-passwd --flake .#omega
`hosts/*/hardware.nix`, while initially generated by `nixos-generate-config `hosts/*/hardware.nix`, while initially generated by `nixos-generate-config
--show-hardware-config`, _is_ manually modified. --show-hardware-config`, _is_ manually modified.
### Upgrading ### State Version
Nixpkgs uses `stateVersion` so sparingly that auditing the entire nixpkgs repo Nixpkgs uses `stateVersion` so sparingly that auditing the entire nixpkgs repo
is [easy is [easy
enough](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/NixOS/nixpkgs%24+lang:Nix+stateVersion+AND+24.05&patternType=keyword&sm=0). enough](https://sourcegraph.com/search?q=context%3Aglobal+repo%3A%5Egithub%5C.com%3FNixOS%2Fnixpkgs%24++lang%3ANix+stateVersion+AND+23.11).
Important changes to home-manager is available at
<https://nix-community.github.io/home-manager/release-notes.xhtml> and
<https://github.com/nix-community/home-manager/blob/master/modules/misc/news.nix>.
## Useful Commands ## Useful Commands

View file

@ -64,16 +64,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1716736833, "lastModified": 1716729592,
"narHash": "sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl+Rx6mcWYo0=", "narHash": "sha256-Y3bOjoh2cFBqZN0Jw1zUdyr7tjygyxl2bD/QY73GZP0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "a631666f5ec18271e86a5cde998cba68c33d9ac6", "rev": "2c78a57c544dd19b07442350727ced097e1aa6e6",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-24.05", "ref": "release-23.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -85,11 +85,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717316182, "lastModified": 1717097707,
"narHash": "sha256-Xi0EpZcu39N0eW7apLjFfUOR9y80toyjYizez7J1wMI=", "narHash": "sha256-HC5vJ3oYsjwsCaSbkIPv80e4ebJpNvFKQTBOGlHvjLs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "9b53a10f4c91892f5af87cf55d08fba59ca086af", "rev": "0eb314b4f0ba337e88123e0b1e57ef58346aafd9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -121,11 +121,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717297675, "lastModified": 1716772633,
"narHash": "sha256-43UmlS1Ifx17y93/Vc258U7bOlAAIZbu8dsGDHOIIr0=", "narHash": "sha256-Idcye44UW+EgjbjCoklf2IDF+XrehV6CVYvxR1omst4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "972a52bee3991ae1f1899e6452e0d7c01ee566d9", "rev": "ff80cb4a11bb87f3ce8459be6f16a25ac86eb2ac",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -136,11 +136,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1717248095, "lastModified": 1716987116,
"narHash": "sha256-e8X2eWjAHJQT82AAN+mCI0B68cIDBJpqJ156+VRrFO0=", "narHash": "sha256-uuEkErFVsFdg2K0cKbNQ9JlFSAm/xYqPr4rbPLI91Y8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "7b49d3967613d9aacac5b340ef158d493906ba79", "rev": "8251761f93d6f5b91cee45ac09edb6e382641009",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -152,16 +152,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1717144377, "lastModified": 1716991068,
"narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=", "narHash": "sha256-Av0UWCCiIGJxsZ6TFc+OiKCJNqwoxMNVYDBChmhjNpo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "805a384895c696f802a9bf5bf4720f37385df547", "rev": "25cf937a30bf0801447f6bf544fc7486c6309234",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-24.05", "ref": "nixos-23.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View file

@ -6,7 +6,7 @@
url = "git+ssh://git@git.caspervk.net/caspervk/nixos-secrets.git"; url = "git+ssh://git@git.caspervk.net/caspervk/nixos-secrets.git";
}; };
nixpkgs = { nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-24.05"; url = "github:NixOS/nixpkgs/nixos-23.11";
}; };
nixpkgs-unstable = { nixpkgs-unstable = {
url = "github:NixOS/nixpkgs/nixos-unstable"; url = "github:NixOS/nixpkgs/nixos-unstable";
@ -32,7 +32,7 @@
inputs.nixpkgs.follows = "nixpkgs"; # use the same nixpkgs as the system inputs.nixpkgs.follows = "nixpkgs"; # use the same nixpkgs as the system
}; };
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-24.05"; url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs"; # use the same nixpkgs as the system inputs.nixpkgs.follows = "nixpkgs"; # use the same nixpkgs as the system
}; };
home-manager-unstable = { home-manager-unstable = {

View file

@ -27,7 +27,7 @@
# this value at the release version of the first install of this system. # this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment? system.stateVersion = "23.11"; # Did you read the comment?
# This value determines the Home Manager release that your # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage
@ -36,5 +36,5 @@
# You can update Home Manager without changing this value. See # You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version # the Home Manager release notes for a list of state version
# changes in each release. # changes in each release.
home-manager.users.caspervk.home.stateVersion = "24.05"; # Did you read the comment? home-manager.users.caspervk.home.stateVersion = "23.11"; # Did you read the comment?
} }

View file

@ -25,7 +25,7 @@
# this value at the release version of the first install of this system. # this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment? system.stateVersion = "23.11"; # Did you read the comment?
# This value determines the Home Manager release that your # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage
@ -34,5 +34,5 @@
# You can update Home Manager without changing this value. See # You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version # the Home Manager release notes for a list of state version
# changes in each release. # changes in each release.
home-manager.users.caspervk.home.stateVersion = "24.05"; # Did you read the comment? home-manager.users.caspervk.home.stateVersion = "23.11"; # Did you read the comment?
} }

View file

@ -28,7 +28,7 @@
# this value at the release version of the first install of this system. # this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment? system.stateVersion = "23.11"; # Did you read the comment?
# This value determines the Home Manager release that your # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage
@ -37,5 +37,5 @@
# You can update Home Manager without changing this value. See # You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version # the Home Manager release notes for a list of state version
# changes in each release. # changes in each release.
home-manager.users.caspervk.home.stateVersion = "24.05"; # Did you read the comment? home-manager.users.caspervk.home.stateVersion = "23.11"; # Did you read the comment?
} }

View file

@ -26,7 +26,7 @@
# this value at the release version of the first install of this system. # this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment? system.stateVersion = "23.11"; # Did you read the comment?
# This value determines the Home Manager release that your # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage
@ -35,5 +35,5 @@
# You can update Home Manager without changing this value. See # You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version # the Home Manager release notes for a list of state version
# changes in each release. # changes in each release.
home-manager.users.caspervk.home.stateVersion = "24.05"; # Did you read the comment? home-manager.users.caspervk.home.stateVersion = "23.11"; # Did you read the comment?
} }

View file

@ -19,7 +19,7 @@
boot.initrd.kernelModules = ["dm-snapshot"]; boot.initrd.kernelModules = ["dm-snapshot"];
boot.kernelModules = ["kvm-amd"]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
boot.supportedFilesystems = {ntfs = true;}; boot.supportedFilesystems = ["ntfs"];
# https://elis.nu/blog/2020/05/nixos-tmpfs-as-root/ # https://elis.nu/blog/2020/05/nixos-tmpfs-as-root/
fileSystems."/" = { fileSystems."/" = {

View file

@ -37,7 +37,7 @@
# this value at the release version of the first install of this system. # this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment? system.stateVersion = "23.11"; # Did you read the comment?
# This value determines the Home Manager release that your # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage
@ -46,5 +46,5 @@
# You can update Home Manager without changing this value. See # You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version # the Home Manager release notes for a list of state version
# changes in each release. # changes in each release.
home-manager.users.caspervk.home.stateVersion = "24.05"; # Did you read the comment? home-manager.users.caspervk.home.stateVersion = "23.11"; # Did you read the comment?
} }

View file

@ -1,5 +1,6 @@
{ {
config, config,
nixpkgs-unstable,
pkgs, pkgs,
secrets, secrets,
... ...
@ -9,6 +10,8 @@
# https://wiki.nixos.org/wiki/Forgejo # https://wiki.nixos.org/wiki/Forgejo
services.forgejo = { services.forgejo = {
enable = true; enable = true;
# TODO: remove package override in NixOS 24.04
package = nixpkgs-unstable.legacyPackages.x86_64-linux.forgejo;
# Run Forgejo under git:git for better ssh clone urls. # Run Forgejo under git:git for better ssh clone urls.
user = "git"; user = "git";
group = "git"; group = "git";

View file

@ -18,7 +18,7 @@
boot.initrd.kernelModules = ["dm-snapshot"]; boot.initrd.kernelModules = ["dm-snapshot"];
boot.kernelModules = ["kvm-amd"]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
boot.supportedFilesystems = {}; boot.supportedFilesystems = [];
# https://elis.nu/blog/2020/05/nixos-tmpfs-as-root/ # https://elis.nu/blog/2020/05/nixos-tmpfs-as-root/
fileSystems."/" = { fileSystems."/" = {

View file

@ -1,4 +1,4 @@
{...}: { {nixpkgs-unstable, ...}: {
# Sonarr is an internet PVR for Usenet and Torrents. # Sonarr is an internet PVR for Usenet and Torrents.
# https://sonarr.tv/ # https://sonarr.tv/
# #
@ -14,6 +14,8 @@
# * UI: Fix retarded date formats. # * UI: Fix retarded date formats.
services.sonarr = { services.sonarr = {
enable = true; enable = true;
# Unstable for sonarr v4. TODO: remove in NixOS 24.04
package = nixpkgs-unstable.legacyPackages.x86_64-linux.sonarr;
# Use the 'torrent' group to share files amongst downloaders, indexers etc. # Use the 'torrent' group to share files amongst downloaders, indexers etc.
group = "torrent"; group = "torrent";
}; };

View file

@ -26,7 +26,7 @@
# this value at the release version of the first install of this system. # this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment? system.stateVersion = "23.11"; # Did you read the comment?
# This value determines the Home Manager release that your # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage
@ -35,5 +35,5 @@
# You can update Home Manager without changing this value. See # You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version # the Home Manager release notes for a list of state version
# changes in each release. # changes in each release.
home-manager.users.caspervk.home.stateVersion = "24.05"; # Did you read the comment? home-manager.users.caspervk.home.stateVersion = "23.11"; # Did you read the comment?
} }

View file

@ -25,7 +25,7 @@
# this value at the release version of the first install of this system. # this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment? system.stateVersion = "23.11"; # Did you read the comment?
# This value determines the Home Manager release that your # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage
@ -34,5 +34,5 @@
# You can update Home Manager without changing this value. See # You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version # the Home Manager release notes for a list of state version
# changes in each release. # changes in each release.
home-manager.users.caspervk.home.stateVersion = "24.05"; # Did you read the comment? home-manager.users.caspervk.home.stateVersion = "23.11"; # Did you read the comment?
} }

View file

@ -15,7 +15,7 @@
}; };
# TODO: these systemd networkd settings will be the default once # TODO: these systemd networkd settings will be the default once
# https://github.com/NixOS/nixpkgs/pull/264967 is merged. # https://github.com/NixOS/nixpkgs/pull/202488 is merged.
networking.useNetworkd = true; networking.useNetworkd = true;
systemd.network.enable = true; systemd.network.enable = true;
@ -50,7 +50,7 @@
# Resolved falls back to DNS servers operated by American internet # Resolved falls back to DNS servers operated by American internet
# surveillance and adtech companies by default. No thanks, I'd rather have # surveillance and adtech companies by default. No thanks, I'd rather have
# no DNS at all. # no DNS at all.
fallbackDns = []; fallbackDns = config.networking.nameservers;
}; };
# TCP BBR has significantly increased throughput and reduced latency. Note # TCP BBR has significantly increased throughput and reduced latency. Note

View file

@ -1,5 +1,4 @@
{ {
config,
nix-index-database, nix-index-database,
nixpkgs-unstable, nixpkgs-unstable,
nixpkgs, nixpkgs,
@ -36,19 +35,20 @@
# The nix registry is used to refer to flakes using symbolic identifiers # The nix registry is used to refer to flakes using symbolic identifiers
# when running commands such as `nix run nixpkgs#hello`. By default, # when running commands such as `nix run nixpkgs#hello`. By default,
# `nixpkgs` is an alias of the system's nixpkgs, but no such alias is made # the global registry from [1] is used, which aliases `nixpkgs` to the
# for unstable. # nixpkgs-unstable branch. We overwrite the default global `nixpkgs`
# registry with one which refers to the same nixpkgs as the rest of
# the system, aligning it with flake.lock.
# [1] https://github.com/NixOS/flake-registry/blob/master/flake-registry.json
registry = { registry = {
nixpkgs.flake = nixpkgs;
nixpkgs-unstable.flake = nixpkgs-unstable; nixpkgs-unstable.flake = nixpkgs-unstable;
}; };
}; };
# The system-wide garbage collection service configured above does not know # The system-wide garbage collection service configured above does not know
# about our user profile. # about our user profile. TODO: 24.04
home-manager.users.caspervk.nix.gc = { # home-manager.users.caspervk.nix.gc = config.nix.gc;
inherit (config.nix.gc) automatic options;
frequency = config.nix.gc.dates;
};
# Run unpatched dynamic binaries on NixOS. # Run unpatched dynamic binaries on NixOS.
# https://github.com/Mic92/nix-ld # https://github.com/Mic92/nix-ld

View file

@ -1,9 +1,15 @@
{home-manager, ...}: { {
home-manager,
nixpkgs-unstable,
...
}: {
# Terminal emulator # Terminal emulator
# https://codeberg.org/dnkl/foot # https://codeberg.org/dnkl/foot
home-manager.users.caspervk = { home-manager.users.caspervk = {
programs.foot = { programs.foot = {
enable = true; enable = true;
# TODO: remove version override in NixOS v24.04
package = nixpkgs-unstable.legacyPackages.x86_64-linux.foot;
# https://man.archlinux.org/man/foot.ini.5.en # https://man.archlinux.org/man/foot.ini.5.en
settings = { settings = {
main = { main = {

View file

@ -28,6 +28,6 @@
# a different service is responsible for managing the system's internet # a different service is responsible for managing the system's internet
# connection (for example, NetworkManager), this service is unnecessary and # connection (for example, NetworkManager), this service is unnecessary and
# can be disabled. # can be disabled.
# https://search.nixos.org/options?channel=24.05&show=systemd.network.wait-online.enable # https://search.nixos.org/options?channel=23.11&show=systemd.network.wait-online.enable
systemd.network.wait-online.enable = false; systemd.network.wait-online.enable = false;
} }

View file

@ -13,7 +13,6 @@
aspellDicts.en aspellDicts.en
aspellDicts.en-computers aspellDicts.en-computers
aspellDicts.en-science aspellDicts.en-science
element-desktop
firefox-wayland firefox-wayland
gimp gimp
hunspell hunspell
@ -57,8 +56,6 @@
MOZ_ENABLE_WAYLAND = 1; MOZ_ENABLE_WAYLAND = 1;
# https://wiki.archlinux.org/title/Sway#Java_applications # https://wiki.archlinux.org/title/Sway#Java_applications
_JAVA_AWT_WM_NONREPARENTING = 1; _JAVA_AWT_WM_NONREPARENTING = 1;
# https://wiki.nixos.org/wiki/Wayland
NIXOS_OZONE_WL = 1;
}; };
}; };
} }

View file

@ -15,13 +15,12 @@
package = pkgs.rofi-wayland; package = pkgs.rofi-wayland;
theme = "android_notification"; theme = "android_notification";
extraConfig = { extraConfig = {
modes = "drun"; # TODO: drun,emoji modes = "drun,emoji";
show-icons = true; show-icons = true;
}; };
# TODO plugins = with pkgs; [
# plugins = with pkgs; [ rofi-emoji
# rofi-emoji ];
# ];
}; };
}; };
} }

View file

@ -13,9 +13,13 @@
# to the mess that is IPv6. Force keepalive packets to avoid sessions # to the mess that is IPv6. Force keepalive packets to avoid sessions
# dying. See https://news.ycombinator.com/item?id=25737611. # dying. See https://news.ycombinator.com/item?id=25737611.
serverAliveInterval = 25; serverAliveInterval = 25;
# TODO: use addKeysToAgent attribute in Home Manager 24.04 instead of
# extraConfig.
extraConfig = ''
# Add ssh keys to the agent the first time we unlock them so we don't # Add ssh keys to the agent the first time we unlock them so we don't
# have to type the password all the time. # have to type the password all the time.
addKeysToAgent = "yes"; AddKeysToAgent yes
'';
}; };
}; };

View file

@ -45,7 +45,6 @@
}; };
}; };
modifier = "Mod4"; # super modifier = "Mod4"; # super
defaultWorkspace = "workspace number 1";
keybindings = lib.mkOptionDefault { keybindings = lib.mkOptionDefault {
# Menu # Menu
"Mod4+backspace" = "exec rofi -show drun"; "Mod4+backspace" = "exec rofi -show drun";
@ -140,7 +139,7 @@
src = "${pkgs.waybar}/etc/xdg/waybar"; src = "${pkgs.waybar}/etc/xdg/waybar";
installPhase = '' installPhase = ''
# JSON isn't valid if it contains comments # JSON isn't valid if it contains comments
sed 's#//.*##' config.jsonc | ${pkgs.jq}/bin/jq > $out sed 's#//.*##' config | ${pkgs.jq}/bin/jq > $out
''; '';
}; };
defaultConfig = builtins.fromJSON (lib.readFile "${mkDefaultConfig}"); defaultConfig = builtins.fromJSON (lib.readFile "${mkDefaultConfig}");