made config work on nixos
This commit is contained in:
parent
b9e231d72f
commit
800f63b000
7 changed files with 605 additions and 690 deletions
89
flake.lock
89
flake.lock
|
@ -50,22 +50,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1746162366,
|
|
||||||
"narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat_2": {
|
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1696426674,
|
||||||
|
@ -81,7 +65,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat_3": {
|
"flake-compat_2": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1696426674,
|
||||||
|
@ -427,7 +411,7 @@
|
||||||
"nvf",
|
"nvf",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"rust-overlay": "rust-overlay_2"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741118843,
|
"lastModified": 1741118843,
|
||||||
|
@ -483,29 +467,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixos-cosmic": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": "flake-compat",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
|
||||||
"rust-overlay": "rust-overlay"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1747826251,
|
|
||||||
"narHash": "sha256-Fe4AXmnnAKnh/wIe1ao4Pv/8m6WGA1ujwp6VApgos30=",
|
|
||||||
"owner": "lilyinstarlight",
|
|
||||||
"repo": "nixos-cosmic",
|
|
||||||
"rev": "9a67b4a289cd8994080398d40b57cfde8e8cfb0a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "lilyinstarlight",
|
|
||||||
"repo": "nixos-cosmic",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1736012469,
|
"lastModified": 1736012469,
|
||||||
|
@ -537,22 +498,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1747676747,
|
|
||||||
"narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "72841a4a8761d1aed92ef6169a636872c986c76d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-24.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1747744144,
|
"lastModified": 1747744144,
|
||||||
|
@ -647,36 +592,14 @@
|
||||||
"nh": "nh",
|
"nh": "nh",
|
||||||
"nix-index-database": "nix-index-database",
|
"nix-index-database": "nix-index-database",
|
||||||
"nix-options-search": "nix-options-search",
|
"nix-options-search": "nix-options-search",
|
||||||
"nixos-cosmic": "nixos-cosmic",
|
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nvf": "nvf",
|
"nvf": "nvf",
|
||||||
"rust-overlay": "rust-overlay_3",
|
"rust-overlay": "rust-overlay_2",
|
||||||
"zig": "zig",
|
"zig": "zig",
|
||||||
"zls": "zls"
|
"zls": "zls"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixos-cosmic",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1747795013,
|
|
||||||
"narHash": "sha256-c7i0xJ+xFhgjO9SWHYu5dF/7lq63RPDvwKAdjc6VCE4=",
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"rev": "6b1cf12374361859242a562e1933a7930649131a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rust-overlay_2": {
|
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nvf",
|
"nvf",
|
||||||
|
@ -698,7 +621,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay_3": {
|
"rust-overlay_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
|
@ -924,7 +847,7 @@
|
||||||
},
|
},
|
||||||
"zig": {
|
"zig": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils_5",
|
"flake-utils": "flake-utils_5",
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
|
@ -944,7 +867,7 @@
|
||||||
},
|
},
|
||||||
"zig-overlay": {
|
"zig-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_3",
|
"flake-compat": "flake-compat_2",
|
||||||
"flake-utils": "flake-utils_7",
|
"flake-utils": "flake-utils_7",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"zls",
|
"zls",
|
||||||
|
|
26
flake.nix
26
flake.nix
|
@ -29,9 +29,6 @@
|
||||||
moonlight.url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly.
|
moonlight.url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly.
|
||||||
moonlight.inputs.nixpkgs.follows = "nixpkgs";
|
moonlight.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
|
|
||||||
nixos-cosmic.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
nh.url = "github:viperML/nh";
|
nh.url = "github:viperML/nh";
|
||||||
nh.inputs.nixpkgs.follows = "nixpkgs";
|
nh.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
@ -40,16 +37,13 @@
|
||||||
nix-index-database.url = "github:nix-community/nix-index-database";
|
nix-index-database.url = "github:nix-community/nix-index-database";
|
||||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
outputs =
|
outputs = {
|
||||||
{
|
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
lix-module,
|
lix-module,
|
||||||
nixos-cosmic,
|
|
||||||
darwin,
|
darwin,
|
||||||
...
|
...
|
||||||
}@inputs:
|
} @ inputs: let
|
||||||
let
|
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
# TODO: apply these overlays sooner and remove uses of legacyPackages elsewhere.
|
# TODO: apply these overlays sooner and remove uses of legacyPackages elsewhere.
|
||||||
overlays = [
|
overlays = [
|
||||||
|
@ -75,8 +69,7 @@
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
"aarch64-darwin"
|
"aarch64-darwin"
|
||||||
];
|
];
|
||||||
forAllSystems =
|
forAllSystems = f:
|
||||||
f:
|
|
||||||
builtins.listToAttrs (
|
builtins.listToAttrs (
|
||||||
builtins.map (system: {
|
builtins.map (system: {
|
||||||
name = system;
|
name = system;
|
||||||
|
@ -87,7 +80,8 @@
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}) systems
|
})
|
||||||
|
systems
|
||||||
);
|
);
|
||||||
|
|
||||||
mkSystem = import ./lib/mkSystem.nix {
|
mkSystem = import ./lib/mkSystem.nix {
|
||||||
|
@ -107,8 +101,7 @@
|
||||||
inputs
|
inputs
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
in
|
in rec {
|
||||||
rec {
|
|
||||||
inherit self;
|
inherit self;
|
||||||
# "nix fmt"
|
# "nix fmt"
|
||||||
formatter = forAllSystems (inputs: inputs.pkgs.nixfmt-tree);
|
formatter = forAllSystems (inputs: inputs.pkgs.nixfmt-tree);
|
||||||
|
@ -130,7 +123,6 @@
|
||||||
host = "desktop";
|
host = "desktop";
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
extraModules = [
|
extraModules = [
|
||||||
nixos-cosmic.nixosModules.default
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
# natalie's laptop
|
# natalie's laptop
|
||||||
|
@ -156,11 +148,9 @@
|
||||||
# generate checks for "nix flake check --all-systems --no-build"
|
# generate checks for "nix flake check --all-systems --no-build"
|
||||||
checks.aarch64-darwin = builtins.listToAttrs (
|
checks.aarch64-darwin = builtins.listToAttrs (
|
||||||
builtins.map (
|
builtins.map (
|
||||||
name:
|
name: let
|
||||||
let
|
|
||||||
d = darwinConfigurations.${name}.system;
|
d = darwinConfigurations.${name}.system;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
name = "darwinConfiguration-" + d.name;
|
name = "darwinConfiguration-" + d.name;
|
||||||
value = d;
|
value = d;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
host,
|
host,
|
||||||
mainHomeImports,
|
mainHomeImports,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.programs;
|
cfg = config.programs;
|
||||||
in
|
in {
|
||||||
{
|
imports =
|
||||||
imports = mainHomeImports ++ [
|
mainHomeImports
|
||||||
|
++ [
|
||||||
./macos/sketchybar.nix
|
./macos/sketchybar.nix
|
||||||
];
|
];
|
||||||
programs = {
|
programs = {
|
||||||
|
|
|
@ -2,9 +2,12 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
host,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
home.file =
|
home.file =
|
||||||
|
{}
|
||||||
|
// lib.optionalAttrs host.darwin (
|
||||||
lib.attrsets.mapAttrs (file: value: (
|
lib.attrsets.mapAttrs (file: value: (
|
||||||
lib.attrsets.overrideExisting value {enable = config.shared.darwin.tiling.enable;}
|
lib.attrsets.overrideExisting value {enable = config.shared.darwin.tiling.enable;}
|
||||||
)) {
|
)) {
|
||||||
|
@ -531,5 +534,6 @@
|
||||||
esac
|
esac
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
services = {
|
services = {
|
||||||
avahi = {
|
avahi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -24,6 +23,7 @@
|
||||||
|
|
||||||
desktopManager.cosmic.enable = true;
|
desktopManager.cosmic.enable = true;
|
||||||
displayManager.cosmic-greeter.enable = true;
|
displayManager.cosmic-greeter.enable = true;
|
||||||
|
desktopManager.cosmic.xwayland.enable = true;
|
||||||
|
|
||||||
# Auto mount devices
|
# Auto mount devices
|
||||||
udisks2 = {
|
udisks2 = {
|
||||||
|
|
|
@ -24,13 +24,11 @@
|
||||||
"https://cache.nixos.org/?priority=10"
|
"https://cache.nixos.org/?priority=10"
|
||||||
|
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
"https://cosmic.cachix.org/"
|
|
||||||
# For haskell
|
# For haskell
|
||||||
"https://cache.iog.io"
|
"https://cache.iog.io"
|
||||||
];
|
];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
|
|
||||||
# For haskell
|
# For haskell
|
||||||
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
|
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
|
||||||
];
|
];
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
user,
|
user,
|
||||||
host,
|
host,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
@ -84,8 +83,6 @@
|
||||||
hybrid-sleep.enable = false;
|
hybrid-sleep.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = [ pkgs.observatory ];
|
|
||||||
|
|
||||||
services.monitord.wantedBy = ["multi-user.target"];
|
services.monitord.wantedBy = ["multi-user.target"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -148,7 +145,10 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
environment = {
|
environment = {
|
||||||
sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1;
|
sessionVariables = {
|
||||||
|
COSMIC_DATA_CONTROL_ENABLED = 1;
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
|
};
|
||||||
variables.EDITOR = "nvim";
|
variables.EDITOR = "nvim";
|
||||||
|
|
||||||
systemPackages = with pkgs; [
|
systemPackages = with pkgs; [
|
||||||
|
|
Loading…
Reference in a new issue