Compare commits

...

9 commits

Author SHA1 Message Date
5f7dc29d25 sway: enable sway in nixos config too, not just home-manager
Fixes an issue with xdg portals.
2023-12-01 21:53:08 +01:00
9056600dc8 23.11: syncthing config 2023-12-01 21:52:30 +01:00
206be0599b 23.11: no more need for ripgrep overlay 2023-12-01 20:57:14 +01:00
e54b354770 23.11: home-manager 2023-12-01 20:55:41 +01:00
82cec5c3e5 23.11: fonts config has been renamed 2023-12-01 18:06:47 +01:00
24b3e96009 23.11: passwordFile -> hashedPasswordFile 2023-12-01 17:53:26 +01:00
6a24fbfacf 23.11: remove workaround for network-online.target
network-online.target has been fixed to no longer time out for systems with
networking.useDHCP = true and networking.useNetworkd = true. Workarounds
for this can be removed.
2023-12-01 17:49:16 +01:00
911f90670e 23.11 2023-12-01 17:46:52 +01:00
e7b2b28818 23.11: virt-manager 2023-12-01 17:41:25 +01:00
13 changed files with 69 additions and 80 deletions

34
flake.lock generated
View file

@ -7,16 +7,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1700392168, "lastModified": 1700814205,
"narHash": "sha256-v5LprEFx3u4+1vmds9K0/i7sHjT0IYGs7u9v54iz/OA=", "narHash": "sha256-lWqDPKHRbQfi+zNIivf031BUeyciVOtwCwTjyrhDB5g=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "28535c3a34d79071f2ccb68671971ce0c0984d7e", "rev": "aeb2232d7a32530d3448318790534d196bf9427a",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-23.05", "ref": "release-23.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -28,11 +28,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1701071203, "lastModified": 1701433070,
"narHash": "sha256-lQywA7QU/vzTdZ1apI0PfgCWNyQobXUYghVrR5zuIeM=", "narHash": "sha256-Gf9JStfENaUQ7YWFz3V7x/srIwr4nlnVteqaAxtwpgM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "db1878f013b52ba5e4034db7c1b63e8d04173a86", "rev": "4a8545f5e737a6338814a4676dc8e18c7f43fc57",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -79,11 +79,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1701020860, "lastModified": 1701250978,
"narHash": "sha256-NwnRn04C8s+hH+KdVtGmVB1FFNIG7DtPJmQSCBDaET4=", "narHash": "sha256-ohu3cz4edjpGxs2qUTgbs0WrnewOX4crnUJNEB6Jox4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "b006ec52fce23b1d57f6ab4a42d7400732e9a0a2", "rev": "8772491ed75f150f02552c60694e1beff9f46013",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -95,27 +95,27 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1701053011, "lastModified": 1701263465,
"narHash": "sha256-8QQ7rFbKFqgKgLoaXVJRh7Ik5LtI3pyBBCfOnNOGkF0=", "narHash": "sha256-lNXUIlkfyDyp9Ox21hr+wsEf/IBklLvb6bYcyeXbdRc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5b528f99f73c4fad127118a8c1126b5e003b01a9", "rev": "50aa30a13c4ab5e7ba282da460a3e3d44e9d0eb3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-23.05", "ref": "nixos-23.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1700794826, "lastModified": 1701253981,
"narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=", "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8", "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -3,7 +3,7 @@
inputs = { inputs = {
nixpkgs = { nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-23.05"; url = "github:NixOS/nixpkgs/nixos-23.11";
}; };
nixpkgs-unstable = { nixpkgs-unstable = {
url = "github:NixOS/nixpkgs/nixos-unstable"; url = "github:NixOS/nixpkgs/nixos-unstable";
@ -23,7 +23,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-23.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

@ -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 = "23.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 = "23.05"; # Did you read the comment? home-manager.users.caspervk.home.stateVersion = "23.11"; # Did you read the comment?
} }

View file

@ -24,7 +24,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 = "23.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
@ -33,5 +33,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 = "23.05"; # Did you read the comment? home-manager.users.caspervk.home.stateVersion = "23.11"; # Did you read the comment?
} }

View file

@ -41,7 +41,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 = "23.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
@ -50,5 +50,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 = "23.05"; # Did you read the comment? home-manager.users.caspervk.home.stateVersion = "23.11"; # Did you read the comment?
} }

View file

@ -24,7 +24,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 = "23.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
@ -33,5 +33,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 = "23.05"; # Did you read the comment? home-manager.users.caspervk.home.stateVersion = "23.11"; # Did you read the comment?
} }

View file

@ -8,15 +8,15 @@
# TODO: The passwordfile is manually generated during the initial setup # TODO: The passwordfile is manually generated during the initial setup
# to avoid (hashed) secrets in the public git repo. It should replaced # to avoid (hashed) secrets in the public git repo. It should replaced
# with a proper secret management scheme, such as agenix. # with a proper secret management scheme, such as agenix.
passwordFile = "/nix/persist/passwordfile"; hashedPasswordFile = "/nix/persist/passwordfile";
}; };
caspervk = { caspervk = {
isNormalUser = true; isNormalUser = true;
description = "Casper V. Kristensen"; description = "Casper V. Kristensen";
# TODO: The passwordfile is manually generated during the initial setup # TODO: The hashedPasswordFile is manually generated during the initial
# to avoid (hashed) secrets in the public git repo. It should replaced # setup to avoid (hashed) secrets in the public git repo. It should
# with a proper secret management scheme, such as agenix. # replaced with a proper secret management scheme, such as agenix.
passwordFile = "/nix/persist/passwordfile"; hashedPasswordFile = "/nix/persist/passwordfile";
extraGroups = [ extraGroups = [
"wheel" # allows sudo "wheel" # allows sudo
"video" # allows controlling brightness "video" # allows controlling brightness

View file

@ -17,12 +17,4 @@
{ directory = "/etc/NetworkManager/system-connections"; user = "root"; group = "root"; mode = "0700"; } { directory = "/etc/NetworkManager/system-connections"; user = "root"; group = "root"; mode = "0700"; }
]; ];
}; };
# systemd-networkd-wait-online can timeout and fail if there are no network
# interfaces available for it to manage. When systemd-networkd is enabled but
# a different service is responsible for managing the system's internet
# connection (for example, NetworkManager), this service is unnecessary and
# can be disabled.
# https://search.nixos.org/options?channel=23.05&show=systemd.network.wait-online.enable
systemd.network.wait-online.enable = false;
} }

View file

@ -1,6 +1,11 @@
{ home-manager, lib, pkgs, ... }: { { home-manager, lib, pkgs, ... }: {
# https://nixos.wiki/wiki/Sway # https://nixos.wiki/wiki/Sway
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
};
# Polkit is required to configure sway with home-manager # Polkit is required to configure sway with home-manager
security.polkit.enable = true; security.polkit.enable = true;
@ -242,13 +247,13 @@
# https://nixos.wiki/wiki/Fonts # https://nixos.wiki/wiki/Fonts
fonts = { fonts = {
fonts = with pkgs; [ enableDefaultPackages = true;
packages = with pkgs; [
# Nerd Fonts patches glyph icons, such as from Font Awesome, into existing fonts # Nerd Fonts patches glyph icons, such as from Font Awesome, into existing fonts
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) (nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
font-awesome # waybar uses Font Awesome icons directly font-awesome # waybar uses Font Awesome icons directly
]; ];
fontDir.enable = true; # TODO? fontDir.enable = true; # TODO?
enableDefaultFonts = true;
fontconfig.defaultFonts = { fontconfig.defaultFonts = {
monospace = [ "JetBrainsMonoNL Nerd Font" ]; # NL = NoLigatures monospace = [ "JetBrainsMonoNL Nerd Font" ]; # NL = NoLigatures
}; };
@ -268,14 +273,16 @@
]; ];
# xdg portal allows applications secure access to resources outside their # xdg portal allows applications secure access to resources outside their
# sandbox. In particular, this allows screen sharing on Wayland via PipeWire # sandbox through a D-Bus interface. In particular, this allows screen
# and file open/save dialogues in Firefox. # sharing on Wayland via PipeWire and file open/save dialogues in Firefox.
# https://wiki.archlinux.org/title/XDG_Desktop_Portal # https://wiki.archlinux.org/title/XDG_Desktop_Portal
# https://mozilla.github.io/webrtc-landing/gum_test.html # https://mozilla.github.io/webrtc-landing/gum_test.html
services.dbus.enable = true;
xdg.portal = { xdg.portal = {
enable = true; enable = true;
wlr.enable = true; wlr.enable = true;
extraPortals = with pkgs; [ extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk xdg-desktop-portal-gtk
]; ];
}; };

View file

@ -1,11 +1,8 @@
{ home-manager, pkgs, ... }: { { home-manager, ... }: {
# https://nixos.wiki/wiki/Virt-manager # https://nixos.wiki/wiki/Virt-manager
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
environment.systemPackages = with pkgs; [ virt-manager ]; programs.virt-manager.enable = true;
# Virt-manager requires dconf to remember settings
programs.dconf.enable = true;
# Make virt-manager use QEMU/KVM by default # Make virt-manager use QEMU/KVM by default
home-manager.users.caspervk = { home-manager.users.caspervk = {

View file

@ -10,6 +10,7 @@
group = "users"; group = "users";
# The directory where synchronised directories will exist # The directory where synchronised directories will exist
dataDir = "/home/caspervk"; dataDir = "/home/caspervk";
settings = {
# Devices ignore their own IDs, allowing for a single configuration. # Devices ignore their own IDs, allowing for a single configuration.
# TODO: Syncthing generates a private key and ID the first time it is # TODO: Syncthing generates a private key and ID the first time it is
# started. On first install, add the devices' ID here and apply to the # started. On first install, add the devices' ID here and apply to the
@ -35,4 +36,5 @@
}; };
}; };
}; };
};
} }

View file

@ -1,5 +1,3 @@
{ ... }: { { ... }: {
imports = [ imports = [ ];
./ripgrep.nix
];
} }

View file

@ -1,7 +0,0 @@
{ home-manager, home-manager-unstable, ... }: {
# ripgrep isn't in Home Manager v23.05
home-manager.users.caspervk = {
imports = [ "${home-manager-unstable}/modules/programs/ripgrep.nix" ];
};
}