Compare commits
25 Commits
a5511710a3
...
dd96ede0c8
Author | SHA1 | Date | |
---|---|---|---|
dd96ede0c8 | |||
25bc410fdd | |||
ac70365221 | |||
1c46f39e6d | |||
e0dc5888d8 | |||
dbde974faa | |||
cb534abacd | |||
92d8a0e76e | |||
09e4a7cb46 | |||
48c3a93156 | |||
232cec6c0e | |||
745f103304 | |||
a0b5f5b5c4 | |||
8db057bc42 | |||
f27298fa9f | |||
e6a3d4b7db | |||
cd200e0d1b | |||
4c45aa0005 | |||
bf73460fe7 | |||
3b839f957f | |||
abc25ef6ae | |||
fd6a01a1df | |||
57f260920f | |||
fac2369ac9 | |||
3a75c8c938 |
34
flake.lock
34
flake.lock
@ -7,31 +7,32 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709756385,
|
||||
"narHash": "sha256-EwAsCWfjLnq6Rzh9c95ThPhTTOQkY/R9ZROPUfhtHmE=",
|
||||
"lastModified": 1710888565,
|
||||
"narHash": "sha256-s9Hi4RHhc6yut4EcYD50sZWRDKsugBJHSbON8KFwoTw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "ad9254cd9af9165000ecd6ef9c23c2b8ceda01c7",
|
||||
"rev": "f33900124c23c4eca5831b9b5eb32ea5894375ce",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-23.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1709479366,
|
||||
"narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=",
|
||||
"lastModified": 1712168706,
|
||||
"narHash": "sha256-XP24tOobf6GGElMd0ux90FEBalUtw6NkBSVh/RlA6ik=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b8697e57f10292a6165a20f03d2f42920dfaf973",
|
||||
"rev": "1487bdea619e4a7a53a4590c475deabb5a9d1bfb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"ref": "nixos-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
@ -56,7 +57,8 @@
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"sops-nix": "sops-nix"
|
||||
"sops-nix": "sops-nix",
|
||||
"unstable": "unstable"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
@ -79,6 +81,22 @@
|
||||
"repo": "sops-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1712163089,
|
||||
"narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "fd281bd6b7d3e32ddfa399853946f782553163b5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
23
flake.nix
23
flake.nix
@ -2,10 +2,12 @@
|
||||
description = "Nixos config flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
|
||||
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
@ -23,10 +25,23 @@
|
||||
...
|
||||
} @ inputs: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
unstable = final: prev: {
|
||||
unstable = import inputs.unstable {
|
||||
system = final.system;
|
||||
config = final.config;
|
||||
};
|
||||
};
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [unstable];
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in {
|
||||
nixosConfigurations."MaxNixosLaptop" = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
inherit pkgs;
|
||||
};
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/MaxNixosLaptop/configuration.nix
|
||||
|
@ -21,6 +21,20 @@
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
libvdpau-va-gl
|
||||
libvdpau
|
||||
libva
|
||||
rocmPackages.clr.icd
|
||||
amdvlk
|
||||
driversi686Linux.amdvlk
|
||||
];
|
||||
};
|
||||
|
||||
hardware.spacenavd.enable = true;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
@ -69,13 +83,10 @@
|
||||
users.users.max = {
|
||||
isNormalUser = true;
|
||||
description = "Max Känner";
|
||||
extraGroups = ["networkmanager" "wheel"];
|
||||
extraGroups = ["networkmanager" "wheel" "libvirtd"];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
users = {
|
||||
@ -89,11 +100,37 @@
|
||||
neovim
|
||||
wget
|
||||
fprintd
|
||||
qemu
|
||||
quickemu
|
||||
home-manager
|
||||
(let
|
||||
base = pkgs.appimageTools.defaultFhsEnvArgs;
|
||||
in
|
||||
pkgs.buildFHSUserEnv (base
|
||||
// {
|
||||
name = "fhs";
|
||||
targetPkgs = pkgs: (
|
||||
# pkgs.buildFHSUserEnv provides only a minimal FHS environment,
|
||||
# lacking many basic packages needed by most software.
|
||||
# Therefore, we need to add them manually.
|
||||
#
|
||||
# pkgs.appimageTools provides basic packages required by most software.
|
||||
(base.targetPkgs pkgs)
|
||||
++ [
|
||||
pkg-config
|
||||
ncurses
|
||||
# Feel free to add more packages here if needed.
|
||||
]
|
||||
);
|
||||
profile = "export FHS=1";
|
||||
runScript = "bash";
|
||||
extraOutputsToInstall = ["dev"];
|
||||
}))
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
nerdfonts
|
||||
montserrat
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
@ -119,6 +156,24 @@
|
||||
enable = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
package = pkgs.qemu_kvm;
|
||||
runAsRoot = true;
|
||||
swtpm.enable = true;
|
||||
ovmf = {
|
||||
enable = true;
|
||||
packages = [
|
||||
(pkgs.unstable.OVMF.override {
|
||||
secureBoot = true;
|
||||
tpmSupport = true;
|
||||
})
|
||||
.fd
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# List services that you want to enable:
|
||||
@ -132,9 +187,30 @@
|
||||
};
|
||||
services.blueman.enable = true;
|
||||
|
||||
services.udev.extraRules = ''
|
||||
services.udisks2.enable = true;
|
||||
|
||||
services.udev = {
|
||||
enable = true;
|
||||
packages = with pkgs; [
|
||||
picoprobe-udev-rules
|
||||
teensy-udev-rules
|
||||
qmk-udev-rules
|
||||
game-devices-udev-rules
|
||||
android-udev-rules
|
||||
];
|
||||
extraRules = ''
|
||||
ACTION=="add", KERNEL=="event[0-9]*", DEVPATH="/devices/platform/AMDI0010:02/i2c-2/i2c-ELAN2513:00/0018:04F3:2D9C.0001/input/input[0-9]*/event[0-9]*", SYMLINK+="touchscreen0"
|
||||
'';
|
||||
};
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
jack.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
@ -27,8 +26,6 @@
|
||||
home.username = "max";
|
||||
home.homeDirectory = "/home/max";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
@ -46,7 +43,6 @@
|
||||
firefox
|
||||
thunderbird
|
||||
xournalpp
|
||||
kicad
|
||||
prismlauncher
|
||||
steam
|
||||
blender
|
||||
@ -55,22 +51,21 @@
|
||||
youtube-dl
|
||||
dconf
|
||||
distrobox
|
||||
gyroflow
|
||||
libqalculate
|
||||
sops
|
||||
pwvucontrol
|
||||
qpwgraph
|
||||
(pkgs.discord.override {
|
||||
withOpenASAR = true;
|
||||
withVencord = true;
|
||||
})
|
||||
vesktop
|
||||
discord
|
||||
libreoffice-fresh
|
||||
mate.caja
|
||||
kdePackages.okular
|
||||
libsForQt5.okular
|
||||
mpv
|
||||
gimp
|
||||
freecad
|
||||
flatpak
|
||||
wine
|
||||
unstable.gyroflow
|
||||
prusa-slicer
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
@ -81,6 +76,12 @@
|
||||
|
||||
services.nextcloud-client.enable = true;
|
||||
|
||||
services.udiskie = {
|
||||
enable = true;
|
||||
automount = true;
|
||||
notify = true;
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
|
@ -99,6 +99,9 @@ in {
|
||||
HDMI-A-1 = {
|
||||
bg = "'${bg4k}' fit";
|
||||
};
|
||||
DP-3 = {
|
||||
bg = "'${bg1080}' fit";
|
||||
};
|
||||
DP-4 = {
|
||||
bg = "'${bg1080}' fit";
|
||||
};
|
||||
@ -208,11 +211,11 @@ in {
|
||||
workspaceOutputAssign = [
|
||||
{
|
||||
workspace = "main";
|
||||
output = ["DP-4" "DP-6" "HDMI-A-1" "eDP-1"];
|
||||
output = ["DP-3" "DP-4" "DP-6" "HDMI-A-1" "eDP-1"];
|
||||
}
|
||||
{
|
||||
workspace = "term";
|
||||
output = ["DP-5" "DP-7" "eDP-1"];
|
||||
output = ["DP-5" "DP-4" "DP-7" "eDP-1"];
|
||||
}
|
||||
{
|
||||
workspace = "msg";
|
||||
@ -224,7 +227,7 @@ in {
|
||||
}
|
||||
{
|
||||
workspace = "5";
|
||||
output = ["DP-4" "DP-6" "HDMI-A-1" "eDP-1"];
|
||||
output = ["DP-3" "DP-4" "DP-6" "HDMI-A-1" "eDP-1"];
|
||||
}
|
||||
];
|
||||
|
||||
@ -463,6 +466,30 @@ in {
|
||||
"${pkgs.sway}/bin/swaymsg workspace 5, move workspace to DP-6"
|
||||
];
|
||||
};
|
||||
dock_luhbots4 = {
|
||||
outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "1080,1080";
|
||||
}
|
||||
{
|
||||
criteria = "Dell Inc. DELL P2422HE 4BXL9M3";
|
||||
position = "1080,0";
|
||||
}
|
||||
{
|
||||
criteria = "NEC Corporation E243WMi 75309334NB";
|
||||
transform = "90";
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
exec = [
|
||||
"${pkgs.sway}/bin/swaymsg workspace 1, move workspace to DP-3"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 2, move workspace to DP-4"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 3, move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 4, move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg workspace 5, move workspace to DP-3"
|
||||
];
|
||||
};
|
||||
laptop_hannspree = {
|
||||
outputs = [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user