Compare commits

..

7 Commits

Author SHA1 Message Date
70a4b3195c Add wl-clipboard
Like pbcopy and pbpaste on macos for wayland.
2025-09-12 00:52:40 +02:00
72e0463e32 inherit accepts multiple args 2025-09-12 00:21:52 +02:00
726eace95c Move some stuff around 2025-09-11 23:48:52 +02:00
351608385f Move brew to separate module 2025-09-11 22:00:37 +02:00
c50f3e2578 Restructure the configuration 2025-09-11 20:06:49 +02:00
05fa93fc50 hosts -> machines 2025-09-11 18:48:14 +02:00
1d82907f8f Update nanostatus 2025-09-11 18:28:30 +02:00
43 changed files with 154 additions and 189 deletions

View File

@ -202,11 +202,11 @@
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1757371422,
"narHash": "sha256-4EEIRJE52cACFG2ik/+pU5vh8CKShwKLSSTaivGouGM=",
"lastModified": 1757604536,
"narHash": "sha256-q0zKPGRi5oW59IpYkxmjyRRLtqwsDaDFbb+oOcFpg2s=",
"owner": "larstvei",
"repo": "nanostatus",
"rev": "af0dc80af18569becbf40c77ac7380c2efc6bef6",
"rev": "9338759e13edeca8d8dc14a3b3b8485d5c2fa22e",
"type": "github"
},
"original": {

View File

@ -45,7 +45,7 @@
modules = [
home-manager.darwinModules.default
./hosts/macbook/configuration.nix
./machines/macbook
nix-rosetta-builder.darwinModules.default
{ nix-rosetta-builder.onDemand = true; }
];
@ -54,14 +54,10 @@
nixosConfigurations.thinkpad = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit nanostatus;
inherit emacs-larstvei;
inherit zen-browser;
};
specialArgs = { inherit emacs-larstvei nanostatus zen-browser; };
modules = [
home-manager.nixosModules.default
./hosts/thinkpad/configuration.nix
./machines/thinkpad
];
};
};

View File

@ -1,5 +0,0 @@
{
username = "larstvei";
userHome = "/Users/larstvei";
hostName = "larstvei-macbookpro";
}

View File

@ -1,94 +0,0 @@
{
pkgs,
nanostatus,
emacs-larstvei,
zen-browser,
...
}:
let
v = import ./variables.nix;
in
{
imports = [
../../system
../../system/nixos
./keyboard.nix
./hardware-configuration.nix
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit nanostatus;
inherit emacs-larstvei;
inherit zen-browser;
};
users.${v.username}.imports = [
../../home
../../home/desktop
];
};
services.greetd = {
enable = true;
settings = {
default_session = {
command = "hyprland";
user = v.username;
};
};
};
users.users.${v.username} = {
isNormalUser = true;
description = "Lars Tveito";
home = v.userHome;
shell = pkgs.fish;
extraGroups = [
"networkmanager"
"wheel"
];
};
networking.hostName = v.hostName;
console.keyMap = "us";
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Oslo";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable bluetooth.
hardware.bluetooth.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.05"; # Did you read the comment?
}

View File

@ -1,5 +0,0 @@
{
username = "larstvei";
userHome = "/home/larstvei";
hostName = "larstvei-think";
}

View File

@ -0,0 +1,23 @@
{ pkgs, emacs-larstvei, ... }:
{
imports = [
../../modules/base
../../modules/darwin
];
system.primaryUser = "larstvei";
networking.hostName = "larstvei-macbookpro";
users.users.larstvei = {
home = "/Users/larstvei";
shell = pkgs.fish;
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit emacs-larstvei; };
users.larstvei.imports = [ ../../modules/home ];
};
}

View File

@ -0,0 +1,60 @@
{
pkgs,
nanostatus,
emacs-larstvei,
zen-browser,
...
}:
{
imports = [
./keyboard
./hardware
../../modules/base
../../modules/nixos
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit nanostatus emacs-larstvei zen-browser; };
users.larstvei.imports = [
../../modules/home
../../modules/desktop
];
};
networking.hostName = "larstvei-think";
users.users.larstvei = {
isNormalUser = true;
description = "Lars Tveito";
home = "/home/larstvei";
shell = pkgs.fish;
extraGroups = [
"networkmanager"
"wheel"
];
};
console.keyMap = "us";
services.greetd = {
enable = true;
settings.default_session = {
command = "hyprland";
user = "larstvei";
};
};
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.05"; # Did you read the comment?
}

View File

@ -1,5 +1,11 @@
{ pkgs, ... }:
{
programs.fish.enable = true;
environment.shells = [ pkgs.fish ];
time.timeZone = "Europe/Oslo";
i18n.defaultLocale = "en_US.UTF-8";
nix = {
package = pkgs.nix;

View File

@ -1,15 +1,11 @@
{ pkgs, ... }:
{
imports = [
../../home/fonts
../fonts
../homebrew
];
nix.linux-builder.enable = true;
programs.fish.enable = true;
environment.shells = [ pkgs.fish ];
system = {
stateVersion = 4;

View File

@ -6,6 +6,7 @@
pkgs.brightnessctl
pkgs.grimblast
pkgs.pamixer
pkgs.wl-clipboard
pkgs.wtype
];

View File

@ -18,15 +18,6 @@ let
};
in
{
xdg.portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
];
config.hyprland."org.freedesktop.impl.portal.Settings" = "darkman";
};
services.darkman = {
enable = true;
settings.portal = true;

View File

@ -1,7 +1,7 @@
{
imports = [
./languages
./tools
../languages
../tools
];
programs.home-manager.enable = true;

View File

@ -1,29 +1,4 @@
{ pkgs, emacs-larstvei, ... }:
let
v = import ./variables.nix;
in
{
imports = [
../../system
../../system/darwin
];
system.primaryUser = v.username;
networking.hostName = v.hostName;
users.users.${v.username} = {
home = v.userHome;
shell = pkgs.fish;
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit emacs-larstvei; };
users.${v.username}.imports = [ ../../home ];
};
homebrew = {
enable = true;
onActivation = {

54
modules/nixos/default.nix Normal file
View File

@ -0,0 +1,54 @@
{ pkgs, ... }:
{
imports = [
../fonts
];
fonts = {
fontconfig = {
enable = true;
defaultFonts = {
serif = [ "Source Serif 4" ];
sansSerif = [ "Source Sans 3" ];
monospace = [ "Source Code Pro" ];
};
};
};
nixpkgs.config.allowUnfree = true;
programs._1password.enable = true;
programs._1password-gui.enable = true;
programs.hyprland = {
enable = true;
withUWSM = true;
package = pkgs.hyprland;
portalPackage = pkgs.xdg-desktop-portal-hyprland;
};
xdg.portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
];
config.hyprland."org.freedesktop.impl.portal.Settings" = "darkman";
};
networking.networkmanager.enable = true;
hardware.bluetooth.enable = true;
services.printing.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
}

View File

@ -1,33 +0,0 @@
{ pkgs, ... }:
{
imports = [
../../home/fonts
];
fonts = {
fontconfig = {
enable = true;
defaultFonts = {
serif = [ "Source Serif 4" ];
sansSerif = [ "Source Sans 3" ];
monospace = [ "Source Code Pro" ];
};
};
};
programs.fish.enable = true;
environment.shells = [ pkgs.fish ];
nixpkgs.config.allowUnfree = true;
programs._1password.enable = true;
programs._1password-gui.enable = true;
programs.hyprland = {
enable = true;
withUWSM = true;
package = pkgs.hyprland;
portalPackage = pkgs.xdg-desktop-portal-hyprland;
};
}